Hello… I’ve just dual booted Fedora 32 with Windows 10 and everything was working fine until I decided to reboot to Windows, After finishing my work when I decided to go back to Fedora all of a sudden I started to get “You need to load the kernel first” error on the grub menu, I’m using a UEFI system and I chose the “Automatic” partitioning option during the installation of Fedora, Although this is not the first time I’m facing this problem earlier I’ve also tried using Kubuntu on dual boot and it also had the same problem, And at that time the only thing that worked for me wast to use Manjaro I followed the instructions in this post [root tip] [How To] Dual boot Manjaro and Windows - Tutorials - Manjaro Linux Forum where they created a seperate FAT32 partition with boot flag on it, I tried to do the same thing with a fresh fedora installation but the installer doesn’t have such an option it only let’s us create a new “EFI partition” but I don’t think it would be a good idea to use two EFI partitions on a single SSD, Can anyone please guide me to the right way on dual booting Fedora with Windows 10? P.S- Fast boot is also disabled in Windows.
That almost seems like windows somehow modified the grub bootloader in the esp partition.
Try booting to the live usb, then mount the fedora / partition at /mnt, the /boot partition at /mnt/boot, and the /boot/efi partition at /mnt/boot/efi.
Then you will need to mount /sys at /mnt/sys, /run at /mnt/run, /proc at /mnt/proc, and /dev at /mnt/dev to support the chroot environment.
Now you can chroot /mnt and to fix the grub problem run
“grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg”
Assuming you have completed all of the above successfully then
“umount -R /mnt”
to unmount all that was previously mounted then a reboot should give you back the ability to boot into both fedora and windows.
Obviously most of those steps will require the use of su to root in the live environment before you begin making those changes.
BTW, just for future reference, the anaconda installer option to create a new efi partiton does just that. It creates a vfat partition, sets it as esp, and uses it to contain the efi files for boot. You were correct in not creating a second efi partition.
Thank You! I’ll try this and get back to you.
BTW, Is there any possibility that this might happen again in the future? Cause If it so then I’m also thinking on buying a new SSD, So that I could install Windows and Linux on separate drives with their own separate EFI partitions, Cause I’m afraid windows might do that again.
Hello I booted into the live usb and then ran “lsblk” to check the partitions but I can’t seem to find the “/boot, /sys, /run, /proc and /dev” partitions in the output , Although I’m able to mount the “/boot/efi” and the fedora “/” partition because I know it’s nvme0n1p1 and nvme0n1p7, Can you please guide me on how to identify and mount the other partitions?
Those are not partitions, they are virtual partitions. You can use the mount command to display their filesystem type, then using the command “mount -t proc /proc /mnt/proc” will put it where needed. The same for each of the others I listed with the appropriate type for each.
(sysfs, devtmpfs, and tmpfs) You match them from the output of “mount”
I tried all the steps that were mentioned and successfully chrooted in the root directory, Here are the partitions that I mounted before and after chrooting -
cd /
mount -t proc proc /mnt/proc
mount -o bind dev /mnt/dev
mount -t tmpfs run /mnt/run
mount -t sysfs sys /mnt/sys
chroot /mnt
mount -a “Because I suppose this command will mount everything including the “/boot” and the “/boot/efi” partition.
After this I did grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
But for some reason it didn’t work and I got this error - " Grub-probe: error: cannot find a GRUB drive for /dev/sda1” I tried with sudo but still got the same error, So I gave up and rebooted the system and surprisingly this time my system booted straight into fedora but the grub menu didn’t appear so now although I didn’t see grub but I was in the system so I decided to reinstall grub and for that I ran “dnf reinstall grub2-efi grub2-efi-modules shim” and after that I ran “grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg” also before doing that I had also accidentally did “grub2-mkconfig -o /boot/grub2/grub.cfg” and VOILA! when I rebooted I got to see the grub menu without any “You need to load the kernel first error”, But again after shutting down my system when I came back I got the same error, Can you suggest what could be the reason behind this? Can it be because the size of the EFI partition that Windows allocates is only100mb?
Before I can answer that I need more info.
Please post the output of “sudo fdisk -l” and “sudo lsblk” and “sudo blkid” (each in code tags so the formatting and readability is maintained) That is
[code]
your output here
[/code]
Hello, Kindly review the posted output and please help me.
Sorry, I did not see that reply for some reason.
Are you still having the same problem?
Are you booting as a regular practice with the install USB plugged in?
[Note: Sorry I accidently replied to my own post that’s why I’m posting again]
It turned out to be that the culprit behind this was grub itself, And I suspect that there’s a bug in the latest version. So performing a downgrade on the grub package with sudo dnf downgrade grub2-efi
solved the issue for me!
BTW is there any way that I can lock grub to the currently installed version so that it doesn’t get upgraded when I update to Fedora 33 from 32? also for some reason when I do rpm -qa grub*
to find its version it returns no matches found: grub*
. So for future reference can you please also tell me how can we find the version of any currently installed package?
P.S - Is it a bad idea to use an older version of grub?
You can see the version of any package installed IME using “dnf list installed <package>”. Within grub the * is usable, but IIRC rpm requires the full package name.
It is most likely that the many changes to grub during the life of fedora 33 will have fixed any issues you may have been having, so just do the update.
IIRC I saw the same error when doing a repair to grub some time back and it was related to the fact I was booted from the live usb and doing the repair within a chroot environment. It complained about no boot image on the USB. When I booted from the main OS I never saw that error.
Unfortunately even after upgrading to Fedora 33 the problem persists and now I can’t even boot after chrooting. I also tried downgrading grub while chrooted but for some reason dnf is failing to install packages as well in the chrooted environment. When attempting it suggests me to do dnf clean packages
but doing that doesn’t help either.