<div>Package: grub-common<br></div><div>Version: 2.02~beta2-22+deb8u1<br></div><div><br></div><div>Steps to reproduce: <br></div><div>------------- <br></div><div><br></div><div>1. Hard drive (EFI mode) has Btrfs "/" partitions of two Debian-derived Linux OSes: <br></div><div>/dev/sda2 Xubuntu 13.04 with GRUB package version 2.00-13ubuntu3<br></div><div> - Hereinafter, "Ubuntu" refers to this _specific_ install and *NOT* to Ubuntu OSes generally. <br></div><div>/dev/sda3 Linux Mint Debian Edition 2 "Betsy" with GRUB package version as noted in "Version" pseudo-header of this bug report (from Debian Jessie) <br></div><div> - Hereinafter known as "LMDE". <br></div><div>The Ubuntu install is in subvolume "@" of the Btrfs filesystem. I believe this partition was installed by a vendor who sells a lot of Linux PCs, and/or using subvolume "@" was recommended at one time as a best practice (although I wasn't able to find it on the Web recently), so a high percentage of Btrfs users is likely to be using subvolume "@" like this. <br></div><div><br></div><div>2. Run "update-grub" in LMDE. <br></div><div><br></div><div>3. Reboot the PC and select Ubuntu option from GRUB menu. <br></div><div><br></div><div>4. GRUB is unable to boot Linux, and halts with an error message that's something like the following: <br></div><div><br></div><div>Unable to find /boot/vmlinuz-3.blah.blah<br></div><div>alloc magic is broken at 0xXXXXXXXX (0xXXXXXXXX).<br></div><div>Aborted. Press any key<br></div><div><br></div><div>If I alter the folders in the EFI system partition so that Ubuntu's .efi file (instead of LMDE's) is the one that boots, then the Ubuntu-generated GRUB menu can successfully boot either Ubuntu or LMDE. <br></div><div><br></div><div>Comments on possible fix: <br></div><div>------------- <br></div><div>In /boot/grub/grub.cfg in the 2 OS installs, I compared the section that boots Ubuntu. The Ubuntu grub.cfg (section made by the /etc/grub.d/linux script) contains 3 things that are missing from the LMDE grub.cfg (section made by the /etc/grub.d/os-prober script): <br></div><div><br></div><div>* The filename parameter to the "linux" and "initrd" commands has a /@ prefix (i.e., it looks like /@/boot/vmlinuz...) <br></div><div>* After the "root=" partition spec, there is "rootflags=subvol=@" <br></div><div>* Finally, there are kernel command-line parameters (e.g., "quiet splash") - not relevant to the boot failure, but probably should still be fixed. <br></div><div><br></div><div>Manually updating LMDE's grub.cfg with these differences causes Ubuntu to boot successfully when the LMDE-generated "Ubuntu" GRUB menu option is chosen. I know that grub.cfg isn't normally supposed to be updated manually; I did this for troubleshooting only. <br></div><div><br></div><div>I stated the Ubuntu GRUB package version only to document that the /etc/grub.d/linux script in that GRUB version seems to have correct logic that maybe can be ported to /etc/grub.d/os-prober in the current GRUB version. Specifically, there appears to be a function called "make_system_path_relative_to_its_root" which seems to detect that /boot/vmlinuz is really at /@/boot/vmlinuz. <br></div><div><br></div><div>Thanks in advance for reviewing this. <br></div><div><br></div><div>-dg1727<br></div>