petitboot
petitboot copied to clipboard
petitboot doesn't ignore EFI entries
I'm running petitboot with openSUSE Tumbleweed on a Talos Blackbird. Some months ago petitboot didn't find the boot entry anymore. I had to manually add a new one entering the initrd and kernel name.
After some investigation (together with the openSUSE community) I found the following:
openSUSE has /etc/grub.d/95_textmode
#!/bin/sh
cat <<EOF
if [ "\${grub_platform}" = "efi" ]; then
# On EFI systems we can only have graphics *or* serial, so allow the user
# to switch between the two
hiddenentry 'Text mode' --hotkey 't' {
set textmode=true
terminal_output console
}
fi
EOF
It will be included in /boot/grub2/grub.cfg
210 ### BEGIN /etc/grub.d/95_textmode ###
211 if [ "\${grub_platform}" = "efi" ]; then
212 # On EFI systems we can only have graphics *or* serial, so allow the user
213 # to switch between the two
214 hiddenentry 'Text mode' --hotkey 't' {
215 set textmode=true
216 terminal_output console
217 }
218 fi
219 ### END /etc/grub.d/95_textmode ###
This somehow can not be parsed by petitboot and petitboot refuses to boot. Removing the file and running sudo update-bootloader resolves the issue. openSUSE had following /etc/grub.d/95_textmode in place before, which was good as well:
#!/bin/sh
cat <<EOF
if [ -d /sys/firmware/efi ]; then
echo "
# On EFI systems we can only have graphics *or* serial, so allow the user
# to switch between the two
hiddenentry 'Text mode' --hotkey 't' {
set textmode=true
terminal_output console
}"
fi
EOF
Let me know if you need any further information from me.
petitboot/pb-discover.log: sda2 contains the Tumbleweed system. Line numbers can be seen above.
[15:19:15] Snapshot successfully created for sda2
[15:19:15] mounting device /dev/sda2 read-only
[15:19:15] trying parsers for sda2
[15:19:15] parse error: 214('{'): syntax error, unexpected '{', expecting elif or else or fi
[15:19:15] Running command:
exe: /usr/sbin/pb-plugin
argv: '/usr/sbin/pb-plugin' 'scan' '/var/petitboot/mnt/dev/sda2'
Scanning device /var/petitboot/mnt/dev/sda2
No plugins found