Cannot boot into custom kernel: ERROR : resume hibernation device UUID=<insert UUID> not found, ERROR : device UUID=<insert UUID> not found

I compiled a custom linux kernel per the ‘Kernel/Arch Build System’ wiki page. Everything went well until I tried to boot into it. I get the messages in the title (I also get another line involving \new_root but can’t remember what it says), then it says I can’t use tty because job control is turned off, then I’m dropped into a recovery shell.

Now (I was able to boot using the default kernel I was using, so I don’t need a live usb, right?), I have run mkinitcpio -p linux-custom , grub-mkconfig -o /boot/grub/grub.cfg multiple times, but the issue persists. I changed the HOOKS flag in the mkinitcpio config file so that block comes before autodetect. Then I downgraded systemd to version 240 which rendered both of my kernels unbootable. At this point I chrooted in using a live USB and ran pacman -S systemd and the funny thing is, the resume error seems to have been solved!

Now for the remaining problem, some threads suggest downgading to systemd 239 because there was a bug in systemd 240, but I’m on 246. So I’m guessing that this is not a systemd related issue.

The person in this thread seems to have solved the issue by installing systemd-boot and editing /boot/loader/entries/arch.conf. But alas when I try bootctl --path=/boot/efi install I get the following error: File system "/dev/block/8:1" has wrong type for an EFI System Partition (ESP).
fdisk -l

Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors
Disk model: VBOX HARDDISK   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9308577C-C977-0640-93A1-91A3813513FE

Device       Start      End  Sectors  Size Type
/dev/sda1     2048  1050623  1048576  512M Microsoft basic data
/dev/sda2  1050624  7342079  6291456    3G Linux swap
/dev/sda3  7342080 62910506 55568427 26.5G Linux filesystem

blkid:

/dev/sda1: UUID="E29B-A0BB" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="bcad7aa4-1b8a-8242-9df7-70cf402b9f89"
/dev/sda2: UUID="5d235b38-cb10-4579-8c50-3d1a91066151" TYPE="swap" PARTUUID="b72ba895-32cb-a840-9b0a-3788e6b4122a"
/dev/sda3: UUID="5bb200b1-f122-4d92-97fd-20084159bf4d" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="0fc49771-cb62-d949-b704-033f6cf6a271"
/dev/sr0: BLOCK_SIZE="2048" UUID="2020-09-20-20-31-31-00" LABEL="ENDEAVOUROS" TYPE="iso9660" PTUUID="7dc359a3" PTTYPE="dos"

/etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=E29B-A0BB                            /boot/efi      vfat    umask=0077 0 2
UUID=5d235b38-cb10-4579-8c50-3d1a91066151 none           swap        defaults,noatime 0 2
UUID=5bb200b1-f122-4d92-97fd-20084159bf4d /              ext4    defaults,noatime 0 1

/boot/grub/grub.cfg:

#
# 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 ###
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 ext2
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt3' --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  5bb200b1-f122-4d92-97fd-20084159bf4d
else
  search --no-floppy --fs-uuid --set=root 5bb200b1-f122-4d92-97fd-20084159bf4d
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_AU
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt3' --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  5bb200b1-f122-4d92-97fd-20084159bf4d
else
  search --no-floppy --fs-uuid --set=root 5bb200b1-f122-4d92-97fd-20084159bf4d
fi
insmod gfxmenu
loadfont ($root)/boot/grub/themes/EndeavourOS/unifont-regular-16.pf2
insmod png
set theme=($root)/boot/grub/themes/EndeavourOS/theme.txt
export theme
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 'EndeavourOS, on linux-custom' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-custom-advanced-5bb200b1-f122-4d92-97fd-20084159bf4d' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt3' --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  5bb200b1-f122-4d92-97fd-20084159bf4d
	else
	  search --no-floppy --fs-uuid --set=root 5bb200b1-f122-4d92-97fd-20084159bf4d
	fi
	echo	'Loading kernel linux-custom ...'
	linux	/boot/vmlinuz-linux-custom root=UUID=5bb200b1-f122-4d92-97fd-20084159bf4d rw  quiet resume=UUID=5d235b38-cb10-4579-8c50-3d1a91066151 loglevel=3 nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/amd-ucode.img /boot/initramfs-linux-custom.img
}
menuentry 'EndeavourOS, on linux-custom (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-custom-fallback-5bb200b1-f122-4d92-97fd-20084159bf4d' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt3' --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  5bb200b1-f122-4d92-97fd-20084159bf4d
	else
	  search --no-floppy --fs-uuid --set=root 5bb200b1-f122-4d92-97fd-20084159bf4d
	fi
	echo	'Loading kernel linux-custom ...'
	linux	/boot/vmlinuz-linux-custom root=UUID=5bb200b1-f122-4d92-97fd-20084159bf4d rw  quiet resume=UUID=5d235b38-cb10-4579-8c50-3d1a91066151 loglevel=3 nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-linux-custom-fallback.img
}
menuentry 'EndeavourOS, on linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-5bb200b1-f122-4d92-97fd-20084159bf4d' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt3' --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  5bb200b1-f122-4d92-97fd-20084159bf4d
	else
	  search --no-floppy --fs-uuid --set=root 5bb200b1-f122-4d92-97fd-20084159bf4d
	fi
	echo	'Loading kernel linux ...'
	linux	/boot/vmlinuz-linux root=UUID=5bb200b1-f122-4d92-97fd-20084159bf4d rw  quiet resume=UUID=5d235b38-cb10-4579-8c50-3d1a91066151 loglevel=3 nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/amd-ucode.img /boot/initramfs-linux.img
}
menuentry 'EndeavourOS, on linux (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-5bb200b1-f122-4d92-97fd-20084159bf4d' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt3' --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  5bb200b1-f122-4d92-97fd-20084159bf4d
	else
	  search --no-floppy --fs-uuid --set=root 5bb200b1-f122-4d92-97fd-20084159bf4d
	fi
	echo	'Loading kernel linux ...'
	linux	/boot/vmlinuz-linux root=UUID=5bb200b1-f122-4d92-97fd-20084159bf4d rw  quiet resume=UUID=5d235b38-cb10-4579-8c50-3d1a91066151 loglevel=3 nowatchdog
	echo	'Loading initial ramdisk ...'
	initrd	/boot/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 ###

/etc/default/grub:

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=5d235b38-cb10-4579-8c50-3d1a91066151 loglevel=3 nowatchdog"
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=/boot/grub/themes/EndeavourOS/theme.txt

# 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"
GRUB_DISABLE_SUBMENU=y

/etc/mkinitcpio.conf:

#
# SPDX-License-Identifier: GPL-3.0-or-later

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev block autodetect modconf filesystems keyboard fsck"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

Now correct me if I’m wrong but my boot partition is separate, right? So maybe that could be a contributing factor?

Please help. I’ve been trying to solve this for days.

P.S. All of this is on a virtual machine.

I would try to boot changing the kernel cmd line in /etc/default/grub to
GRUB_CMDLINE_LINUX_DEFAULT=“quiet loglevel=3 nowatchdog”
The resume statement is just for suspend mode as I’m aware of.

Boot first in bin/bash, then change the cmd line as per above, and run sudo grub-mkconfig -o /boot/grub/grub.cfg

If that doesn’t work, try disabling swap entirely

Edit: There is a possibility that booting to bin/bash won’t work, in this case you can use the live media instead.

Edit2: If you disable the swap, you can enabled it again later on, and add the resume statement in grub again as well.

Just a pointer: If the other repository kernels work then the issue is not with the existing GRUB configuration or the rest of your system, it’s with your custom kernel.

2 Likes

doe you want to install systemd-boot ? best runs like ef00 , efi file system… but what schould i say :slight_smile:

followed this blog : https://www.addictivetips.com/ubuntu-linux-tips/set-up-systemd-boot-on-arch-linux/

and uses EF00 not Msdata junk :slight_smile:
and yeah should install on /boot , because msdata gives error when you install systemd-boot also you have toprepair to make entries sort of things… makes sure uuid do well :slight_smile:

This is tangential - the issue is getting their custom kernel to work. :wink:

Ah ok its because he mentioned bootctl blabla install… Calamares installs as msdata must be ef00 and on /boot , that the error message because of tjat with bootctl in first place,

Install systemd-boot is in /boot not /boot/efi, but then you beter generate with grub (. ❛ ᴗ ❛.)

1 Like

As I’ve said, I seem to have solved the hibernation problem. I only get this error now: ERROR: device UUID : ...... not found, skipping fsck.

But the guide says I have to reinstall arch…

Unless, of course, if I can run
gdisk /dev/sda
t
1
EF00
`w’
Without damaging anything. Can I do that?

Depend what you want to do, is a guide to install systemd-boot because wanted to use bootctl,but try first the custom kernel on grub… normally it should find it

Edit: does basicly not format te drive but change the code from msdata to EF00 , but grub wil stil be there. But if its installed suc6full you need change boor of efimngr , but is a thing you have toninstznd but normal a kernel set a image in /boot the grub recognize it joe habe to check if the image is there…image as img

So what steps can I take to see what’s wrong? Is there a way I can check the kernel config?

Also I would like to point out that I followed this guide perfectly up until the boot loader configuration. It says " If you have modified pkgbase in order to have your new kernel installed alongside the default kernel you will need to update your bootloader configuration file and add new entries (‘default’ and ‘fallback’) for your custom kernel and the associated initramfs images". I didn’t exactly do this. All I did was run grub-mkconfig -o /boot/grub/grub.cfg. Was there something else I was supposed to do?

I don’t know exactly what you’ve done to create your custom kernel, but I would start by rebuilding the standard kernel with minimal changes (i.e. the name) and see what happens. Then, make incremental changes to that process and so narrow down what is causing the issue.

Taking a systematic approach will be more reliable than making arbitrary and wide-ranging changes for a symptom which only happens with your custom kernel - though this also relies on you not having broken your setup when downgrading systemd, altering GRUB config, etc.

So, you were right. The problem lies within my kernel. I installed linux-zen and linux-zen-headers and that kernel can boot perfectly. (One observation I’ve made is, if I install linux-zen, grub automatically gets configured, but if I install linux-custom then I need to run grub-mkconfig -o /boot/grub/grub.cfg manually).

I don’t know exactly what you’ve done to create your custom kernel, but I would start by rebuilding the standard kernel with minimal changes (i.e. the name) and see what happens.

Ok, I’m going to build a kernel now with absolutely no changes.

1 Like

but dit you like down under?

https://wiki.archlinux.org/index.php/Kernel/Traditional_compilation#Installation

you have to copy something to /boot also ? thats why not in grub also…

?

im not so … but check always out also the namings…

I didn’t follow that, I followed this: https://wiki.archlinux.org/index.php/Kernel/Arch_Build_System#Boot_loader

I actually tried to build a custom kernel using the traditional method, but when I tried to run mkinitcpio -p linux59 I got an error so I gave up on that method and decided to build the kernel using the PKGBUILD.

but there is a vmlinuz to copy over …

image

this is for linux and linux-lts , if yours called linux59 should be vmlinuz-linux59 be there…

i reformatted my bootloader but mean time i had to reinstall linux and linux-lts and amd-ucode etc…otherwise mkinitcpio -P dont work … ?

it should be

sudo mkinitcpio -p linux
sudo mkinitcpio -p linux-lts

For the standard kernels, yes. Not for a custom kernel with a custom profile name, though.

Ok, thanks. I didn’t exactly follow the scientific method to pinpoint the problem but it is solved now.
Conditions when I was getting the error:

  1. System was a virtual one, installed in virtual box.
  2. I disabled a bunch of options. The only ones I remember are: Intel CPU support, Nvidia and intel graphics, Macintosh drivers, miscellaneous file systems.
  3. I didn’t create the docs.

Conditions when I didn’t get the error:

  1. Installed the kernel on my main system.
  2. Only enabled the options needed for running anbox, didn’t change anything else.
  3. Created the docs (I did get a lot of errors though).

Anyway I want to thank all those who tried to help.

2 Likes

This would likely explain the issue - certain options will be needed even though they might not seem like they should (e.g. things with “x86”, “GENERIC”, that sort of thing).

At least you know that the process itself works, and you can continue to explore the “rabbit hole” of kernel customisation!

1 Like