FS#52910 - [grub] in os-prober part cuts off all but first initrd arguments
Attached to Project:
Arch Linux
Opened by hotice (hotice) - Thursday, 09 February 2017, 09:47 GMT
Last edited by Toolybird (Toolybird) - Thursday, 04 May 2023, 21:41 GMT
Opened by hotice (hotice) - Thursday, 09 February 2017, 09:47 GMT
Last edited by Toolybird (Toolybird) - Thursday, 04 May 2023, 21:41 GMT
|
Details
Description:
Arch has customized grub package that can't boot other Linuxes that have more than one initrd parameter. The bug shows as os-prober (30_ entries) appear truncated in grub.cfg in a way that only first initrd argument survives. Relevant Arch entry in /boot/grub/grub.cfg is initrd /boot/intel-ucode.img /boot/initramfs-linux.img or, Manjaro entry: initrd /boot/intel-ucode.img /boot/initramfs-4.9-x86_64.img But, with Arch grub the result is truncated as below and obviously unbootable: initrd /boot/intel-ucode.img There is the obvious difference in script code that handles initrd row in Manjaro (that works) and Arch (that doesn't). The situation forces to keep Manjaro version of grub in MBR of /dev/sda Additional info: Name : grub Version : 1:2.02.beta3-6 and 1:2.02.rc1-1 Description : GNU GRand Unified Bootloader (2) Architecture : x86_64 Steps to reproduce: Single SSD BIOS/MBR multiboot config with Windows, Arch, Manjaro (Linuxes in extended part). All 3 are up to date. parted -l output: Model: ATA Samsung SSD 850 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 106MB 105MB primary ntfs boot 2 106MB 190GB 190GB primary ntfs 3 190GB 500GB 310GB extended lba 5 190GB 377GB 187GB logical ntfs 6 377GB 471GB 94.1GB logical ext4 7 471GB 476GB 4340MB logical linux-swap(v1) 8 476GB 500GB 24.1GB logical ext4 9 500GB 500GB 214MB logical /dev/sda6 is Archlinux root, /dev/sda8 is Manjaro root All results were double checked on actual SSD partitioned as above. Arch/Manjaro grubs were sequentially set into SSD MBR. Also performed boot from Archlinux official live CD and Manjaro official distro by using these commands to see the result in console: Arch: mount /dev/sda6 /mnt arch-chroot /mnt grub-mkconfig Manjaro: manjaro-chroot -a [select either Arch or Manjaro autodetected partition] grub-mkconfig |
This task depends upon
Closed by Toolybird (Toolybird)
Thursday, 04 May 2023, 21:41 GMT
Reason for closing: Fixed
Additional comments about closing: No one apparently cares...so assuming fixed.
Thursday, 04 May 2023, 21:41 GMT
Reason for closing: Fixed
Additional comments about closing: No one apparently cares...so assuming fixed.
If there is an obvious difference in script code... What is it?
Tix, does the issue still persist with latest package?
pacaur -Qi grub
Name : grub
Version : 2:2.02-1
pacaur -Qi os-prober
Name : os-prober
Version : 1.75-1
Now looks like there was a ROUGH workaround applied on ArchLinux part. That is ArchLinux is now simply ignores os-probe initrd /boot/intel-ucode.img entry by skipping it. So the initrd has only one parameter that makes a generated entry bootable. And YES, there was and still are the obvious differences in Arch and Manjaro corresponding scripts, as Manjaro script is still able to generate multi-argument initrd entries (that include /boot/intel-ucode.img) in os-probe section!
Looks like we are mis-communicating about "obvious differences". For you it is just "obvious differences in the result", no?
In your original post you wrote about "obvious difference in script code". That made me think you could point to a file and line number to find the difference.
Anyway, can you provide a complete grub.cfg file (or at least the complete block generated by 30_os-prober) and a list of files (linux kernel, initrd) and their naming patterns?
Not sure if we want to load the microcode for foreign operating systems, though. This may work for Manjaro, but break for others. Some distributions use a concatenated initrd, including the microcode: See the dracut documentation [0] and its parameter '--early-microcode' for example.
[0] https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
I remember I took Manjaro and Arch related scripts and saw clear diffs there in handling initrd line. As I have neither sufficient knowledge nor ability to suggest a fix, I just reported the issue here.
"Not sure if we want to load the microcode for foreign operating systems, though." - I think that's the key issue here. This also goes against common sense, as if Arch generates microcode for main entry, but not for others (which includes Manjaro that itself based on Arch, or even other possible pure Arch "foreign" installations for that matter!). Also Manjaro does this more consistently, microcode clause is included irrespectively of the instance of OS that put GRUB into boot sector, so that "domestic" and "foreign" OSes are handled similarly. Also, as you repeatedly told that Arch is direct copy of upstream code in this regard, the question arises why Manjaro team bothered to complicate it in the first place? The answer was obvious (as originally reported here, Arch just stripped off all but the first argiment from intrd causing faulty entry in case microcode was added), and the current situation is just a lazy and dirty workaround, either from upstream or from Arch team. All that IMHO of course.
[1] https://git.savannah.gnu.org/cgit/grub.git/commit/util/grub.d/30_os-prober.in?id=000b5cd04fd228f9741f5dca0491636bc0b89eb8
My best guess would be to either wait lazily for extra responses either from sf (callmejoe) or someone else.
Joe's response was made 2-3 months _after_ the linked bug fix attempt, thus it obviously depends.
That tells us how darn quick Arch maintainers are willing to react [now over 6 years and 2 months and counting...]
;-)