Sunday Sep 16, 2007

Recover Linux GRUB after Solaris reinstall with Ubuntu Alternate install disc

I have a setup where I multiboot Solaris and Ubuntu, and I occasionally install the newest release of Solaris to try out new features.  Each time I do so, however, Solaris overwrites the existing Linux GRUB install with its own, and I lose the ability to boot to Ubuntu, even though it's still there on the disk.  Here is one method to recover the Linux GRUB (using the Ubuntu Alternate install disc, since that's what I have) and the choices I select:

  1. Boot from Alternate CD
  2. Choose "Rescue a broken system"
  3. Choose Language (English, United States)
  4. Detect Keyboard Layout (No, U.S. English, U.S. English)
  5. Detecting HW, Scanning CDROM, Additional components
  6. Configure networking (Cancel, Continue, Do not configure at this time)
  7. Hostname (Default, Continue)
  8. Detecting HW...
  9. Choose root filesystem device (/dev/sda1)
  10. Rescue Operations Mode (Reinstall GRUB boot loader)
  11. I need to install GRUB to MBR, so type hd0 and press continue
  12. System runs grub-install hd0 to write boot loader to MBR
  13. Reboot
Upon reboot, I now see my original GRUB boot menu, and I can now boot into my Ubuntu installation.  Note that these steps are not specific to an Ubuntu/Solaris setup, but should also work for Ubuntu/<other OS> or even Linux/<other OS>, depending on recovery disk options.

 

About

I'm a Software Engineer at Sun Microsystems, and an alumnus of the University of Texas at Austin - Hook 'Em Horns!

Search

Categories
Archives
« September 2007
SunMonTueWedThuFriSat
      
1
2
3
4
7
8
9
10
12
13
14
15
18
19
20
21
22
23
24
25
26
27
28
29
30
      
Today