LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-10-2009, 08:25 PM   #1
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
problem with installing debian onto external hard drive/grub bootloader error "21"


I've been running Debian Lenny kernel 2.6.26 w/ desktop kde3.5 on my laptop for a while, and im going to take a trip in which i will be unable to take wmy laptop with me. However, where i am going contains computers and i figured if i could install debian onto my external harddrive, i could just boot onto the other computers. I install it using the debianlenny-i386 dvd image. However whenever I try to boot it from a computer. Grub returns
Code:
Grub Loading...
Error 21
and then the blinkng cursor. On one site i found something saying "you may need to activat the drive" and some command-line instructions on how to do it. However the commands have faded from memory and i am now unable to find that site again. Could anyone offer insight on how to fix this "grub error 21" or how to activate it. I run primarily debian but i have a windows partition on one of my relative's computers.
Thank you in advance for the help!!!
btw I'm installing on a western digital 500gb "passport" external hard drive with ext3 and swap partitions.

Last edited by mf93; 07-10-2009 at 08:28 PM. Reason: left something out...
 
Old 07-12-2009, 05:38 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,953

Rep: Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073
Looks like your BIOS doesn't support booting from the external.
 
Old 07-12-2009, 09:12 AM   #3
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Original Poster
Rep: Reputation: 36
lol yes i have 2 monthly backup disks
 
Old 07-12-2009, 09:15 AM   #4
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Original Poster
Rep: Reputation: 36
Also when i check my bios it lists booting from external drive as an option however when i install using the debian dvd i install the bootloader to the master boot record which was what the guide instructed me to do...is there anywhere else to load the MBR and if so how do i specify it?
 
Old 07-14-2009, 04:16 PM   #5
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
Try this at a command prompt, as root (using a bootable CD or whatever):

Code:
#comments look like this; don't type them.

grub

find /boot/grub/stage1   #This will tell you which HD should be root.  This should be on hd1 or greater, NOT on hd0 (assuming that you have an internal hard drive).  If it doesn't tell you, you can guess for the next step.
root (hdx,y)   #Assuming that the partition where /boot/grub/stage1 resides is on hard drive x (1, 2, ...), partition y (1, 2, ...).
setup (hdx)   # Using the value of x from the previous command.
Now, it should give you a menu when you try to boot from the external drive (by telling your computer to do so via BIOS). Next, you need to make sure that your /boot/grub/menu.lst is set-up right. The entry for your external should look something like this:

Code:
title		Debian
uuid		ed55900d-b90b-46a6-be23-3a2c5b48c040
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=ed55900d-b90b-46a6-be23-3a2c5b48c040 ro quiet splash 
initrd		/boot/initrd.img-2.6.28-11-generic
quiet
(Assuming that you know the uuid of your external Debian partition; you can obtain this using the vol_id or blkid commands.) This is the preferred method, because different computers might see your external as hd1, or hd3, or whatever, depending on the computer's setup and number of hard drives. The quiet and splash options on the kernel line are completely optional.


...or like this:

Code:
title		Debian
root            (hdx,y)  #using the values of x and y above.
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=ed55900d-b90b-46a6-be23-3a2c5b48c040 ro quiet splash 
initrd		/boot/initrd.img-2.6.28-11-generic
quiet
Don't forget to change the kernel and initrd lines to point to the correct files (kernel/vmlinuz image, and initrd image, respectively) in /boot/.

If you get a menu, but can't boot your installation, try highlighting Debian and pressing "e" to edit the options. Then press "b" to boot when you're done.

Hope that helps!

--Dane
 
Old 07-22-2009, 06:10 PM   #6
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Original Poster
Rep: Reputation: 36
wow thats really precise...anyway ill try it when i get back to my debian laptop in the meantime your answer was extremely thorough and youve helped me solve a problem thats been bothering me 4evr. Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mbr bootloader problem with external hard drive andaanma Linux - Software 4 10-25-2006 01:29 AM
External Hard Drive "locked" in Mandriva 2006 VapourTrail Linux - Software 1 03-04-2006 12:53 AM
Boot problem: "GRUB Loading stage2read Error" after installing PCI Ethernet card nsyng Fedora - Installation 1 06-06-2005 06:53 AM
GRUB bootloader spits out "GRUB hard disk error" Crampedson Linux - Software 2 01-26-2005 06:34 PM
"GRUB error 15" after hard drive removal maxfacta Linux - General 2 08-31-2004 08:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:23 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