Strange error at boot

Hi since yesterday i suddenly noticed that before the kernel gets loaded i get this message on the screen:

error: sparse file not allowed.
press any key to continue...

It waits a few seconds and then boots normally though.
(I can’t press any key because the keyboard isn’t activated yet, i know because it’s lights are off)

The only thing i can recall is that i installed another kernel to test, and thus rebuild the initrd etc.

sudo mkinitcpio -P && sudo update-grub
cat /etc/mkinitcpio.conf | xclip
# 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=(
    crc32c-intel
    # https://forum.manjaro.org/t/howto-use-wayland-with-proprietary-nvidia-drivers/36130
    nvidia
    nvidia_modeset
    nvidia_uvm
    nvidia_drm
)

# 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 autodetect modconf block keyboard keymap consolefont resume filesystems bootsplash-manjaro"

# 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="zstd"

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

# MODULES_DECOMPRESS
# Decompress kernel modules during initramfs creation.
# Enable to speedup boot process, disable to save RAM
# during early userspace. Switch (yes/no).
#MODULES_DECOMPRESS="yes"

I tried with the COMPRESSION lines commented out also, but it stays same…

cat /etc/default/grub | xclip
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=hidden
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=d0e8e1cc-12bb-4105-a185-114fe02793e9 udev.log_priority=3 intel_iommu=on nvidia-drm.modeset=1 bootsplash.bootfile=/bootsplash-themes/manjaro/bootsplash"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT="true"

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# 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

# 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 'videoinfo'
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 this option to enable os-prober execution in the grub-mkconfig command
GRUB_DISABLE_OS_PROBER=false

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

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

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

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true
cat /proc/cmdline | xclip
BOOT_IMAGE=/@/boot/vmlinuz-6.0-x86_64 root=UUID=74357a56-4b24-4eaf-94b5-5547de52b278 rw rootflags=subvol=@ resume=UUID=d0e8e1cc-12bb-4105-a185-114fe02793e9 udev.log_priority=3 intel_iommu=on nvidia-drm.modeset=1 bootsplash.bootfile=/bootsplash-themes/manjaro/bootsplash
sudo find /boot -name initramfs-\*-x86_64.img -exec lsinitcpio -a '{}' ';' | xclip
==> Image: /boot/initramfs-5.15-x86_64.img 
==> Created with mkinitcpio 32
==> Kernel: 5.15.78-1-MANJARO
==> Size: 82.81 MiB
==> Compressed with: zstd
  -> Uncompressed size: 133.15 MiB (.621 ratio)
  -> Estimated decompression time: 0.725s

==> Included modules:
  blake2b_generic		  crc-itu-t			  mmc_core			  raid6_pq			  usb-storage
  btrfs				  firewire-core			  nvidia-drm [explicit]		  sha256-ssse3			  virtio_blk
  cdrom				  firewire-sbp2			  nvidia [explicit]		  sr_mod			  xhci-pci
  crc32c_generic		  libcrc32c			  nvidia-modeset [explicit]	  uas				  xor
  crc32c-intel [explicit]	  mmc_block			  nvidia-uvm [explicit]		  usbhid			  xxhash_generic

==> Included binaries:
  blkid			  busybox		  kmod			  mount			  switch_root		  systemd-tmpfiles	  udevadm

==> Early hook run order:
  udev

==> Hook run order:
  udev
  keymap
  resume

==> Cleanup hook run order:
  udev

==> Image: /boot/initramfs-6.0-x86_64.img 
==> Created with mkinitcpio 32
==> Kernel: 6.0.8-1-MANJARO
==> Size: 84.48 MiB
==> Compressed with: zstd
  -> Uncompressed size: 151.26 MiB (.558 ratio)
  -> Estimated decompression time: 0.670s

==> Included modules:
  blake2b_generic		  firewire-core			  nvidia [explicit]		  raid6_pq			  virtio_blk
  btrfs				  firewire-sbp2			  nvidia-modeset [explicit]	  sha256-ssse3			  xhci-pci
  cdrom				  libcrc32c			  nvidia-uvm [explicit]		  sr_mod			  xhci-pci-renesas
  crc32c_generic		  mmc_block			  nvme				  uas				  xor
  crc32c-intel [explicit]	  mmc_core			  nvme-common			  usbhid			  xxhash_generic
  crc-itu-t			  nvidia-drm [explicit]		  nvme-core			  usb-storage

==> Included binaries:
  blkid			  busybox		  kmod			  mount			  switch_root		  systemd-tmpfiles	  udevadm

==> Early hook run order:
  udev

==> Hook run order:
  udev
  keymap
  resume

==> Cleanup hook run order:
  udev

inxi -v 2 | xclip
System:
  Host: manjaro Kernel: 6.0.8-1-MANJARO arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.26.3 Distro: Manjaro Linux
Machine:
  Type: Desktop System: ASUS product: All Series v: N/A
    serial: <superuser required>
  Mobo: ASUSTeK model: X99-PRO/USB 3.1 v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 4101
    date: 07/10/2019
CPU:
  Info: 6-core Intel Core i7-5820K [MT MCP] speed (MHz): avg: 1210
    min/max: 1200/3600
Graphics:
  Device-1: NVIDIA GP102 [GeForce GTX 1080 Ti] driver: nvidia v: 520.56.06
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.5 driver: X:
    loaded: nvidia unloaded: modesetting gpu: nvidia,nvidia-nvswitch
    resolution: 2560x1080~60Hz
  API: OpenGL v: 4.6.0 NVIDIA 520.56.06 renderer: NVIDIA GeForce GTX 1080
    Ti/PCIe/SSE2
Network:
  Device-1: Intel Ethernet I218-V driver: e1000e
  Device-2: Broadcom BCM4352 802.11ac Wireless Network Adapter driver: wl
Drives:
  Local Storage: total: 9.24 TiB used: 1.15 TiB (12.4%)
Info:
  Processes: 306 Uptime: 1h 39m Memory: 31.26 GiB used: 3.48 GiB (11.1%)
  Shell: Zsh inxi: 3.3.23
1 Like

According to this page:

The reason for the message originates in the fact that grub cannot write to grub environment file (/boot/grub/grubenv) - I am not using grub - so I may remember the name incorrect - but grub writes the last used entry to the environment file and because grub cannot write on btrfs you get this grub message.

Only way around it is to have your /boot mounted on a ext filesystem or disable the save function.

Hope this helps!

Edit:

This page kind of says the same, so…

2 Likes

Ohhhhh so the GRUB_SAVEDEFAULT="true" line i enabled is causing this? :thinking:
Going to comment it out again and see :+1:
Will report back after dinner :woman_technologist:

1 Like

Looks that way.

Yup commenting out that line again, made the error message disappear :+1:
:fireworks:

1 Like

Yes, the option does not work when installing the package grub-btrfs, because grub-btrfs does not let this option GRUB_SAVEDEFAULT save any selected snapshot as a default boot entry in GRUB boot menu.

1 Like

It also fails on f2fs file systems

Did you install have grub-btrfs?

The GRUB error message is too generic and doesn’t tell us what exactly the problem is.

Wow I’ve just tried it on f2fs only, no btrfs here, and it works.
Thy must have changed grub to be able to write to f2fs.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.