LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to boot from the 3rd disk while RAID1? (https://www.linuxquestions.org/questions/linux-software-2/how-to-boot-from-the-3rd-disk-while-raid1-376263/)

Chowroc 10-24-2005 01:06 AM

How to boot from the 3rd disk while RAID1?
 
I just want to do this: Now there is 4 hard disks, to build RAID1 on RAID0.

I splite the partitions of every disk to 2 part: the system part and data part. data part will be build RAID1 on RAID0, and system part, to make the system always availabe, I build only RAID1 for disk partitions: /(sda1,sdb1,sdc1 & sdd1), /usr(sda2,sdb2,sdc2,sdd2).

Then I must setup grub on all these 4 disks to make the system can boot up from anyone when the previous disk is broken, so do this:
Code:

# grub
grub> install (hd0,0)/boot/grub/stage1 d (hd1) (hd0,0)/boot/grub/stage2 p (hd0,0)/boot/grub/grub.conf

grub> install (hd0,0)/boot/grub/stage1 d (hd2) (hd0,0)/boot/grub/stage2 p (hd0,0)/boot/grub/grub.conf

Now if I remove sda, the system can boot from sdb, GRUB works well. But then I go on remove sdb, I just get a command prompt of grub while boot:
Code:

grub>
If I run the right commands, I can boot the system:
Code:

grub> root (hd0,0)
grub> kernel /boot/vmlinuz-VERSTION ro root=/dev/md0
grub> initrd /boot/initrd-VERSTION.img
grub> boot

But I don't think it's convenience, what is the problem and what is the solution?

Thanks.

Chowroc 11-07-2005 07:56 AM

I comment this 2 line, and it seems work:
# splashimage=(hd0,0)/boot/grub/splash.xpm.gz
# hiddenmenu

But now I have another problem. Using the previous way, if I remove sda and sdb, OK, I can boot up from sdc(set in BIOS) because it will been considered as (hd0) by stage1 on the MBR of sdc. But what about the condition when I re-insert 2 new disks. This 2 disks have nothing.

Will sdc stage1 takes new sda as (hd0)?

I tried in VMware, and I found in this case, sdc stage1 still take itself as (hd0), not the sda. But what about (hd1), (hd2) and (hd3)? I tried this to found:
Code:

grub> install (hd3,0)/boot/grub/stage1 d (hd2) (hd3,0)/boot/grub/stage2 p (hd3,0)/boot/grub/grub.conf
I found the behaviour of GRUB was not sure, sometimes it found the stage2 on sdb and sometimes on sdd.

What's wrong? Is it realy unsure? Or it is just the cause of the Virtual Machine?

Thanks.


All times are GMT -5. The time now is 08:00 PM.