LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 01-29-2007, 07:28 PM   #1
VinceIP
LQ Newbie
 
Registered: Jan 2007
Location: Ohio, USA
Distribution: Puppy Linux, Damn Small Linux, Debian... Depends on my mood :).
Posts: 6

Rep: Reputation: 0
Unhappy Grub 1.5 Error 21 when installing Debian/Windows dual-boot


I downloaded the minimal network installer ISO of Debian 3.1r4. My PC has some pretty weak hardware specs (AMD K-6 454 mhz processor), so I thought being able to pick and choose which packages I want on first boot-up of Debian would be better for me.

Anyway, I installed without any problems (except for a few partitioning confusions at first). Then, I rebooted. My PC displayed the following:

Quote:
GRUB 1.5 Loading...

Error 21
That's it. Nothing else. I can't even boot into Windows XP now. Currently, I'm on Puppy Linux with LiveCD. Here's my partition layout. I have 2 hard drives.

20 GB Quantam Fireball Hard Drive (eugh this thing sucks)
Partitons:
hda1, ntfs; drive C (boots Windows XP)

160 GB Western Digital SATA Hard Drive, running off of a SATA 150 PCI controller.
Partitions:
sda1, ntfs; drive F (my multimedia storage partition)
sda2, ext2 (should I change to ext3?)(Installed Debian to this partition)
sda3, 512 MB swap

So, does anyone know what I can do to get Debian to boot? I'd appreciate any help I can get.
 
Old 01-29-2007, 07:42 PM   #2
war1025
Member
 
Registered: Jul 2006
Distribution: Debian: Squeeze AMD64
Posts: 318

Rep: Reputation: 31
I don't know about your boot problems, but I would use ext3 instead of ext2. I don't really know the specifics as to why though...
 
Old 01-29-2007, 07:45 PM   #3
VinceIP
LQ Newbie
 
Registered: Jan 2007
Location: Ohio, USA
Distribution: Puppy Linux, Damn Small Linux, Debian... Depends on my mood :).
Posts: 6

Original Poster
Rep: Reputation: 0
Yeah, I doubt reformatting it to ext3 will make things bootable, but I'll probably do it anyway.
 
Old 01-29-2007, 07:54 PM   #4
VinceIP
LQ Newbie
 
Registered: Jan 2007
Location: Ohio, USA
Distribution: Puppy Linux, Damn Small Linux, Debian... Depends on my mood :).
Posts: 6

Original Poster
Rep: Reputation: 0
After a quick read of the GRUB manual, I found Error 21 means this:

Quote:
21 : Selected disk does not exist
This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.
...Probably meaning, my BIOS is just too old. I had a feeling. Of course I'm not entirely sure. Anyway, I'm still not sure where to go from here. I thought maybe it could be possible to create a boot disc with GRUB on it that would load Debian on power on. This would be better anyway, since I'm on a family PC; none of my family could possibly understand Linux, especially since they all know Windows XP best.

The funny thing is, it would have to be a boot DVD in my case... My cheap $20 DVD burner hasnt recognized my CD-Rs since the first week I got it (at that time, I remember burning an audio CD flawlessly...) Oh well, even if I have to waste a DVD+R, it's worth it for my precious Linux <3.

I suppose another possibility would be to flash and upgrade my BIOS... But I know next to nothing when it comes to that subject. Any advice?
 
Old 01-29-2007, 08:01 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Did you change the bios settings to either enable or disable one or more hard disks after you had installed?
 
Old 01-29-2007, 08:05 PM   #6
VinceIP
LQ Newbie
 
Registered: Jan 2007
Location: Ohio, USA
Distribution: Puppy Linux, Damn Small Linux, Debian... Depends on my mood :).
Posts: 6

Original Poster
Rep: Reputation: 0
No, not that I know of. I didn't touch my BIOS settings after I installed.
 
Old 01-29-2007, 08:13 PM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Well, I know next to nothing about grub, but nobody else has jumped in. So, if you hang around long enough to get this working we may both become experts. Start off by giving me the contents of these two files:

/boot/grub/device.map
/boot/grub/menu.lst

And do I understand correctly that you can't boot either windows or linux now?

Last edited by Quakeboy02; 01-29-2007 at 08:15 PM.
 
Old 01-29-2007, 08:30 PM   #8
VinceIP
LQ Newbie
 
Registered: Jan 2007
Location: Ohio, USA
Distribution: Puppy Linux, Damn Small Linux, Debian... Depends on my mood :).
Posts: 6

Original Poster
Rep: Reputation: 0
Alright, here goes:

/boot/grub/device.map:
Code:
(hd0)	/dev/hda
(hd1)	/dev/sda
/boot/grub/menu.lst:
Code:
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.           
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/sda2 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,1)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## ## End Default Options ##

title		Debian GNU/Linux, kernel 2.4.27-3-386 
root		(hd1,1)
kernel		/boot/vmlinuz-2.4.27-3-386 root=/dev/sda2 ro 
initrd		/boot/initrd.img-2.4.27-3-386
savedefault
boot

title		Debian GNU/Linux, kernel 2.4.27-3-386 (recovery mode)
root		(hd1,1)
kernel		/boot/vmlinuz-2.4.27-3-386 root=/dev/sda2 ro single
initrd		/boot/initrd.img-2.4.27-3-386
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title		Windows NT/2000/XP (loader)
root		(hd0,0)
savedefault
makeactive
chainloader	+1
Anyway, yes, I cannot boot to either Debian or Windows now. Good thing for LiveCD distros.

Last edited by VinceIP; 01-29-2007 at 08:44 PM.
 
Old 01-29-2007, 08:38 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
"Wow, what a page stretcher. Sorry"

No biggy. Just hit the edit button and change the [ quote ] to [ code ] same for the /quote.

2.4 is a pretty old kernel. But, still the problem is grub not the kernel version. Lemme look around for a bit. And, I just about burned supper looking at this, so that's going to take me some time too. I haven't abandoned you, but I'll be away for a bit. In the meantime, maybe some grubber will come along and save you.
 
Old 01-29-2007, 09:06 PM   #10
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
I'm loading knoppix to my spare machine to experiment with it a bit. I kinda suspect it's related to the sata drive. Can you tell me which controller is on it? Cut and paste from the lspci command.

Added:
Oh yeah, and do you have your xp installer disk? That has some stuff to repair the xp boot.

Finally, here's something to look at: http://ubuntuforums.org/showthread.php?t=224351

Last edited by Quakeboy02; 01-29-2007 at 09:08 PM.
 
Old 01-29-2007, 09:11 PM   #11
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
I think that if you run grub from your livecd and run "find /boot/grub/stage1" that will probably tell us what's going wrong.
 
Old 01-29-2007, 09:42 PM   #12
cdrom600
Member
 
Registered: Oct 2003
Location: MI, USA
Distribution: Fedora, Ubuntu, Debian
Posts: 63

Rep: Reputation: 15
I doubt this will help, but try removing any and all USB mass storage devices (external hard drives, flash drives, etc.)
 
Old 01-29-2007, 09:44 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
You went through this cdrom. I'm kinda suspicious that the problem is that grub is loaded on his second hard disk. Whether that means that the devices have to be reversed in both the Device.map and menu.lst I'm not sure.

Well, vince, if you ever come back, try "fdisk -l" from your live disk to see if your sata disk is actually seen as /dev/sda. If it's not, then the problem might be that the Device.map needs to be changed to:

(hd0) /dev/hda
(hd1) /dev/hdb

There is probably more than any decent person would ever want to know about grub here.

http://www.gnu.org/software/grub/manual/grub.html

Last edited by Quakeboy02; 01-29-2007 at 10:38 PM.
 
Old 01-29-2007, 11:37 PM   #14
VinceIP
LQ Newbie
 
Registered: Jan 2007
Location: Ohio, USA
Distribution: Puppy Linux, Damn Small Linux, Debian... Depends on my mood :).
Posts: 6

Original Poster
Rep: Reputation: 0
fdisk -l shows:
Code:
sh-3.00# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       16846   135315463+   7  HPFS/NTFS
/dev/sda2   *       16847       19196    18876375   83  Linux
/dev/sda3           19197       19261      522112+  82  Linux swap / Solaris
So yep, it's read as sda. I went back into the installer just to see what would happen. I have about 8 MB on my 20 gig hda unallocated, so I made a new ext3 partition and put Grub on that. Still got the same error. I even tried using LILO.

I also followed that link you showed me about Ubuntu and the grub configuration. I just ran grub from my LiveCD distro, and found it installed on my SATA sda2 Debian partition. I'm still pretty stumped as to what I should do... I'll probably tinker around in the installer awhile longer just to see what happens.

One more thing I did try, was to resize my C partition on hda1 (containing Windows XP) and pulling 5 gigs out of it, then make a new 5 gig ext3 partition and install Debian on that. Well, for some reason, gparted won't let me do it. It tells me there was an error, but it won't tell me what the error was exactly.
 
Old 01-29-2007, 11:43 PM   #15
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Hmm, I'm still thinking about that version 2.4. What do you get when you type uname -a from the livecd? I wonder if puppy is fooling us because it's a 2.6 kernel? I'd still consider changing the device map to hdb.

Something just occurred to me. Are you sure you're giving me the output from the proper /boot/grub directory? Puppy will have its own. If you do a df, you will get a list of drives as puppy sees them. You will probably need to "mount /dev/sda2 /mnt" and "cd /mnt/boot/grub" to look at the real files on your hard disk.
 
  


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
Dual boot WinXP/Debian, grub error booting WinXP ChemBot Linux - General 5 02-22-2007 05:13 PM
Dual boot Debian Etch and XP with GRUB - Debian installed First - one HDD bence8810 Debian 11 01-07-2007 11:45 AM
dual boot - Grub won't boot Windows on /windows/D partition biosol Suse/Novell 9 04-09-2006 09:14 PM
Grub not installing on dual XP/Debian system? corkypa Linux - General 9 03-22-2006 03:25 AM
Dual boot Linux with Windows: Grub Error 17 Veniogenesis Linux - Newbie 3 10-23-2005 10:41 AM


All times are GMT -5. The time now is 01:01 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration