Subj : nvme grub2 efi boot
To : Benny Pedersen
From : Maurice Kinal
Date : Sat Jul 16 2022 09:00 pm
Hey Benny!
I have it booting to 4k with a 32p font I created from terminus-font's ter-u32b.bdf since regular console-fonts won't work with grub2 efi boots. This works;
-={ /boot/grub/grub.cfg starts }=-
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root DD27-C0CC
if loadfont /EFI/ZNVER2_NVME/test.ttf ; then
set gfxmode=3840x2160x32,2560x1440x32,1920x1080x32,1280x800x32,1024x768x32,800x600x32,auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_CA
insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'GNU/Linux' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-86518520-dafc-40ae-b4d5-47a565bdb0ab' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 86518520-dafc-40ae-b4d5-47a565bdb0ab
echo 'Loading Linux 5.18.12 ...'
linux /boot/vmlinuz-5.18.12 root=PARTUUID=4353f2c2-f6eb-bb2d-da55-21dff4f1b9eb ro
}
submenu 'Advanced options for GNU/Linux' $menuentry_id_option 'gnulinux-advanced-86518520-dafc-40ae-b4d5-47a565bdb0ab' {
menuentry 'GNU/Linux, with Linux 5.18.12' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.18.12-advanced-86518520-dafc-40ae-b4d5-47a565bdb0ab' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 86518520-dafc-40ae-b4d5-47a565bdb0ab
echo 'Loading Linux 5.18.12 ...'
linux /boot/vmlinuz-5.18.12 root=PARTUUID=4353f2c2-f6eb-bb2d-da55-21dff4f1b9eb ro
}
menuentry 'GNU/Linux, with Linux 5.18.12 (recovery mode)' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.18.12-recovery-86518520-dafc-40ae-b4d5-47a565bdb0ab' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 86518520-dafc-40ae-b4d5-47a565bdb0ab
echo 'Loading Linux 5.18.12 ...'
linux /boot/vmlinuz-5.18.12 root=PARTUUID=4353f2c2-f6eb-bb2d-da55-21dff4f1b9eb ro single
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
-={ /boot/grub/grub.cfg ends }=-
I also have an uefi for the sata interface and can successfully install to a hotswapped 2.5" SSD on my so-called file server and then pop it into the target system - ASRock 4X4-4000 Series for example - and boot it up. That is what I initially did in order to create the above ZNVER2_NVME. Note that in the above cfg there are no references to /dev/nvme0n1p2 where the rootfs is installed to. For cross-referencing here is the output of 'blkid' for the installed nvme disk;
I can also do the above for the 2.5" SSD if you think there might be some help in that. It is DEFINETLY different and I think the nvme disks are handling uefi boots far better than sata. The switch from grub to the linux terminal isn't seamless as such but is far less noticable than not supplying a more or less matching sized console-font such as latarcyrheb-sun32 which is what I am deploying.
The boot penguins get displayed as part of the grub display just before the real terminal display kicks in.
Life is good,
Maurice
... ðone wisdom ðe ðe God sealde ðær ðær ðu hiene befæstan mæge, befæste.
Wherever you can use the wisdom God gave you, use it.
--- GNU bash, version 5.1.16(1)-release (x86_64-znver1-linux-gnu)
* Origin: Little Mikey's EuroPoint @ (2:280/464.113)