Re: RAID1 on sarge fail on boot, work manually postboot.
On Wednesday 06 April 2005 03:25 pm, Christine600 wrote:
>tem boots up. If I then login as root and
>
> mdrun
> mount /dev/md0
>
> ...then everything works fine.
>
i have had experience with doing this too.
Here is what I found.
You must have the correct modules in the kernel at the time of kernel boot.
How to do this?
Hard way: compile a new kernel. This is not appropriate for a newbie.
If you are a newbie: (such as me) and don't want to compile a new kernel each
time you install a new sytem or upgrade a system kernel, then the right tool
to use is mkinitrd. This is what the debian installer does. It is the RIGHT
beginner way.
what this does is creates a initrd. Ie something like
initrd.img-2.6.8-1-386
initrd.img-2.6.9-1-386
these live in your /boot directory along with
say vmlinuz-2.6.9-1-386
and it contains all the kernel modules that you need to run your system. Your
system boots from this and then runs with the modules later on.
The reason you need this is that during the initial boot up of your system
while your system runs through the scripts in /etc/rcS.d (before the scripts
in /etc/rc2.d), it runs the following scripts
S24raid2
S25mdadm-raid
S30checkfs.sh
Now if the first 2 fail (or whichever you have on your system) then the third
will fail and you will drop to the fix prompt you have gotten.
Ie: your system needs to have modules such as "ext3 and jbd" to get access to
the ext3 file system, as well as the modules"md" "raid1" to address your
raid1.
Additionally, if your raid is not on your motherboard, but on some other
device that has a special driver, you need to have that driver loaded in
initrd.img-2.6.8-1-386 too.
You need to know what drivers need to be in initrd.
For instance on one of my systems I have the need for
via82cxxx, hpt366 pdc202xx_new pdc202xx_old
to find the ide controllers that I added to my sytem that have the ide drives
that my raid lives on. If your had a 3ware or other device your would need
them too.
in addition to the modules raid1 and md.
So one thing to try is the following.
Lets assume you are not using SATA raid1. If you are I dont know what modules
to use. Then lets first try with md and raid1 modules alone.
so edit the file /etc/mkinitrd/modules with vi or emacs or joe and put the
following lines there at the end of the file
md
raid1
ext3
jbd
Then lets assume you are using the debian 2.6.8-1-386 kernel
(check by typeing uname -a )
then do ls /lib/modules
you should see a directory 2.6.8-1-386 in that directory.
Next you go to the /boot directory and do this
mkinitrd -o initrd.img-2.6.8-1-386-christine 2.6.8-1-386
notice the 2 strategically placed spaces in that line and notice that i have
renamed the initrd.img after you. If you
were to do mkinitrd -o initrd.img-2.6.8-1-386 2.6.8-1-386
(which is what is normal to do), it will overwrite the initrd that you already
have with that name in your /boot directory, which would potentially mess you
up more than you are.
now make a new stanza in /boot/grub/menu.lst that replaces the lines
title Debian GNU/Linux, kernel 2.6.9-1-386
root (hd0,0)
kernel /vmlinuz-2.6.9-1-386 root=/dev/hda2 ro
initrd /initrd.img-2.6.9-1-386
savedefault
boot
with
title Debian GNU/Linux, kernel 2.6.9-1-386
root (hd0,0)
kernel /vmlinuz-2.6.9-1-386 root=/dev/hda2 ro
initrd /initrd.img-2.6.9-1-386-christine
savedefault
boot
(or similar).
then boot using this version and see if the raid works. If so make it the
default boot stanza. If not report back with a copy of dmesg
which modules you have reported in dmesg that you need
to address your ide controllers.
Good luck
Mitchell
> The RAID1 was created on a Mandrake10, and the disks moved over when I
> read about debian and apt-get. :-)
>
> I have done apt update/ugrade.
> I have read
> http://www.justenoughlinux.com/2004/03/28/fixing_a_busted_raid.html I have
> read http://www.mail-archive.com/debian-hppa@lists.debian.org/msg04228.html
>
> ...but still no clue
>
>
> Anything else I can try?
>
> Christine
Reply to: