ubuntu server gives GRUB error 17 with RAID-5 setup

Asked by Harrison

Hi,

I set up Ubuntu server 8.10 on a machine and used RAID-1 to mirror two drives. Everything worked fine, everything installed, I could boot, etc.

Now, I set up the server with four drives, with RAID-5. The install completed successfully, but when trying to boot, I got an error from GRUB, GRUB error 17.

I looked online and most of the solutions seem to say that it has to do with BIOS configuration (they tell you not to set your BIOS configuration to RAID because Ubuntu is using software RAID). However, my BIOS config is not set to RAID, and I didn't change the BIOS configs between the two installs, so this isn't my problem.

Also, I booted to an Ubuntu LiveCD and checked with parted; my swap partitions do not have boot flags, so that is not the problem.

I noticed that there was some sort of warning during installation about /dev/md0 not being up to date so a restart was necessary before doing something. However, I remember getting this both times, so I didn't think it was the issue. But maybe it is?

Does anyone have any light to shed on this situation?

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Jenkins
Solved:
Last query:
Last reply:
Revision history for this message
johannes_senf (johannes-senf) said :
#1

Hi

I´m working on a similar problem;

I got the same error 17 after reboot; from some help sites and wiki i came to now is has to do with GRUB; GRUB don´t find the 1st, 1,5 and 2nd boot divice on the ride place (hd0);

I find the GRUB boot divices in the new installed Mint in the folder boot/grub/divice.map and menu.Ist; but how I must change it I don`t now; because I´m new on Linux;

sorry

Revision history for this message
Harrison (chenh) said :
#2

I just figured out the problem. You can't boot to anything but RAID-1 using software RAID (for obvious reasons).

I have a new problem though. So, let's say I have 4 drives. I boot to one, and the other three I use RAID-5. Then, the drive I boot to dies. Can I still recover the data on my RAID setup now that my operating system is gone? How much backing up do I need to do?

Thanks.

Revision history for this message
Best Alan Jenkins (aj504) said :
#3

You should be able to boot with a liveCD to recover the data.

As to what you _should_ have done ... :-).

As you say, it's fairly obvious that since GRUB is not RAID-aware, it can only boot from RAID-1. Clearly you realised you need to use a separate partition for /boot. What you should have done is create a /boot partition on *every* drive and use RAID1 for it.

Any good RAID5 install tutorial would have covered this. Sorry you had to find out the hard way!

Revision history for this message
Harrison (chenh) said :
#4

Thanks Alan Jenkins, that solved my question.

Revision history for this message
Harrison (chenh) said :
#5

well, interesting automated response, but i wanted to say personally, thanks