Main Menu

Install Grub Bootloader PDF Print E-mail

After several failed attempts at making a working, bootable exact disk image, I learned that it's necessary to reinstall the Grub bootloader after restoring from a disk image.

Since I'm booting Ubuntu on the system I used to restore the disk image to a keychain drive, I was concerned that I would accidentally select the wrong disk when writing the image. To solve this problem

, I created a file with a unique name and placed it in my root filesystem folder "/." Prior to backing up my keychain drive, I created a file in the root of the filesystem so I could be sure which drive I was writing. This file could be any name, but I recommend using "Keychain_Drive" or "Ubuntu_Backup."


To install grub, open a terminal window and type the following:
sudo grub
root (hd1,0)

** Note: This line may vary depending on your configuration.

find (hd1,0)/<tab>

** Note: You should see the file you created in the root of the filesystem.

setup (hd1)

** You should now be ready to shutdown your system and boot from your newly imaged drive.

 

[Update]

This configuration sometimes requires me to edit the grub configuration when I boot from different hardware.  In testing on my own systems, root (hd0,0) appears to work consistently when I boot from USB flash memory.