From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dan Hitt Newsgroups: gmane.emacs.help Subject: Re: Fix the destroyed disk image partition table in a raw image file using Emacs. Date: Sun, 11 Apr 2021 12:56:56 -0700 Message-ID: References: <20210411184546.GG30008@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17859"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs , Hongyi Zhao To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 11 21:57:59 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVgDW-0004X2-VG for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 21:57:58 +0200 Original-Received: from localhost ([::1]:60482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVgDV-0006PJ-SP for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 15:57:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVgCl-0006PB-0i for help-gnu-emacs@gnu.org; Sun, 11 Apr 2021 15:57:11 -0400 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:41591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVgCj-0004mH-38 for help-gnu-emacs@gnu.org; Sun, 11 Apr 2021 15:57:10 -0400 Original-Received: by mail-wm1-x32b.google.com with SMTP id t5-20020a1c77050000b029010e62cea9deso5715864wmi.0 for ; Sun, 11 Apr 2021 12:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NzNa7XrkrYQQnCTQ9L/jb9ejUQ7RsrlIt3cJVL2YwyU=; b=AUe6+K6wYkhDOKzYPB3lbccnImeuH2KbyAfFY/j09FhHPcdyxr5GeY3s3bCFpWJvLn T4fNJHi/dFzmGSxTMqB9OJ0ppFgBDL9t8wMix2bjUkgCC9NRPbJkDebHh7JqbK7TBLry IyjbVQ6oKxBtBzxypl1QLfV259kaBEkEU91O5TKO/k8ap3jtjCzjhbG0r2paxSp5B19l mhKIe/zs5JE8g3lNRPByarWZXPg6RYJTbsuZ6UYT1oqoGefqdywDPN43YOQFSaVpEd5l 5GUmUGYfLi9fs5vxV+bdlLUcdvbLRc9rWiSnEm4eaL8Eatq6ZK6wMPM46bx/4KjYr9TL w5UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NzNa7XrkrYQQnCTQ9L/jb9ejUQ7RsrlIt3cJVL2YwyU=; b=ppVvGl5t4Bk9T/HjsAipnZvgxbALm057mcSMLmmmxq69LMYkf4+mc4SwOeeJH4/9SB 0OM4MqPGKKs+iu16WIBz44ItKufPyjm46R6u5n51Q0OPBeNHlZ1zEGjSOjlmmsu5VJs9 evxS6C/WjPWyRPaXsAtrNbdlxK9usYPcTNZTVAazd8gvFKfTFmqjaCd4bU+iohhOyjpW EiHje0qz/H3WtiIgKuCj0eRfjsn1D3mE/rypj6jl2d9AdDZsZsEy4XccYiw6cxpxyUJs PxvIDRlijG3jNkWlgcd4e/ixQX8908s5wal1ZSvLuxLm6OhmWjW2didWdfI7f6C4RD/j ZsKA== X-Gm-Message-State: AOAM5308dR3tAshmkQoBGEI/eZk5Rrud71BaTIiSyeVSPusLE10EeDYF G3fIEK9GUPDbPrxINzIlLH9Phzv+9gZYpjAac+c= X-Google-Smtp-Source: ABdhPJxhS2xmfX1AnixOWHECRo9A9K0cIl0ZIykm8MSg3cOYBV32rw3xizvv9HHlHJ87XXi6vwDbWPf037Oc686TerQ= X-Received: by 2002:a1c:b48b:: with SMTP id d133mr12358250wmf.182.1618171027360; Sun, 11 Apr 2021 12:57:07 -0700 (PDT) In-Reply-To: <20210411184546.GG30008@tuxteam.de> Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=dan.hitt@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128954 Archived-At: On Sun, Apr 11, 2021 at 11:45 AM wrote: > On Sun, Apr 11, 2021 at 10:26:26AM -0700, Dan Hitt wrote: > > On Sun, Apr 11, 2021 at 6:41 AM Jean Louis wrote: > > > > > * Hongyi Zhao [2021-04-11 16:35]: > > > > It's well known that Emacs is an 8-bit clean editor which makes it > > > > safe to edit binary files. So, I want to whether I can fix the above > > > > destroyed disk image file with Emacs for my scenario. > > > > > > There is hexl library: > > > > > > ;; This package implements a major mode for editing binary files. It > uses > > > ;; a program called hexl, supplied with the GNU Emacs distribution, > that > > > ;; can filter a binary into an editable format or from the format back > into > > > ;; binary. For full instructions, invoke `hexl-mode' on an empty > buffer > > > and > > > ;; do M-x `describe-mode'. > > > > > > But I guess you need `hexl' program. > > > > > > -- > > > Jean > > > > > > > Hi Jean, > > > > hexl-mode works for me on my xubuntu 20.04 system, and i do not have a > > program called 'hexl'. > > Look around somewhere (Debian here) > > /usr/lib/emacs//x86_64-linux-gnu/hexl > > Replace by your Emacs version and x86_64-linux-gnu by some > appropriate architecture string. > OK, i guess i do have it after all :) Thanks for pointing out the path, and the suggestion to use apt-file. One thing i notice about hexl, is that although it must surely be a gnu program, based on its path, it does not understand either the --help or the --version command line options. Anyhow, i hope the OP can use hexl-mode if he can't find any better, more specific tools. dan > > Of course, i don't know if my system is secretly using some other program > > which does the same thing as hexl. > > It's all in the open ;-) > > Hint: apt-file search finds such things, even if you haven't installed > a package. Package apt-file. Very much recommended. > > Cheers > - t >