Re: Mounting /dev/md0 as root in 2.6.0-test7

From: Helge Hafting
Date: Mon Oct 20 2003 - 03:15:32 EST


Harold Martin wrote:
First, is it possible to mount an md device as root (superblock is
present)?

Yes, this is trivial. /dev/md0 works just as good
as, say, /dev/hda2.


If not then the rest of this doesn't really matter...

If so, I can't get it to work :(
I pass root=/dev/md0 to the kernl, but I get the "Kernel panic: VFS:
Unable to mount root fs on md0" error.

1. This raid device is properly made and contains a valid root fs?
2. The partitions containing parts of the RAID are of type
raid autodetect? (if not, use cfdisk/fdisk/... and change them)
2. Your kernel has the raid-drivers _compiled in_, they're not
modular? (Modular _can_ be done if you load the drivers from
an initrd, but why bother? Drivers for the root fs will never
be unloadable anyway, so no reason for modules here. Compile
the drivers in, and they just work.

My setup:
kernel 2.6.0-test7
One drive on each of my two IDE channels (i810 chipset)
RAID 0, set up with raidtools
Using devfs
I use devfs too. Note that it isn't "/dev/md0" with devfs,
it is "/dev/md/0". Note the extra "/". Now, devfsd may
create a compatibilty symlink called "/dev/md0", but it isn't
there at the time you mount root.

Note that root=/dev/md/0 is not enough when you use devfs.
You also need: append="root=/dev/md/0"
for some strange dark reason. It wasn't always so, it got broken.
Perhaps an incentive to not use devfs?

My FS type (ext2 and ext3), partition type (DOS), and RAID-0 support are
all compiled in (not as modules).
Good.

What else do I need to do to be able to mount /dev/md0 as root?

Looks like the "append" thing is what you need, seeing that you
already use compiled-in drivers. Also make sure your raid-partitions
are of the autodetect variety.

Helge Hafting

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/