Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have weird situation - order of disks as reported by BIOS, is different than order of disks that Linux sees.

Which makes for problematic run - grub installs to sda, but bios boots from sdd or something like this (this machine has 7 disks, 4 on internal controller, and 3 on external.

Is it possible to make grub install (and later on update) to all disks, and not just /dev/sda? I have no idea which disk is the one that bios wants to boot (all disks are the same, and since I have raid over it, I can't remove them at will), so the only solution I see is to make grub install on all sda-sdg.

This is Debian stable, with Grub2.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

I think you can just do

grub-install /dev/sda
grub-install /dev/sdb
grub-install /dev/sdc
grub-install /dev/sdd
grub-install /dev/sde
grub-install /dev/sdf
grub-install /dev/sdg

I can't really foresee what kind of problems you'll be having with grub's HD addressing, though, if your disks are mixed up.

share|improve this answer
ok. but how to make it happen every time that I install new kernel? or will that not be necessary? –  user13185 Oct 28 '11 at 9:19
Sorry for the very late reply; I'm not used to not getting e-mail about it... Anyway, you don't need to do that for every new kernel. The bootloader dynamically looks up the kernel. –  Halfgaar Mar 10 '12 at 13:53

You didn't write anything like, which distro you use (Am I blind?). Today I almost destroyed my server, because I was really pi**ed off of not working grub-install. I used to have GRUB error 17, when trying to do that.

So I have better solution, how to install very easily and very quickly grub to multiple drives in raid. If you can boot your system (after install or from live distro), and have Debian Wheezy (in my case ver 7.2), you can just type following command:

dpkg-reconfigure grub-pc

(you must be root when doing this!!!)

I was pressing just enter, enter, enter and last screen, there was a question, into which devices I want to install the GRUB! :-) Just by your space choose all physical drives (do not choose /dev/md devices, just /dev/sdb /dev/sdc and so on and neither don't choose /dev/sdb1 or /dev/sdb2, just only devices without numbers!) In my example /dev/sdb /dev/sdc dev/sdd /dev/sde not /dev/sdb1... Then you go next and wait few seconds (about 30 or 45 seconds to finish) and get a next bier for a celebretion, because YOU DID IT! ;-)

Ubuntu-server 12.04 LTS ask you at the ending of installation, if you want to install grub into all devices. Debian does not have it.

After this solution, it does not matter on which hard drive boots earlier or later, it will boot everytime.

Enjoy ;-)

share|improve this answer
Whew, your post reads like from a kid. A tad annoying to read, I must admit. –  phresnel Oct 19 '14 at 18:43

The order in which devices are initialised at boot time can be random, causing problems if your /etc/fstab is using disk identifiers (sda, sdb etc).

Check this two links how to circumwent:



share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.