Quote falko
"Please try this guide instead:
http://www.howtoforge.com/how-to-set...ion-centos-5.3
The command to create a new initrd is mkinitrd on CentOS."
Hi, thanks! I have tried to follow that tutorial and used mkinitrd a couple of days ago and it worked to a point. Unfortunately /dev/sda2 (the initial root partition) is indicated as "device busy" because if I put root=/dev/md1 in grub.conf on the kernel line it will throws me again "kernel panic" so I have to boot with root=LABEL=/1 in the kernel line in grub.conf. I have recompiled initrd and I believe it added raid support:
[root@localhost boot]# mkinitrd -v -f --preload=raid1 --with=raid1 /boot/initrd-2.6.18-164.el5PAE.img 2.6.18-164.el5PAE
.......
Adding module raid1
Adding module ehci-hcd
Adding module ohci-hcd
Adding module uhci-hcd
Adding module jbd
Adding module ext3
Adding module scsi_mod
Adding module sd_mod
Adding module libata
Adding module ahci
Adding module dm-mem-cache
Adding module dm-mod
Adding module dm-log
Adding module dm-region_hash
Adding module dm-message
Adding module dm-raid45
I am choosing the second option (PAE) in grub at boot time and this is my grub.conf:
[root@localhost boot]# cat grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
boot=/dev/sdb
default=0
fallback 1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title RAID
root (hd1,0)
kernel /vmlinuz-2.6.18-164.el5 root=/dev/md1 ro hdb=60801,255,63
initrd /initrd-2.6.18-164.el5-2.img
savedefault
title CentOS (2.6.18-164.el5PAE)
root (hd1,0)
kernel /vmlinuz-2.6.18-164.el5PAE ro root=/dev/md1
initrd /initrd-2.6.18-164.el5PAE.img
title CentOS-base (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/1
initrd /initrd-2.6.18-164.el5.img
When I boot with root=LABEL=/1 it boots normally but with root=/dev/md1 it throws me a kernel panic.
So I don't seem to be able to boot directly from a RAID mount point although I have compiled it into initrd. But if I boot from non-raid (sda2), raid is active after boot:
[root@localhost boot]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb2[1]
51199040 blocks [2/1] [_U]
md2 : active raid1 sdb3[1]
4096448 blocks [2/1] [_U]
md0 : active raid1 sdb1[1]
104320 blocks [2/1] [_U]
unused devices: <none>
I am really lost here. If you can please point me into the right direction.
Thanks!
Recent comments
1 day 5 hours ago
1 day 5 hours ago
1 day 10 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 19 hours ago
1 day 23 hours ago
2 days 6 hours ago
2 days 10 hours ago
2 days 12 hours ago