* Woody, initrd, raid1, boot
@ 2002-06-17 15:15 Thomas -Balu- Walter
2002-06-17 18:50 ` Jakob Oestergaard
0 siblings, 1 reply; 5+ messages in thread
From: Thomas -Balu- Walter @ 2002-06-17 15:15 UTC (permalink / raw)
To: linux-raid
First two smaller questions/notes:
The FAQ at http://www.tldp.org/FAQ/Linux-RAID-FAQ/index.html lists
three mailinglist-archives, while only
http://marc.theaimsgroup.com/?l=linux-raid&r=1&w=2 seems to have actual
mails (I was kinda shocked that the last mails were coming from 2000 :)
What are the actual raidtools? raidtools-20010914?
Now to a something more complex problem (which I am going to despair on):
I've read different HOWTOs, Hints, Tipps and tricks, but none helped.
I am trying to set up a debian (woody) system running the
debian-packaged 2.4.18-686-kernel that boots from "root=/dev/md1" (and
uses the debian-initrd to load the md-modules)
To do so, I've installed a minimal woody using a netinstall-CD and
upgraded it to kernel-image-2.4.18-686 (including the initrd-changes to
lilo). The system got installed on hda:
Disk /dev/hda: 4865 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 5 6- 48163+ 83 Linux
/dev/hda2 6 67 62 498015 82 Linux swap
/dev/hda3 68 675 608 4883760 83 Linux
/dev/hda4 0 - 0 0 0 Empty
while /dev/hhda1 is mounted as /boot and /dev/hda3 is mounted as / and
/dev/hdc got exact the same partition table.
I rebooted to get 2.4.18 up and running, then I've changed the
/dev/hdc-partitions to be Raid-Autodetect and set up the following
/etc/raidtab:
# /boot
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/hdc1
raid-disk 0
device /dev/hda1
failed-disk 1
# /
raiddev /dev/md1
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/hdc3
raid-disk 0
device /dev/hda3
failed-disk 1
I've prepared the md-devices using mkraid and mke2fs, mounted them
/dev/md1 -> /mnt
/dev/md0 -> /mnt/boot
Next was to "cp -a" the installed system on the md-devices (all but
/mnt, /proc and /lost+found) and change /mnt/etc/fstab to mount the
md-devices instead of the original /dev/hda partitions.
So far, everything is okay. Next I tried to reboot and at boot I told
lilo to run "Linux root=/dev/md1", but I get
md: md driver 0.90.0 MAX_MD...
cramfs: wrong magic
EXT3-FS: unable to read superblock
EXT2-FS: unable to read superblock
Kernel panic: VFS: Unable to mount root fs on 09:01
Missing the raid-module, I've added "raid1" to /etc/mkinitrd/modules and
created a new initrd:
# mkinitrd -o /boot/initrd-2.4.18-686-raid1 /lib/modules/2.4.18-686
# ln -sf /boot/initrd-2.4.18-686-raid1 /initrd.img
# lilo
Now the raid1-module gets loaded right after the md-module, but I keep
getting the same error.
I've also tried the way James Bromberger suggests in
http://www.james.rcpt.to/programs/debian/raid1/ - especially using
(manually entered by now though) the append parameters
"md=0,/dev/hdc1,/dev/hda1", and "root=/dev/md0" (and
"md=1,/dev/hdc3,/dev/hda3") and and and.
Also tested was root=/dev/md1 in mkinitrd.conf.
Another approach was adding the values to lilo.conf -
boot=/dev/md0
root=/dev/md1
(which should not make a difference than adding it to the lilo-prompt?)
One of my biggest problems is, that I don't know where the problem is
located - is it lilo (which boots the kernel and initrd and should be
fine?), initrd (missing a module?) or the root-filesystem on the
md-devices, or even the md-devices themself (it should be possible to
boot from a degraded device?)
I am really clueless... :-/ any hints?
Balu
--
In the begining was the word, and the word was:
Content-Type: text/plain; charset=us-ascii
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Woody, initrd, raid1, boot
2002-06-17 15:15 Woody, initrd, raid1, boot Thomas -Balu- Walter
@ 2002-06-17 18:50 ` Jakob Oestergaard
2002-06-17 19:35 ` Scott Bisker
2002-06-18 9:25 ` Thomas -Balu- Walter
0 siblings, 2 replies; 5+ messages in thread
From: Jakob Oestergaard @ 2002-06-17 18:50 UTC (permalink / raw)
To: Thomas -Balu- Walter; +Cc: linux-raid
On Mon, Jun 17, 2002 at 05:15:11PM +0200, Thomas -Balu- Walter wrote:
> First two smaller questions/notes:
> The FAQ at http://www.tldp.org/FAQ/Linux-RAID-FAQ/index.html lists
> three mailinglist-archives, while only
> http://marc.theaimsgroup.com/?l=linux-raid&r=1&w=2 seems to have actual
> mails (I was kinda shocked that the last mails were coming from 2000 :)
>
> What are the actual raidtools? raidtools-20010914?
On debian woody here, I use 0.90.20010914-15
>
> Now to a something more complex problem (which I am going to despair on):
>
> I've read different HOWTOs, Hints, Tipps and tricks, but none helped.
I'm sorry to hear that :)
>
> I am trying to set up a debian (woody) system running the
> debian-packaged 2.4.18-686-kernel that boots from "root=/dev/md1" (and
> uses the debian-initrd to load the md-modules)
>
> To do so, I've installed a minimal woody using a netinstall-CD and
> upgraded it to kernel-image-2.4.18-686 (including the initrd-changes to
> lilo). The system got installed on hda:
>
> Disk /dev/hda: 4865 cylinders, 255 heads, 63 sectors/track
> Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
>
> Device Boot Start End #cyls #blocks Id System
> /dev/hda1 * 0+ 5 6- 48163+ 83 Linux
> /dev/hda2 6 67 62 498015 82 Linux swap
> /dev/hda3 68 675 608 4883760 83 Linux
> /dev/hda4 0 - 0 0 0 Empty
>
> while /dev/hhda1 is mounted as /boot and /dev/hda3 is mounted as / and
> /dev/hdc got exact the same partition table.
>
> I rebooted to get 2.4.18 up and running, then I've changed the
> /dev/hdc-partitions to be Raid-Autodetect and set up the following
> /etc/raidtab:
>
> # /boot
> raiddev /dev/md0
> raid-level 1
> nr-raid-disks 2
> nr-spare-disks 0
> chunk-size 4
> persistent-superblock 1
> device /dev/hdc1
> raid-disk 0
> device /dev/hda1
> failed-disk 1
>
> # /
> raiddev /dev/md1
> raid-level 1
> nr-raid-disks 2
> nr-spare-disks 0
> chunk-size 4
> persistent-superblock 1
> device /dev/hdc3
> raid-disk 0
> device /dev/hda3
> failed-disk 1
Good
>
> I've prepared the md-devices using mkraid and mke2fs, mounted them
> /dev/md1 -> /mnt
> /dev/md0 -> /mnt/boot
Good
>
> Next was to "cp -a" the installed system on the md-devices (all but
> /mnt, /proc and /lost+found) and change /mnt/etc/fstab to mount the
> md-devices instead of the original /dev/hda partitions.
>
> So far, everything is okay. Next I tried to reboot and at boot I told
> lilo to run "Linux root=/dev/md1", but I get
>
> md: md driver 0.90.0 MAX_MD...
> cramfs: wrong magic
> EXT3-FS: unable to read superblock
> EXT2-FS: unable to read superblock
> Kernel panic: VFS: Unable to mount root fs on 09:01
Since it's cramfs that complains, I suppose it's your initrd that is
bad.
>
> Missing the raid-module, I've added "raid1" to /etc/mkinitrd/modules and
> created a new initrd:
> # mkinitrd -o /boot/initrd-2.4.18-686-raid1 /lib/modules/2.4.18-686
> # ln -sf /boot/initrd-2.4.18-686-raid1 /initrd.img
> # lilo
>
> Now the raid1-module gets loaded right after the md-module, but I keep
> getting the same error.
>
> I've also tried the way James Bromberger suggests in
> http://www.james.rcpt.to/programs/debian/raid1/ - especially using
> (manually entered by now though) the append parameters
> "md=0,/dev/hdc1,/dev/hda1", and "root=/dev/md0" (and
> "md=1,/dev/hdc3,/dev/hda3") and and and.
>
> Also tested was root=/dev/md1 in mkinitrd.conf.
>
> Another approach was adding the values to lilo.conf -
> boot=/dev/md0
> root=/dev/md1
> (which should not make a difference than adding it to the lilo-prompt?)
>
> One of my biggest problems is, that I don't know where the problem is
> located - is it lilo (which boots the kernel and initrd and should be
> fine?), initrd (missing a module?) or the root-filesystem on the
> md-devices, or even the md-devices themself (it should be possible to
> boot from a degraded device?)
It looks like you have an initrd problem.
>
> I am really clueless... :-/ any hints?
Compile the RAID-1 into the kernel, forget about using modules. That is
the simple solution that I use - I am no initrd expert, and I have no
intentions of becoming one :)
--
................................................................
: jakob@unthought.net : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob Østergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Woody, initrd, raid1, boot
2002-06-17 18:50 ` Jakob Oestergaard
@ 2002-06-17 19:35 ` Scott Bisker
2002-06-18 9:25 ` Thomas -Balu- Walter
1 sibling, 0 replies; 5+ messages in thread
From: Scott Bisker @ 2002-06-17 19:35 UTC (permalink / raw)
Cc: linux-raid
What you need to do is recreate your initrd to include the modules you
need during boot. The default mkinitrd /boot/initrd-2.4.18-686-raid1
2.4.18-686-raid1 will not suffice.
Try this.
mkinitrd --preload=raid1 --preload=xor /boot/initrd-2.4.18-686-raid1
2.4.18-686-raid1
That should do the trick. The default mkinitrd doesn't install any
actual modules in the ramdisk file.
Not sure about on debian, but raidtools should have at least the
following tools.
/sbin/arytst
/sbin/detect_multipath
/sbin/lsraid
/sbin/mkraid
/sbin/raid0run
/sbin/raidhotadd
/sbin/raidhotgenerateerror
/sbin/raidhotremove
/sbin/raidreconf
/sbin/raidsetfaulty
/sbin/raidstart
/sbin/raidstop
Hope this helps.
-sb
On Mon, 2002-06-17 at 14:50, Jakob Oestergaard wrote:
> On Mon, Jun 17, 2002 at 05:15:11PM +0200, Thomas -Balu- Walter wrote:
> > First two smaller questions/notes:
> > The FAQ at http://www.tldp.org/FAQ/Linux-RAID-FAQ/index.html lists
> > three mailinglist-archives, while only
> > http://marc.theaimsgroup.com/?l=linux-raid&r=1&w=2 seems to have actual
> > mails (I was kinda shocked that the last mails were coming from 2000 :)
> >
> > What are the actual raidtools? raidtools-20010914?
>
> On debian woody here, I use 0.90.20010914-15
>
> >
> > Now to a something more complex problem (which I am going to despair on):
> >
> > I've read different HOWTOs, Hints, Tipps and tricks, but none helped.
>
> I'm sorry to hear that :)
>
> >
> > I am trying to set up a debian (woody) system running the
> > debian-packaged 2.4.18-686-kernel that boots from "root=/dev/md1" (and
> > uses the debian-initrd to load the md-modules)
> >
> > To do so, I've installed a minimal woody using a netinstall-CD and
> > upgraded it to kernel-image-2.4.18-686 (including the initrd-changes to
> > lilo). The system got installed on hda:
> >
> > Disk /dev/hda: 4865 cylinders, 255 heads, 63 sectors/track
> > Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
> >
> > Device Boot Start End #cyls #blocks Id System
> > /dev/hda1 * 0+ 5 6- 48163+ 83 Linux
> > /dev/hda2 6 67 62 498015 82 Linux swap
> > /dev/hda3 68 675 608 4883760 83 Linux
> > /dev/hda4 0 - 0 0 0 Empty
> >
> > while /dev/hhda1 is mounted as /boot and /dev/hda3 is mounted as / and
> > /dev/hdc got exact the same partition table.
> >
> > I rebooted to get 2.4.18 up and running, then I've changed the
> > /dev/hdc-partitions to be Raid-Autodetect and set up the following
> > /etc/raidtab:
> >
> > # /boot
> > raiddev /dev/md0
> > raid-level 1
> > nr-raid-disks 2
> > nr-spare-disks 0
> > chunk-size 4
> > persistent-superblock 1
> > device /dev/hdc1
> > raid-disk 0
> > device /dev/hda1
> > failed-disk 1
> >
> > # /
> > raiddev /dev/md1
> > raid-level 1
> > nr-raid-disks 2
> > nr-spare-disks 0
> > chunk-size 4
> > persistent-superblock 1
> > device /dev/hdc3
> > raid-disk 0
> > device /dev/hda3
> > failed-disk 1
>
> Good
>
> >
> > I've prepared the md-devices using mkraid and mke2fs, mounted them
> > /dev/md1 -> /mnt
> > /dev/md0 -> /mnt/boot
>
> Good
>
> >
> > Next was to "cp -a" the installed system on the md-devices (all but
> > /mnt, /proc and /lost+found) and change /mnt/etc/fstab to mount the
> > md-devices instead of the original /dev/hda partitions.
> >
> > So far, everything is okay. Next I tried to reboot and at boot I told
> > lilo to run "Linux root=/dev/md1", but I get
> >
> > md: md driver 0.90.0 MAX_MD...
> > cramfs: wrong magic
> > EXT3-FS: unable to read superblock
> > EXT2-FS: unable to read superblock
> > Kernel panic: VFS: Unable to mount root fs on 09:01
>
> Since it's cramfs that complains, I suppose it's your initrd that is
> bad.
>
> >
> > Missing the raid-module, I've added "raid1" to /etc/mkinitrd/modules and
> > created a new initrd:
> > # mkinitrd -o /boot/initrd-2.4.18-686-raid1 /lib/modules/2.4.18-686
> > # ln -sf /boot/initrd-2.4.18-686-raid1 /initrd.img
> > # lilo
> >
> > Now the raid1-module gets loaded right after the md-module, but I keep
> > getting the same error.
> >
> > I've also tried the way James Bromberger suggests in
> > http://www.james.rcpt.to/programs/debian/raid1/ - especially using
> > (manually entered by now though) the append parameters
> > "md=0,/dev/hdc1,/dev/hda1", and "root=/dev/md0" (and
> > "md=1,/dev/hdc3,/dev/hda3") and and and.
> >
> > Also tested was root=/dev/md1 in mkinitrd.conf.
> >
> > Another approach was adding the values to lilo.conf -
> > boot=/dev/md0
> > root=/dev/md1
> > (which should not make a difference than adding it to the lilo-prompt?)
> >
> > One of my biggest problems is, that I don't know where the problem is
> > located - is it lilo (which boots the kernel and initrd and should be
> > fine?), initrd (missing a module?) or the root-filesystem on the
> > md-devices, or even the md-devices themself (it should be possible to
> > boot from a degraded device?)
>
> It looks like you have an initrd problem.
>
> >
> > I am really clueless... :-/ any hints?
>
> Compile the RAID-1 into the kernel, forget about using modules. That is
> the simple solution that I use - I am no initrd expert, and I have no
> intentions of becoming one :)
>
> --
> ................................................................
> : jakob@unthought.net : And I see the elder races, :
> :.........................: putrid forms of man :
> : Jakob Østergaard : See him rise and claim the earth, :
> : OZ9ABN : his downfall is at hand. :
> :.........................:............{Konkhra}...............:
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Woody, initrd, raid1, boot
2002-06-17 18:50 ` Jakob Oestergaard
2002-06-17 19:35 ` Scott Bisker
@ 2002-06-18 9:25 ` Thomas -Balu- Walter
2002-06-18 17:19 ` Thomas -Balu- Walter
1 sibling, 1 reply; 5+ messages in thread
From: Thomas -Balu- Walter @ 2002-06-18 9:25 UTC (permalink / raw)
To: linux-raid
Thanks for CCing, Jakob - I am not subscribed to the list and was
thinking of checking the archives, but this way answering is easier (and
might not shuffle threads too much)
+ Jakob Oestergaard <jakob@unthought.net> [17.06.02 21:05]:
> On Mon, Jun 17, 2002 at 05:15:11PM +0200, Thomas -Balu- Walter wrote:
[...]
> > md: md driver 0.90.0 MAX_MD...
> > cramfs: wrong magic
> > EXT3-FS: unable to read superblock
> > EXT2-FS: unable to read superblock
> > Kernel panic: VFS: Unable to mount root fs on 09:01
>
> Since it's cramfs that complains, I suppose it's your initrd that is
> bad.
Hm - thats the default woody initrd of that kernel, however I have added
the raid module, created a new initrd and got the same message - but I
can mount the initrd manually (-t cramfs -o loop) and look whats inside,
and I can spawn the shell at boot and load the modules manually (they
get loaded automatically too, but still can not find the superblocks)
> Compile the RAID-1 into the kernel, forget about using modules. That is
> the simple solution that I use - I am no initrd expert, and I have no
> intentions of becoming one :)
No, that would be "the easy way" - I am not supposed to give up on this
8).
If I am able to get it running this way, I don't have to bother with
updates or other things. I could just get a new default debian
kernel-image and the initrd would be built with the new modules, ...
+ Scott Bisker <scott@bisker.com> wrote:
> What you need to do is recreate your initrd to include the modules you
> need during boot. The default mkinitrd /boot/initrd-2.4.18-686-raid1
> 2.4.18-686-raid1 will not suffice.
>
> Try this.
>
> mkinitrd --preload=raid1 --preload=xor /boot/initrd-2.4.18-686-raid1
> 2.4.18-686-raid1
The debian mkinitrd does not have --preload, the modules that should be
included go into /etc/mkinitrd/modules. I've added raid1 already, but
not xor? Perhaps this is the one to go for?
>
> Not sure about on debian, but raidtools should have at least the
> following tools.
>
> /sbin/arytst
> /sbin/detect_multipath
> /sbin/lsraid
> /sbin/raidreconf
The ones above do not exist. Woody's raidtools2 are 0.90.20010914-15
> /sbin/mkraid
> /sbin/raid0run
> /sbin/raidhotadd
> /sbin/raidhotgenerateerror
> /sbin/raidhotremove
> /sbin/raidsetfaulty
> /sbin/raidstart
> /sbin/raidstop
I have those. Do they have to be on the initrd too?
Balu
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Woody, initrd, raid1, boot
2002-06-18 9:25 ` Thomas -Balu- Walter
@ 2002-06-18 17:19 ` Thomas -Balu- Walter
0 siblings, 0 replies; 5+ messages in thread
From: Thomas -Balu- Walter @ 2002-06-18 17:19 UTC (permalink / raw)
To: Thomas -Balu- Walter; +Cc: linux-raid
+ Thomas -Balu- Walter <tw@itreff.de> [18.06.02 11:25]:
[root=/dev/md1 not working]
Update - I am getting closer :)
One reason why it did not work here was that I had to create
the initrd in chroot (the mounted md-devices the original system got
copied to), this was it got /dev/md*, raidmodules and
other things needed to get raid running into the initrd.
I did not even have to change the partition type to autodetect, since
raidstart and such are available and get started in the created initrd.
(master = first ide controller, secondary = second IDE controller, no
master/slave hdd)
But now I am stuck and booting while simulating a broken secondary IDE
controller.
If I take off the master cable (powered off of course) I can boot into
the raid - and get the following messages:
md: could not lock [dev 03:03] sero-size? Marking faulty
md: could not import [dev 03:03], trying to mount raid nevertheless
md: autorun
...
former device [dev 03:03] is unavailable, removing from array
...
So it just ignores hda and boots into the remaining mirrored hdc.
But after rebuilding the raidset and removing the cable to the secondary
controller i get:
ide0 on 0x1f0-0x1f7, 0x 3f6 on IRQ14
md: could not lock [dev 16:03] sero-size? Marking faulty
md: could not import [dev 16:03]
md: autostart [dev 16:03] failed
/dev/md1: invalid argument
...
Kernel panic, because of missing root.
To fix I've tried to make the partitions raid-autodetect, created a new
initrd (because the old one still had "failed-disk" in it) and finally
added "
disk=/dev/hda
bios=0x80
disk=/dev/hdc
bios=0x80
" to lilo.conf.
with no luck - Why does it not "try to mount raid nevertheless" this
way?
Balu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-06-18 17:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-17 15:15 Woody, initrd, raid1, boot Thomas -Balu- Walter
2002-06-17 18:50 ` Jakob Oestergaard
2002-06-17 19:35 ` Scott Bisker
2002-06-18 9:25 ` Thomas -Balu- Walter
2002-06-18 17:19 ` Thomas -Balu- Walter
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).