"Cannot find file system superblock" error - how to recover?

Jerry McAllister jerrymc at clunix.cl.msu.edu
Tue Jan 6 12:17:38 PST 2004

> --- Jerry McAllister <jerrymc at clunix.cl.msu.edu> wrote:
> > > (is disklabel/bsdlabel only meant to be run on slices and not 
> > > bsd-partitions?). 
> > 
> > You have it backwards in this question.   Disklabel is meant to run
> > only on bsd partitions and not slices.   Slices (1-4) are the major 
> > divisions of the disk and partitions (a-h) are divisions within slices. 
> > Fdisk is what creates slices.

First, as I look at what I wrote,  I said this wrong in two ways - because
I didn't read carefully and had just come off a bad headache, probably
caused by breathing spray paint fumes - always use in well ventilated

The biggie!!  disklabel DOES work on slices and CREATES partitions.   
It does not work on partitions - it creates them which is where my 
sleepy [Groggy has already been claimed by a famous contributer] got 
lost.   So, trying to run disklabel on ad0s1c would definitely cause 
an error.

The other thing is, I should have left out the word 'only' (after writing
the rest of it correctly, of course) because disklabel can, but usually 
shouldn't, be run on the whole disk  ad0 (as apposed to just a slice ad0s1) 
which will create a "dangerously dedicated" disk.  There is no real danger 
as long as you only use FreeBSD on it and don't want to multi-boot it or 
anything.  Since you only lose the tiny bit by slicing it (63 sectors), 
you should just always first slice it (with fdisk) - even if that means 
making it all one big slice.  That will make sure things are happy should 
you get weird creative ideas later on.

> Ok, well the reason I thought it might be the other way is because if you
> run disklabel (bsdlabel) on a slice (such as /dev/ad4s1 on my machine, which
> is working, or /dev/ad0s1 on another machine I have access to) it works fine
> (and reports an offset of 0),  but if you run it on the partition
> (/dev/ad0s1c) you get an offset of 63 and errors like:

Yes, the offset in disklabel is from the beginning of the slice.  I am not 
sure what it is trying to do if you try to further partition a partition.  
Anyway, the 'c' partition is a special one that refers to the whole slice 
regardless of the partitions it has been carved in to.  I would have to 
go wading through code to figure out how it is handled differently.  Just 
for fun, try doing a disklabel on ad0s1a or something like that and see 
what it does - on a disk you can afford to trash.

Anyway, sorry for the first round of mis-statement.


> partition c: partition extends past end of unit
> bsdlabel: partition c doesn't start at 0!
> bsdlabel: An incorrect partition c may cause problems for standard system
> utilities
> partition f: partition extends past end of unit
> So why does disklabel/bsdlabel produce errors when run on the partition even
> when the disk is fine, if it is meant to be run on partitions and not
> slices?
> Trying to learn... thanks!
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

More information about the freebsd-questions mailing list