linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Mounting /dev/md0 as root in 2.6.0-test7
@ 2003-10-19 16:58 Harold Martin
  2003-10-19 18:16 ` Michael Buesch
  2003-10-20  8:23 ` Helge Hafting
  0 siblings, 2 replies; 6+ messages in thread
From: Harold Martin @ 2003-10-19 16:58 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting /dev/md0 as root in 2.6.0-test7
  2003-10-19 16:58 Harold Martin
@ 2003-10-19 18:16 ` Michael Buesch
  2003-10-20  8:23 ` Helge Hafting
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Buesch @ 2003-10-19 18:16 UTC (permalink / raw)
  To: Harold Martin; +Cc: linux-kernel

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

On Sunday 19 October 2003 18:58, Harold Martin wrote:
> 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.

> 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)?

> 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-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting /dev/md0 as root in 2.6.0-test7
@ 2003-10-19 18:53 John Mock
  2003-10-19 19:12 ` Andre Tomt
  0 siblings, 1 reply; 6+ messages in thread
From: John Mock @ 2003-10-19 18:53 UTC (permalink / raw)
  To: linux-kernel

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

Yes, software RAID5 works for me on a PPC with 2.6.0-test7 (aside from other
video problems which make it hard for me to test adequately).  There is a
HOW-TO which explains how to do this (you want the >= 0.9 version, not the
0.4 version which is not relevant for modern kernels).

    > 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.

The basic problem here is that the kernel has no idea what disks comprise
your RAID when you just say "root=/dev/md0", e.g., it has no idea where to
start.  Here's an extract from my PPC's .config file:

    CONFIG_CMDLINE="root=/dev/md0 md=0,/dev/sda7,/dev/sdb7,/dev/sdc7"

Something like that could also be in /etc/lilo.conf if you use LILO (which
a PowerPC does not).

Thus the kernel has three disk to look at, to find out which partitions
make up /dev/md0.  Since i want the machine to work no matter which of my
three disk might fail, i have arranged my disks to have the root partition 
on the same partition number on each drive (even though they're not the 
same capacity or even organized in the same way otherwise).  If /dev/sda 
and /dev/sdb differ too much, then if /dev/sda fails sufficiently badly, 
then the drives get 'renumbered' (e.g. what was /dev/sdb because /dev/sda, 
/dev/sdc becomes /dev/sdb, etc.).

Write privately if you want to discuss this further (albeit i am hardly an
expert on this), as this mailing list is about maintaining the kernel rather
than about helping people get started with new configurations.  Yes, it can
work, and if it does with one recent kernel, but not another, then that's a
good hint that this may be an appropriate place to post (assuming a search 
of the archives doesn't already contain alot of discussion on your topic).
Good luck!
			         -- JM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting /dev/md0 as root in 2.6.0-test7
  2003-10-19 18:53 John Mock
@ 2003-10-19 19:12 ` Andre Tomt
  0 siblings, 0 replies; 6+ messages in thread
From: Andre Tomt @ 2003-10-19 19:12 UTC (permalink / raw)
  To: John Mock; +Cc: linux-kernel

On Sun, 2003-10-19 at 20:53, John Mock wrote:
> The basic problem here is that the kernel has no idea what disks comprise
> your RAID when you just say "root=/dev/md0", e.g., it has no idea where to
> start. 

The kernel knows it if the array is set up with persistent superblocks,
the partition type of the relevant partitions has id 0xfd (raid
auto-detect), and the md-raid code is compiled into the kernel image.

-- 
Mvh,
André Tomt
andre@tomt.net


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting /dev/md0 as root in 2.6.0-test7
@ 2003-10-19 20:48 John Mock
  0 siblings, 0 replies; 6+ messages in thread
From: John Mock @ 2003-10-19 20:48 UTC (permalink / raw)
  To: Harold Martin; +Cc: linux-kernel

I have been corrected!  While /dev/md0 may not be correctly detected in
Macintosh (PPC) partitions, they should be recognized in MSDOS and SUN
partition tables.  You probably won't need a 'md0=...' command line for
most configurations.

I apologize for any confusion i may have created.  Thank you very much
for the correction, Andre.
				       -- JM


P.S.  I believe the relevant HOW-TO is:

    http://www.tldp.org/HOWTO/Boot+Root+Raid+LILO.html

    Boot+Root+Raid+LILO, Boot + Root + Raid + Lilo : Software Raid mini-HOWTO

    Updated: July 2000. A cookbook for setting up root raid using the 0.90
    raidtools for bootable raid mounted on root using standard LILO. 

Good luck!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mounting /dev/md0 as root in 2.6.0-test7
  2003-10-19 16:58 Harold Martin
  2003-10-19 18:16 ` Michael Buesch
@ 2003-10-20  8:23 ` Helge Hafting
  1 sibling, 0 replies; 6+ messages in thread
From: Helge Hafting @ 2003-10-20  8:23 UTC (permalink / raw)
  To: Harold Martin; +Cc: linux-kernel

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-10-20  8:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-19 20:48 Mounting /dev/md0 as root in 2.6.0-test7 John Mock
  -- strict thread matches above, loose matches on Subject: below --
2003-10-19 18:53 John Mock
2003-10-19 19:12 ` Andre Tomt
2003-10-19 16:58 Harold Martin
2003-10-19 18:16 ` Michael Buesch
2003-10-20  8:23 ` Helge Hafting

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).