Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 1995 17:12:22 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        jkh@freefall.cdrom.com, root@Shockwave.COM
Cc:        freebsd-bugs@freefall.cdrom.com
Subject:   Re: kern/280: new slice manager totally confused about old slice disks
Message-ID:  <199503290712.RAA20923@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>  Subject: Re: kern/280: new slice manager totally confused about old slice dis
>>>ks 
>  > 1) It looks like the implicit label stuff for unlabeled disks is
>  >    non-functional?  I cannot ask disklable to read the pseudo-label off
>  >    of sd1

Did you install a current MAKEDEV and run it?

>  Maybe if you specify /dev/sd0d explicitly?  Works for me!

It shouldn't work.  The d partition is no longer special.

>root@precipice$ disklabel /dev/sd1d
>disklabel: /dev/sd1d: Invalid argument

Correct.  Perhaps the errno's could be improved.  I seem to have broken
ENXIO being returned for opens of nonexistent partitions (EINVAL is now
returned) while fixing(?) sd's return of ENXIO for existent empty
partitions (wd always allowed opening such partitions).  Both drives
always returned the confusing errno EINVAL for nonexistent labels.

>root@precipice$ disklabel sd1
>disklabel: ioctl DIOCGDINFO: Invalid argument

disklabel(8) translates sd1 to /dev/sd1c.  Apparently you have no label
on sd1c.  `disklabel sd1' used to return a dummy in-core label if there
is no label on the disk, but this didn't seem reasonable so I broke it.
There is no-longer a dummy in-core label for each slice, and you
wouldn't want one for non-BSD slices.  There is only a dummy in-core
label for the whole disk.  The whole disk is the device /dev/sd1, which
is a completely different device from sd1 and /dev/sd1c.

>sd1s1: start 32, end = 819199, size 819168: OK
>sd1s2: start 819200, end = 2041855, size 1222656: OK
>sd1s5: start 819232, end = 2041855, size 1222624: OK

>  > 2) All of this slice stuff is really verbose and I think gratuitous.
>  >    Note: I am using older boot blocks that don't support -v,  so it

More is apparently required for debugging old broken installations :-(.

>  > 2) When the system is booting, it whines loudly about partitions not being
>  >    inside slices... this may indeed be an error condition,  but that's the
>  >    way FreeBSD 2.0 did things,  so you're going to have a hell of a support
>  >    problem with these new slice changes.
>  
>  Agreed again.  We're going to need to deal with this somehow, or users
>  are going to SCREECH.  Bruce is safe over there in OZ, but I know that
>  folks like Poul and I are going to get hundreds of mails in our boxes! :-(

Disagreed.  Aren't you going to tell everyone to reinstall like you did with
all previous releases?  The new sysinstall won't make any invalid slices
or partitions ;-).

>  > 3) Oh where oh where has my MSDOS partition gone?  Oh where oh where
>  >    can it beeeeee?

Apparently the verbose boot info should include freebsd-current mail
explaining all this :-|.

>  Try copying the new MAKEDEV over and doing a ./MAKEDEV sd0, then try:
>  
>  	mount -t msdos /dev/sd0s1 /dos
>  
>  Assuming, of course, that slice 1 is the DOS partition.  This is

Not a good assumption.  There may be up to 26 DOS partitions starting
as late as slice s4 (primary partition #4, extended partition #3
containing 25 more).  Very few setups will have this, but the install
program has to be careful not to break it (if not support it), and
people answering bug reports should know about it.

>  actually a very GOOD part of the change and I'm happy that we have it.
>  It will make auto-detecting and mounting the DOS partition from the
>  install much easier (I can just look to see what partition is a DOS
>  partition and then mount the corresponding slice).

I need to add an ioctl to return the slice struct.  It still isn't easy,
because there are several different DOS partition types and no
requirement that the partition type have anything to do with the file
system type.

>I'm a little fuzzy on something,  what is a slice vs a partition?

>Is a slice one of the one of four (recursive) classic DOS partitions
>or is a slice a UNIX disklabel partition?

DOS calls its subdivisions of a disk `partitions' and so does FreeBSD.
The slice code nests FreeBSD partitions (if any) inside DOS partitions
(if any).  It is very confusing to call both `partitions' so we usually
call the DOS ones `slices'.

Bruce



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