Ubuntu LTS, Ubuntu Latest and Linux Mint work well when selected their entries.
The Debian images boot on their own (when they burned to the device instead of partition). In the above setup when either one of the Debian menu entry is chosen, the Clonezilla grub boot menu appears.
I thought maybe when I switch the entries in the rEFInd menu, so the Debian would go last, it will affect the behavior in some way, but it didn't. So I removed the Clonezilla entry from the menu and left only Ubuntu and Debian. After I selected Debian, Clonezilla boot screen showed up anyway...
I tested also what would happen if I removed the clonezilla partition altogether (without rewriting it, just remove the entry from the partition table via gdisk). When a Debian entry was selected in rEFInd, the GParted boot screen appeared...
So I removed the GParted partition as well, and checked again. Then Linux Mint boot screen appeared... It looks like, it goes in alphabetical order (C, G, L). What would be next, U for Ubuntu?
I checked, and removed the Linux Mint partition. In this moment when I had only 2x Ubuntu and 2x Debian partitions, the Debian Gnome booted... So Ubuntu doesn't seem to fit in this alphabetic pattern. But when I wanted to boot Debian Mint, the Debian Gnome was booted instead, probably because M is after G in the alphabet, so Debian Gnome is selected in either case...
To be sure, I removed the Debian Gnome partition and then Debian Mate booted when selected its entry in rEFInd.
At this point I thought maybe something is wrong with the Debian Gnome ISO file. So I recreated all the removed partitions except the Debian Gnome and checked. It looks like it's the same behavior as it was with Debian Gnome, but now Debian Mint is involved.
Playing with the different settings, I accidentally booted the GParted entry at some point. I didn't do this before because it was obvious to me that GParted boot screen means that GParted is to boot or that the Clonezilla boot screen means that Clonezilla will boot -- wheat else would be booted when you select "Boot GParted" or "Boot Clonezilla" in the Grub list? But it turned out that Debian was booted... So I selected GParted entry, and Debian booted -- that's weird...
So what would happen if I selected the Debian entry, which shows me GParted grub boot screen and chose to boot from the Grub list whatever is listed there? In this case, also Debian is booted...
So all the images (Debian Gnome, Debian Mint, Clonezilla and Gparted) are somewhat connected together -- selecting either one will boot ultimately Debian.
The interesting part is that each of the 4 ISOs individually works well. So If I added only one of the ISOs to the two Ubuntus and Linux Mint, it will boot well. But as soon as I add another ISO (one of the three left), then the problems begin.
The question is how the ISO driver works and finds what to load into memory? The volume entry in the each menuentry stanza is different. The only thing I can see that would affect whether the ISO boots properly is the lowercase boot in the path in the loader line. Every ISO, which uses capital BOOT, works. In the cases of lowercase boot, the ISOs don't boot or lead to this weird situation. All the 4 affected have lowercase boot.
I would probably check what would happen when I edited the ISO files and capitalize the BOOT, but I will check later.
So what do you think? Any thought on this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The EFI driver for ISO-9660 that ships with rEFInd simply provides access to each ISO-9660 filesystem to the EFI, which identifies each one as a separate volume, similar to the way they're handled in MS-DOS or Windows. rEFInd can then access them. If they're showing up as unique volumes in rEFInd, then the ISO-9660 driver is almost certainly working correctly, at least in this respect. You can investigate this further in an EFI shell. Launch it and type a filesystem identifier (like fs0: or fs3:) to access that filesystem. You can then peruse the filesystem with commands like ls and cd to verify that they're correct, comparing what you see in the EFI to what you see in Linux or some other OS.
My suspicion is that the problem is in GRUB. Specifically, I suspect that GRUB in the problem distributions is not correctly identifying the follow-on boot location. This might happen if all the problem distributions are based on the same original source, as I believe they are. (I don't use the Clonezilla or GParted live CDs myself, but some Googling suggests they're both based on Debian.) If the GRUB on the ISO-9660 filesystem, as booted by rEFInd, only looks for the first Debian-like system it can find on a partition, or if it's identifying the follow-on location by something that's invariant between all your distributions (like a filesystem name that's identical between them all), then it'll get it wrong. You'd need to dig into the GRUB configurations of all the problem distributions to figure this out. I haven't attempted to dig that deep.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This actually affects different Debian ISOs, so it doesn't even have to be different distributions. So far I tested multiple Ubuntu/Debian/Linux Mint images, and only Debian has issues -- the others boot well when many images of the same kind (different versions) are copied to the pendrive. I asked about this on a Debian Live mailing list, and they don't really know what's going on.
I also checked what efishell says, and I viewed the .disk/info file after switching to each of the Debian ISOs, and efishell shows different info from this file, so it is able to distinguish the ISOs.
Maybe could you download some of the Debian ISOs that can be found here, and we could check whether you can observe the same behavior? Just to eliminate the possibility that the bug only affects my machine.
Also, this behavior has nothing to do with Secure Boot. I checked without Secure Boot enabled, and I can see the same issue.
Last edit: Mikhail Morfikov 2020-03-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a continuation of some other topic[1], but I wanted to make it a separate issue since it's really an interesting one.
First of wall, I have the following partitions on my multiboot pendrive (which actually is an SD card plugged into an external SD card reader):
On the Debian mailing list, one guy suggested creating static entries for the ISOs. So I edited refind.conf and added:
scanfor manual
and added entries like the following ones for all the ISOs:
the volume of each entry points to Partition unique GUI of each partition:
Ubuntu LTS, Ubuntu Latest and Linux Mint work well when selected their entries.
The Debian images boot on their own (when they burned to the device instead of partition). In the above setup when either one of the Debian menu entry is chosen, the Clonezilla grub boot menu appears.
I thought maybe when I switch the entries in the rEFInd menu, so the Debian would go last, it will affect the behavior in some way, but it didn't. So I removed the Clonezilla entry from the menu and left only Ubuntu and Debian. After I selected Debian, Clonezilla boot screen showed up anyway...
I tested also what would happen if I removed the clonezilla partition altogether (without rewriting it, just remove the entry from the partition table via gdisk). When a Debian entry was selected in rEFInd, the GParted boot screen appeared...
So I removed the GParted partition as well, and checked again. Then Linux Mint boot screen appeared... It looks like, it goes in alphabetical order (C, G, L). What would be next, U for Ubuntu?
I checked, and removed the Linux Mint partition. In this moment when I had only 2x Ubuntu and 2x Debian partitions, the Debian Gnome booted... So Ubuntu doesn't seem to fit in this alphabetic pattern. But when I wanted to boot Debian Mint, the Debian Gnome was booted instead, probably because M is after G in the alphabet, so Debian Gnome is selected in either case...
To be sure, I removed the Debian Gnome partition and then Debian Mate booted when selected its entry in rEFInd.
At this point I thought maybe something is wrong with the Debian Gnome ISO file. So I recreated all the removed partitions except the Debian Gnome and checked. It looks like it's the same behavior as it was with Debian Gnome, but now Debian Mint is involved.
Playing with the different settings, I accidentally booted the GParted entry at some point. I didn't do this before because it was obvious to me that GParted boot screen means that GParted is to boot or that the Clonezilla boot screen means that Clonezilla will boot -- wheat else would be booted when you select "Boot GParted" or "Boot Clonezilla" in the Grub list? But it turned out that Debian was booted... So I selected GParted entry, and Debian booted -- that's weird...
So what would happen if I selected the Debian entry, which shows me GParted grub boot screen and chose to boot from the Grub list whatever is listed there? In this case, also Debian is booted...
So all the images (Debian Gnome, Debian Mint, Clonezilla and Gparted) are somewhat connected together -- selecting either one will boot ultimately Debian.
The interesting part is that each of the 4 ISOs individually works well. So If I added only one of the ISOs to the two Ubuntus and Linux Mint, it will boot well. But as soon as I add another ISO (one of the three left), then the problems begin.
The question is how the ISO driver works and finds what to load into memory? The volume entry in the each menuentry stanza is different. The only thing I can see that would affect whether the ISO boots properly is the lowercase boot in the path in the loader line. Every ISO, which uses capital BOOT, works. In the cases of lowercase boot, the ISOs don't boot or lead to this weird situation. All the 4 affected have lowercase boot.
I would probably check what would happen when I edited the ISO files and capitalize the BOOT, but I will check later.
So what do you think? Any thought on this.
The EFI driver for ISO-9660 that ships with rEFInd simply provides access to each ISO-9660 filesystem to the EFI, which identifies each one as a separate volume, similar to the way they're handled in MS-DOS or Windows. rEFInd can then access them. If they're showing up as unique volumes in rEFInd, then the ISO-9660 driver is almost certainly working correctly, at least in this respect. You can investigate this further in an EFI shell. Launch it and type a filesystem identifier (like
fs0:
orfs3:
) to access that filesystem. You can then peruse the filesystem with commands likels
andcd
to verify that they're correct, comparing what you see in the EFI to what you see in Linux or some other OS.My suspicion is that the problem is in GRUB. Specifically, I suspect that GRUB in the problem distributions is not correctly identifying the follow-on boot location. This might happen if all the problem distributions are based on the same original source, as I believe they are. (I don't use the Clonezilla or GParted live CDs myself, but some Googling suggests they're both based on Debian.) If the GRUB on the ISO-9660 filesystem, as booted by rEFInd, only looks for the first Debian-like system it can find on a partition, or if it's identifying the follow-on location by something that's invariant between all your distributions (like a filesystem name that's identical between them all), then it'll get it wrong. You'd need to dig into the GRUB configurations of all the problem distributions to figure this out. I haven't attempted to dig that deep.
This actually affects different Debian ISOs, so it doesn't even have to be different distributions. So far I tested multiple Ubuntu/Debian/Linux Mint images, and only Debian has issues -- the others boot well when many images of the same kind (different versions) are copied to the pendrive. I asked about this on a Debian Live mailing list, and they don't really know what's going on.
I also checked what efishell says, and I viewed the .disk/info file after switching to each of the Debian ISOs, and efishell shows different info from this file, so it is able to distinguish the ISOs.
Maybe could you download some of the Debian ISOs that can be found here, and we could check whether you can observe the same behavior? Just to eliminate the possibility that the bug only affects my machine.
Also, this behavior has nothing to do with Secure Boot. I checked without Secure Boot enabled, and I can see the same issue.
Last edit: Mikhail Morfikov 2020-03-25