LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Booting problem Grub loading stage 1.5 error 21 Windows 7 openSUSE external hard driv (http://www.linuxquestions.org/questions/linux-newbie-8/booting-problem-grub-loading-stage-1-5-error-21-windows-7-opensuse-external-hard-driv-894226/)

CoolBeans 07-28-2011 03:00 AM

Booting problem Grub loading stage 1.5 error 21 Windows 7 openSUSE external hard driv
 
A few days ago I installed openSUSE 11.4 on a 1TB HP external hard drive. I have some very important files for school and personal work on my main hard drive, running windows 7, so I made sure the installation only affected my external hard drive. With the external hard drive plugged in it boots just fine but when it is un-plugged it says Grub loading stage 1.5. Error 21 and it won't do anything. This kind of pisses me off because there were no warnings and nothing was supposed to happen to my main hard drive. But this has already happened and now I want to know if there is any way I could fix it so I can boot windows 7 normally and still boot openSUSE with the external hard drive plugged in. Thanks in advance to anybody who can help.

rahulkya 07-28-2011 03:41 AM

This means you have installed grub in the internal hard drive and it needs external drive to boot the OS. Does grub showing the boot menu after removing external drive??
Note:-
if you truly want an portable linux system do read this thread of mine
...

yancek 07-28-2011 09:02 AM

As indicated above, you have installed part of the Grub files to the mbr of the internal drive so you need to install it to the mbr of the external and then use your win 7 installation or Recovery CD/DVD to restore the mbr to windows on the internal. You can get info on how to do that by using the search function here at LQ as there have been numerous posts on the subject.

If you don't know how to put Grub on the mbr of your external drive, log in to Opensuse as root and in a terminal run this: fdisk -l (lower case Letter L in the command) and post the output here.

TobiSGD 07-28-2011 10:16 AM

By any means, before doing anything further: If your files are important to you then make backups, regularly, and especially before dangerous tasks like installing an OS. Otherwise you can loose your files due to hardware failures, software bugs, malware or user error.

CoolBeans 07-28-2011 10:51 AM

fdisk -l
 
So after doing the fdisk -l command it returns whit this:
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbeee52c9

Device Boot Start End Blocks Id System
/dev/sda1 * 63 464951295 232475616+ 7 HPFS/NTFS/exFAT
/dev/sda2 464953344 488390655 11718656 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 999.5 GB, 999501594624 bytes
255 heads, 63 sectors/track, 121515 cylinders, total 1952151552 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ee963

Device Boot Start End Blocks Id System
/dev/sdb1 2048 4208639 2103296 82 Linux swap / Solaris
/dev/sdb2 4208640 46153727 20972544 83 Linux
/dev/sdb3 46153728 1952151551 952998912 83 Linux

What should I do now?

CoolBeans 07-28-2011 01:26 PM

I ended up fixing it up by booting through a windows 7 recovery disk and fixed the mbr through that now everything is back to normal. Thanks to everybody who tried to help

yancek 07-28-2011 01:33 PM

The fdisk output doesn't tell us which drive the files on. To find your boot files, open a terminal, log in as root user and at the prompt type: grub
This will give you a grub prompt which looks like: grub>
type: find /boot/grub/menu.lst
Check the partition listed in the output. If the files are on sdb2 it should show (hd1,0) but may show something else. Make a note as you should have only one partition showing. If it is in fact (hd1,0) then at the grub prompt enter:

root (hd1,0)
setup (hd1)
quit

Hit the enter key after each of the above individual entries. Make sure you have the correct device. I don't know what Grub will see your drive/partition as so you need to check the output carefully before proceeding. If you don't feel comfortable doing this, post the output ofthe find /boot/grub/menu.lst command here. If these commands work, you will have installed Grub to the master boot record of the external drive.

To restore windows to the mbr of your internal drive, you will need a windows installation or recovery disk if you have one. You can do aa search here at LQ for "restore mbr windows 7" as I have seen numerous posts on this here.


All times are GMT -5. The time now is 11:43 AM.