Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11th August 2012, 03:03 PM
RedHatDKM Offline
Registered User
 
Join Date: Feb 2011
Posts: 11
windows_7chrome
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.
Reply With Quote
  #2  
Old 11th August 2012, 03:31 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxfirefox
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.
Reply With Quote
  #3  
Old 11th August 2012, 08:55 PM
RedHatDKM Offline
Registered User
 
Join Date: Feb 2011
Posts: 11
windows_7chrome
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.
Reply With Quote
  #4  
Old 11th August 2012, 09:18 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 31
Posts: 2,750
linuxfirefox
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.
Reply With Quote
  #5  
Old 12th August 2012, 05:14 AM
RedHatDKM Offline
Registered User
 
Join Date: Feb 2011
Posts: 11
windows_7chrome
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.
Reply With Quote
  #6  
Old 12th August 2012, 01:01 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxfirefox
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.
Reply With Quote
  #7  
Old 12th August 2012, 07:06 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Leamington Spa, UK
Age: 31
Posts: 2,750
linuxfirefox
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.
Reply With Quote
  #8  
Old 13th August 2012, 01:46 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxfirefox
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...
Click image for larger version

Name:	grub_boot3.JPG
Views:	48
Size:	48.1 KB
ID:	23611
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).
Reply With Quote
  #9  
Old 15th August 2012, 09:01 PM
RedHatDKM Offline
Registered User
 
Join Date: Feb 2011
Posts: 11
windows_7chrome
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.
Reply With Quote
  #10  
Old 16th August 2012, 12:08 AM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxfirefox
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.
Reply With Quote
Reply

Tags
error, mount, partition, resized, selected, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 15 Cannot mount selected partition (new install) Vector Using Fedora 1 3rd June 2011 09:29 AM
Grub Error 17: Cannot mount selected partition ecoli Installation, Upgrades and Live Media 2 12th November 2010 05:47 AM
Cannot mount selected partition error17 krishna11 Installation, Upgrades and Live Media 4 30th January 2008 08:54 AM
Can't mount my with partition magic resized ext3 partition fedski Installation, Upgrades and Live Media 0 27th December 2006 08:00 AM


Current GMT-time: 15:51 (Wednesday, 23-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat