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 07-23-2009, 11:44 PM   #1
wheeliee
Member
 
Registered: Aug 2008
Posts: 47

Rep: Reputation: 15
Getting GRUB "error 17" after a dual-boot [WinXP + Debian] installation


-Hi,

I originally had 5 partitions on the WinXP desktop, but to gear up for the Debian installation, I decided to delete the last three partitions (I did that by backing up my stuff onto some CD media and deleting the three partitions via the native WinXP 'Disk Management' utility).

The Debian installation went fine (by the way, for whatever this information is worth -- I installed GRUB on the MBR when prompted for that (is this something typically done when going for a dual-boot installation? I wasn't sure)). Anyway upon a reboot, I was just given an "Error 17" (I never even got to see a GRUB menu).

Below is a paste of #fdisk -l:
Quote:
root@slax:~# fdisk -l

Disk /dev/hda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x51e1f5df

Device Boot Start End Blocks Id System
/dev/hda1 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 9112 52709265 f W95 Ext'd (LBA)
/dev/hda3 * 9113 30515 171919597+ 83 Linux
/dev/hda5 2551 8924 51199123+ 7 HPFS/NTFS
/dev/hda6 8925 9112 1510078+ 82 Linux swap
root@slax:~#
I'v read some previous threads relevant to this 'error 17', but I'm asking just to be sure on what my next step should be. I'm on the Live SLAX disc right now, so I've at least got that done.

Thanks in advance,
-wheelie.

EDIT: some more information:
I don't think I got a bad partition ordering or something of that sort-- doing "fdisk /dev/hda" and then entering X F W (as suggested here: http://stringofthoughts.wordpress.co...-debianubuntu/ ) gave me something like "nothing to do, ordering is correct already"

EDIT: some more possibly relevant information: This computer had a non-working CD-RW and DVD drive (two seperate physical ones) -- so I took out both and put in one working CD drive from an old junk computer that I had. I just read somewhere on the web some guy mentioning that he found the cause of this "error 17" to be some unhooked IDE cables. Now, recall - I only put in one CD drive, so the cable thingie (I don't know what it's technically called) for the other is just hanging loose there somewhere.. should I put the non-working drives back on? Keep in mind that my understanding of all and any hardware is pretty shallow.. so my hunches may not be worth anything.. but, .. they just may as well be. Anyway - any help would be appreciated, thanks a lot for taking the time to read.

EDIT: here's my menu.lst: #EDIT: changed menu.lst~ to menu.lst (so what follows below is menu.lst, not menu.lst~)
Quote:
# 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-legacy-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'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
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 specific 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_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/hda3 ro

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

## 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

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user) single
# altoptions=(single-user 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

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Debian GNU/Linux, kernel 2.6.26-2-686
root (hd0,2)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda3 ro quiet
initrd /boot/initrd.img-2.6.26-2-686

title Debian GNU/Linux, kernel 2.6.26-2-686 (single-user mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.26-2-686 root=/dev/hda3 ro single
initrd /boot/initrd.img-2.6.26-2-686

### 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 Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
and /boot/grub/device.map:
Quote:
(hd0) /dev/hda
and /etc/fstab:
Quote:
root@slax:/mnt/hda3/etc# cat fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda3 / ext3 errors=remount-ro 0 1
/dev/hda6 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
root@slax:/mnt/hda3/etc#

Last edited by wheeliee; 07-24-2009 at 06:36 AM.
 
Old 07-24-2009, 05:16 AM   #2
wheeliee
Member
 
Registered: Aug 2008
Posts: 47

Original Poster
Rep: Reputation: 15
I was kindly directed to some advice by someone in #debian@freenode, to re-install GRUB:

[04:53] <dpkg> To reinstall <GRUB> simply boot to your Debian install disk, live CD or whatever else you have, switch to the other console (Alt-F2), then mount your root filesystem (mount -t ext2 /dev/whatever /target ; mount --bind /dev /target/dev), then chroot into it (chroot /target) then run "mount /proc ; update-grub && grub-install /dev/hda". Also ask me about <rescue mode> and <dual boot guide>.

So... I suppose I'll try that.

But since this looks to be a pretty big task, I thought I'd get a green light from you guys first to be on the safe side(I don't want to confuse these commands -- specifically the mount commands - I was particularly unsure about those).

So, please tell if my understanding is alright and these commands shall suffice:
Quote:
mount -t ext2 /dev/hda3 /target
mount --bind /dev /target # hrm, looking back, this seems like it's wrong. I'm hoping someone will give me a push to the right direction.
chroot /target
mount /proc
update-grub && grub-install /dev/hda3

Thanks,

EDIT: I'm using the SLAX live disc -- I'm not sure, but I think the partitions are already mounted.. e.g., I can access them under /mnt/hda3 -- does this meant I don't have to do the first two commands? Any help would be appreciated, thanks.
-wheelie.

Last edited by wheeliee; 07-24-2009 at 05:22 AM.
 
Old 07-24-2009, 05:26 AM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
mmmmm...
I never saw amyone do the mount --bind /dev /target
chroot /target
mount /proc
stuff

That shouldn't be necessary...

The windows grub entry is missing from your
menu.lst?

maybe this ''ll help

https://help.ubuntu.com/community/Re...tallingWindows

Not specific to your issue, but it does show how to update/re-install grub
and it shows a grub windows enrty
which is what your missing

If that doesn't help
please come back

oh wait
I found something else
http://www.webson.co.za/complete-gui...grub-error-17/
 
Old 07-24-2009, 05:30 AM   #4
wheeliee
Member
 
Registered: Aug 2008
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by linus72 View Post
mmmmm...
I never saw amyone do the mount --bind /dev /target
chroot /target
mount /proc
stuff
My commenting there something like "this seems wrong" was not to the directions given by the bot per se, but to my understanding and utilization of them. In particular, since I don't know the commands' syntax, I wasn't very sure what to substitute with what. I was hoping to be given a hand in that sense.

And I'll look over the links you gave. Thanks very much for your time.
 
Old 07-24-2009, 05:40 AM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Sorry wheelie
I don't have windows
so, I can't help really

What I meant by
Quote:
I never saw amyone do the mount --bind /dev /target
chroot /target
mount /proc
stuff
was that it seems a complicated way to do it...

Usually, one just has to edit /boot/grub/menu.lst
and add your windows entry...

a question too,
your using slax right now?

using slax's filemanager
go into your /boot/grub folder in debian partition
enable "show hidden files" in slax's file manager "view" menu
is there a file that looks like this
"menu.lst~" without the quotes?

if that file is there it is your old menu.lst

debian should have automatically added windows to the menu.lst
that's what's strange...?

Which debian are you using?
Lenny?
 
Old 07-24-2009, 05:51 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Take a look at
http://stringofthoughts.wordpress.co...-debianubuntu/
 
Old 07-24-2009, 05:54 AM   #7
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Thanks Repo
I was hoping someone would help

Now, why can't he just add that entry to menu.lst and boot?

Quote:
title Windows 95/98/NT/2000
root (hd0,0)
makeactive
chainloader +1
is windows on 1st partition yes?
 
Old 07-24-2009, 06:03 AM   #8
wheeliee
Member
 
Registered: Aug 2008
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by linus72 View Post
Sorry wheelie
I don't have windows
so, I can't help really

What I meant by


was that it seems a complicated way to do it...

Usually, one just has to edit /boot/grub/menu.lst
and add your windows entry...

a question too,
your using slax right now?

using slax's filemanager
go into your /boot/grub folder in debian partition
enable "show hidden files" in slax's file manager "view" menu
is there a file that looks like this
"menu.lst~" without the quotes?

if that file is there it is your old menu.lst

debian should have automatically added windows to the menu.lst
that's what's strange...?

Which debian are you using?
Lenny?
err, sorry, actually, menu.lst~ was actually the one I put up there.. WinXP does indeed seem to be in menu.lst (as opposed to menu.lst~). Just a moment please, I'll update my original post
 
Old 07-24-2009, 06:05 AM   #9
wheeliee
Member
 
Registered: Aug 2008
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by repo View Post
Hi repo. Thanks for replying.

However, in my very own original post, I pointed out that I had already tried that:
Quote:
...

EDIT: some more information:
I don't think I got a bad partition ordering or something of that sort-- doing "fdisk /dev/hda" and then entering X F W (as suggested here: http://stringofthoughts.wordpress.co...-debianubuntu/ ) gave me something like "nothing to do, ordering is correct already"

...
 
Old 07-24-2009, 03:46 PM   #10
wheeliee
Member
 
Registered: Aug 2008
Posts: 47

Original Poster
Rep: Reputation: 15
A shameless bump

Here is the recap of my situation:

To install Debian, I removed 3 partitions from my WinXP desktop. The installation went fine, but I couldn't boot up after the installation - I was getting a GRUB "Error 17".

The partitioning order seems to be correct (as previously stated: doing "fdisk /dev/hda" and then entering X F W (as suggested here: http://stringofthoughts.wordpress.co...-debianubuntu/ ) gave me something like "nothing to do, ordering is correct already").

One thing yet still to do now is to re-install GRUB, as also suggested by someone. I was stuck here because I had trouble understanding the directions:

[04:53] <dpkg> To reinstall <GRUB> simply boot to your Debian install disk, live CD or whatever else you have, switch to the other console (Alt-F2), then mount your root filesystem (mount -t ext2 /dev/whatever /target ; mount --bind /dev /target/dev), then chroot into it (chroot /target) then run "mount /proc ; update-grub && grub-install /dev/hda". Also ask me about <rescue mode> and <dual boot guide>.

Here is my fdisk - l:

Quote:
root@slax:~# fdisk -l

Disk /dev/hda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x51e1f5df

Device Boot Start End Blocks Id System
/dev/hda1 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 9112 52709265 f W95 Ext'd (LBA)
/dev/hda3 * 9113 30515 171919597+ 83 Linux
/dev/hda5 2551 8924 51199123+ 7 HPFS/NTFS
/dev/hda6 8925 9112 1510078+ 82 Linux swap
root@slax:~#
I'm using a SLAX live disc, as I mentioned earlier - hda3 I think is already mounted (it's accessible under /mnt, so it must be, right?) Does that I mean I don't execute the first two commands as suggested by dpkg? Or maybe, it won't hurt if I do it anyway? If that's so, here's what I've got:

Quote:
mount -t ext2 /dev/hda3 /target
mount --bind /dev /target/dev
chroot /target
mount /proc
update-grub && grub-install /dev/hda3
Would these commands work in my case?

I'll appreciate any words at this point.
Thanks, -wheelie.

Last edited by wheeliee; 07-24-2009 at 03:47 PM.
 
Old 07-24-2009, 04:10 PM   #11
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
I think those diections are OK
BUT
I don't like how it doesn't tell you
to Unmount /proc, target and all that?!

that's not good
If you do use it, unless I'm wrong,
you need to use "umount" command to unmount everything when your finished

Quote:
umount /dev/hda3 /target
umount /dev /target/dev
umount /proc
I don't know if that's correct though
so, don't do it unless your sure

Also, can a slax livecd do all that?
not sure either...

Also, you should probably use a debian-based livecd/liveusb
cause debian's got everything
and that's what your trying to fix.

chrooting and all that is what they do in remastering too
therefore, you could try a couple debian based distro's like

Sidux (the xfce desktop edition is nice and small)
GRML (i would get grml full)
any debian livecd,

any ubuntu livecd, probably.

I could be wrong in all that
so, please wait for others who are more experienced in this
 
Old 07-25-2009, 08:26 PM   #12
aus9
LQ Addict
 
Registered: Oct 2003
Location: Australia
Distribution: MX 16
Posts: 5,283

Rep: Reputation: Disabled
To install Debian, I removed 3 partitions from my WinXP desktop

wheeliee

How exactly did you do this? What software?

what was on those partitions?

Is it possible that one or more of those partitions was something we call a "Recovery Partition"

Was it possible that one of them was your original C partition?

regards
 
Old 07-25-2009, 09:03 PM   #13
wheeliee
Member
 
Registered: Aug 2008
Posts: 47

Original Poster
Rep: Reputation: 15
Just another update:

I tried reinstalling GRUB (via 'Graphical Rescue Mode' in the Debian installer disc), and it unfortunately seems to have made no difference.

I tried installing it both on mbr and on /dev/hda3.

I'll really be grateful if I can get some help on this, (not having a useful computer is very detrimental to my morale).
 
Old 07-26-2009, 05:07 AM   #14
milomak
Member
 
Registered: May 2009
Posts: 117

Rep: Reputation: 18
Try the following:

Booting the Windows disk.
Restore the Windows MBR
Boot Windows to see if it boots
Boot from a Live CD
chroot into your install
Restore grub
 
Old 07-26-2009, 12:57 PM   #15
wheeliee
Member
 
Registered: Aug 2008
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by aus9 View Post
To install Debian, I removed 3 partitions from my WinXP desktop

wheeliee

How exactly did you do this? What software?
I used the native 'Disk Management' utility of Windows XP to simply delete the partitions (I had thus approximately 100 GB of unallocated space. To my understanding, this is what Debian understands to be 'free' space in the installation procedure; the space on which Debian is put on if I choose the "Put Debian on the free space available").

Quote:
Originally Posted by aus9 View Post
what was on those partitions?
Nothing relatedly important, really. Just data.. music, etc. I tried removing them as cleanly as I could (uninstalling most programs from 'Add/Remove Programs', etc.).

Quote:
Originally Posted by aus9 View Post
Is it possible that one or more of those partitions was something we call a "Recovery Partition"
I don't know what that is, but I rather doubt that (for as I've mentioned, there was just misc. data and music on those partitions)

Quote:
Originally Posted by aus9 View Post
Was it possible that one of them was your original C partition?
No, I still can access the C drive (I was just browsing through it a moment ago with the SLAX live disc).

Quote:
Originally Posted by milomak View Post
Try the following:
...
I'll try it out.

Thanks guys.
 
  


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 fedora & vista - boot error - "GRUB loading stage 2" ans Fedora 1 08-20-2007 03:35 AM
"Grub" is displayed in dual-boot dual-drive Win xp and Fedora 6 installation hanscom Linux - Newbie 10 02-28-2007 10:48 AM
Dual boot WinXP/Debian, grub error booting WinXP ChemBot Linux - General 5 02-22-2007 04:13 PM
"Error loading operating system" in WinXP dual boot saskee Ubuntu 1 02-03-2006 02:24 PM
How to "dual boot" linux (debian) and Freebsd using Grub? hkl8324 Debian 4 06-15-2005 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:20 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration