Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [Solved] Strange issues adding new kernels to GRUB (Read 586 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Solved] Strange issues adding new kernels to GRUB

I have been running the standard Linux kernel on my desktop since March 2021, but recently I required the linux-zen kernel for a particular application to work.

I then installed linux-zen & linux-zen-headers. I also installed linux-lts & linux-lts-headers to have a LTS fallback option, as I recently had the linux-zen kernel stop booting on a laptop & that system would only boot with the LTS kernel.

First I created a back up of /boot/grub/grub.cfg & then  I ran the command shown in the Arch Wiki to generate a new /boot/grub/grub.cfg
Code: [Select]
# grub-mkconfig -o /boot/grub/grub.cfg

Then I rebooted the system & it would only display GRUB before rebooting again & again before dumping me into my BIOS.

I then booted off an Artix ISO and mounted my encrypted drive with artix-chroot; then restored my original grub.cfg (dated Mar 26  2021) and my system rebooted fine.

What am I missing here? I've followed the same process on different systems before. Any help or suggestions is much appreciated.

Re: Strange issues adding new kernels to GRUB

Reply #1
Did you run mkinitcpio beforehand?
Code: [Select]
# mkinitcpio -P
# grub-mkconfig -o /boot/grub/grub.cfg

Re: Strange issues adding new kernels to GRUB

Reply #2
Did you run mkinitcpio beforehand?
Code: [Select]
# mkinitcpio -P
# grub-mkconfig -o /boot/grub/grub.cfg

I just tried running "mikinitcpio -P" beforehand, but unfortunately I get the same behaviour as in the OP.

I think my issue may have to do with UEFI & I don't want to really break my system badly so hoping another Artix user here with more UEFI experience has some suggestions. Are you running UEFI on your system @MaxLPM ?

Re: Strange issues adding new kernels to GRUB

Reply #3
Quote
Are you running UEFI on your system @MaxLPM ?
Yeah, I am, and in the past I had no trouble having linux and linux-lts simultaneously.
You mentioned that you use encryption, are you sure that you have all of the needed hooks in /etc/mkinitcpio.conf? And that all of the UUIDs are correct in /etc/default/grub?
Maybe try mkinitcpio, installing grub again and then grub-mkconfig? For grub installation use this:
Code: [Select]
grub-install --target=x86_64-efi --efi-directory=<your_esp_dir> --bootloader-id=grub
If that doesn't work, please post the output of
Code: [Select]
efibootmgr
Also, what do you mean by "GRUB before rebooting again & again before dumping me into my BIOS"?  Do you see any boot entries?

Re: Strange issues adding new kernels to GRUB

Reply #4
Quote
Are you running UEFI on your system @MaxLPM ?
Yeah, I am, and in the past I had no trouble having linux and linux-lts simultaneously.
You mentioned that you use encryption, are you sure that you have all of the needed hooks in /etc/mkinitcpio.conf? And that all of the UUIDs are correct in /etc/default/grub?
Maybe try mkinitcpio, installing grub again and then grub-mkconfig? For grub installation use this:
Code: [Select]
grub-install --target=x86_64-efi --efi-directory=<your_esp_dir> --bootloader-id=grub

After running those commands, I get dropped to a grub rescue prompt after reboot.
I then reboot into recovery & restore my backed up grub.cfg over the newly created one. Then when I reboot, GRUB comes up normally but there are no other kernels listed. Then I select Advanced there on the GRUB menu and it only shows me the "Linux" kernel - no zen or LTS are there.

If that doesn't work, please post the output of
Code: [Select]
efibootmgr

Here is the output of efibootmgr
Code: [Select]
efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0001,0003
Boot0000* grub HD(1,GPT,fa8bdda7-f312-2d42-9235-7e3ad45797c6,0x800,0x200000)/\EFI\grub\grubx64.efi
Boot0001* Hard Drive BBS(HD,,0x0)0000474f00004e4fc1000000010000007100530061006d00730075006e006700200053005300440020003900370030002000450056004f00200050006c007500730020003500300030004700420000000501090002000000007fff040002010c00d041030a0000000001010600010101010600000003171000010000000025385c019e2c667fff040001043400ef47642dc93ba041ac194d51d01b4ce653003500380053004e005a0046004e004300300035003100370032004c0000007fff04000000424f00004e4fad00000001000000750053005400320030003000300044004d003000300038002d0032004600520031003000320000000501090002000000007fff040002010c00d041030a0000000001010600030101010600010003120a000000ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce620002000200020002000200020002000200020002000200046005a0032004c00410059004c00370000007fff04000000424f
Boot0003* CD/DVD Drive BBS(CDROM,,0x0)0000474f00004e4fc50000000100000079004f0070007400690061007200630020004400560044002000520057002000410044002d0037003700300030005300200031002e003700300000000501090003000000007fff040002010c00d041030a000000000101060003010101060000000305060007007fff040001044600ef47642dc93ba041ac194d51d01b4ce630003000300030003000300030003000300030003000300030003000300030003000300030003000300030003000300000007fff04000000424f

Also, what do you mean by "GRUB before rebooting again & again before dumping me into my BIOS"?  Do you see any boot entries?

I mean that the computer would attempt to load grub & quite literally only flash GRUB (where the menu should be) and then instantly bootloop the system which then drops me into the BIOS screen.

 

Re: Strange issues adding new kernels to GRUB

Reply #5
Quote
I mean that the computer would attempt to load grub & quite literally only flash GRUB (where the menu should be) and then instantly bootloop the system which then drops me into the BIOS screen.
Huh, do any messages get outputed? Anything like "Welcome to GRUB"?
Are you using full disk encryption, or just an encrypted root?

Also, could you please send the contents of the following files:
/etc/default/grub
Original /boot/grub/grub.cfg (the one from 2021)
The current /boot/grub/grub.cfg, with linux, linux-lts and linux-zen installed and grub updated

Does this happen when you just use linux and linux-lts? Basically, have you tried uninstalling linux-zen, updating grub, and rebooting?

Re: Strange issues adding new kernels to GRUB

Reply #6
Quote
I mean that the computer would attempt to load grub & quite literally only flash GRUB (where the menu should be) and then instantly bootloop the system which then drops me into the BIOS screen.
Huh, do any messages get outputed? Anything like "Welcome to GRUB"?
Are you using full disk encryption, or just an encrypted root?
When I have the issue, the screen only says "GRUB" & then reboots. It does not present the "Welcome to GRUB" screen that it should be presenting.
I'm just running an ecrypted root with LUKS.

Also, could you please send the contents of the following files:
/etc/default/grub
Original /boot/grub/grub.cfg (the one from 2021)
The current /boot/grub/grub.cfg, with linux, linux-lts and linux-zen installed and grub updated

Does this happen when you just use linux and linux-lts? Basically, have you tried uninstalling linux-zen, updating grub, and rebooting?

Here is my /etc/default/grub
Code: [Select]
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=15
GRUB_DISTRIBUTOR="Artix"
#GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"

Here is my Original /boot/grub/grub.cfg (the one from 2021)
Code: [Select]
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
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
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  0d052f6b-3729-40fb-b29f-58c7b232ea06
else
  search --no-floppy --fs-uuid --set=root 0d052f6b-3729-40fb-b29f-58c7b232ea06
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=15
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=15
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Artix Linux' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
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  25B8-1843
else
search --no-floppy --fs-uuid --set=root 25B8-1843
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux.img
}
submenu 'Advanced options for Artix Linux' $menuentry_id_option 'gnulinux-advanced-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
menuentry 'Artix Linux, with Linux linux' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
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  25B8-1843
else
search --no-floppy --fs-uuid --set=root 25B8-1843
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux.img
}
menuentry 'Artix Linux, with Linux linux (fallback initramfs)' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
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  25B8-1843
else
search --no-floppy --fs-uuid --set=root 25B8-1843
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux-fallback.img
}
}

### 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/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 ###

Here is the broken /boot/grub/grub.cfg, with linux, linux-lts and linux-zen installed and grub updated
Code: [Select]
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
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
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod cryptodisk
insmod luks2
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u 3ae12c7e-2f01-4284-86ff-497438d858e2
set root='cryptouuid/3ae12c7e2f01428486ff497438d858e2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='cryptouuid/3ae12c7e2f01428486ff497438d858e2'  0d052f6b-3729-40fb-b29f-58c7b232ea06
else
  search --no-floppy --fs-uuid --set=root 0d052f6b-3729-40fb-b29f-58c7b232ea06
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=15
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=15
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Artix Linux' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 25B8-1843
echo 'Loading Linux linux-zen ...'
linux /vmlinuz-linux-zen root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux-zen.img
}
submenu 'Advanced options for Artix Linux' $menuentry_id_option 'gnulinux-advanced-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
menuentry 'Artix Linux, with Linux linux-zen' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 25B8-1843
echo 'Loading Linux linux-zen ...'
linux /vmlinuz-linux-zen root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux-zen.img
}
menuentry 'Artix Linux, with Linux linux-zen (fallback initramfs)' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 25B8-1843
echo 'Loading Linux linux-zen ...'
linux /vmlinuz-linux-zen root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux-zen-fallback.img
}
menuentry 'Artix Linux, with Linux linux-lts' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 25B8-1843
echo 'Loading Linux linux-lts ...'
linux /vmlinuz-linux-lts root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux-lts.img
}
menuentry 'Artix Linux, with Linux linux-lts (fallback initramfs)' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 25B8-1843
echo 'Loading Linux linux-lts ...'
linux /vmlinuz-linux-lts root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux-lts-fallback.img
}
menuentry 'Artix Linux, with Linux linux' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 25B8-1843
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux.img
}
menuentry 'Artix Linux, with Linux linux (fallback initramfs)' --class artix --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-0d052f6b-3729-40fb-b29f-58c7b232ea06' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 25B8-1843
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=0d052f6b-3729-40fb-b29f-58c7b232ea06 rw  cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot
echo 'Loading initial ramdisk ...'
initrd /amd-ucode.img /initramfs-linux-fallback.img
}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/15_ostree ###
### END /etc/grub.d/15_ostree ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
fwsetup --is-supported
if [ "$?" = 0 ]; then
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
fi
fi
### 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 ###

I believe I've already tried uninstalling linux-zen, updating grub, and then rebooting, but will try that again if you don't see anything odd in the newly generated grub.cfg.

Re: Strange issues adding new kernels to GRUB

Reply #7
Quote
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot"
This could potentially be the culprit.
Recently, I experimented with encryption on Artix. I tried using the "root=/dev/mapper/name" scheme first, but after completing the installation and rebooting, grub couldn't find the partition and didn't even ask for a password. Changing the argument to "root=UUID=NAME_UUID" fixed it. Maybe this is related to your case?

So, boot into a live CD, unlock your volume and run the following commands (make sure to either use sudo or run as root):
Code: [Select]
# blkid /dev/nvme0n1p2
# blkid /dev/mapper/cryptroot
Then, edit /etc/default/grub to the following, replacing the placeholders with the results of the previous commands (you're looking for UUID=, not PARTUUID= or anything else):
Quote
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=YOUR_NVME_UUID:cryptroot root=UUID=YOUR_CRYPTROOT_UUID"
Now, install the lts and zen kernels if you don't have them already, and fully re-install grub:
Code: [Select]
# mkinitcpio -P
# grub-install --target=x86_64-efi --efi-directory=<your_esp_dir> --bootloader-id=grub
# grub-mkconfig -o /boot/grub/grub.cfg
This should either boot correctly, drop you to a busybox initramfs, or drop you into grub rescue. Please report the results.
In case it doesn't work, keep the UUIDs, since it's considered best practice anyway

Re: [Solved] Strange issues adding new kernels to GRUB

Reply #8
Thank you very much for your help @MaxLPM as it did indeed need those UUID entries for it to work.