You are not logged in.

#1 2024-11-28 04:59:03

dcaspar
Member
Registered: 2020-08-12
Posts: 50

Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

The other day I accidentally restored a timeshift backup that was much older than I anticipated (note to self, don't use timeshift while on a phone call at the same time).

This required me to fix the bootloader when all was done. After booting back into the system I then decided I should try revert to one of the more recent timeshift snapshots on the system.
Stupidly I chose not to rebuild GRUB with this (thinking, well I've just done that).

This has now created the situation where the system hangs after grub with the message "failed to mount /efi - dependency failed for local filesystem" (same for remote filesystems that are in my fstab).

I tried to put in the arch live USB again to repair GRUB again, but when trying to mount my root partition at /mnt it fails with the error "can't look up blockdev".

Since I am able to boot into "emergency mode" can I repair GRUB from there? Am I barking up the wrong tree with the grub repair since this seems to be a filesystem mounting error and it shows up after GRUB.

I figured best to ask here before I make things more messy for myself.

Last edited by dcaspar (Yesterday 17:20:50)

Offline

#2 2024-11-28 05:52:57

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,345
Website

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

dcaspar wrote:

This has now created the situation where the system hangs after grub with the message "failed to mount /efi - dependency failed for local filesystem" (same for remote filesystems that are in my fstab).

Does the booted kernel image match the content of /usr/lib/modules/? Use the `file` command on the kernel image to find the version, if they do not match the kernel can't load the filesystem drivers it needs to read the partitions.


Para todos todo, para nosotros nada

Offline

#3 2024-11-28 06:56:19

dcaspar
Member
Registered: 2020-08-12
Posts: 50

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

Seems like they match.
/usr/lib/modules and /boot/vmlinuz-linux both report 6.11.6-arch1-1

Offline

#4 2024-11-29 21:51:56

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,345
Website

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

dcaspar wrote:

I tried to put in the arch live USB again to repair GRUB again, but when trying to mount my root partition at /mnt it fails with the error "can't look up blockdev"

Your vague description is confusing for me. Please post the exact, full commands used along with the verbatim output. Thanks.


Para todos todo, para nosotros nada

Offline

#5 2024-11-30 06:57:44

dcaspar
Member
Registered: 2020-08-12
Posts: 50

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

Sorry about that.

From the Arch live USB:

mount /dev/nvme0n1p3 /mnt
mount: /mnt: fsconfig system call failed: /dev/nvme0n1p3: Can't lookup blockdev.
dmesg(1) may have more information after failed mount system call.

Here is the output of dmesg:
https://0x0.st/XRES.txt

Booting without the live usb I can enter "emergency mode". From there lsblk shows that nvme0n1p3 is mounted at / and i can access all files. but it seems the boot partition (nvme0n1p1)  is not mounted. Checking jounalctl -xb it says "systemd[1]: efi.mount: Mount process exided, code=exited, status=32/n/a"
I am unable to upload the full journalctl to 0x0.st as it reterns "curl: (6) Could not resolve host: 0x0.st"

Offline

#6 2024-11-30 11:31:53

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,345
Website

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

dcaspar wrote:
mount /dev/nvme0n1p3 /mnt
mount: /mnt: fsconfig system call failed: /dev/nvme0n1p3: Can't lookup blockdev.
dmesg(1) may have more information after failed mount system call.

Which filesystem is on that partition? Use `lsblk -f` to check. Perhaps try fsck(8) as well.

dcaspar wrote:

I am unable to upload the full journalctl to 0x0.st as it reterns "curl: (6) Could not resolve host: 0x0.st"

View from the live ISO and use the connection there: https://wiki.archlinux.org/title/System … al_to_view


Para todos todo, para nosotros nada

Offline

#7 2024-11-30 11:48:24

dcaspar
Member
Registered: 2020-08-12
Posts: 50

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

The filesystem is ext4.
Running fsck seemed to work and I'm now able to mount that partition from the live USB.

Here's the output of journalctl:
https://0x0.st/XRIj.txt

Since I am now able to mount the drive and arch-chroot into it should I go ahead and try re-installing grub?

Offline

#8 2024-11-30 13:22:09

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,345
Website

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

Yes.


Para todos todo, para nosotros nada

Offline

#9 2024-12-01 05:31:04

dcaspar
Member
Registered: 2020-08-12
Posts: 50

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

Unfortunately it didn't work. I am still getting the error: failed to mount /efi - dependency failed for local filesystem.

I followed the GRUB installation instructions here: https://wiki.archlinux.org/title/GRUB#Installation and then rebuilt the config with grub-mkconfig.

EDIT:
I noticed I had an entry at /boot/EFI/EFI, so I deleted this and tried to re-install grub to --efi-directory=/boot, however I'm now getting the error "FAT-fs (nvme0n1p1): error, corrupted directory (invalid entries), grub-install error: failed to make directory '/boot/EFI/GRUB'.

Last edited by dcaspar (2024-12-01 05:44:09)

Offline

#10 2024-12-01 08:28:45

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,345
Website

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

So did you originally have the ESP mounted under /efi/ or /boot/?

I'm not sure how much help I will be here, I've used btrfs snapshots for restoration but I used my own scripts rather than Timeshift.


Para todos todo, para nosotros nada

Offline

#11 2024-12-03 17:14:53

dcaspar
Member
Registered: 2020-08-12
Posts: 50

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

Ah, I must have put it at /efi originally as that was where my fstab was trying to mount it.

Anyway, I ran dosfsck on the boot partition which fixed the grub-install errors and changed the fstab to mount the partition to /boot and re-installed grub.

Now I'm back to the original problem, but "failed to mount /boot - dependency failed for local filesystem".

At this point I'm thinking of totally wiping this partition and reinstalling the bootloader from scratch. Is this a sound approach?

Offline

#12 Yesterday 06:54:15

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,345
Website

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

If you share /boot/grub/grub.cfg & /etc/fstab I will have a better idea of how to help.

Also post the output of

btrfs subvolume list /

Thanks!


Para todos todo, para nosotros nada

Offline

#13 Yesterday 11:52:48

dcaspar
Member
Registered: 2020-08-12
Posts: 50

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

Ah I should have mentioned. I am not using BTRFS, the root partition is ext4. This is timeshift with Rsync & hardlinks.

Here's the grub.cfg:
https://0x0.st/X72z.txt

and fstab:
https://0x0.st/X72-.txt

Offline

#14 Yesterday 16:03:44

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,345
Website

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

dcaspar wrote:

This is timeshift with Rsync & hardlinks

Apologies but I will have to bow out, I have no idea how that works. Hopefully somebody else will. Perhaps add "ext4" to the title to attract the attention of those in the know.


Para todos todo, para nosotros nada

Offline

#15 Yesterday 17:35:00

dcaspar
Member
Registered: 2020-08-12
Posts: 50

Re: Timeshift (ext4) restore without GRUB rebuild, can't mount /efi.

No problem. Thanks for the help so far.

Offline

Board footer

Powered by FluxBB