Trouble deleting my Ubuntu partition to make more space for my Fedora 26 partition
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Trouble deleting my Ubuntu partition to make more space for my Fedora 26 partition
After deleting Ubuntu 16.04, whenever I boot it says
Code:
.
error:Unknown Filesystem
Entering rescue mode
Also whenever I use Gparted from a live session it shows me this error
Code:
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
According to redhat in rescue mode I should try and edit grub but neither cd nor vim is working, so how can I edit the file? I'm also open to any other possible fixes that may work.
run ls at the grubrescue prompt to see if you can determine which partition fedora is on then run the following
where ? is your partition number for fedora. If you have more than one drive will have to change the hd0 accordingly.
Code:
grub rescue> set prefix=(hd0,?)/boot/grub2
grub rescue> set root=(hd0,?)do
grub rescue> insmod normal
grub rescue> normal
This is assuming your not using uefi mode and did install grub in fedora. since you didn't give any information on your system setup(drives, partitions, efi or bios, fedora grub, other distros, etc)
run ls at the grubrescue prompt to see if you can determine which partition fedora is on then run the following
where ? is your partition number for fedora. If you have more than one drive will have to change the hd0 accordingly.
Code:
grub rescue> set prefix=(hd0,?)/boot/grub2
grub rescue> set root=(hd0,?)do
grub rescue> insmod normal
grub rescue> normal
This is assuming your not using uefi mode and did install grub in fedora. since you didn't give any information on your system setup(drives, partitions, efi or bios, fedora grub, other distros, etc)
Because I have to live boot, it's hard to get a lot of the specific info from my system, here what I remember of the top of my head.
I believe the partition number for Fedora was 9, though I could be wrong. I have a 480 GB SSD boot drive where I store all of my OS’s and two 2 TB HDDs. Other than Fedora I now only have Windows 10 and Windows 8 partitions left on my SSD. When I finished installing Fedora a few weeks ago I noticed that it had automatically replaced the GRUB that I had when I was using Ubuntu 16.04. My motherboard uses a UEFI and it works fine, I had no issues with using it, I was not aware of there being a UEFI version and a BIOS version so I presume I’m using the UEFI version. Right after posting this I’ll go and check to make sure that I was right with what partition number Fedora has, I’ll edit this if it's wrong.
EDIT: The output listed hd0msdos 1 and 2 and hd0msdos 5-9 which seems very strange, obviously I'm not using msdos so this highly confuses me, it also outputs hd1 without msdos or numbers and hd2 msdos 2 which i presume is the backup of my laptop i did a while ago using dd.
you don't do that.
you simply install something else over it. have you tried that?
what other OSs and partitions are on the hard drive?
what do you want to install over ubuntu?
ps: i think the gparted error is harmless.
What I mean is, I already have a Fedora partition, but I was trying to delete my Ubuntu partition so my Fedora partition can then use the unallocated space. I put lots of info into my reply to colorpurple21859 answer.
you say your running efi mode and you have efi partitions, but the live cd is running in cmos/bios/msdos mode whatever it happens to be called so you may have a mixture of both. Without knowing how fedora was installed it is hard to say. If Fedora was installed in efi mode you should be able to select fedora by the esc or one of the f-keys to select booting fedora from the efi-firmware. If fedora was installed in msdos/bios mode try the following at the grub-rescue prompt
Code:
grub rescue> set prefix=(hd1,9)/boot/grub2
grub rescue> set root=(hd1,9)
grub rescue> insmod normal
grub rescue> normal
you say your running efi mode and you have efi partitions, but the live cd is running in cmos/bios/msdos mode whatever it happens to be called so you may have a mixture of both. Without knowing how fedora was installed it is hard to say. If Fedora was installed in efi mode you should be able to select fedora by the esc or one of the f-keys to select booting fedora from the efi-firmware. If fedora was installed in msdos/bios mode try the following at the grub-rescue prompt
Code:
grub rescue> set prefix=(hd1,9)/boot/grub2
grub rescue> set root=(hd1,9)
grub rescue> insmod normal
grub rescue> normal
I said I presumed that I was using efi partitions as I didn't know there was a bios version and an efi version you can download, looks like I’m using the bios version though, but after this has been fixed I might look into trying to use Fedora with efi as the ability to boot from firmware sounds interesting. I tried the commands from your first post but replaced ? with a 9 but when I entered insmod normal it said the file /boot/grub2/i386-pc/normal.mod could not be found. When I tried the ones you just suggested when i entered insmod normal it said that there wasn't a partition found.
It is hard to give advice when efi and msdos/bios booting is mixed together. did you try the esc or f-keys to get something to boot or change the boot order of the drives? Another thing to try is to go into firmware/bios and disable compatabity mode.you have several other linux partitions on that same drive are there other distros installed? if so you could try the same commands but change grub2 to grub if they are not fedora based distro, and the partition number for the corresponding partition.
It is hard to give advice when efi and msdos/bios booting is mixed together. did you try the esc or f-keys to get something to boot or change the boot order of the drives? Another thing to try is to go into firmware/bios and disable compatabity mode.you have several other linux partitions on that same drive are there other distros installed? if so you could try the same commands but change grub2 to grub if they are not fedora based distro, and the partition number for the corresponding partition.
I'm not sure what the other partitions are, according to gparted from my Ubuntu live boot partition 6 is only 1 GB so I presume it's something for the system, partitions 5 and 7 are for linux swap and partition 9 is for Fedora 26. I'm not sure what partition 8 is, it has 50 GB assigned to it so it's probably not something to do with the system. It's not another Linux installation though because I don't ever remember creating that partition. After I disabled compatibility mode my PC couldn’t recognise any of my drives.
did you run the commands in Post #9? If so, it should have got you to the grub menu if fedora was installed in compatibility mode. What about disk sdc, it has windows with an efi partition and a linux file system on it of 101G? What is in the efi folder on partitions sda2 and sdc1? Is secureboot turned off? Have you tried to change the boot order of drives? Will the live cd boot with compatibility mode turned off?
you say your running efi mode and you have efi partitions, but the live cd is running in cmos/bios/msdos mode whatever it happens to be called so you may have a mixture of both. Without knowing how fedora was installed it is hard to say. If Fedora was installed in efi mode you should be able to select fedora by the esc or one of the f-keys to select booting fedora from the efi-firmware. If fedora was installed in msdos/bios mode try the following at the grub-rescue prompt
Code:
grub rescue> set prefix=(hd1,9)/boot/grub2
grub rescue> set root=(hd1,9)
grub rescue> insmod normal
grub rescue> normal
Shouldn't this be something like "sdb,9"? Or "hd2,9"?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.