LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB error 21 again (https://www.linuxquestions.org/questions/linux-newbie-8/grub-error-21-again-569833/)

eksantrik2 07-16-2007 11:45 AM

GRUB error 21 again..HELP PLS !!!
 
Hi guys,

I just started learning Linux, actually I was about to.
I tried to install ubuntu on my external usb harddrive to be able to boot both linux and window on my laptop.
I have window pro on my laptop. I created a partition on my external harddrive to make some space for linux then installed linux ubuntu on it.
Now I am getting the "GRUB error 21" when I try to turn my laptop on.When the external hardrive is connected to my laptop during the boot-up, there is no problem..it gives me a list of choices and I choice either ubuntu or windows but when I try the same thing without my external harddrive plugged in, it gives me the GRUB error 21.
I have a windows pro cd and tried to boot the laptop from the CD (I changed the boot sequence to make boot from the CD-ROM) but it still gives me the same error..
All of the solutions I saw here, recommends to use the WIN XP cd...I have it but apparently it doesnt work for me...
What I want to do is to save my windows and make my laptop work without any linux for now; so maybe I can try to do the same thing on another laptop..

thanks in advance,

Keithj 07-17-2007 03:56 AM

Oh dear. Yes, I've been there too.

When you installed Linux, it changed the way your laptop boots up.

Previously, the Master Boot Record on your hard drive pointed straight at Windows, which started immediately. Now, you have an extra utility called Grub, which handles the choice between Windows or Linux.

Grub looks for a file called menu.lst which it expects to find on your external drive. That menu.lst then offers the option to start Windows or Ubuntu (or any other version of Linux or anything else you may have).

If menu.lst isn't there, Grub doesn't know what to do. So, you always have to have that external drive connected to start the machine. Look upon it as a Yale key - once you've started, you can remove it till you next want to start.

I don't know of a way to remove Grub and go back to a direct "Windows" boot - certainly, the Windows CD doesn't know how to do that if you are "repairing", as I found out to the cost of many hours work.

If you don't want to use the external drive, and if your laptop has an internal floppy drive, you can make up a Grub boot floppy which will boot straight to Windows.

syg00 07-17-2007 04:27 AM

Quote:

Originally Posted by eksantrik2
I have a windows pro cd and tried to boot the laptop from the CD (I changed the boot sequence to make boot from the CD-ROM) but it still gives me the same error..

Mmmmmm - should be easy to fix, but you're going to need that (XP) CD working.
From a Linux terminal enter the following and post the complete output
Code:

sudo fdisk -l

Keithj 07-17-2007 05:24 AM

I think the XP CD is working just fine. It's not going to change the MBR on his drive, though. For that, he needs a GRUB expert. I saw a useful set of tips for GRUB etc work by saikee - Google will probably find "Just booting tips".

syg00 07-17-2007 05:44 AM

The XP loader code may be poorly designed, however it is certainly what is required to replace the loader code in the MBR.
With the info I asked for I should be able to help eksantrik2.

IndyGunFreak 07-17-2007 07:35 AM

Just curious, did you install with the Live CD?

I know a guy who had this problem with an Ubuntu installation, and tried repeatedly to install with the live CD, and kept getting Grub errors(sorry I don't recall which ones). I believe he was also having problems with the install freezing halfway through, but when it got installed, Grub errors.

How he ended up doing this...

1. Download and Burn the Alternate Install CD(its text based, but still pretty easy)
2. Removed his laptops hard drive(probably not necessary, but he did)
3. Hooked up his USB drive, and booted from the Alternate Install CD.
4. Installed Ubuntu and Grub to the USB drive.
5. Shutdown and hooked his internal drive backup, and started up.

He done it this way because he didn't want Grub accidentally installed on the MBR of his laptop(company provided). When he wanted to boot Linux, he simply changed his bios to boot the USB drive, then Grub would load, and allow him to select Ubuntu. If he wanted to boot Windows, he simply set his bios to boot the internal drive, and it would go straight to Windows, No Grub, etc..

YMMV, but it worked quite well for him.

IGF

rupertwh 07-17-2007 07:49 AM

Hi,

as has been noted, your problem is that grub cannot find it's configuration (/boot/grub/menu.lst), as that is on your external drive.

The easy solution: make a little room (some 60MB should be plenty) on your main disk and place your /boot partition there. This way grub always has its data available and you can still have the rest of your Linux installation on any other harddisk.


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