[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62886] Wrong $cmdpath when booting from an optical disc
From: |
INVALID.NOREPLY |
Subject: |
[bug #62886] Wrong $cmdpath when booting from an optical disc |
Date: |
Thu, 11 Aug 2022 05:55:41 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62886>
Summary: Wrong $cmdpath when booting from an optical disc
Project: GNU GRUB
Submitter: nl6720
Submitted: Thu 11 Aug 2022 12:55:39 PM EEST
Category: Booting
Severity: Major
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: other
Release:
Discussion Lock: Any
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 11 Aug 2022 12:55:39 PM EEST By: Anonymous
When booting GRUB standalone (created following
https://wiki.archlinux.org/title/GRUB/Tips_and_tricks#GRUB_standalone ) from
an optical disc (an emulated one using IODD 2531), where it was placed at
/EFI/BOOT/BOOTx64.EFI in both the ISO9660 and in an attached FAT image used as
an EFI system partition, GRUB's $cmdpath was wrong. echo $cmdpath returned
(cd0)/EFI/Boot. Notice that it's Boot not BOOT, but ls (cd0)/EFI/ showed that
the directory is indeed called BOOT.
This only happens on my HP ProBook 450 G2 laptop. I can't reproduce it on
another PC I own nor on the same laptop when the ISO is written to a USB flash
drive.
OS: Arch Linux
Package versions:
grub 2:2.06.r261.g2f4430cc0-1
libisoburn 1.5.4-2
dosfstools 4.2-2
mtools 1:4.0.40-1
Steps to reproduce:
$ mkdir -p isoroot/BOOT/EFI
$ echo 'configfile ${cmdpath}/grub.cfg' > grub-embed.cfg
$ cat <<'EOF' > isoroot/BOOT/EFI/grub.cfg
insmod part_gpt
insmod part_msdos
insmod fat
insmod iso9660
insmod all_video
insmod font
if loadfont "${prefix}/fonts/unicode.pf2" ; then
insmod gfxterm
set gfxmode="auto"
terminal_input console
terminal_output gfxterm
fi
menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
fwsetup
}
menuentry "System shutdown" --class shutdown --class poweroff {
echo "System shutting down..."
halt
}
menuentry "System restart" --class reboot --class restart {
echo "System rebooting..."
reboot
}
EOF
$ grub-mkstandalone -O x86_64-efi \
--modules="part_gpt part_msdos fat iso9660" \
--locales="en@quot" \
--themes="" \
-o "isoroot/BOOT/EFI/BOOTx64.EFI" \
"boot/grub/grub.cfg=grub-embed.cfg"
$ mkfs.fat -C efiboot.img 8192
$ mmd -i efiboot.img ::/EFI ::/EFI/BOOT
$ mcopy -i efiboot.img isoroot/BOOT/EFI/BOOTx64.EFI isoroot/BOOT/EFI/grub.cfg
::/EFI/BOOT/
$ xorriso -as mkisofs \
-iso-level 3 \
-full-iso9660-filenames \
-joliet \
-joliet-long \
-rational-rock \
-partition_offset 16 \
-append_partition 2 0xef efiboot.img \
-eltorito-alt-boot \
-e '--interval:appended_partition_2:all::' \
-no-emul-boot \
-isohybrid-gpt-basdat \
-output "grub-boot-test.iso" \
isoroot/
Burn and boot grub-boot-test.iso.
archiso issue: https://gitlab.archlinux.org/archlinux/archiso/-/issues/183 .
Currently archiso uses the following embeded grub configuration file to work
around it:
if ! [ -d "$cmdpath" ]; then
if regexp --set=1:isodevice
'^(\([^)]+\))\/?[Ee][Ff][Ii]\/[Bb][Oo][Oo][Tt]\/?$' "$cmdpath"; then
cmdpath="${isodevice}/EFI/BOOT"
fi
fi
configfile "${cmdpath}/grub.cfg"
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62886>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62886] Wrong $cmdpath when booting from an optical disc,
INVALID.NOREPLY <=