detached a mounted ufs filesystem

Polytropon freebsd at edvax.de
Sun Jun 13 16:38:32 UTC 2010


On Sat, 12 Jun 2010 22:38:15 -0400, "Xihong Yin" <xyin at gmx.com> wrote:
> 'fdisk /dev/da0' output is
> 
> ******* Working on device /dev/da0 *******
> parameters extracted from in-core disklabel are:
> cylinders=14593 heads=255 sectors/track=63 (16065 blks/cyl)
> 
> Figures below won't work with BIOS for partitions not in cyl 1
> parameters to be used for BIOS calculations are:
> cylinders=14593 heads=255 sectors/track=63 (16065 blks/cyl)
> 
> Media sector size is 512
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 1 is:
> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
>  start 63, size 234436482 (114470 Meg), flag 80 (active)
>  beg: cyl 0/ head 1/ sector 1;
>  end: cyl 1023/ head 254/ sector 63
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> <UNUSED>

This indicates that at least the FreeBSD slice seems to be intact.
Maybe it's "just" the label that's missing (and therefore, the
partitions can't be accessed).



> I tried 'fsck_ufs /dev/da0', it says
> 
> ** /dev/da0
> Cannot find file system superblock
> ioctl (GCINFO): Inappropriate ioctl for device
> fsck_ufs: /dev/da0: can't read disk label

You said there was also /dev/da0a, maybe you can check this partition?
Make sure, for the first try, to use the -d flag (debug), so there are
no changes to the file system.



> I forget what layout the disk has. Normally I used /dev/da0s1d
> to mount the disk.

There should be more than one copy of the partition table on the disk.
I'm not sure if I'm mixing up things here, but fsck_ffs also allows
you to refer to a different superblock. Use

	# newfs -N /dev/da0a

to print out superblock locations; this command will NOT create a
file system!

Use fsck_ffs -b<block> to refer to a possible alternate superblock
for checking.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list