Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jan 2004 08:05:57 +0300
From:      Sergey 'DoubleF' Zaharchenko <doublef@tele-kom.ru>
To:        Jerry McAllister <jerrymc@clunix.cl.msu.edu>
Cc:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: "Cannot find file system superblock" error - how to recover?
Message-ID:  <20040107080557.3c8621be.doublef@tele-kom.ru>
In-Reply-To: <200401062017.i06KHUM08886@clunix.cl.msu.edu>
References:  <20040106195408.31698.qmail@web41112.mail.yahoo.com> <200401062017.i06KHUM08886@clunix.cl.msu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Wed__7_Jan_2004_08_05_57_+0300_AaKiKKdqG3h_lIQ3
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

On Tue, 6 Jan 2004 15:17:29 -0500 (EST)
Jerry McAllister <jerrymc@clunix.cl.msu.edu> probably wrote:

> > 
> > --- Jerry McAllister <jerrymc@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
> area.  
> 
> 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.

As for now, I have the impression that it's so in 4.x, but in 5.x it's
some kind kind of special. If in 4.x the adXsY and adXsYc nodes were
identical, it just isn't so in 5.x, and `bsdlabel' shows offsets from
beginning of th *physical disk*, not the slice (why?).

> 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.
> 
> ////jerry
> 
> > 
> > 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@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> > 
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 


-- 
DoubleF
"He was a modest, good-humored boy.  It was Oxford that made him
insufferable."

--Signature=_Wed__7_Jan_2004_08_05_57_+0300_AaKiKKdqG3h_lIQ3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/+5PAwo7hT/9lVdwRAnnAAJ9l6OFrEfQaQfHXPdNDVaS7uIg9YACfXpTe
zvp7VYPNdLo77DhqAfL5nKc=
=rpka
-----END PGP SIGNATURE-----

--Signature=_Wed__7_Jan_2004_08_05_57_+0300_AaKiKKdqG3h_lIQ3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040107080557.3c8621be.doublef>