LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-30-2015, 04:43 AM   #1
pnbalaji
Member
 
Registered: Oct 2003
Location: Dodgeville, WI
Distribution: Mageia 5
Posts: 46

Rep: Reputation: 0
Grub Error with Ubuntu in external HDD


Hi,

I had a 1TB external HDD and I partitioned it with partition wizard. The first partition is of size 900 GB with all my data in it. I formatted the remaining 60-70GB and installed ubuntu on it. When I connected the external HDD to my laptop, the external HDD was recognized as /dev/sdb. The first partition was /dev/sdb1 and the second partition was /dev/sdb2. I formatted /dev/sdb2 as ext4 file system and installed ubuntu. During the boot loader installation, I selected /dev/sdb to install the grub boot loader. Everything worked fine up to this point.

However, when I reboot my laptop by connecting the external HDD, the control stuck at the grub rescue> prompt.

I did look at several forums, but it is more confusing when I look at the results.

Can some one help me? I have the super grub disk and boot repair disk, but haven't used them as I do not want to mess-up anything on the laptop as it is my work laptop.

On some page, I read that linux has to be installed on the first partition of the external hard drive and to have the data in the second partition. Can some one confirm?

Thanks,
Balaji.
 
Old 12-30-2015, 05:34 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Too little info.
Does the system boot ok without the external plugged in ?.
From a Linux system, even a liveCD, go here, run the script with the external plugged in and post the RESULTS.txt. That way we can see the boot environment.
 
Old 12-30-2015, 05:38 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
did you also create a grub config file?
with e.g.
Code:
sudo update-grub
you also have to take care into which partition that config file goes.
i think by default it goes into the /boot of the distro currently running.


i think you have to install grub to /dev/sda and then tell it to boot from /dev/sdb2.
Or, you have to tell your BIOS to boot from the external hard drive first.

Last edited by ondoho; 12-30-2015 at 05:39 AM.
 
Old 12-30-2015, 06:07 AM   #4
pnbalaji
Member
 
Registered: Oct 2003
Location: Dodgeville, WI
Distribution: Mageia 5
Posts: 46

Original Poster
Rep: Reputation: 0
Thanks for the responses.

@syg00: The laptop boots fine into windows with out the external HDD plugged in.

@ondoho: Sorry, I did not run the sudo update-grub after the installation. I don't remember doing this after every installation. I guess Grub installed fine with out any errors reported.

I don't want to install anything into /dev/sda as it is my work laptop.BIOS is set to boot from external hard drive.

Thanks,
Balaji.
 
Old 12-30-2015, 06:19 AM   #5
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Using the BIOS for an external with a modern linux...

I boot openSUSE 13.2 from my internal HDD, but installed Kubuntu in a logical partition of an external USB HDD. The bootloader for Kubuntu is installed in the logical partition of the external HDD.

When I use a keystroke to direct the BIOS to boot from the internal HDD, it finds the SUSE copy of GRUB2 and boots. When I choose to boot from a USB device, the BIOS finds the Kubuntu copy of GRUB2 with both Kubuntu and SUSE on the boot list.

In case your BIOS can't boot from a USB device, you can use the Plop boot CD.

https://www.plop.at/en/bootmanager/download.html

Last edited by thorkelljarl; 12-30-2015 at 07:55 AM.
 
Old 12-30-2015, 07:03 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
BIOS is set to boot from external hard drive.
This might be the problem. Can you set the bios to boot from the internal drive and hit a key while powering up to select to boot from external drive?

Last edited by colorpurple21859; 12-30-2015 at 01:16 PM.
 
Old 12-30-2015, 07:54 AM   #7
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
As already mentioned, to find your bootloader...

This is a useful script to obtain information on what boots and where it is.

http://sourceforge.net/projects/bootinfoscript/

Last edited by thorkelljarl; 12-30-2015 at 07:58 AM.
 
Old 12-30-2015, 09:48 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
If you already have the boot repair software, run that and make sure you select the option to "Create BootInfo summary" and do not try to do any repairs. Post a link to the output here. It would have been useful if you had indicated which windows you have and whether it uses UEFI or not. This info will be in the boot repair output.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu on external drive boots only on one computer, GRUB gives error on others Basilios Ubuntu 20 06-24-2012 01:27 PM
I installed ubuntu 9.04 to my Maxtor external hdd. I have no internal hdd. I can boot dont33 Linux - Newbie 1 08-13-2009 04:13 PM
[SOLVED] Removing Grub from internal HDD and installing it only on external hdd M3GA8U5H Linux - Newbie 5 08-07-2009 01:47 AM
GRUB error 21 when trying to boot XP after installing Ubuntu 7.04 on seperate hdd neilksos Linux - Newbie 16 05-05-2008 08:07 AM
GRUB Error 17 when installing Ubuntu on an External Drive nrbelex Linux - Software 1 11-16-2005 08:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration