Grub with USB drive

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Grub with USB drive

Postby gmport » Wed Jan 23, 2013 9:15 am

Hi,

I have been using Linux almost exclusively for over 3 years now using various versions of Ubuntu and Mint and am now using Mint 14.1 (Cinnamon) dual booting with Windows XP; I only keep Windows for AutoCAD. Good though Mint is, I often feel like trying something a bit different.

Using mostly my HP laptop, trying a new distro on live discs is ok, but doesn't give a true feel for the distro being tested. Virtualbox is ok, but again is not like running the 'real thing'. So I have taken to installing the distro to be tested on a USB drive – it runs faster and I get a better impression of what the new distro is really like.

The problem I have is what the new installation does with Grub. I always select manually partition set-up and select to install the boot manager to '/dev/sdb'. However, some installers put the Grub boot menu on sdb, but remove the original menu from sda. Consequently, I can only boot from my main installation on sda when the USB drive (sdb) is connected.

Other installers don't seem to install Grub at all leaving me with the Grub recovery prompt when I boot.

I have tried using the 'System Recovery CD' from LXF162, but this seems very complicated. I have also scoured LXF answers for advice – there are several questions on Grub problems, but I can't find anything that covers my particular circumstances using a removable drive.

Could someone tell me a method for replacing/re-installing Grub (in simple terms please, I'm getting on a bit!) so that I can boot my original installation on sda when the USB drive (sdb) is not connected or boot from the USB drive when it is.

Regards gmport
gmport
 
Posts: 20
Joined: Fri Jan 20, 2012 3:16 pm

Postby gmport » Wed Jan 23, 2013 7:51 pm

Update...

It's always the same, I've been looking for a solution for days and then hours after posting the above, I stumble across “Grub2/installing” at:
https://help.ubuntu.com/community/Grub2/Installing.

It explains how to do just about amything with Grub. From these instructions I booted into Mint with the USB drive connected and in a terminal entered:

Code: Select all
sudo grub-install /dev/sda


After re-booting I had the Grub menu back, but the USB drive was not included. So I then entered:

Code: Select all
sudo update-grub


Success everything worked correctly!!! Without the USB drive connected, I could boot Mint or Windows. With USB connected, I could boot into Mint, Windows or the new openSuse 12.2.

This was all ok until I re-booted after installed all the updates – instead of the Grub menu, there was an error message about the kernel.

So I did:

Code: Select all
sudo update-grub


again and all is well again.

Regards gmport
gmport
 
Posts: 20
Joined: Fri Jan 20, 2012 3:16 pm


Return to Help!

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 1 guest