 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

11th August 2012, 03:03 PM
|
|
Registered User
|
|
Join Date: Feb 2011
Posts: 11

|
|
|
Windows partition resized - Error 17 : cannot mount selected partition
I have a dual boot system with Windows 7 and Fedora 16. On my Windows side I had 4 NTFS partitions - C, D, E, F. On Fedora 16 side it had a single ext2 partition. Now since I was out of space in C partition of windows so I decided to delete the F partition and extend the C partition. I used windows partition tool for this purpose. But when I rebooted I got the grub prompt screen. I had no clue whatsoever to do. Based on some post on this side I typed
configfile (hd0,5)/boot/grub/grub.conf
after which it showed the black screen with some options. When I enter the other options then windows OS is successfully booted and I can seen all C,D,E partition but when I enter the Fedora options I get
Error 17 : unable to mount selected partition
there is some garbage written next to hd partition however hd05 is still showing of ext2fs type.
I have some very important information in the ext2fs partition which I want to get back.
|

11th August 2012, 03:31 PM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
Deleting a partition "in front of" Fedora's partition may have had the effect of misconfiguring its GRUB boot loader. Boot loaders find what they boot by counting partitions. If you delete (or add) a partition, the boot loader often needs new numbers in its config file for counting.
The configfile thing worked to present the GRUB boot menu, but its Fedora entry remains misconfigured (probably the wrong partition). Try the configfile thing again, but don't attempt to boot anything from the boot menu. Instead, highlight the Fedora menu entry and press the "e" key. Highlight the root command and press the "e" key. Edit the partition number and press Enter. Now highlight the kernel command and press the "e" key. Edit the partition in the root= parameter if it is not a UUID, LABEL, or LVM device (leave those as is). Press the Enter key. Press the "b" key to boot with your changes. Maybe it will boot. No promises.
If it boots, then edit the config file to fix it permanently.
If it doesn't boot, then some variation of the above will boot it. You get the idea.
P.S.: For those times when you can't get to the boot menu from the grub> prompt, it's still possible to directly boot a Linux kernel from the grub> prompt. It's a useful thing to teach yourself.
P.P.S.: Another idea is to download and create a Super Grub Disk. It's free, popular, and easy-to-find. Besides, anybody who uses GRUB should possess some way to emergency boot. Anyway, someday it will be needed. That, I do promise.
|

11th August 2012, 08:55 PM
|
|
Registered User
|
|
Join Date: Feb 2011
Posts: 11

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
Thanks for the suggestion. I pressed e after highlighting Fedora. Then I tried to boot when it showed cannot mount selected partition. I then changed root (hd0,7) to (hd0,5) and tried once again. It booted however I faced another problem. Its running in some emergency mode and I cannot do startx. So even though I can see all my files - which is a good thing. I am missing the fancy GUI. I guess there is a simple way to open the default mode but I have no clue how to do it.
|

11th August 2012, 09:18 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,716

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
Do you have a live CD or USB you can boot from?
Check that /boot/grub2/grub.cfg uses "linux /vmlinuz... root=UUID=xxxx..." and that /etc/fstab uses "UUID=xxxx..." for mounted devices. If either uses old-style device names (e.g. /dev/sda6), then these will also be off by one after removing a partition that was enumerated before. However, if you're only using a single Fedora partition, it's probably LVM, which works differently again (/dev/mapper/vol_group_name-logical_vol_name), and should be able to cope with changing partition layouts.
|

12th August 2012, 05:14 AM
|
|
Registered User
|
|
Join Date: Feb 2011
Posts: 11

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
Thanks Jones and Stoat. Unfortunately another problem has spring up. In attempt to save the grub.conf file I executed
grub-mkconfig -o /boot/grub2/grub.cfg
and now I can't even boot into windows. If I run
configfile (hd0,5)/boot/grub/grub.conf
OR
configfile (hd0,5)/boot/grub2/grub.cfg
it justs restarts the grub prompt. I see no options.
|

12th August 2012, 01:01 PM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
Quote:
|
Originally Posted by RedHatDKM
I see no options.
|
Option #1...
Quote:
|
Originally Posted by stoat
P.S.: For those times when you can't get to the boot menu from the grub> prompt, it's still possible to directly boot a Linux kernel from the grub> prompt. It's a useful thing to teach yourself.
|
Option #2
Quote:
|
Originally Posted by stoat
P.P.S.: Another idea is to download and create a Super Grub Disk. It's free, popular, and easy-to-find. Besides, anybody who uses GRUB should possess some way to emergency boot. Anyway, someday it will be needed. That, I do promise.
|
|

12th August 2012, 07:06 PM
|
|
Official Gnome 3 Sales Rep. (and Adminstrator)
|
|
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 30
Posts: 1,716

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
When did you run grub2-mkconfig? If you were using a live CD, you should mount all the installed file-systems under /mnt/rootfs (for example), and bind the virtual file-systems across too, then chroot in first:
Code:
su -
mkdir /mnt/rootfs
mount /dev/sdinstalled_root /mnt/rootfs
# mount installed /boot onto /mnt/rootfs/boot etc.
for i in dev proc run sys
do mount --rbind /$i /mnt/rootfs/$i
done
chroot /mnt/rootfs
grub2-mkconfig
That way, you're running grub2-mkconfig as if from the installed system.
|

13th August 2012, 01:46 AM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
And if you get nowhere with that, here is a demonstration of directly booting the kernel from a GRUB 2 grub> prompt (skipping grub.cfg and the menu completely). It won't be pretty like the normal boot, but it will get you there. Then you can use the system, salvage stuff, whatever, and probably fix the busted boot loader easier. First boot the system to a working GRUB2 grub> prompt by any means. Then...

I really should explain it a lot more. But I'm not going to. I hope you and other readers can figure out how to adapt the example that boots my Fedora system (in a single ext4 partition) to other situations. The main things that will be different are the location of the boot directory (and whether or not to include "/boot" in paths) and the location of the root filesystem (and whether to use a device name, LABEL, UUID, or LVM device mapper device name in the root parameter).
|

15th August 2012, 09:01 PM
|
|
Registered User
|
|
Join Date: Feb 2011
Posts: 11

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
Ok so here is the update on the problem. I tried the following code -
root (hd0,5) //of type ext2fs
kernel /boot/vmlinuz-3-3.2....... ro root=/dev/sda6
initrd /boot/initramfs-3-3.2....
boot
this gets me to a place where I get
dependency failed : ------
emergency mode use systemctl default or control^D to get into default mode
after then I login and can surf through files however I cannot run the GUI.
I tried using systemctl default, control^D, startx, ctl+alt+F2 based on different suggestions however none seem to work. If I use startx command I get a screen with a blue computer logo and a text saying that something went wrong.
---------- Post added at 01:31 AM ---------- Previous post was at 01:13 AM ----------
Good news. I was able to boot into Fedora normally by using initrd-plymouth instead of initramfs. I do not understand the difference between the two but this actually worked. Hence if someone faces this problem he should try command structure like -
root (hd0,5) //0,5 to be replaced by different numbers
kernel /boot/vmlinuz-3-3-2........... ro root=/dev/sda6 //a and 6 in sda6 to be varied. Also version of vmlinuz can be different
initrd /boot/initrd-plymouth.img
boot
However before we call this thread as closed. Gentleman can someone tell me how to automate these things so that I dont have to do them everytime. Also how to get back the blue colored grub screen with options.
|

16th August 2012, 12:08 AM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
Re: Windows partition resized - Error 17 : cannot mount selected partition
Now that you can get back into the Fedora system, repair the GRUB boot loader. I have always considered that the best environment for fixing GRUB problems. Do your usual grub2-mkconfig procedure again in a terminal in the running system. I would expect it to re-create a good grub.cfg file and work normally.
P.S.: This has been about Fedora 17, I think. So why have legacy GRUB terms been used here and there throughout the discussion? You know, things like grub.conf and that kernel menu command instead of linux. Just wondering.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 02:27 (Sunday, 26-05-2013)
|
|
 |
 |
 |
 |
|
|