Skip to contentSkip to conversation

Mounting /dev/md0 as root in 2.6.0-test7

DISCUSSION Harold Martin 3 participants 3 messages Oct 19, 2003 – Oct 20, 2003

lore
Share & tools
lore
#0 lore raw

First, is it possible to mount an md device as root (superblock is present)?
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.
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
My FS type (ext2 and ext3), partition type (DOS), and RAID-0 support are all compiled in (not as modules).

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

Thanks for your help,
Harold

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 2 lines · Harold Martin

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

Yes, it is. I've had such a configuration on this machine some weeks ago.

Quoted 3 lines

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.

Did you correctly set up the md? Did you make proper use of the raidtools? How does your raidtab, that you used to create the array, look like?

Are you able to mount the md from a running system (not as / root)?

Quoted 2 lines

Thanks for your help,
Harold

- --
Regards Michael Buesch [ http://www.tuxsoft.de.vu ] -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/ktUGoxoigfggmSgRAsymAJ9g4bPy+8S+Mq5zkOC+N2BLSQJmUACfcr5l hSHv/lWFF5UEA2NrSbFX5OA=
=V//M
-----END PGP SIGNATURE-----

#2 lore raw
In reply to Harold Martin
Quoted 2 lines · Harold Martin

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.

Quoted 5 lines

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.

Quoted 5 lines

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?

Quoted 2 lines

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

Good.

Quoted 3 lines

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