Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The question is somewhat involved, but bear with me for a minute, it's not actually that complicated.

So, I have two hard discs, I suspect one of them to fail some times, but before I completely replace it (I don't know which yet!) I put a bootloader on each one of them.

Let's call hard discs /dev/sda and /dev/sdb. I have 3 OSes installed, two of them are installed to /dev/sda, and one of them is on /dev/sdb. All OSes are Linuxes of a different flavor. Now, the last OS installed to /dev/sda put on it a bootloader that can see two other OSes on /dev/sdb, but the old bootloader can only see the two OSes on /dev/sdb (where it, itself lives).

So, is there a way to update somehow the bootloader on disc /dev/sdb to see the OS which was installed after it was created?

Thanks in advance!

EDIT

OK, I found this in grub.cfg:

menuentry 'My Ubuntu version' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,6)'
    search --no-floppy --fs-uuid --set some-guid
    linux   /boot/vmlinuz-version root=UUID=some guid ro   quiet splash
    initrd  /boot/initrd.img-version
}

If I just copy this (being sure this is the system entry I need in another bootloader), is this all I need to do, or is there anything else I need besides these lines? Sorry, I'm a bit scared to do this change, so wanted to be sure.

share|improve this question
    
Tr reading up on chainloading bootloaders. The recent versions of almost all bootloaders support it –  darnir Aug 25 '12 at 9:10
    
Thanks for the comment, but I don't want to load them one after another, it's more as in one should be a backup of another in case one fails. Sorry if I didn't make that clear in the question. –  wvxvw Aug 25 '12 at 9:55
add comment

2 Answers 2

up vote 3 down vote accepted

All you need to do is update grub's list of installed OSs and reinstall it to the MBR of each disk:

$ update-grub
$ grub-install /dev/sdb 

That assumes that the bootloader on sda already sees al OSs and can be left alone. I am not sure which of your disks is which since you mix them up a bit in your question. If the bootloader on sda also needs to be updated run:

$ grub-install /dev/sda 
share|improve this answer
    
Thanks for reply, it was slightly different in the end, on Fedora (and possibly other RH-like) and using grub2 it is grub2-mkconfig -o /boot/grub2/grub.cfg ; grub2-install /dev/sda –  wvxvw Aug 26 '12 at 20:42
    
You're welcome @wvxvw, I am surprised you needed grub-mkconfig, you should already have had a grub.cfg file. Oh well, live ad learn, glad it worked :). –  terdon Aug 27 '12 at 12:24
add comment

You certainly can copy the configuration entries from one boot loader to the other one(s). Alternatively (or in addition), you can also chainload bootloaders to each others.

Details will vary depending on what bootloader (eg: grub) you use, and which release.

share|improve this answer
    
Thanks for affirmative answer, but could you have a link to the documentation of how to do that? The bootloader is grub 2. I'm new to the whole conundrum, so would appreciate it very much. –  wvxvw Aug 25 '12 at 10:00
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.