LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-26-2009, 08:57 PM   #1
Eitaro
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Rep: Reputation: 0
GRUB doesn't let me load without Ubuntu external hard drive plugged in.


I have Windows XP installed on my internal hard drive (laptop), and I installed Ubuntu onto an external hard drive. Now, when I load up the laptop:
With the external drive plugged in, I can choose which operating system to load.
Without the external drive plugged in, I get a GRUB error 21.
I have found that GRUB needs to be configured onto the internal hard drive, but since it is Windows, I'm not sure how to configure it properly.
Any ideas?

Edit: I should have mentioned this first, but my laptop hard drive doesn't want to partition, and it doesn't really have the room for it anyways (60 gigs) for two operating systems, a backup, and games.

Last edited by Eitaro; 06-27-2009 at 04:11 PM.
 
Old 06-26-2009, 10:36 PM   #2
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Yea it sounds like when you installed Ubuntu it installed Grub to the MBR of the external drive. Here is a good howto on working with Grub.

Question, when you installed Ubuntu did it ask you where you wanted to install Grub to, or did it just install it? The last time/s I installed Ubuntu it just installed Grub without asking, (which is one of the reasons I don't use it) but to be fair, I was installing it on its own drive without another OS on it, but even so it should ask.

Edit: O welcome to LQ
 
Old 06-27-2009, 12:43 AM   #3
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Quote:
Originally Posted by Eitaro View Post
I have Windows XP installed on my internal hard drive (laptop), and I installed Ubuntu onto an external hard drive. Now, when I load up the laptop:
With the external drive plugged in, I can choose which operating system to load.
Without the external drive plugged in, I get a GRUB error 21.
I have found that GRUB needs to be configured onto the internal hard drive, but since it is Windows, I'm not sure how to configure it properly.
Any ideas?
Unless you use the Advance tab Ubuntu install GRUB on hd0
Which drive was the first boot device when you install Ubuntu
 
Old 06-27-2009, 01:31 AM   #4
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Blog Entries: 14

Rep: Reputation: 35
Probably the easiest way would be a reinstall. At the point where you get asked where to install Ubuntu, switch to manual partitioning. You can keep Ubuntu on the external disk, but you should cut off a chunk of maybe 100 MB or so from the Windows partition. You should then format this small new partition with ext2 and set /boot as its mountpoint (these are options in the dialogue). That will have the effect that grub will install all its relevant files in that partition, and Ubuntu kernels will also end up there. That way grub should be able to boot Windows at least, when the external drive is not connected.

While you're at it, create two partitions on the external drive, set them to mountpoints / and /home respectively and format them with ext3. That way, all system files and programs will end up in one partition and all your personal files and settings in the other. This makes replacing the system at a later date without touching your personal files that much easier.

Robin

Last edited by bitpicker; 06-27-2009 at 01:38 AM. Reason: Afterthought...
 
Old 06-27-2009, 02:13 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,491

Rep: Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077Reputation: 1077
Personally, I would recommend you keep Ubuntu completely on the external. That way you can simply choose to boot it from the BIOS, or leave it unplugged and run just XP. That way you can take the external to another machine, and same applies.

From a Ubuntu terminal run "sudo fdisk -l" and post the results. That way we can refer you to the specific solution from saikee's link above, or tell you what to do.
 
Old 06-27-2009, 03:14 AM   #6
Eitaro
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Continued...

It's awesome to see posts so soon.
Since my first post, I ran through some brick wall troubleshooting. First, I tried to set the BIOS to it's defaults, but that didn't change it, so I switched to an extra laptop hard drive, but that didn't do it. So, I decided that installing Ubuntu onto the spare laptop hard drive should set it to load the primary (Ubuntu, at least) hard drive.
Since then, the external hard drive ran into some bugs (I think it's a faulty) and I've tried reinstalling windows to cover the GRUB up.
Now that that's out of the way, the requested command (sudo fdisk -l) has been typed in, and the response back is:



Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x14cb14cb

Device Boot Start End Blocks Id System
/dev/sda1 * 1 6992 56163208+ 83 Linux
/dev/sda2 6993 7296 2441880 5 Extended
/dev/sda5 6993 7296 2441848+ 82 Linux swap / Solaris

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ce211

Device Boot Start End Blocks Id System
/dev/sdb1 1 30051 241384626 83 Linux
/dev/sdb2 30052 30401 2811375 5 Extended
/dev/sdb5 30052 30401 2811343+ 82 Linux swap / Solaris



Note: Since the external drive is bugging, and I'm using a different internal drive, this will not be the original, but I will post those when I am done with the first laptop hard drive, and run a live cd.

Edit
Okay, so maybe that didn't go so well... In the effort of getting the GRUB to load properly, run windows internally, and run Ubuntu externally, I officially have no hard drive with windows on it. When I tried adding a small partition of Ubuntu on the internal drive to set the GRUB, I couldn't get any files that were still on the Windows partition! I could see them when I was running Ubuntu internally, but GRUB couldn't see Windows on startup, and now I can't run restore.

p.s. Thanks for the welcome, and the help!

Last edited by Eitaro; 06-29-2009 at 10:52 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Grub, Stage1, and GRUB/BIOS detection of external hard drive godfigure Linux - Newbie 1 03-10-2009 03:51 AM
Ubuntu Linux won't load from external hard drive prophet gideon Linux - Laptop and Netbook 5 01-22-2009 10:25 AM
ubuntu installed on external hard drive, can't startup without external hard drive. Vanostaajen Linux - Software 23 01-20-2009 10:59 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-05-2007 12:28 AM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 09:48 AM


All times are GMT -5. The time now is 05:58 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration