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.

I have a working RHEL in /dev/sda1 and a newly constructed Ubuntu Lucid in /dev/sda2. I'm going to edit the grub config and reboot the server into the new Ubuntu. However, I'm not 100% sure that the new distro can boot. And since my only way to access the server is via SSH, I need the network to be up too.

How can I configure Grub and Ubuntu so that if the server fails to boot, it will automatically reboot into the old RHEL?

Currently using GRUB 0.93, but I can upgrade it if needed.


Update: In the end, no boot failure occured. But without the insurance from this, I wouldn't have attempted http://serverfault.com/questions/208128/how-to-remotely-install-linux-via-ssh =)

share|improve this question

2 Answers 2

I'm not sure if 0.93 can do it, but 0.97 is capable of booting once-only. Grab the grub SRPM from Fedora if need be and rebuild it.

You'll also need to tell your other install to reboot on panic (the panic kernel parameter is what you need to set in the bootloader configuration).

share|improve this answer

While 0.93 does not support that option from 0.97, fortunately you can do savedefault --default=1 --once in the grub batch mode. See http://www.linux-noob.com/forums/index.php?/topic/2928-grub-single-boot-and-kernel-panic-reboot/ for details

In addition to that, I've put a auto-reboot script in /etc/cron.d so that in case the network doesn't work in the new system, I can still get back to the working system.

share|improve this answer

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.