On 08/28/2015 06:40 PM, Chris Murphy wrote:
Due to many things, including UEFI, and GRUB being overly complicated, and each distro forking GRUB, and also not always keeping it up to date with upstream, there are many variations in GRUB behavior possible. So it's not necessarily the case a given grub.cfg contains menu entries for all kernels/distros on the system. It might contain only entries for a particular distribution.
well, I know when I installed fedora, grub had entries for windows 10 and 3 fedora kernels. when I installed ubuntu after that, ubuntu became the default, and grub had 3 entries for fedora, plus windows 10, plus ubuntu. when I rebooted into fedora, and installed the latest kernel, THEN I had issues with grub, because I didn't know how to update the grub that was installed, and I didn't know how to update the fedora grub & have the system use that to boot from.
In my view, the concept of grub.cfg containing entries for other distros is fraught with peril, not least of which is that the wrong /etc/grub/default is read to create the entries for other distros. Also, kernel upgrades only cause one grub.cfg to get updated. So I really wish this whole automatic creation of other distro menu entries would go away and instead create a forwarding entry to all other grub.cfg's. That way the proper menu entry for a particular kernel+distro is always used.
every time you boot into a specific distro, update the system, and install a new kernel, well, then grub needs to be updated. MY problem is, I want to keep ubuntu updated, but I always want fedora grub to be the default.. I don't think they thought about all these situations when they created grub...
And this explanation is courtesy of how overly complicated it is. How it actually works at a code level, just look at grub.cfg - it reads like a bash script. It's not just a boot configuration file anymore. It's simultaneously impressive and annoying.
yes, I've edited the grub when I boot, to change an entry to a newer kernel that grub didn't know about. It isn't fun.
UEFI loads and runs shim.efi, which is identified in the UEFI boot list. shim.efi loads and runs grubx64.efi. grubx64.efi loads its configuration file, then loads and runs a Linux kernel (or Windows). The kernel runs /sbin/init on its root filesystem.
> , whatever they are.. except there > is no shimx64.efi ... > > -rwx------ 1 root root 1293304 Feb 17 2015 shim.efi > -rwx------ 1 root root 1287032 Feb 17 2015 shim-fedora.efi
The full path relative to the system partition is "\EFI\ubuntu\shimx64.efi". It's in a different directory than the Fedora-installed shim.efi.
I just mounted my ubuntu "/" partition and.... /boot/efi was... empty. I'm pretty sure it was there when I booted ubuntu.. oh wait... /boot/efi is a separate partition.. but it is already mounted, and it is fedora, not ubuntu... arg....
Yet another absurdity is this OCD on Linux with persistently mounting shit that doesn't need to be mounted. No other OS does this with the EFI System partition. In my opinion it's sloppiness+laziness that we do this instead of mounting it dynamically on demand only when it's necessary and then promptly umount it - which should be rather rare.
this is beyond my ...current knowledge:)
In a previous email some information you posted indicated the EFI System partition was sda8, which makes me wonder if there's more than one ESP on this drive. On an out of the box Windows 8.1 system I had, it was sda2 and Fedora reused that rather than making a new ESP. More than one ESP can also be confusing for the user, and might trigger bugs even though it's permitted in the UEFI spec.
I thought I had my partitions written down, so I would know what I had where... but this /boot/efi and /EFI/fedora & /EFI/ubuntu has totally screwed my mind up. I am running fedora, but I mounted my ubuntu partition to look at the EFI/ubuntu folder but.... it wasn't there.