# [SOLVED] Cannot mount selected partition.



## Istanbul_Lfc

Hi,

i have a 72GB Master (Windows XP Home)
and a 40GB Slave (No OS)

I installed Ubuntu 7.10 with live CD, it was going well. I created a new partition on the slave as ext3 format (10GB) and a swap partition(256 mb). The ext3 with a "/" mount point.

Here is how it looks on the installer.

/dev/sda

/dev/sda2 NTFS (Windows XP)

/dev/sdb

/dev/sdb1 ext3
/dev/sdb2 swap

(I think that was it, im just remembering from memory)

It finished copying the files and when it came to configuring the boot loader it was set as default to (hd0). I thought it was the hardrive my XP was on and i didn't want to tamper with the bootloader so i changed it to (hd1) thinking it load from my slave.

I then rebooted and changed my hard disk priority to my slave from the BIOS and the GRUB loaded ok. On the GRUB menu it has numerous options.

Ubuntu Kernel - Generic
Ubuntu Safe Mode
Windows XP Home etc.

There are six boot options and none of them work they all come with this error.

"Error 17. Cannot mount selected partition

Press any key to continue..."

When i press a key it returns me to the GRUB load screen.

Please can someone shine some light on this problem?


----------



## Bartender

*Re: Cannot mount selected partition.*

What happens if you go back to BIOS and set it to boot from the original HDD? 
Does Windows still come up OK?

You could try unplugging the Windows HDD, install Ubuntu to the second drive, then plug them both back in and see what happens. What you describe sounds like it shoulda worked... :4-dontkno


----------



## Istanbul_Lfc

*Re: Cannot mount selected partition.*

Yes, thats what i thought, i will do the install again but without the XP hdd. And yes when i boot from the original hdd it loads Windows without GRUB.


----------



## Guardian-Mage

*Re: Cannot mount selected partition.*

I have seen this problem. If I understand you, Ubuntu is on the second hard disk. So is Grub. For some reason GRUB doesn't configure itself correct when you change it's location. GRUB always refers to itself as on hd0. So when it is on the second partition, instead of booting Ubuntu from hd1 which is the first hard disk, it should boot to hd0, which is the hard disk that GRUB resides on.

1. Insert Live CD
2. Boot to Live CD
3. Open a terminal
4. type sudo gedit
5. GEdit will open
6. Open File > Ubuntu Partition(NOT THE LIVE CD FILE SYSTEM)(Ubuntu Partition should be /media/sdx) > Ubuntu File System /boot/grub/menu.lst
7. Go to the bottom
8. Your Ubuntu Entry should resemble this:

> title Ubuntu, kernel 2.6.20-16-generic
> root (hd1,1)
> kernel /boot/vmlinuz-2.6.20-16-generic 
> root=UUID=3adabece-a770-49a0-bf76-766193ae1204 ro single
initrd /boot/initrd.img-2.6.20-16-generic

9. It may be different, but change "root (hd1,1)" to "root (hd0,<Your partition here>)


----------



## Bartender

*Re: Cannot mount selected partition.*

I'm not sure I agree with some of Guardian-Mage's comments, or perhaps I just don't understand what he's saying. GRUB can certainly be told to install somewhere else besides hd0. I've done it.
If you tell it to install to hd1, it will (should?) install to the second HDD. But which drive does GRUB think is second? It clearly did not install to sda, otherwise the Windows HDD wouldn't have started up without errors because GRUB tweaked the MBR, or without seeing something from GRUB.
If it was me, I'd just try again with both HDD's plugged in, take notes, make sure you tell GRUB to install to hd1 if that is the second drive as identified by the Linux partitioner. In other words, if the Linux partitioner sees sdb as the drive you want to install to, then GRUB should identify the root of that drive as hd1 and that's where you want to direct it. 
You can even install GRUB to a partition on a HDD. If you wanted GRUB in the first partition on the second drive you'd tell GRUB to install to hd1,0. Most of us just install to the root of the drive.


----------



## Guardian-Mage

*Re: Cannot mount selected partition.*

Sorry I did not explain myself properly. Grub can install to another drive just fine, but with the Ubuntu install it does not get configured right. First off, will GRUB boot Windows or do you have to boot from the primary


----------



## Istanbul_Lfc

*Re: Cannot mount selected partition.*

I don't need GRUB to boot Windows i just change my HD priority in the BIOS.


----------



## Bartender

*Re: Cannot mount selected partition.*

How we doing today Istan?
Have you tried anything else?
You're using an Ubuntu LiveCD, right?

I'd try again. With both dries plugged in.
Instead of going manual when you get to the partitioner, let ubuntu do a "Guided - use entire drive" but make sure that you -
1) Have your BIOS set up so that Windows HDD is master and the other one's slave
2) Make sure that the ubuntu installer sees sda as "NTFS" or media/windows or whatever it calls the Windows drive.
3) Make sure when you're at the "Guided - use entire disc" step that it's aimed at sdb, not sda. We do not want it to install to sda!!
4) At the last step before it starts to install Ubuntu gives you a little summary page. That summary page is important. In one little line that's not very obvious, it'll say something like 
"GRUB will install to ..." and there will be a little tiny box saying "hd0". Change that to "hd1". Then let it install.
That should work. Windows (sda) will be left alone, the entire Ubuntu install will be on sdb, and you would choose by changing the boot order in BIOS or by using that key during boot that gives you the choice of bootable devices if your BIOS has that option.
If, in a few weeks, you decide that you want GRUB to install to the windows MBR, then you can re-install grub or just re-install Linux completely and let GRUB install to hd0.


----------



## Istanbul_Lfc

*Re: Cannot mount selected partition.*

Thanks for replying. 

I only want Ubuntu to have 10GB partition so i do the install manually. And at the summary page it trys to save the bootloader to hd0 i changed it to hd1 and when i boot from the slave from the BIOS the GRUB bootloader works and this comes up.

Ubuntu Kernel - Generic
Ubuntu Safe Mode
Windows XP Home etc.

There are six boot options and none of them work they all come with this error.

"Error 17. Cannot mount selected partition

Press any key to continue..."

When i press a key it returns me to the GRUB load screen.


----------



## Bartender

*Re: Cannot mount selected partition.*

According to LinuxSelfhelp :

17 : Cannot mount selected partition
This error is returned if the partition requested exists, but the filesystem type cannot be recognized by GRUB. 

I'm not sure I'm reading this right. And my understanding of how GRUB works is not exactly flawless.

GRUB has two stages. The first part is a tiny bit of code that installs to the very beginning of the drive. That bit directs GRUB to GRUB Stage2, installed out in the body of the drive platters where there's room for more data. In Ubuntu, if I go to Computer>File System>boot>grub I'm looking at the GRUB Stage2 data. 
At least that's how I understand it :grin:

Error 17 looks to me like GRUB doesn't recognize the disk formatting as one it can use. Did you use Partition Magic to format your HDD?

Hopefully someone else will pipe up if I'm leading you astray. I'm no Linux expert, but I've installed Linux (Ubuntu, PCLOS, Mint) twenty times or so to several different PC's.

I would not have expected to see the GRUB menu that you describe if I'd reinstalled everything to sdb. GRUB shouldn't be making any references to Windows.

This is what I'd do with my admittedly limited experience. I'd unplug the Windows drive. That way we know it can't be wrecked.
Then I'd plug in the Linux drive, set it up as master (physically as well as in BIOS) and let Ubuntu auto-install. Don't do any manual partitioning, just select "Guided - Use Entire Disk".

Does it boot up and run? If you get the same error again I'd wipe the entire drive clean with a disc wipe utility like Darik's BootNuke or use a GPartedLiveCD (my favorite partitioning tool - a pox on Partition Magic) to remove all partitions and format the entire disc as ext3. Then I'd try to install again with just the Linux HDD in the PC.
If you STILL get messages about a Windows HDD and Error 17 then I'd say that either the HDD is starting to fail, or the install CD you're using is no good. Cheaper to make another install CD than scrap the drive. If you've been using an Ubuntu LiveCD you might want to download/burn an alt-install CD. They're more reliable than LiveCD's.

Does your PC use the wide ribbon cables to connect HDD's or is it SATA? If you have the ribbon cables, and they're the old 40-wire cables, try replacing with an 80-wire ribbon cable. 80-wires transmit data more reliably.


----------



## Istanbul_Lfc

*Re: Cannot mount selected partition.*

All the hassle to get Ubuntu... I have now scrapped Ubuntu, it probably is a good Linux but the installation of the bootlaoder is a pain. So i have installed openSUSE 10.3 and it has allowed me to save GRUB to the slave without problem. Thank you all for your help it is much appreciated. Thanks.


----------



## thrash.nation

I know it's marked as [SOLVED] (i think it should be marked as gave up )
but today i faced the same situation and go google to find some answers...and came up to this post... ok the boring part finish here.


Solution for the problem:

For some reason (someone explained it in the post) GRUB gets confused when you install with 2 HDs and boot from the second one (he thinks that is the 2nd drive when for a while that is the main HD (1st) ) so u will just have to edit the command:
(i base in mine config)

root(hd1,0)

to:

root(hd0,0)

and grub will do the job...


----------



## wmorri

This thread is from 2007, please don't bring up old posts. 

Closed!


----------

