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?
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
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)
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 /
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/@
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).
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 {} \;