Re: devfs patch v3

H. Peter Anvin (hpa@transmeta.com)
Mon, 12 Jan 1998 03:20:07 -0800 (PST)


> Maybe, so let me go over it again. ext2, msdos, and I'm sure other
> FS's have a volume label. When the filesystem (ext2) driver
> is loaded, it should scan the superblocks of the partitions for this volume
> label, and then make them available via dev symlinks/devfs/proc or
> something. Then in fstab instead of /dev/sda8 I can spec /dev/usr1 if the
> volume label of /dev/sda8 is 'usr1'. Follow me thus far?
>
> Up to this point it can all be done in user space. The problem is mounting
> the root. We always have to spec the actual device for the root, if we do
> notpull this info out with the kernel. Now you don't need the kernel to
> create all the symlinks(whatever) just search for the label that matches the
> one speced for the root. Then I can spec /dev/root-drive with the boot
> loader, and linux it will always try to mount the drive with the label
> 'root-drive' as the root.

Ah, but you do this with initrd by having initrd look for your root
partition of choice (as specced to the boot loader and passed by the
kernel into the environment of /linuxrc) and mount it.

Remember, the initrd is loaded by the boot loader.

> Reasonable, yes, but I still don't like it : >
> Lately I've been spoiled by being able to just drop new kernels on a
> syslinux disk. It would be nice to have something like that for ext2. That
> would be great because with that and the above scheme you could throw the
> damn root partition anywhere and it would come right up so long as you named
> it correctly.

True. I was considering writing a boot loader that would read ext2.
The main problem is that it really begs for being a second-stage
loader, so it can be in protected mode. Unfortunately, thats a
mini-OS all in itself, i.e. not exactly a weekend project (the first
version of syslinux I wrote in a night.)

-hpa