LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-09-2006, 02:04 AM   #1
rookiepaul
Member
 
Registered: Jul 2005
Location: London
Distribution: Debian, RedHat, Ubuntu
Posts: 73

Rep: Reputation: 15
Software RAID, Ubuntu, and Grub problem


Hi Guys,

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?

Much appreciated.

Rookie.
 
Old 08-09-2006, 02:26 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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.
 
Old 08-09-2006, 02:56 AM   #3
hamish
Member
 
Registered: Aug 2003
Location: Edinburgh
Distribution: Server: Gentoo2004; Desktop: Ubuntu
Posts: 720

Rep: Reputation: 30
Is your boot partition on RAID 0?

I'm sure I remember something about not being about to boot from a RAID 0 array.

Hamish
 
Old 08-09-2006, 05:04 AM   #4
rookiepaul
Member
 
Registered: Jul 2005
Location: London
Distribution: Debian, RedHat, Ubuntu
Posts: 73

Original Poster
Rep: Reputation: 15
Cool, I will try that jschiwal. Do you know of anyway of getting GRUB onto a software RAID-0 or is it impossible?
 
Old 08-09-2006, 06:16 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
According to this wiki, grub accesses the drives directly so you need to use raid1 for the boot partition.
http://www.gentoo-wiki.com/HOWTO_Gen..._Software_RAID

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.

Last edited by jschiwal; 08-09-2006 at 08:03 AM.
 
Old 11-02-2007, 02:31 PM   #6
nedharkey
LQ Newbie
 
Registered: Nov 2007
Posts: 1

Rep: Reputation: 0
Wink Fix the GRUB boot loader on your RAID drive(s).

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

mount /dev/md0 /mnt
chroot /mnt
grub
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
device (hd1) /dev/sdb
root (hd1,0)
setup (hd1)
quit

* Reboot the system with command “shutdown -r now”, remove the CDROM and allow the system to boot from the hard drive.
 
Old 11-04-2007, 02:58 AM   #7
heson
LQ Newbie
 
Registered: Nov 2007
Posts: 6

Rep: Reputation: 0
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)

Last edited by heson; 11-04-2007 at 03:00 AM.
 
Old 08-21-2008, 10:09 PM   #8
weiyuanw
LQ Newbie
 
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
Failed to fix the GRUB boot loader on RAID drive.

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.

device (hd1) /dev/sdb
Error: Device not found.
--

Can anyone help?

Last edited by weiyuanw; 08-21-2008 at 10:20 PM.
 
Old 08-22-2008, 03:32 PM   #9
Robert_SK
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
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.
 
Old 08-22-2008, 03:35 PM   #10
Robert_SK
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by weiyuanw View Post
I received an error:

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.

Last edited by Robert_SK; 08-22-2008 at 03:36 PM.
 
  


Reply

Tags
grub, raid, server, software, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having grub boot a windows software raid volume. byteframe Linux - Hardware 1 07-10-2006 11:51 AM
Replacing a drive in /boot, software RAID-1 + GRUB tobiasly Linux - Hardware 1 12-21-2005 12:08 AM
Software RAID 1 setup on CentOS using Grub boot loader kumarsundaram Linux - Software 1 11-30-2005 12:57 PM
Grub software raid problems syamajala Linux - Distributions 7 01-07-2005 07:10 PM
RH9 Software Raid 1 hard drive failure - GRUB loader errors Mynar Linux - Newbie 1 01-28-2004 10:25 AM


All times are GMT -5. The time now is 08:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration