Computer crashed during `garuda-update`, cannot boot anymore

I was working my whole week without rebooting the computer.

I probably have executed “garuda-update” last week. I believe I haven’t rebooted the computer after updating, but I’m not sure also.

Now, after finishing the job of the whole week, I tried “git push” (I know I should have pushed every day, but now the mistaken has been made), I was receiving a “invalid credentials” message, so probably the PAT has expired.

I thought in executing “garuda-update” before rebooting and creating a new PAT.

I was waiting garuda-update to finish as usual. Suddenly a lot of errors appeared on the terminal and my laptop became unresponsive. I tried everything but no window was opening anymore and I couldn’t open the terminal or any application anymore.

I waited a few minutes and gave up. After rebooting, this is what appears now:

error: file ` /timeshift-btrfs/snapshots/2024-03-19_14-23-39/@/boot/grub/x86_64-efi/normal.mod' not found.
Entering rescue mode...
grub rescue

I have two SSDs: one contains Windows, the other contains Garuda Linux

This is what I see when typing ls

I would really like to try something so that I can at least push the code I worked all these days… I would appreciate any help or guidance because I’ve never seen this grub rescue screen before.

You could try restoring the latest working snapshot, although I see the error is about a missing snapshot, so it could be that you have been working on a snapshot for a while and something went wrong. Just try.
I don’t remember much about timeshift, since we moved to snapper since quite some time now.
If that doesn’t work, you could try booting with a live USB, chroot and see if you can update from there. And maybe reinstall the GRUB as well.

2 Likes

You could try restoring the latest working snapshot

How do I do that from grub rescue? I have never seen this screen before.

(I updated the original post with some emotional context)

Can I trust the step-by-step given by ChatGPT?

(UPDATE) I have used another computer to create a bootable USB and I see I have access to my files. I will backup what’s important before trying anything.

Those instructions are pretty close, although you definitely don’t need to create the bind mounts and manually chroot like that. Here is the recommended way to do this maintenance:

I agree with @filo, after you set up the chroot you should reinstall Grub and bring your system fully up to date with garuda-update, then try booting normally again.

If you run into any issues, log into the forum from the live environment and paste the terminal output into the thread so we can take a look.

3 Likes

I wouldn’t trust ANYTHING from ChatGPT or anyother AI right now.

NOT READY FOR PRIMETIME.

3 Likes

I have a doubt here about the instructions that @BluishHumility has given

I followed these instructions

I don’t know if my system is installed in in Legacy BIOS/MBR or UEFI. Not sure how to obtain this information. Not sure which instruction to follow.

I have two SSDs, one with Windows, another one with Garuda.

I appreciate any guidance at this step!

Check and see if you have a /sys/firmware/efi directory. If you do, it’s a UEFI board.

Fancy one-liner:

[ -d /sys/firmware/efi ] && echo "UEFI" || echo "Legacy BIOS"
1 Like
╰─λ [ -d /sys/firmware/efi ] && echo "UEFI" || echo "Legacy BIOS"
UEFI
╭─garuda@garuda in ~ as 🧙 took 124ms
╰─λ sudo mkdir -p /mnt/broken

╭─garuda@garuda in ~ as 🧙 took 9ms
╰─λ sudo mount /dev/nvme0n1p2 /mnt/broken

╭─garuda@garuda in ~ as 🧙 took 11ms
╰─λ sudo garuda-chroot /mnt/broken/@
sh-5.2# parted -l | grep -iE "^Disk /|esp" | grep -B1 esp
Warning: failed to translate partition name
Disk /dev/sdb: 31.1GB
2      2623MB  2627MB  4194kB  primary               esp
Disk /dev/nvme0n1: 2048GB
1      2097kB  275MB   273MB   fat32              boot, legacy_boot, esp, no_automount
Disk /dev/nvme1n1: 2048GB
2      1612MB  2417MB  805MB   fat32        EFI system partition          boot, esp, no_automount

it means in my case I need to do this?

mount /dev/nvme0n1p2 /boot/efi

I’m confused, I tried this

sh-5.2# mount /dev/nvme0n1p2 /boot/efi
sh-5.2# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=garuda --recheck
Installing for x86_64-efi platform.
grub-install: error: /boot/efi doesn't look like an EFI partition.

So you can proceed with the UEFI command.
Consider also the tip in the tutorial.

Select the proper $esp partition (you may check your /etc/fstab if you are not sure) and mount it inside chroot

Please do not use pictures for terminal text in the posts.

4 Likes

This is your esp, not

2 Likes

Ok how do I unmount what I mounted before?

I got this from /mnt/broken/@/boot/efi/@/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=94CE-1A69                            /boot/efi      vfat    umask=0077 0 2
UUID=1841fbdb-0a5a-497a-86d3-67c2ef2f6c76 / btrfs subvol=/@,defaults,noatime,space_cache,noautodefrag,compress=zstd 0 0 #Modified_by_garuda-hotfixes(1)
UUID=1841fbdb-0a5a-497a-86d3-67c2ef2f6c76 /home btrfs subvol=/@home,defaults,noatime,space_cache,noautodefrag,compress=zstd 0 0 #Modified_by_garuda-hotfixes(1)
UUID=1841fbdb-0a5a-497a-86d3-67c2ef2f6c76 /root btrfs subvol=/@root,defaults,noatime,space_cache,noautodefrag,compress=zstd 0 0 #Modified_by_garuda-hotfixes(1)
UUID=1841fbdb-0a5a-497a-86d3-67c2ef2f6c76 /srv btrfs subvol=/@srv,defaults,noatime,space_cache,noautodefrag,compress=zstd 0 0 #Modified_by_garuda-hotfixes(1)
UUID=1841fbdb-0a5a-497a-86d3-67c2ef2f6c76 /var/cache btrfs subvol=/@cache,defaults,noatime,space_cache,noautodefrag,compress=zstd 0 0 #Modified_by_garuda-hotfixes(1)
UUID=1841fbdb-0a5a-497a-86d3-67c2ef2f6c76 /var/log btrfs subvol=/@log,defaults,noatime,space_cache,noautodefrag,compress=zstd 0 0 #Modified_by_garuda-hotfixes(1)
UUID=1841fbdb-0a5a-497a-86d3-67c2ef2f6c76 /var/tmp btrfs subvol=/@tmp,defaults,noatime,space_cache,noautodefrag,compress=zstd 0 0 #Modified_by_garuda-hotfixes(1)
# Binderfs Anbox
none /dev/binderfs binder nofail 0 0

To check this, see here:

1 Like
umount /boot/efi

If this is what you wanted to do.
But I don’t think you mounted it, considering the error above.

2 Likes
sh-5.2# [ -d /sys/firmware/efi ] && echo "UEFI" || echo "Legacy BIOS"
UEFI
sh-5.2# mount /dev/nvme0n1p2 /boot/efi
sh-5.2# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=garuda --recheck
Installing for x86_64-efi platform.
grub-install: error: /boot/efi doesn't look like an EFI partition.
sh-5.2# unmount /dev/nvme0n1p2 /boot/efi
sh: unmount: command not found
sh-5.2# mount /dev/nvme0n1 /boot/efi
mount: /boot/efi: /dev/nvme0n1 already mounted or mount point busy.
dmesg(1) may have more information after failed mount system call.
sh-5.2# fstab
sh: fstab: command not found
sh-5.2# umount /boot/efi
umount: /boot/efi: target is busy.

what’s this target is busy?

I corrected a typo above:

mount /dev/nvme0n1p1 /boot/efi

Maybe it could be cleaner and easier to do everything from scratch, shutdown, reboot live ISO, chroot and mount the hopefully correct ESP.

3 Likes
sh-5.2# mount /dev/nvme0n1p1 /boot/efi

sh-5.2# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=garuda --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.

sh-5.2# update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/garuda-dr460nized/theme.txt
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
No snapshots found.
If you think an error has occurred, please file a bug report at "https://github.com/Antynea/grub-btrfs"
Unmount /tmp/grub-btrfs.cNXikSb5zc .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

I’m gonna try garuda-update now. Did I mess up anything?

The GRUB installation seems okay now. Don’t worry about the warnings on sdb.
Maybe you could also give a

garuda-update 

Inside the chroot.
Then

exit

And try rebooting.
The check of the ESP 94CE-1A69 with blkid was done?
You have an esp also on the other disk.

2 Likes

No, I did not check.
What’s the command to execute? I was confused

blkid /dev/nvme0n1p1
1 Like