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

# 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

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

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

# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.

# Additional options for the compressor

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

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

cat /etc/default/grub | xclip
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"

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

# Uncomment to disable submenus in boot menu

# 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

# Uncomment to use basic console

# Uncomment to disable graphical terminal

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

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

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

# Uncomment to disable generation of recovery mode menu entries

# Uncomment this option to enable os-prober execution in the grub-mkconfig command

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.

# Uncomment one of them for the gfx desired, a image background or a gfxtheme

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

==> Hook run order:

==> Cleanup hook run order:

==> 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:

==> Hook run order:

==> Cleanup hook run order:

inxi -v 2 | xclip
  Host: manjaro Kernel: 6.0.8-1-MANJARO arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.26.3 Distro: Manjaro Linux
  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
  Info: 6-core Intel Core i7-5820K [MT MCP] speed (MHz): avg: 1210
    min/max: 1200/3600
  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
  Device-1: Intel Ethernet I218-V driver: e1000e
  Device-2: Broadcom BCM4352 802.11ac Wireless Network Adapter driver: wl
  Local Storage: total: 9.24 TiB used: 1.15 TiB (12.4%)
  Processes: 306 Uptime: 1h 39m Memory: 31.26 GiB used: 3.48 GiB (11.1%)
  Shell: Zsh inxi: 3.3.23

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!


This page kind of says the same, so…

1 Like

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:

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.