Error: you need to load the kernel first (timeshift file is missing)

Good day,

I managed to screw up my Manjaro isntallation that it doesn’t load anymore. I tried updating Discord through snap packagem but it failed and after that manjaro can’t boot anymore.

Here is an error I see:

error: file `/timeshift-btrfs/snapshots/2024-11-19_18-50-54/@/boot/vmlinuz-6.10-x86_64/` not found
error: you need to load kernel first

I have found my Manjaro USB and logged in into a Manjaro Live in hopes to fix my grub.

sudo su -
manjaro-chroot -a

But I’m seeing this result:

grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> ERROR: No Linux partitions detected!

I have a btrfs filesystem located in /dev/nvme0n1p2, but somehow it doesn’t find that and linux on it. I can access it through filemanager.

I tried installing kernel with following commands:

pacman -Syu
... (A lot of output)
[manjaro-gnome ~]# mhwd-kernel -li
Currently running: 6.9.12-3-MANJARO (linux69)
The following kernels are installed in your system:
   * linux610

[manjaro-gnome ~]# sudo mhwd-kernel -i linux612
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
error: no targets specified (use -h for help)

sudo mhwd-kernel -i linux610
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
error: no targets specified (use -h for help)

I’m a bit lost at this point – don’t know how to recover my system. Any tips please?

Here is inxi -G output

inxi -G
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Phoenix1 driver: amdgpu v: kernel
  Device-2: IMC Networks Integrated Camera driver: uvcvideo type: USB
  Display: unspecified server: X.org v: 1.21.1.14 with: Xwayland v: 24.1.4
    driver: gpu: amdgpu tty: 80x24 resolution: 2944x1840
  API: EGL v: 1.5 drivers: radeonsi,swrast platforms: gbm,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: mesa v: 24.2.4-arch1.0.1
    note: console (EGL sourced) renderer: AMD Radeon 780M (radeonsi gfx1103_r1
    LLVM 18.1.8 DRM 3.57 6.9.12-3-MANJARO), llvmpipe (LLVM 18.1.8 256 bits)

I also tried mounting partition

sudo mount /dev/nvme0n1p2 /mnt

But that didn’t help either.

You may have a failure with your hard drive.

lsblk will list available hard drives on your system.

Doesn’t seem to be the case. My hard drive is listed.

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0 153.7M  1 loop /run/miso/sfs/livefs
loop1         7:1    0     1G  1 loop /run/miso/sfs/mhwdfs
loop2         7:2    0   1.6G  1 loop /run/miso/sfs/desktopfs
loop3         7:3    0 824.8M  1 loop /run/miso/sfs/rootfs
sda           8:0    1  14.6G  0 disk /run/miso/bootmnt
├─sda1        8:1    1   3.7G  0 part 
└─sda2        8:2    1     4M  0 part 
nvme0n1     259:0    0 953.9G  0 disk 
├─nvme0n1p1 259:1    0   300M  0 part 
├─nvme0n1p2 259:2    0 923.7G  0 part /run/media/manjaro/683a8752-1b08-4f6c-9169-2a64c4a6c097
└─nvme0n1p3 259:3    0  29.9G  0 part 

But I’m not sure why my mount point is the way it is.

hard to believe this happened from just updating discord…
and isnt kernel 6.10 end of life?
manjaro-chroot -a doesnt work with btrfs… you have to chroot manually…
but btrfs uses snapshots, can you just roll back? im not using btrfs, and dont know much about it, so look it up yourself …
for chrooting into btrfs:

sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt
sudo mount /dev/nvme0n1p1 /mnt/efi
sudo manjaro-chroot /mnt

check:
ldconfig
if should return nothing… if it does, rerun update:
pacman-mirrors --fasttrack 5 && pacman -Syyu
if no errors, install a kernel, the 6.1 or the 6.6

1 Like

I had a new machine, so decided to try btrfs. Not that experienced with it myself.

Come to think of it, a couple of weeks ago I have messed up my system and had to use timeshift to rollback my system. It might be that I didn’t do that correctly.

Thank you for the steps.

All went great, I was only unable to install any kernel.

sh-5.2# mhwd-kernel -i linux66 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
error: no targets specified (use -h for help)

I did the update and everything works! Thanks @brahma

Someone mentioned that Timeshift is known to be unreliable for BTRFS.

I personally use Snapper with Limine bootloader, and they work reliably for me.

1 Like

It works fine with btrfs. You just can’t currently boot into a snapshot using grub-btrfs, then use Timeshift restore. It makes a mess of your volumes. (And appears to work.)

To make sure you didn’t do this @skatkov. On a regular boot what is the output of:

findmnt /

And:

sudo btrfs sub list /

Here is the output:

>  findmnt /                                                                                                                                                                                    
TARGET SOURCE             FSTYPE OPTIONS
/      /dev/nvme0n1p2[/@] btrfs  rw,relatime,ssd,discard=async,space_cache=v2,subvolid=292,subvol=/@
> sudo btrfs sub list /                                                                                                                                                                        
ID 256 gen 47703 top level 5 path timeshift-btrfs/snapshots/2024-11-23_22-32-50/@
ID 257 gen 48247 top level 5 path @home
ID 258 gen 48146 top level 5 path @cache
ID 259 gen 48247 top level 5 path @log
ID 261 gen 47702 top level 5 path timeshift-btrfs/snapshots/2024-08-27_20-00-49/@
ID 290 gen 47702 top level 5 path timeshift-btrfs/snapshots/2024-11-22_22-04-28/@
ID 291 gen 47702 top level 5 path timeshift-btrfs/snapshots/2024-11-23_22-35-56/@
ID 292 gen 48247 top level 5 path @
ID 293 gen 47702 top level 5 path timeshift-btrfs/snapshots/2024-11-26_00-09-45/@
ID 294 gen 47962 top level 5 path timeshift-btrfs/snapshots/2024-11-26_14-14-52/@

I think this is precisely what I did :slight_smile:

They may of fixed it then. (It wasn’t working inside a booted snapshot just months ago.)

But that’s what it should look like after a normal btrfs restore.

You find good Information about Btrfs in the wiki

and in

This weekend, I’ll probably verify Timeshift actually has fixed their restore to work booting from a RW snapshot. It was a very much needed fix, as grub-btrfs and Timeshift is installed by default in Manajro. (Among others.)

This is up to you, but personally I would also include @home in your snapshots. (It’s just a simple checkbox in the Timeshift GUI settings.)

There are many advantages to having them included. From the GUI stand point, everything works like before (press snapshot/restore once for both volumes). The main disadvantage is the extra space it takes up, which is often minimal compared to @ / root, depending on what you do in your home(s).

1 Like

Most of the files in @home that I really need are already backed up.

Photos are in a photo storage. Code in github and backup git instance. And music/video on a family NAS. Documents in Obsidian Sync.

But thanks for a tip!

I am talking about more than just backup. These are rollback points (which in turn can then be backed up). Directories like: ~/.config, ~/.local, etc. have many user specific application settings and even desktop environment settings.

It lets you have the option to restore/rollback these together or separately. (Or even a subset of each.) As root and home do drastically different things, It is very handy to have them on different volumes in btrfs. Both are often needed to make your stuff work, and sometimes your settings in home need to match the root volume in certain cases, for everything to work perfectly. (So Timeshift allows us to snapshot them both simultaneously.)

If you wanted to backup those specific folders yourself, you can also use the no-CoW/snapshot features inside your home, and exclude those folders.

It sounds advanced, but it is simply just adding the NoCoW attribute to the folder(s) you do not want included…

cd ~
sudo chattr +C Pictures Documents etc
lsaatr -l

You can add to folders the NoCoW (+C) attribute. And files and folders just exist there like an ext4 filesystem would store them, but still part of your main btrfs filesystem. (Not included in snapshots, or checksums calculated.)

The only caveat to this, is that existing files in those folders, will not have NoCoW on them. Only new files. But you can recursively add them by commands like: find ~/Documents -exec chattr +C {} \;

1 Like