[SOLVED] My partitions are a mess and I cannot boot into Fedora
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Thank you for clarifying. If I can ask another question, when I mount /dev/mapper/fedora-root to /mnt should I be able to navigate to /mnt/mnt/dev/mapper/fedora-root ? as it stands I don't know how to navigate to the volume from the mount point.
should I be able to navigate to /mnt/mnt/dev/mapper/fedora-root
Typically /mnt directory is empty, once you mount /dev/mapper/fedora-root to the running Live Fedora /mnt directory, you can go in there and you will see all directories in the root of the installed Fedora. You can open the file manager in the running Live environment and navigate to /mnt and see it graphically or navigate there via command line. If you want to retrieve data from the user's home directory, you may need to do it as sudo or root via command line, but if you have Gnome DE, you may be able to open a directory as root by right clicking it and selecting that option from the graphical file browser. I use Fedora KDE, so don't know if that option is available with Fedora Gnome like Ubuntu Gnome.
[root@localhost-live /]# grub2-mkconfig -o /efi/EFI/fedora/grub.cfg
/usr/sbin/grub2-mkconfig: line 268: /efi/EFI/fedora/grub.cfg.new: No such file or directory
I navigated to the folder and there is no grub.cfg but there is grubia32.efi and grubx64.efi
looking back at the dnf,
Code:
Package grub2-efi-aa64-modules available, but not installed.
No match for argument: grub2-efi-modules
[root@localhost-live /]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.18.16-300.fc29.x86_64
Found initrd image: /boot/initramfs-4.18.16-300.fc29.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-44d5a50dfd92455fa45cb04f1accb9d0
Found initrd image: /boot/initramfs-0-rescue-44d5a50dfd92455fa45cb04f1accb9d0.img
device-mapper: reload ioctl on osprober-linux-sdc1 failed: Device or resource busy
Command failed.
Found Windows 7 on /dev/sda2
done
to this which was found 2 days ago
Code:
Found linux image: /boot/vmlinuz-4.18.16-300.fc29.x86_64
Found initrd image: /boot/initramfs-4.18.16-300.fc29.x86_64.img
Found Windows 7 on /dev/sda2
Found Fedora 29 (Workstation Edition) on /dev/mapper/fedora-root
done
Disk /dev/sdc: 3.7 GiB, 4004511744 bytes, 7821312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7c3f77cf
This is from your fdisk -l output in your original post, I don't know what this drive is, you are most likely to know, it's only 4GB in size, perhaps removing it might help, but likely all the error is trying to say is that it could not be added to the list.
Did you follow all commands listed in my first post code box? Seems to me the word "live" in the red highlight above should not be present in a chroot, but I could be wrong.
[root@localhost-live ~]# sudo mount /dev/mapper/fedora-root /mnt
[root@localhost-live ~]# sudo mount /dev/sda5 /mnt/boot
[root@localhost-live ~]# sudo mount /dev/sda1 /mnt/boot/efi
[root@localhost-live ~]# sudo mount --bind /dev /mnt/dev
[root@localhost-live ~]# sudo mount --bind /proc /mnt/proc
[root@localhost-live ~]# sudo mount --bind /sys /mnt/sys
[root@localhost-live ~]# sudo mount -o bind /run /mnt/run
[root@localhost-live ~]# sudo chroot /mnt
[root@localhost-live /]# dnf reinstall grub2-efi grub2-efi-modules shim
Fedora Modular 29 - x86_64 - Updates 10 kB/s | 17 kB 00:01
Fedora 29 - x86_64 - Updates 12 kB/s | 17 kB 00:01
Fedora 29 - x86_64 - Updates 563 kB/s | 23 MB 00:40
Last metadata expiration check: 0:00:01 ago on Fri 15 Feb 2019 10:01:07 PM EST.
Package grub2-efi-aa64-modules available, but not installed.
No match for argument: grub2-efi-modules
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Reinstalling:
grub2-efi-ia32 x86_64 1:2.02-62.fc29 fedora 333 k
grub2-efi-x64 x86_64 1:2.02-62.fc29 fedora 352 k
shim-x64 x86_64 15-7 fedora 658 k
Transaction Summary
================================================================================
Total download size: 1.3 M
Installed size: 8.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): grub2-efi-x64-2.02-62.fc29.x86_64.rpm 126 kB/s | 352 kB 00:02
(2/3): grub2-efi-ia32-2.02-62.fc29.x86_64.rpm 91 kB/s | 333 kB 00:03
(3/3): shim-x64-15-7.x86_64.rpm 149 kB/s | 658 kB 00:04
--------------------------------------------------------------------------------
Total 236 kB/s | 1.3 MB 00:05
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Reinstall: shim-x64-15-7.x86_64
Reinstalling : shim-x64-15-7.x86_64 1/6
Reinstall: shim-x64-15-7.x86_64
Reinstall: grub2-efi-x64-1:2.02-62.fc29.x86_64
Reinstalling : grub2-efi-x64-1:2.02-62.fc29.x86_64 2/6
Reinstall: grub2-efi-x64-1:2.02-62.fc29.x86_64
Reinstall: grub2-efi-ia32-1:2.02-62.fc29.x86_64
Reinstalling : grub2-efi-ia32-1:2.02-62.fc29.x86_64 3/6
Reinstall: grub2-efi-ia32-1:2.02-62.fc29.x86_64
Reinstalled: shim-x64-15-7.x86_64
Cleanup : shim-x64-15-7.x86_64 4/6
Reinstalled: shim-x64-15-7.x86_64
Reinstalled: grub2-efi-x64-1:2.02-62.fc29.x86_64
Cleanup : grub2-efi-x64-1:2.02-62.fc29.x86_64 5/6
Reinstalled: grub2-efi-x64-1:2.02-62.fc29.x86_64
Reinstalled: grub2-efi-ia32-1:2.02-62.fc29.x86_64
Cleanup : grub2-efi-ia32-1:2.02-62.fc29.x86_64 6/6
Reinstalled: grub2-efi-ia32-1:2.02-62.fc29.x86_64
Verifying : grub2-efi-ia32-1:2.02-62.fc29.x86_64 1/6
Verifying : grub2-efi-ia32-1:2.02-62.fc29.x86_64 2/6
Verifying : grub2-efi-x64-1:2.02-62.fc29.x86_64 3/6
Verifying : grub2-efi-x64-1:2.02-62.fc29.x86_64 4/6
Verifying : shim-x64-15-7.x86_64 5/6
Verifying : shim-x64-15-7.x86_64 6/6
Reinstalled:
grub2-efi-ia32-1:2.02-62.fc29.x86_64 grub2-efi-x64-1:2.02-62.fc29.x86_64
shim-x64-15-7.x86_64
Complete!
[root@localhost-live /]# grub2-mkconfig -o /efi/EFI/fedora/grub.cfg
/usr/sbin/grub2-mkconfig: line 268: /efi/EFI/fedora/grub.cfg.new: No such file or directory
[root@localhost-live /]# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.18.16-300.fc29.x86_64
Found initrd image: /boot/initramfs-4.18.16-300.fc29.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-44d5a50dfd92455fa45cb04f1accb9d0
Found initrd image: /boot/initramfs-0-rescue-44d5a50dfd92455fa45cb04f1accb9d0.img
device-mapper: reload ioctl on osprober-linux-sdc1 failed: Device or resource busy
Command failed.
Found Windows 7 on /dev/sda2
done
How do you exit a chroot? I messed something up earlier, Firefox went black, the power button mysteriously disappeared and I could not issue the reboot command from a chroot. I closed out of terminal reopened it and the screen just went black.
That issue can likely be resolved, lots of links in a Google search. Probably best to start a new thread if you need help since this one is basically solved.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.