gpart recovery FreeBSD 7.4

Jean M. Vandette jmvandette at
Sat Mar 31 18:43:19 UTC 2018


I used the recoverdisk
root at central:/ # recoverdisk /dev/gpt/root /mnt2/root.img
Bigsize = 1048576, medsize = 32768, minsize = 512
   start               size            block-len state          done     remaining    % done
   1072693248 1048576       1048576     0    1073741824             0 100.00000
root at central:/ # recoverdisk /dev/gpt/var /mnt2/var.img
Bigsize = 1048576, medsize = 32768, minsize = 512
        start    size     block-len                state          done     remaining    % done
  42948624384 1048576       1048576     0   42949672960             0 100.00000

I did newfs on the boot then it mounted seems it does not recognize the
formatting of the partitions, I don't know if there is a way of making  the
machine think they are formatted without actually doing it. This disk used
ufs1 not ufs2 I also tried fsdump but it barked about not finding the superblocks
either.  When I did newfs -N -O1 on the root partition the results for superblocks
are very different
192, 524544, 1048896, 1573248 ufs2

64, 520256, 1040448, 1560640, 2080832 ufs1

also did dd  of one file system to a file but
I don't have other mount points ie disks to make copy.
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.

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


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-1552 Fax

Les informations contenues au présent courriel ainsi que dans tout document annexé sont de nature privilégiée et confidentielle et ne peuvent être utilisées que par la ou les personnes ou entités dont le nom paraît ci-dessus. Si le lecteur du présent message n'est pas le destinataire prévu ou n'a pas été mis en copie, il est par les présentes prié de noter qu'il est strictement interdit de divulguer, de distribuer de copier ou d'utiliser de quelconque façon ce message ou ses annexes. Si ceux-ci vous ont été transmis par mégarde, veuillez les effacer et nous en aviser immédiatement.

This E-mail along with its attachments, if any, contain privileged and confidential information intended only for the use of the individuals or entities named above. Any dissemination, distribution, copying or use of the same by anyone other than the intended recipients is strictly prohibited. If you 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 at]
Sent: Saturday, March 31, 2018 8:41 AM
To: Jean M. Vandette <jmvandette at>
Cc: freebsd-questions at
Subject: Re: gpart recovery FreeBSD 7.4


On Fri, 30 Mar 2018 23:34:08 +0000
"Jean M. Vandette" <jmvandette at> wrote:

> Well I booted on 11.1 and the entire disk disappeared
> Since I had the layout I was able to add the partitions
> back but still cannot fsck or mount anything.  I did not
> newfs the partitions.  So data should be still there... just need to
> get to it.

did you make a copy of the crucial parts of the media with dd or one of
its friends?

I tried the recoverdisk utility

> The layout seems to have changed however see below:

Could it be that either GPT entries are faulty or the disk is dying and
reports now a smaller size? Ok, a smaller size will result in a
different behaviour.

If you know the original layout, you should be able to read the GPT
tables and compare them with what they should be. If you have the copy,
just edit them with the values you want. When the values match, the
partitions suddenly appear.

I know, this is real hard core.


Checked by AVG. Version: 16.0.8039 / Virus Database: 4793/15529 - Release Date: Sat Mar 31 09:04:00 2018.
The message does not contain any threats.

More information about the freebsd-questions mailing list