I work with a free/open source project. A Debian maintainer reported a failure under X32 (not a typo; its not X86), and I'm trying to set up a test environment to reproduce it.
According Debian's X32 Ports wiki, I need to enable the X32 extensions in the kernel. To do that, I need to add the Grub entry. Below is what I added to /etc/default/grub
, and its taken from the wiki page (except I commented the default entry).
# GRUB_CMDLINE_LINUX_DEFAULT="syscall.x32=y quiet"
GRUB_CMDLINE_LINUX="syscall.x32=y"
I then performed an update-grub
per the wiki page and verified the entries in the compiled menu (see below).
When I boot the system, the option does not appear to be available under the main menu or the advanced options:
Debian's Grub2 docs leaves a lot to be desired. It only discusses how to colorize menu entries (you can't make this sort of stuff up...).
I expected the following after following the prescription provided by the docs:
- Debian GNU/Linux
- Debian GNU/Linux (X32)
- Advanced options
- Memory test (memtest86+)
- Memory test (memtest86+, serial)
- ...
How do I add X32 boot options to Grub, give it a name like "Debian GNU/Linux (X32)", ensure its a boot option for the kernel during boot, and ensure the changes survive after an upgrade
or dist-upgrade
?
According to Marius's answer below, I added the following to /etc/grub.d/40_custom
:
menuentry 'Debian GNU/Linux (X32)' --class debian --class gnu-linux --class gnu --class os
$menuentry_id_option 'gnulinux-simple-a4af7dfc-640c-4aa8-bf0b-068af3d72b01' {
linux/boot/vmlinuz-4.2.0-1-amd64 root=UUID=a4af7dfc-640c-4aa8-bf0b-068af3d72b01 ro syscall.x32=y quiet
}
It provides the named entry as expected, but it results in a boot error:
error: can't find command: `linux/boot/vmlinuz-4`
I think that was due to copy/paste in Emacs (it apparently removes whitespace???). So I changed it to linux /boot/vmlinuz-4.2.0-1-amd64...
. It resulted in a kernel panic: