# grub error 17 cannot mount selected partition (past posts checked still deosn't work)



## jieyunfu

I am quite new to ubuntu..

my machine is XP + ubuntu

for some reason, my grub failed to identify my hard drive, and it displays "grub loading... error 17" and I can enter neither system. so I use live CD to boot the system, and try to restore the grub. 

I type:

sudo grub
find /boot/grub/stage1 // here I got a "floating point exception" no past posts talk about how to handle it... 

so I directly root (hd0,6) {where my ubuntu is installed}, and setup (hd0) 

but now, I can boot xp, but still, when trying to enter ubuntu, I met "error 17, cannout mount selected partition"...

I am thinking of re-installing ubuntu, but is it going to eat another part of my hard-drive as swap? I am not familiar with the re-installation process of ubuntu. is it possible to solve this problem without re-installation?

is any way to solve this problem? thank!


----------



## saikee

Can you post the output in Ubuntu by command


Code:


sudo fdisk -l

To prove that your Ubuntu is indeed in partition (hd0,6)?

To complete the picture post Ubuntu's /boot/grub/menu.lst here too.


----------



## jhonstack

Problem is due to XP installed as the first bootable disk (hd0) and is now ran as the second bootable disk (hd1) after Ubuntu has taken over as the first bootable disk.
To Correct it you can post the content command Code:
* fdisk-1*


----------



## jhonstack

If also you are not able to solve the problem you can use Linux recovery software.


----------



## anteros22

Hi everyone,
Sorry If I looks a cheeky person but I have a similar problem at this moment with Ubuntu OS and I would like this post to show it:

results with fdisk -l

Disk /dev/sda: 98.5 GB, 98522403840 bytes
255 heads, 63 sectors/track, 11978 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe97d8616

Device Boot Start End Blocks Id System
/dev/sda1 1 11 88326 de Dell Utility
/dev/sda2 * 12 7023 56323890 7 HPFS/NTFS
/dev/sda3 7024 11977 39793005 f W95 Ext'd (LBA)
/dev/sda5 7024 8239 9767488+ 83 Linux
/dev/sda6 8240 8361 979902 82 Linux swap / Solaris
/dev/sda7 8362 11977 29045488+ 7 HPFS/NTFS


and content of file menu.lst

title Ubuntu 8.04, kernel 2.6.24-17-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-17-generic root=UUID=8de4988d-2fb4-46d5-9b14-55fd50c5d797 ro quiet splash locale=es_ES
initrd /boot/initrd.img-2.6.24-17-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-17-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.24-17-generic root=UUID=8de4988d-2fb4-46d5-9b14-55fd50c5d797 ro single
initrd /boot/initrd.img-2.6.24-17-generic

title Ubuntu 8.04, kernel 2.6.22-14-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=8de4988d-2fb4-46d5-9b14-55fd50c5d797 ro quiet splash locale=es_ES
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 8.04, kernel 2.6.22-14-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=8de4988d-2fb4-46d5-9b14-55fd50c5d797 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 8.04, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
quiet

### 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/sda1
title Dell Utility Partition
root (hd0,0)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Windows XP Media Center Edition
root (hd0,1)
savedefault
makeactive
chainloader +1

My problem , is I can come in with WindosXP system but when I select Ubuntu from Grub menu at the begining, it say to me :
error 17: can not mount selected partition 

what I need to do?

Thanks


----------



## saikee

antero22,

Since the OP never responded you request for help doesn't affect him/her at all.

Here is my suggestion to solve your problem as it is very simple.

(1) When the Grub boot screen comes up select the first choice to boot Ubuntu but do not press the enter key.

(2) Instead you press the "e" key for editing the booting command and Grub will display these lines


Code:


root (hd0,2)
kernel /boot/vmlinuz-2.6.24-17-generic root=UUID=8de4988d-2fb4-46d5-9b14-55fd50c5d797 ro quiet splash locale=es_ES
initrd /boot/initrd.img-2.6.24-17-generic
quiet

(3) You use the direction key to navigate the first line to (hd0,2) and change the "2" to "4", like this with the only one change in red.


Code:


root (hd0,[COLOR="red"]4[/COLOR])
kernel /boot/vmlinuz-2.6.24-17-generic root=UUID=8de4988d-2fb4-46d5-9b14-55fd50c5d797 ro quiet splash locale=es_ES
initrd /boot/initrd.img-2.6.24-17-generic
quiet

(4) You can then hit the "b" key as the green light to boot the system.

(5) If the booting is successful you can edit the menu.lst and implemt the change permantly.

Explanation :

In your fdisk -l output there is only one Linux partition type 83, marked blue here


Code:


Device Boot Start End Blocks Id System
/dev/sda1 1 11 88326 de Dell Utility
/dev/sda2 * 12 7023 56323890 7 HPFS/NTFS
/dev/sda3 7024 11977 39793005 f W95 Ext'd (LBA)
[COLOR="Blue"]/dev/sda5 7024 8239 9767488+ 83 Linux[/COLOR]
/dev/sda6 8240 8361 979902 82 Linux swap / Solaris
/dev/sda7 8362 11977 29045488+ 7 HPFS/NTFS

Grub counts from zero so sda5 is known as (hd0,4) because it is the 5th partition of the 1st disk.

I would be surprised if your Ubuntu doesn't boot after the above. Grub was right for claiming not able to mount the sda3 or (hd0,2) because nobody in the business can mount an extended partition.

The morale of the story is if there are bugs in a Linux distro then the installer will have a lion's share of them.


----------



## anteros22

Thanks a lot, Saikee , I though it was sthg like that but ... I wasn't sure because I had had many problems this last weekend in my lap-top


----------

