Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2002 14:40:47 -0700
From:      paul beard <paulbeard@mac.com>
To:        questions@freebsd.org
Subject:   restoring disklabel from an active disk? 
Message-ID:  <3D40705F.9080300@mac.com>

next in thread | raw e-mail | index | archive | help
I somehow wiped out my disklabel and while I am backing up my home 
directory in the event I need to start from scratch, I would like 
know if I can somehow extract a valid disklabel from a running 
system and re-apply it?

I have everything mounted.
Filesystem        1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s2a          128990   42770   75902    36%    /
/dev/ad0s2f          257998     532  236828     0%    /tmp
/dev/ad0s2g         7179502 5481904 1123238    83%    /usr
/dev/ad0s2e          257998  225462   11898    95%    /var
procfs                    4       4       0   100%    /proc

and disklabel offers to apply this information to the disk, but 
I'm not sure it's right: there was an NTFS partition covering the 
first 4 Gb. So starting from 0 doesn't look right to me. But then 
that is slice 2 . . . .

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
   a:   262144        0    4.2BSD     2048 16384    94   # (Cyl. 
   0 - 17*)
   b:   492720   262144      swap                        # (Cyl. 
  17*- 49*)
   c: 16390080        0    unused        0     0         # (Cyl. 
   0 - 1083)
   e:   524288   754864    4.2BSD     2048 16384    94   # (Cyl. 
  49*- 84*)
   f:   524288  1279152    4.2BSD     2048 16384    94   # (Cyl. 
  84*- 119*)
   g: 14586640  1803440    4.2BSD     2048 16384    89   # (Cyl. 
119*- 1083*)

I guess what I need is how to map the mounted filesystems to the 
right disklabel values.

I'm not on the list, so direct replies would be most helpful.

Thanks.

-- 
Paul Beard / 8040 27th Ave NE / Seattle WA 98115 /
paulbeard [at] mac [ dot] com / 206 529 8400

http://paulbeard.no-ip.org/movabletype

Any sufficiently advanced technology is indistinguishable from magic.
		-- Arthur C. Clarke


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D40705F.9080300>