Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have windows 7 installed in my internal hdd and wanted to try out Ubuntu so I got a USB to put Ubuntu LiveUSB on and installed Ubuntu on an external HDD and everything worked out fine.

Now the problem. If I remove the external hdd and try to boot windows normally it shows the grub rescue screen. The only way to boot into windows is by having the external hdd attached.

Is there any way I can make it so I wont have to have the external hdd attached to be able to boot my windows 7?

share|improve this question
1  
Related (but probably not a duplicate): How can I repair grub? (How to get Ubuntu back after installing Windows?) –  Eliah Kagan Jan 21 '13 at 4:19

2 Answers 2

When you installed Ubuntu, it placed the Grub bootloader on your internal drive MBR, but all the grub modules are stored on your Ubuntu partition, on the external drive. Grub won't let you do much if it cannot load the modules, so, without the external plugged in you cannot boot anything.

What you should have done is to leave the Windows bootloader on the internal drive, and installed Grub to the external. Then whenever you plug in the external, just override at startup to boot from the external.

To install Grub to the external MBR (assuming it's /dev/sdb):

sudo grub-install /dev/sdb

To get Windows booting without the external, reinstall the Windows bootloader. To do this boot from a Windows 7 repair CD or the Windows Installation DVD to a repair prompt and run:

bootrec /fixmbr

You can make a Windows Repair CD from Windows if you don't have one. It's also possible to install a Windows-like bootloader from your Ubuntu install:

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

Note that lilo will popup a large warning screen, but it's safe to ignore it as this refers to when it's used to boot linux.

This is what it looks like to use lilo (note the command is case-sensitive):

bcbc@neptune:~$ sudo apt-get install lilo
[sudo] password for bcbc: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  lilo-doc
The following NEW packages will be installed:
  lilo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 275 kB of archives.
After this operation, 807 kB of additional disk space will be used.
Get:1 http://mirror.csclub.uwaterloo.ca/ubuntu/ precise/main lilo amd64 1:23.2-2 [275 kB]
Fetched 275 kB in 1s (198 kB/s)
Preconfiguring packages ...
Selecting previously unselected package lilo.
(Reading database ... 505850 files and directories currently installed.)
Unpacking lilo (from .../lilo_1%3a23.2-2_amd64.deb) ...
Processing triggers for man-db ...
Setting up lilo (1:23.2-2) ...
bcbc@neptune:~$ sudo lilo -M /dev/sda mbr
Backup copy of /dev/sda in /boot/boot.0800
The Master Boot Record of  /dev/sda  has been updated.
bcbc@neptune:~$ 

You'll see a warning that looks like this - it can be ignored when you use lilo as a windows-style bootloader:

enter image description here

share|improve this answer
    
thank you for your reply bcbc, the problem is that i cant get it to boot from the cd portion i even tryed to change the boot portion and nothing –  Victor Suarez Dec 17 '12 at 0:05
1  
Do you mean that you cannot boot from the Windows repair CD? Then you can install lilo from Ubuntu instead. This works the same as the Windows bootloader. –  bcbc Dec 17 '12 at 0:17
    
Dude thank you soooooo much i tried the second option where i used "sudo apt-get install lilo" and it WORKED. Thank you so much it was such a pain having to have the external hard drive connected to boot :D –  Victor Suarez Dec 17 '12 at 0:22
    
You're welcome! –  bcbc Dec 17 '12 at 0:24
  1. You have to repair MBR of internal HDD using windows cd/dvd. (startup-repair)

  2. Attach secondary disk, boot using a live cd and then use boot-repair tool to install the grub in your secondary HDD. See the picture below,

boot-repair

Choose Place Grub into - your secondary HDD from the dropdown.

To identify the name of your secondary HDD, open explorer & see

Boot-repair tool instruction

share|improve this answer
    
hi Web-E thank you for replying, but the problem is that i cant get it to boot from the cd i even tryed to change the boot order –  Victor Suarez Dec 17 '12 at 0:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.