[GRUB][btrfs] error: sparse file not allowed

I have no idea why this is happening. Firstly when i start the pc everything goes fine and all. Grub loads up also all fine. Then when i select my manjaro install it sends me this error:

error: sparse file not allowed.

And under that it says to hit a button to continue. I do and the computer boots up fine and everything looks to be stable and normal.
Even wierder is that i get the same error when i load my windows 10 install. Keep in mind i just reinstalled so its nothing about that.

My install is on UEFI.

Heres a video : https://www.youtube.com/watch?v=JoDSfJdXN4Q

Solved
https://bbs.archlinux.org/viewtopic.php?id=166131

just use this command

sudo grub-editenv create

2 Likes

This error message happens on btrfs installs.
Simple answer: nothing to worry about it.
It is not a real error.

How to remove it? : There have been reports that this can be done.
i don’t think so. But I am not really sure.
If others have removed this error message, it will be nice, but try not to just link somewhere where this is reported.
Please make sure it works for you first before reporting the links.

Why this error message? Something to do with the way btrfs works (snapshots, stuff like that) and how grub cannot get through this maze. Sorry cannot be clear but thought just give you a quick reply.

Oh, just press ‘enter’ or any button at the error message so you don’t need to wait a couple of seconds.

Look here:
https://bbs.archlinux.org/viewtopic.php?id=166131 .

4 Likes

The solution worked for me, but I needed to edit /etc/default/grub -> GRUB_SAVEDEFAULT=false and then run sudo update-grub. This is needed for me on a 64bit system. On a 32bit system I only need to edit /etc/default/grub as above and don’t need to run sudo grub-editenv create.

9 Likes

OK!!! :+1:

Tks

1 Like

its work ! Thanks you

Thanks for sharing the link, It was most useful!

Work fine,thank you!

Thank you so much. This is exactely what I needed today to circumvent the bug.
I wonder why it isn’t fixed already, however…
It’s been known since at least 2014 (I did a quick google search.)

Ther is no GRUB_SAVEDEFAULT anymore.
I have these five entrys in my grub file:

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=‘Manjaro’
GRUB_CMDLINE_LINUX_DEFAULT=“quiet”
GRUB_CMDLINE_LINUX=""

What should I change?

Update Grub after changes.

@damian101
Let us know if you have resolved the issue.
Or that the ‘irritating’ error message (sparse file) remains but still boots up.

I don’t have btrfs OS (anymore) so I cannot test it out.
Need your feedback.

The usual way to fix it is to remove entries in grubenv and then to uncomment
#GRUB_SAVEDEFAULT=true and set GRUB_DEFAULT=0 or just uncomment it as well.

Reason: save default uses grubenv to work; and from the btrfs wiki,

grubenv write support (used to track failed boot entries) is lacking, grub needs btrfs to support a reserved area.

So the usual method is just to clear grubenv and unset savedefault.

However the new grub that manjaro now use makes much more use of grubenv (boot_success, boot_indeterminate) and I am unsure if this may have been the problem you now face.

Your feedback will help us understand that.
ps: Another (old) way to resolve it is to have a separate /boot partition not in btrfs.

@Chrysostomus
Is your /boot in /root and it is in btrfs and you are not facing any error with the new grub?
Tried ‘grub-install’ and ‘update-grub’?

Haven’t tried after the new Grub, still waiting for the new laptop.

Okay. Thanks for the reply.
Have fun with the new ,aptop when it comes.
Cheers.

1 Like

i also got this error

Set GRUB_DEFAULT to something other than saved and comment the line GRUB_SAVEDEFAULT=true.

1 Like

thanks it worked

GRUB_DEFAULT=unsaved
#GRUB_SAVEDEFAULT=true

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

Forum kindly sponsored by