DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Some weeks ago, I set up a new web server with Debian Etch. I set up Raid 1 on two SATA disks during the install. This friday, one of the disks crashed, and the server showed "kernel panic". I took out the disk, and rebooted, and it worked fine.
Today, I put in a new disks, made partitions, and added them to the array with mdadm. It is currently syncing over to the new disk. But I'm not sure about GRUB and the MBR. I've read http://www.tldp.org/HOWTO/Software-R...O-7.html#ss7.3 and it says:
Quote:
If you are using grub instead of LILO, then just start grub and configure it to use the second (or third, or fourth...) disk in the RAID-1 array you want to boot off as its root device and run setup. And that's all.
For example, on an array consisting of /dev/hda1 and /dev/hdc1 where both partitions should be bootable you should just do this:
Some users have experienced problems with this, reporting that although booting with one drive connected worked, booting with both two drives failed. Nevertheless, running the described procedure with both disks fixed the problem, allowing the system to boot from either single drive or from the RAID-1
Another way of ensuring that your system can always boot is, to create a boot floppy when all the setup is done. If the disk on which the /boot filesystem resides dies, you can always boot from the floppy. On RedHat and RedHat derived systems, this can be accomplished with the mkbootdisk command.
Here is the setup:
/dev/md0 mounts to "/" - using /dev/sda1 and /dev/sdb1
/dev/md1 mounts to "/var" using /dev/sda3 and /dev/sdb3
Swap is on /dev/sda2 and /dev/sdb2
The disk that crashed was /dev/sdb. So I think I should maybe run:
grub
grub>device (hd0) /dev/sdb
grub>root (hd0,0)
grub>setup (hd0)
Am I correct? I'm worried I may mess it up, and it won't boot. I don't know GRUB at all. Is there a mkbootdisk command in Debian like for RedHat? I was thinking of using a floppy for backup, and I looked at mkboot, but I'm not sure if it works or not. Is it possible to just put the MBR on the floppy so it boots the kernel from /dev/md0?
I'm not sure if you understood what I wrote. Since the server boots, of course GRUB is installed on the "first disk". But as I understand it, using the Raid setup in the installer, the server can boot even if any disk fails. If my "first disk" fails in the future, I think there is no MBR on the second, and it cannot boot. I wish I knew how the installer does it, I haven't found out yet.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.