kexec-reboot icon indicating copy to clipboard operation
kexec-reboot copied to clipboard

menuentry regex not matching correctly

Open auipga opened this issue 4 years ago • 0 comments

I did't use kexec-reboot for quiet a long time. Since then grub files have been altered or generated differently and the regexp doesn't extract the correct values anymore. Additionally there has never been support for multiple initrd's, right? If needed, I can file another issue for that.

/boot/grub/grub.cfg:

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-/dev/mapper/rootfs' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  ABCD-1234
	else
	  search --no-floppy --fs-uuid --set=root ABCD-1234
	fi
	echo	'Loading Linux linux-lts ...'
	linux	/vmlinuz-linux-lts root=/dev/mapper/rootfs rw rootflags=subvol=@ quiet resume=UUID=XY-valid-uuid-here resume_offset=12345 nmi_watchdog=0 mem_sleep_default=deep even_more=parameters
	echo	'Loading initial ramdisk ...'
	initrd	/intel-ucode.img /initramfs-linux-lts.img
}

Other entries are mostly equal. (without -lts or without /intel-ucode.img and with some more \t on each line). I'll attach them if required.

$ sudo kexec-reboot -i -v

Initrd /boot/intel-ucode.img /initramfs-linux-lts.img is not readable # that's true, this is not a single filename but two
Initrd /boot/intel-ucode.img /initramfs-linux-lts.img is not readable # same here
Kernel /boot...'
		linux	/vmlinuz-linux is not readable
Kernel /boot...'
		linux	/vmlinuz-linux is not readable
Read GRUB configuration from /boot/grub/grub.cfg

Select a kernel to stage:

1: Arch Linux, with Linux linux-lts (fallback initramfs)

Your selection: 1
Staging Arch Linux, with Linux linux-lts (fallback initramfs)
Staging kernel Arch Linux, with Linux linux-lts (fallback initramfs)
Unloading previous kexec target, if any
Running /sbin/kexec -l /boot/vmlinuz-linux-lts --append='root=/dev/mapper/rootfs rw rootflags=subvol=@ quiet resume=UUID=XY-valid-uuid-here resume_offset=12345 nmi_watchdog=0 mem_sleep_default=deep even_more=parameters' --initrd=/boot/initramfs-linux-lts-fallback.img
# still works fine manually:
sudo kexec -l /boot/vmlinuz-linux-lts --initrd=/boot/initramfs-linux-lts.img --reuse-cmdline
sudo systemctl kexec

auipga avatar Jun 16 '21 06:06 auipga