So why don't these menuentries work? It seems pretty straight ahead to me. On EFI, I have an ubuntu folder and a kubuntu folder. Each folder has a grub.cfg and a grubx64.efi
Ubuntu on partition 4
Kubuntu on partition 5
Yet when I select kubuntu, I get ubuntu. Any thoughts?
UPDATE: I used a fresh copy of refind.conf and the problem is still there, which I guess is somewhat reassuring that the problem is NOT in the menuentry stanza.
refind locates both /EFI/ubuntu and /EFI/kubuntu and even applies the correct icons, but selecting kubuntu boots ubuntu.
At this point, I'm wondering is some info gets written to grubx64.efi since the one in kubuntu is a copy of the one from ubuntu.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First, you should try to figure out whether the icons you're seeing on rEFInd's screen are auto-detected or based on your custom boot stanzas. Look at the descriptions provided by rEFInd to figure this out; they'll match the names you specify in the custom stanzas ("Gnome-Intel" and "KDE-Intel") for those, or be generated descriptive names ("Boot X from Y", where "X" is a filename and "Y" is a volume name or description) for auto-generated entries.
Second, your KDE-Intel entry won't work as intended because /dev/sda5 is a Linux identifier that rEFInd has no way to interpret, so unless you've given that exact name to the volume (filesystem label or partition name), rEFInd won't be able to find that volume. It's conceivable that the same problem exists with your "Gnome-Intel" entry, but I can't be sure of that, since I don't know what the filesystem and partition names are for the relevant ESP(s). (Note that grubx64.efi lives on the ESP, not on the Linux /boot partition, so you'd need to specify the ESP in your entries. If you've got just one ESP, omitting the volume line entirely is appropriate.) There are a million other possible problems with both of those entries that I can neither confirm nor rule out without more information. As a general rule, I discourage use of manual boot stanzas. Fifteen or twenty years ago (in the days of LILO and even GRUB Legacy, when Linux users compiled their own kernels and smally furry creatures from Alpha Centauri were real small furry creatures from Alpha Centauri), knowledge of how to create such things was common; but today, most people rely on GRUB 2's scripts to set up boot stanzas, and so the experience of setting them up is uncommon, and many people who try without having manually configured LILO or GRUB end up failing. You need to pay very careful attention to everyting in the manual boot stanza. Guessing at something or deviating from the instructions is almost certain to fail.
More broadly speaking, your configuration is attempting to boot both distributions through GRUB 2. This should work, but it depends upon both GRUB installations being properly configured. If you're certain that rEFInd is launching the correct GRUB binaries, then something is wrong with your Kubuntu GRUB configuration.
It's likely to be simpler and less troublesome to bypass GRUB and instead have rEFInd boot your Linux kernels directly. To do this, you'll need EFI filesystem drivers for whatever filesystem(s) exist on your /boot partitions (or your root, '/', partitions, if you don't have separate '/boot' partitions). rEFInd should then auto-detect the kernels and enable you to boot them directly. You may also need a /boot/refind_linux.conf file in each distribution to set distribution-specific options. (Running mkrlconf will create this file automatically.) You can set icons in any of several ways; see the rEFInd documentation for details on how to do this.
rEFInd does not write to boot loader files, so rEFInd is not modifying grubx64.efi. It's very unlikely that anything else is, either. It's more likely that the information in grub.cfg is incorrect. Note also that there are twogrub.cfg files per distribution -- one in EFI/ubuntu on the ESP and one in /boot/grub. Also, the last time I checked, both Ubuntu and Kubuntu assume that GRUB is installed in EFI/ubuntu on the ESP. If you've moved Kubuntu's GRUB to EFI/kubuntu, then the support scripts in Kubuntu won't know to maintain GRUB in that location, which is likely to result in problems -- but this is more likely to result in Kubuntu's configuration overwriting Ubuntu's than the other way around.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So why don't these menuentries work? It seems pretty straight ahead to me. On EFI, I have an ubuntu folder and a kubuntu folder. Each folder has a grub.cfg and a grubx64.efi
Ubuntu on partition 4
Kubuntu on partition 5
Yet when I select kubuntu, I get ubuntu. Any thoughts?
Ubuntu's grub.cfg
Kubuntu's grub.cfg
UPDATE: I used a fresh copy of refind.conf and the problem is still there, which I guess is somewhat reassuring that the problem is NOT in the menuentry stanza.
refind locates both /EFI/ubuntu and /EFI/kubuntu and even applies the correct icons, but selecting kubuntu boots ubuntu.
At this point, I'm wondering is some info gets written to grubx64.efi since the one in kubuntu is a copy of the one from ubuntu.
First, you should try to figure out whether the icons you're seeing on rEFInd's screen are auto-detected or based on your custom boot stanzas. Look at the descriptions provided by rEFInd to figure this out; they'll match the names you specify in the custom stanzas ("Gnome-Intel" and "KDE-Intel") for those, or be generated descriptive names ("Boot X from Y", where "X" is a filename and "Y" is a volume name or description) for auto-generated entries.
Second, your KDE-Intel entry won't work as intended because
/dev/sda5
is a Linux identifier that rEFInd has no way to interpret, so unless you've given that exact name to the volume (filesystem label or partition name), rEFInd won't be able to find that volume. It's conceivable that the same problem exists with your "Gnome-Intel" entry, but I can't be sure of that, since I don't know what the filesystem and partition names are for the relevant ESP(s). (Note thatgrubx64.efi
lives on the ESP, not on the Linux/boot
partition, so you'd need to specify the ESP in your entries. If you've got just one ESP, omitting thevolume
line entirely is appropriate.) There are a million other possible problems with both of those entries that I can neither confirm nor rule out without more information. As a general rule, I discourage use of manual boot stanzas. Fifteen or twenty years ago (in the days of LILO and even GRUB Legacy, when Linux users compiled their own kernels and smally furry creatures from Alpha Centauri were real small furry creatures from Alpha Centauri), knowledge of how to create such things was common; but today, most people rely on GRUB 2's scripts to set up boot stanzas, and so the experience of setting them up is uncommon, and many people who try without having manually configured LILO or GRUB end up failing. You need to pay very careful attention to everyting in the manual boot stanza. Guessing at something or deviating from the instructions is almost certain to fail.More broadly speaking, your configuration is attempting to boot both distributions through GRUB 2. This should work, but it depends upon both GRUB installations being properly configured. If you're certain that rEFInd is launching the correct GRUB binaries, then something is wrong with your Kubuntu GRUB configuration.
It's likely to be simpler and less troublesome to bypass GRUB and instead have rEFInd boot your Linux kernels directly. To do this, you'll need EFI filesystem drivers for whatever filesystem(s) exist on your
/boot
partitions (or your root, '/', partitions, if you don't have separate '/boot' partitions). rEFInd should then auto-detect the kernels and enable you to boot them directly. You may also need a/boot/refind_linux.conf
file in each distribution to set distribution-specific options. (Runningmkrlconf
will create this file automatically.) You can set icons in any of several ways; see the rEFInd documentation for details on how to do this.rEFInd does not write to boot loader files, so rEFInd is not modifying
grubx64.efi
. It's very unlikely that anything else is, either. It's more likely that the information ingrub.cfg
is incorrect. Note also that there are twogrub.cfg
files per distribution -- one inEFI/ubuntu
on the ESP and one in/boot/grub
. Also, the last time I checked, both Ubuntu and Kubuntu assume that GRUB is installed inEFI/ubuntu
on the ESP. If you've moved Kubuntu's GRUB toEFI/kubuntu
, then the support scripts in Kubuntu won't know to maintain GRUB in that location, which is likely to result in problems -- but this is more likely to result in Kubuntu's configuration overwriting Ubuntu's than the other way around.