LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 01-17-2009, 08:42 PM   #1
rbrown653
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Rep: Reputation: 0
GRUB 21 error help


Hey I have a Dell 1526 Inspiron laptop. I installed ubuntu 8.10 on my hard drive in a partition next to a Windows Vista. I decided to download Windows 7 and I wrote it right over the Ubuntu partition. I then installed ubuntu 8.10 on an external hard drive. now when i turn on mhy computer i get a GRUB 21 error unless I connect the hard drive, enter the boot setup, load the external hard drive, and than select vista loader and then select the OS I want to use. I want to be able to turn on my computer and go straight to the vista loader so i can select the os i want to use. what do i do. please HELP!!!!!!
 
Old 01-17-2009, 09:23 PM   #2
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
OK, how about booting your Live CD (the Ubuntu install CD), open a terminal (Applications > Accessories > Terminal) and do:
Code:
sudo grub
grub> find /boot/grub/stage1
grub> find /grub/stage1
One of the above commands should return your main Ubuntu partition (or /boot partition if you have one) in the form of (hdX,Y) where X and Y are numbers, for example (hd1,0), but use whatever it returns as follows:
Code:
grub> root (hdX,Y)
grub> setup (hdX)
grub> quit
That will install Grub to the MBR (Master Boot Record) of your Ubuntu drive. Then to restore a Windows MBR to your Windows drive, try:
Code:
sudo apt-get install lilo
sudo lilo -M  /dev/sda mbr
Then reboot, set your BIOS to boot the Ubuntu drive, and you should at least get the Grub menu if all goes well. If you are using Intrepid you should be able to boot into Ubuntu, but if you have a previous release your Grub's menu.lst will most likely need some tweaking. Let me know how that goes or if you run into problems.
 
Old 01-17-2009, 09:38 PM   #3
rbrown653
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
ummmmmm...........
im really new to the whole linux thing so im not really sure i understand what you said. i hate to ask, but would you mind dumbing this down a little bit?

which is my main partition, the one i reformated or the one i use now?
how would i install a windows MBR?
and i dont know what intrepid is


thanks sooooo much
 
Old 01-18-2009, 10:56 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
I then installed ubuntu 8.10 on an external hard drive. now when i turn on mhy computer i get a GRUB 21 error unless I connect the hard drive, enter the boot setup, load the external hard drive
This would indicate that when you installed Ubuntu 8.10 on the external, you wrote the Grub stage1 bootloader file to the master boot record of the internal drive. The stage1 file is looking for the rest of the bootloader files which are on the external drive. If you don't have the external attached it obviously won't find these files.

What is it that you want to do? Do you want to just boot vista? If so, you can do this:

Boot up from Vista Installation DVD and select Repair Your Computer option (its below Install Icon). Select Windows Vista -- Command Prompt.
Execute this at command prompt:
Code:
bootrec.exe /fixmbr
bootrec.exe /fixboot

Or you can download EasyBCD to edit the vista bootloader and make changes you want including booting Ubuntu. Have never used it myself so I'm not sure how well this works:

If you want to be able to boot vista and Ubuntu using Grub, you will either have to have Ubuntu on the primary internal drive or keep the external plugged in.
 
Old 01-19-2009, 07:52 AM   #5
rbrown653
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you soooooooooooooo much. my computer is back up and running. I think im gonna put ubuntu on my internal hard drive, but im just relieved that everythings working again!!!! Thanks!!!
 
  


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
install kubuntu 8.10 with lilo rather than grub (because of grub error 18) dukeinlondon Ubuntu 7 12-27-2008 06:53 PM
Loading Grub 1.5 Please Wait...... Grub Failed Error 18 2words4uready Linux - Newbie 5 06-12-2008 05:37 PM
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 09:14 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
Open Source Consulting | Domain Registration