Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Yesterday I attempted to install Ubuntu 6.06 server on my Dell Poweredge 2400. My hardware RAID controller is broken, so on the Ubuntu partitioning manager I created a software RAID-0 array. Everything installs fine until I get to the boot loaders. Neither GRUB nor LILO would install, so I carried on without a bootloader install. The machine rebooted after it had finished installed and eventually I got to the GRUB> prompt, from where I have no idea what to do. I had a look on the net and I've found out that it is a problem with software RAID and grub, they don't like each other apparently.
Can anyone suggest a way I can get GRUB onto this system, or an alternative?
If you got to the grub prompt that is a good sign. You could try loading in the kernel and initrd file and try to boot. If that works, then there isn't a raid/grub problem.
Enter in the shell:
kernel (
Then hit the tab key for the possible options if you don't know which partition and directory the kernel is located.
It might look like:
kernel (sd0,0)/boot/vmlinuz
Do the same for initrd and then enter the "b" key to boot.
On this wiki, they installed grub onto both drives of a raid-1 partition. You could instead not have the first partition on both drives be used by raid at all. Make two small (hd0,0) partitions on both drives. Install grub onto one. Use the second as a backup of /boot. Then the rest of the drives could be used for raid.
To fix a non-bootable system and ensure GRUB is installed on both drives, manually install GRUB as follows:
* Reboot the machine from the original Linux CDROM
* From the Linux boot menu, select “Rescue a broken system”
* Continue through the prompts until the screen “Device to use as a root file system” appears
* Press Alt-F2 to switch to a second console screen then press Enter to activate it.
* Mount the md0 RAID device and use chroot and grub to install the bootloader onto both sda and sdb using the following commands
I have never succeded in doing a proper software raid for /boot (raid1 works fine, but I think it boots without activating the second drive until the kernel is running)
To have a soft raided / (root) the only thing you need is to make sure the initrd has the raid-modules in it (use mkinitrd if the instaler fails to fix it for you) My systems always have a 100MB /boot partition (with raid1 or dd-mirrored if its an important system)
On realy tricky hardware Ive borrowed a drive from another system to boot on, fix partitions and raids, then rsync the os intoplace from the borrowed drive (doing a few edits of grub.conf/menu.lst and fstab after the cloning) This method is effective if I need to compile a custom kernel to even boot on hardware (sometimes with very new mobo)
I followed the instructions on "Setting up software RAID in Ubuntu Server" (posted on April 24th, 2007 by Derrick Webber at the advosys.ca site) and created RAID1 with 2 hard disks. The Ubuntu 8 Server system are installed on RAID1 and rebooted successfully. But when I tried to load the GRUB boot loader onto the second disk with these steps,
--
* Reboot the server from the original Ubuntu Server CDROM
* From the Ubuntu boot menu, select “Rescue a broken system”
* at the screen “Device to use as a root file system” appears
* Press Alt-F2 to switch to a second console screen then press Enter to activate it.
* then the following commands.
I received an error:
mount /dev/md0 /mnt
chroot /mnt
grub
device (hd0) /dev/sd
Error: Device not found.
I managed to do all the steps in the grub installation without any errors, byt it did not work for me. When I rebooted, I just got the grub> prompt and the system did not boot.
mount /dev/md0 /mnt
chroot /mnt
grub
device (hd0) /dev/sd
Error: Device not found.
device (hd1) /dev/sdb
Error: Device not found.
--
Can anyone help?
I also came accross this very problem. The reason is that you are missing /dev/sda and /dev/sdb entries. Just make them with mknod and you are all set. The syntax is:
mknod /dev/sda b <major> <minor>
mknod /dev/sdb b <major> <minor>
Copy the <major> and <minor> from your rescue's system /dev directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.