URL: <https://savannah.gnu.org/bugs/?64448>
Summary: os-prober fails when initrd contains multiple images Group: GNU GRUB Submitter: drax Submitted: Wed 19 Jul 2023 10:46:25 AM UTC Category: None Severity: Major Priority: 5 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Aeron Draxar Originator Email: savan...@draxar.ocm Open/Closed: Open Release: Git master Release: Discussion Lock: Any Reproducibility: Every Time Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Wed 19 Jul 2023 10:46:25 AM UTC By: Aeron Draxar <drax> OS prober fails when the target OS has a separate boot partition and multiple initrd images. I have both Debian and Manjaro installed on my laptop. When using Debian's update-grub, I get a grub.cfg with a wrong path for Manjaro's initramfs. It should be: linux /vmlinuz ... initrd /intel-ucode.img /initramfs-6.4-x86_64.img but instead I get: linux /vmlinuz ... initrd /intel-ucode.img /boot/initramfs-6.4-x86_64.img Upon looking at grub.d/30_os-prober.in (line #226), it appears the script only removes the first occurrence of /boot, so the next image has a wrong path. (util/grub.d/30_os-prober.in #226) LINITRD="${LINITRD#/boot}" Suggestion, something like: LINITRD="$(echo "$LINITRD" | sed -re 's+(^| )/boot+\1+g')" Kind regards, Aeron Draxar _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Wed 19 Jul 2023 10:46:25 AM UTC Name: grub.cfg Size: 9KiB By: drax error at line #185 <http://savannah.gnu.org/bugs/download.php?file_id=54940> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64448> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/