Grub issue

Hi everyone,
I have an issue with grub that I am not able to fix. I have tried reinstalling grub and still nothing. It started when I updated the system and the update hung on a timeshift snapshot running through rsync even though I have btrfs, so I thought it was weird. It took a very long time and didn’t finish, so I stopped the update. Now, when I reboot, it complains about /@/boot/vmlinuz-linux not found on both regular and LTS kernels. I have snapshots set up on grub, so I’m back in the system, but running grub-mkconfig -o /boot/grub/grub.cfg gives me an error after sifting through finding snapshots. The last part of the error is this:

Found 13 snapshot(s)
Unmount /tmp/grub-btrfs.DVui3CR9vZ .. Success
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 174
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.

Every time I reboot the system, I’d have to select a certain kernel to be able to boot. If I select another, it complains about the same vmlinuz-linux not found. Tried grub customizer to put the working kernel on the top, but it, too, throws the same above error. I am honestly out of ideas. I have tried so many things, including reinstalling grub successfully, and nothing worked. The system works, but every time I reboot I have to choose that one kernel that I can’t even put as option number one. I have even removed the LTS kernel and nothing worked so far.
Here is my efibootmgr -v

BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0008,0009
Boot0000* endeavouros   HD(2,GPT,ac13dfce-43cb-9841-b598-463c8e3bb101,0x4800,0x200000)/File(\EFI\endeavouros\grubx64.efi)
      dp: 04 01 2a 00 02 00 00 00 00 48 00 00 00 00 00 00 00 00 20 00 00 00 00 00 ce df 13 ac cb 43 41 98 b5 98 46 3c 8e 3b b1 01 02 02 / 04 04 3e 00 5c 00 45 00 46 00 49 00 5c 00 65 00 6e 00 64 00 65 00 61 00 76 00 6f 00 75 00 72 00 6f 00 73 00 5c 00 67 00 72 00 75 00 62 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
Boot0008* Onboard NIC(IPV4)     PciRoot(0x0)/Pci(0x1f,0x6)/MAC(14b31f267931,0)/IPv4(0.0.0.00.0.0.0,0,0)0000424f
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 06 1f / 03 0b 25 00 14 b3 1f 26 79 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0c 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f
Boot0009* Onboard NIC(IPV6)     PciRoot(0x0)/Pci(0x1f,0x6)/MAC(14b31f267931,0)/IPv6([::]:<->[::]:,0,0)0000424f
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 06 1f / 03 0b 25 00 14 b3 1f 26 79 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0d 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f

Here is my lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
└─sda1        8:1    0 931.5G  0 part /home
nvme0n1     259:0    0 465.8G  0 disk 
├─nvme0n1p1 259:1    0     8M  0 part 
├─nvme0n1p2 259:2    0     1G  0 part /boot/efi
├─nvme0n1p3 259:3    0    16G  0 part [SWAP]
└─nvme0n1p4 259:4    0 448.8G  0 part /var/cache
                                      /var/log
                                      /

Please let me know if you need any more info. It is a Dell mini OptiPlex running all intel. No NVIDIA or a dGPU. Any help is greatly appreciated
Thanks

If you are using btrfs how did you attempt to reinstall grub. I myself have used arch-chroot process by booting on the live ISO and mounting the appropriate subvolumes first. Then after arch-chroot i can reinstall grub.

Edit: From reading the output seems like you have some syntax errors. Maybe post the default grub file:

Post the url.

cat /etc/default/grub | eos-sendlog

Edit: I’m not the btrfs expert but the info might be helpful.

1 Like

Not sure why you have this?

Personally, If I were facing this issue, I would, for the moment, disable both grub-btrfs and timeshift, update my system, replace grub-btrfs (for now) with the regular Grub and see if I could get back functioning Grub boot menu entries.

1 Like

If it is UEFI why this?

Edit: This looks like an 8m unformatted partition you would use for setting up GPT with Bios? :thinking: If it’s UEFI It’s not required. Maybe a mistake?

I don’t know. Perhaps @kalzEOS could give some explanation.

Here is the output of that command

http://ix.io/4D0X

What is the proper way to disable timeshift and grub-btrfs? I don’t want to mess things up

So, here is my set up. I have a 512 GB black WD SN770 nvme and a normal 1TB Sata SSD. I have the nvme set as the root partition and the sata as the /home partition. The root is set to btrfs and the home is set to ext4. It has been working for over 6 months just fine. Is it possible that I set up the whole thing the wrong way?

lsblk                                                                                                                                               INT ✘ 
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
└─sda1        8:1    0 931.5G  0 part /home
nvme0n1     259:0    0 465.8G  0 disk 
├─nvme0n1p1 259:1    0     8M  0 part 
├─nvme0n1p2 259:2    0     1G  0 part /boot/efi
├─nvme0n1p3 259:3    0    16G  0 part [SWAP]
└─nvme0n1p4 259:4    0 448.8G  0 part /var/cache
                                      /var/log
                                      /

Does EOS require creating two boot partitions, one efi and another regular?

I’m not saying it’s wrong. It looks like you may have done manual partitioning when you installed it. in order to create the separate /home partition. You may have created the 8m partition but it isn’t necessary for UEFI. You only need the efi partition. If you are installing on a system that is Bios and not UEFI and you use a GPT partition instead of MBR (dos) then you need the 8m unformatted partition and you flag it bios-grub.

Edit: I don’t use timeshift. I am using btrfs with btrfs-assistant and snapper support plus btrfsmaintenance. I also don’t the have the separate /home and if i did I probably would still keep it btrfs.

Usually if i had to reinstall grub i would boot on the live ISO and mount the subvolumes and arch-chroot and then reinstall grub and update grub. Probably your issue was caused by this.

I’m not sure how you went about re-installing grub?

I’ll let @petsam help you work through this. :wink:

I just nuked the whole thing. I got really really tired of it. I’ve been messing with it for a very long while now. I have removed btrfs-grub, timeshift and autosnapping. Also deleted all of the snapshots which somehow deleted literally every single app I have. Lol. System just got borked big time.
Reinstalling. I’ve created a new partition table on the nvme and made sure it’s GPT, not MBR. Then divided into /boot, /boot/efi, swap and root. Then went on the top of gparted and switched to the sata and made it the /home partition. It’s now installing.

No.

AFAIK Timeshift has GUI configuration. Only the user can modify configuration. Check how it is configured.
I suppose that rsync is used because of /home is on ext4.

:no_mouth: :man_shrugging:

/boot is not required, unless you use some encryption scenario.

Grub customizer may create more problems than those that can fix.

1 Like

Yeah, I’m thinking it was a combination of grub customizer and btrfs/timeshift. It was very messy. Good thing I have a separate home partition and only lost apps. Everything else is intact on the home partition.

Yes … i didn’t realize you had grub customizer. I would definitely stay away from it.

3 Likes

Did you also install timeshift-autosnap to make automatic Timeshift snapshots before updates?

If you did, you could remove that: sudo pacman -R timeshift-autosnap

Or if you have made your own pacman hook for the purpose of making automatic snapshots, remove it.

Next you can start restoring your Grub:

sudo mv /etc/grub.d /etc/grub.d.old

sudo mv /etc/default/grub-btrfs /etc/default/grub-btrfs.old

Now update your system and install Grub

sudo pacman -Syu grub

Reinstall bootloader:

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=endeavouros

Then regenerate grub.cfg:

sudo grub-mkconfig -o /boot/grub/grub.cfg

If you get any errors at any steps, please post them here before proceeding further.

If everything has been ok, cross your fingers and reboot.

EDIT:

Looks like I missed the nuking part
:sweat_smile:

2 Likes

Lesson learned I guess. Very hard lesson. I’m now scared to install timeshift, autosnap and btrfs-grub :confused:
Am I safe to do so?

Very much appreciated. A bit too late. I have very little patience for this. So jusd obliterated the whole thing. That’s the main reason why I always separate home from root partitions. I have no patience. Do you think timeshit and btrfs-grub are ok? I still want to have snapshots in grub if they don’t mess things up

I should think so. There are quite some users on the forum who use this kind of setup.

I think the may be best suited to advice you how to go about this.

Maybe you could make a new thread with a descriptive title to draw their attention.