LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-06-2009, 09:48 AM   #1
marcel etchart
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
ubuntu on external HD problems


Right now I am running Vista on my laptop's internal HD. I wanted to run Ubuntu off an external HD so that I can keep my laptop on vista without dual booting and so that i can use linux on any other computer i want to use. so i installed Ubuntu 8.04 on my external HD.

Problem: i can't boot up vista without having my external HD plugged in! i tried the
sudo grub
root (hd0,0)
setup (hd0)
but then i got "Error 17 cannot mount selected partition"

i think it's because the hd0 partition is vista and that is calling for ubuntu but i'm really not sure.

basically i want it so that when my external is not plugged in i can boot vista. but when it is i can choose to boot up linux. also when the external is plugged into other computers (almost always windows)i can choose to boot up linux.
thanks in advance!!
 
Old 03-06-2009, 10:05 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Can you edit your BIOS configuration to boot first from the USB drive, then from the HD? (I have my BIOS set to search for a bootable device in this order: USB Floppy -> USB HD -> CD/DVD -> HD.) Then all you need to do is install GRUB on the USB drive.

To install GRUB on the USB drive, once you're running Ubuntu off that drive, all you need to do is a sudo grub-install (hd0).

Alternatively, you could add the GRUB boot sector image to your Vista C:\ drive and hack a boot.ini file (which Vista doesn't use by default, but will use if it exists) so it can let you boot the GRUB boot sector. But getting this to work is trickier than just changing your BIOS defaults.
 
Old 03-06-2009, 12:45 PM   #3
marcel etchart
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
when tried to change my boot order and boot off the external HD i got
Error 17 Cannot mount selected partition.
press enter to continue.

i pressed enter and tried to go to vista and it came up with
Error 13 Invalid or unsupported executable format.

if i restart my computer and do not have the external plugged in i get the Error 21 message.
 
Old 03-06-2009, 02:26 PM   #4
marcel etchart
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
i'm somewhat new to linux so i dont know all the commands or how to edit files yet. would anyone happen to know the commands i need to use to fix the above stated problem?
 
Old 03-06-2009, 06:20 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
You have somehow overwritten the Vista boot loader on your internal HD with the GRUB boot sector. This would not, normally, be a problem, but the GRUB boot sector you've installed is looking for it's second-stage files on the removable drive, so you can not boot without your USB drive plugged in.

If your laptop has a typical Vista installation, it should have a "recovery" partition on the internal HD. If you can boot that partition, you can restore the Vista MBR to your internal HD. You should be able to force a boot from the recovery partition after you get the "Error 17" message by using the GRUB editor to modify the Vista boot instructions. (The GRUB editor just uses the keyboard arrow, home, end, and backspace keys to edit the boot instructions in memory. I doesn't make any changes in the boot configuration file.)

Anyhow, get to the place where you were ready to press enter to boot Vista. At the bottom of the screen you should see a block of text describing how you can edit the boot instructions. After you read them, press the "e" key to open the instructions for editing. You should see a block of text similar to this:
Code:
        rootnoverify    (hd0,0)
        savedefault
        makeactive
        chainloader     +1
Select the root line, press "e" again, and change the (hd0,0) to (hd1,1), press enter to save the change, then "b" to boot from the change instructions. F.Y.I.: GRUB numbers drive and partitions from 0, so (hd0,0) means "first partition on the first drive" and "(hd1,1)" means "second partition on the second drive." Since you've booted from the USB drive, that drive is the first drive, and the internal drive is the second drive. One problem with GRUB is that the drive numbering can depend what the BIOS uses as the boot drive.

Anyhow, if my guess is correct, that should boot you into the "Rescue" miniNT OS where you should be able to restore the MBR so Vista will boot when you don't have the the USB drive plugged in. (By the way, using (hd1,0) instead of (hd1,1) should boot your Vista for you, but I don't think you can restore the MBR from inside Vista.)

After all that, unplug the USB drive and see if you can boot Vista. If you can, then all that needs to be done is to install a GRUB MBR on the USB drive and fix the /boot/grub/menu.lst file on the USB drive so you can get into Ubuntu or Vista when you boot from the USB drive.

That should be fairly easy, but let's wait 'till you've got your laptop back to the state it was in before you started playing with the USB drive.

Try the above, and post your results.

Last edited by PTrenholme; 03-06-2009 at 06:23 PM.
 
  


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
ubuntu installed on external hard drive, can't startup without external hard drive. Vanostaajen Linux - Software 23 01-20-2009 09:59 AM
External modem in Ubuntu MToloo Linux - Networking 2 06-06-2008 09:32 PM
External ubuntu install on external USB HDD th3_tr00p3r Linux - Newbie 1 05-11-2008 02:56 PM
ubuntu partitioning tool does not see external usb hard drive when installing ubuntu fakie_flip Linux - Software 2 07-30-2006 12:44 AM
External Hard drive + ubuntu yayd Linux - Newbie 9 01-15-2006 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:51 PM.

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