From owner-freebsd-questions@freebsd.org Tue Apr 3 04:14:12 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C508AF7F98B for ; Tue, 3 Apr 2018 04:14:11 +0000 (UTC) (envelope-from jmvandette@securenet.net) Received: from ms.securenet.net (ms.securenet.net [205.236.147.20]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7241E846CE for ; Tue, 3 Apr 2018 04:14:11 +0000 (UTC) (envelope-from jmvandette@securenet.net) Received: from ms.securenet.net (localhost [127.0.0.1]) by ms.securenet.net (Postfix) with ESMTP id 124E811E1F; Tue, 3 Apr 2018 00:14:05 -0400 (EDT) X-Virus-Scanned: by f-prot anti-virus, and clamav anti-virus at SecureNet Inc. Received: from ms.securenet.net ([127.0.0.1]) by ms.securenet.net (ms.securenet.net [127.0.0.1]) (amavisd-new, port 10001) with ESMTP id 6PLPVHfVwH2K; Tue, 3 Apr 2018 00:14:03 -0400 (EDT) Received: from office.securenet.net (office.securenet.net [205.236.147.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ms.securenet.net (Postfix) with ESMTPS id F3BF311DE4; Tue, 3 Apr 2018 00:14:02 -0400 (EDT) Received: from office.securenet.net (172.16.0.194) by office.securenet.net (172.16.0.194) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1034.26; Tue, 3 Apr 2018 00:14:02 -0400 Received: from office.securenet.net ([fe80::fc2a:207d:850e:3424]) by office.securenet.net ([fe80::fc2a:207d:850e:3424%9]) with mapi id 15.01.1034.033; Tue, 3 Apr 2018 00:14:02 -0400 From: "Jean M. Vandette" To: Erich Dollansky CC: "freebsd-questions@freebsd.org" Subject: RE: gpart recovery FreeBSD 7.4 Thread-Topic: gpart recovery FreeBSD 7.4 Thread-Index: AdPH67s6+2Xno425Q4Gw3Y3ODMy5+wAZ1aOAAAgLB7AAClZQAAAIULXwABRMGwAAAW9JQABQpD8AACqFakA= Date: Tue, 3 Apr 2018 04:14:01 +0000 Message-ID: References: <6b89534c97b14e51b67581e34efac71c@securenet.net> <20180330221523.0b5f8fdd.freebsd.ed.lists@sumeritec.com> <20180331070140.00a1b6fa.freebsd.ed.lists@sumeritec.com> <20180331204056.619965d1.freebsd.ed.lists@sumeritec.com> <3856200b233947ca939e1c5ffa152661@securenet.net> <20180402115102.08679f26.freebsd.ed.lists@sumeritec.com> In-Reply-To: <20180402115102.08679f26.freebsd.ed.lists@sumeritec.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.10.15.157] x-avg-scannedformalware-engineversion: 16.0.8039 4793/15535 437833 x-avg-scannedformalware-signature: 0E1E540C6849CF51B9BEC1FBA0EFC9D21DB1A88FD2ACDAE42BA175899D79F2B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2018 04:14:12 -0000 Erich Found an old post on partition repair https://forums.freebsd.org/threads/partition-repair.5869/ Got the scan_ffs an here are the results: root@central:~ # scan_ffs -l /dev/mfid0 X: 2097152 9786530 4.2BSD 2048 16384 0 # / X: 2097152 9787042 4.2BSD 2048 16384 0 # / X: 4194304 12232866 4.2BSD 2048 16384 0 # /tmp X: 41943040 17126306 4.2BSD 2048 16384 0 # /usr X: 42068388 17126818 4.2BSD 2048 13350 0 # /usr X: 62914560 66061474 4.2BSD 2048 16384 0 # /usr/local X: 83886080 139462050 4.2BSD 2048 16384 0 # /var X: 1258291200 237328290 4.2BSD 2048 16384 0 # /usr/local/system X: 21973958460 1705333922 4.2BSD 2048 16384 0 # /usr/local/storage X: 21973958460 1705334434 4.2BSD 2048 16384 0 # /usr/local/storage The gpart show is =3D> 40 27341619120 mfid0 GPT (13T) 40 128 1 freebsd-boot (64K) 168 8388602 2 freebsd-swap (4.0G) 8388770 2097152 3 freebsd-ufs (1.0G) 10485922 4194304 4 freebsd-ufs (2.0G) 14680226 41943040 5 freebsd-ufs (20G) 56623266 62914560 6 freebsd-ufs (30G) 119537826 83886080 7 freebsd-ufs (40G) 203423906 1258291200 8 freebsd-ufs (600G) 1461715106 25879904054 9 freebsd-ufs (12T) It seems to differ from the scan of the file system Your thoughts? Regards Jean M. Vandette SecureNet Information Services Net-Vu Television Distribution Divisions 159272 Canada Inc. 283-100 Alexis Nihon Blvd St Laurent, Quebec H4M 2N7 514-744-4242 800-469-7774 514-744-1552 Fax IMPORTANT: Les informations contenues au pr=E9sent courriel ainsi que dans tout docume= nt annex=E9 sont de nature privil=E9gi=E9e et confidentielle et ne peuvent = =EAtre utilis=E9es que par la ou les personnes ou entit=E9s dont le nom par= a=EEt ci-dessus. Si le lecteur du pr=E9sent message n'est pas le destinatai= re pr=E9vu ou n'a pas =E9t=E9 mis en copie, il est par les pr=E9sentes pri= =E9 de noter qu'il est strictement interdit de divulguer, de distribuer de = copier ou d'utiliser de quelconque fa=E7on ce message ou ses annexes. Si ce= ux-ci vous ont =E9t=E9 transmis par m=E9garde, veuillez les effacer et nous= en aviser imm=E9diatement. This E-mail along with its attachments, if any, contain privileged and conf= idential information intended only for the use of the individuals or entiti= es named above. Any dissemination, distribution, copying or use of the same= by anyone other than the intended recipients is strictly prohibited. If yo= u have received this communication in error, please delete both E-mail and = attachments and notify us immediately. -----Original Message----- From: Erich Dollansky [mailto:freebsd.ed.lists@sumeritec.com] Sent: Sunday, April 01, 2018 11:51 PM To: Jean M. Vandette Cc: freebsd-questions@freebsd.org Subject: Re: gpart recovery FreeBSD 7.4 Hi, On Sat, 31 Mar 2018 18:43:06 +0000 "Jean M. Vandette" wrote: > I used the recoverdisk > root@central:/ # recoverdisk /dev/gpt/root /mnt2/root.img I never used this program. > I did newfs on the boot then it mounted seems it does not recognize That was dangerous. When I have had the problem I really went down to read = the partition information from the disk into a file and tried to understand= it. This method helped recently when a disk has had developed so many bad secto= rs that it shrank its size during a boot. So, I did the same with its GPT i= nformation, mounted it, made a backup of the last hours of work and returne= d it to the manufacturer. > I don't have other mount points ie disks to make copy. This is a real problem at this stage. > the recoverydisk with state 0 says it encountered no errors so it is > seeing the data (I presume) just it is a binary file it seems. Now is > the data usable is another question. Using more or less I see a lot > of binary gibberish so far. Yes, the data is all binary. The key to any disk is its first sector. > > I don't know if there is a way to write the superblock information > without losing all the data if you or anyone knows I would appreciate > the procedure. Did it once before or should say my mentor did it back > on 3.1 and then was able to fsck and mount the data. This is all not a problem but it come much, much later. There is something = wrong with your partitioning tables. I would try to find this out. Get a hex editor of your choice. dd the first sector of the disk, open it i= n the editor. I used Wikipedia to provide me with the structure information= of the disk. This all depends how it was partitioned and later formatted. = MBR, GPT ... I know that this is hard work and will take time. Erich ? ------------------------------- Checked by AVG. Version: 16.0.8039 / Virus Database: 4793/15535 - Release D= ate: Mon Apr 02 09:04:00 2018. The message does not contain any threats. -------------------------------