0

I have installed a USB drive on an HP Linux server. The USB drive is bootable and contains valid OS backups that I can restore the system from. I can update the backup easily at any time.

I now have the server boot to HDD, however, if at any point in the future, I wish to restore from the USB drive, I want to do a boot from the USB drive once only.

I see 2 possible solutions:

  1. Manage to use BIOS commands on reboot to change the boot order.
  2. Run a single command (possibly grub-reboot) to do a one time only boot from USB.

I was using option 1 but it is a real pain and I can't change the BIOS with some hardware. Can any advise on how I can tell Linux to reboot & boot from USB one time only?

I've read that grub-reboot may do it but everything is focused on booting to a Linux distro from Windows or similar.

GRUB version is 0.97.

Edit: This is a production server that in normal usage will boot from the HDD into Linux. Prior to software / OS upgrades / config changes, the following will occur (using Symantec NetBackup): - Script run to backup OS & config to USB drive. - Scripts run to backup DB, files etc to NetBackup server. - Upgrades performed. In case of requirement to rollback changes or complete failure or upgrade: - Boot from USB drive, re-install OS. - Reinstall other backups from NetBackup server. - Server has not received a bare metal restore to the condition prior to upgrade. In normal operation, if the server is rebooted, it is to boot from HDD. In extreme cases where we wish to perform a bare metal restore, we will need to boot from the USB. Ideally this will be done remotely. Accessing the BIOS remotely can be difficult with some hardware/putty setups so we would prefer to use a grub command to reboot from USB drive if possible.

2 Answers 2

1

A quick idea comes to mind:

  1. chain-load the USB drive with the other OS grub.
  2. set the USB drive to be the default boot medium
  3. make a script that the OS of the USB drive will execute at boot, restoring the HDD OS to be the default boot medium
  4. reboot and choose manually to boot to the HDD OS.

I don't understand why you need the USB drive to be booted once only, but this should achieve it with relative ease

1
  • Hi, Thanks for the input. WRT "once only", I should have provided more info on what I am trying to achieve - I have added this to the main question.
    – B G Damion
    May 15, 2014 at 6:11
0

This link details several approaches to your issue:

http://sidvind.com/wiki/GRUB:_Boot_another_OS_once

You will probably need to fine tune the settings of grub

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .