You are not logged in.
Hi everyeone.
I am fairly new to Arch (and Linux in general). I installed arch using the btrfs . Everything worked great. I was using it for some time too. At some point I installed timeshift and made a btrfs backup. It seemed to work (showed up in the list of snapshots). I pressed recover (cause what is the point of having a recovery system, if I do not know that I can use it). It made a second recovery point (Before restoring).
I rebooted.
I says "
[Failed] Failed to mount /home
[Depend] Dependancy failed for Local File Systems.
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" to dfefault mode."
When I try default more, it goes back to here. When I try to use timeshift --restore and select the initial (or any) snapshot, I get the following output
https://i.imgur.com/W9hldk2.jpg
(sorry, could not embed it. It says "Found stale mount for device /dev/nvme0n1p2 at path /run/timeshfit/837/backup. \n Unmounted successfully. \n E: Failed to remove directory. \n Ret=256".
Would really appreciate some help ![]()
Cheers.
EDIT: I tihnk the problem is that /dev/nvme0n1p2 can not be mounted to /home. But I am not sure.
SOLUTION: upon entering the root (just type password in the emergency mode) I edited /etc/fstab. * There I removed the bits where it said "subvolid=xxx$. E.g from
UUID=xxx-yyy-zzz /home btrfs rw,noatime,compress=zstd:3,ssd,space_cache,commit=120,subvolid=257,subvol=/@home 0 0
to
UUID=xxx-yyy-zzz /home btrfs rw,noatime,compress=zstd:3,ssd,space_cache,commit=120,subvol=/@home 0 0
Save and reboot.
Fixed
* Technically, I had typed mount /dev/nvme0n1p2 /home and then I used sudo vim /etc/fsbat. But it should be the same result, unless I am gravely mistaken.
USE ALL AT YOUR OWN RISK
But it worked fro me.
Much thanks to @Albator78 on the Arch subreddit:
https://www.reddit.com/r/archlinux/comm … &context=3
Last edited by Evil_Hamster (2022-07-16 19:58:56)
Offline
After running the command
mount /dev/nvme0n1p2 /home
an then pressing Control+D, I am able to log in with my username. I am also able to access all my files.
However, when I ls /home, it gives me
@ @home timeshift/btrfs
As such, all of my commands etc do not work. Moreover, when I reboot, I am getting the same error. I can mount again etc. but that does not seem like a solution.
I was wondering, if it might have to do with the fstab file. Can someone have a look and tell me if it seems all right?
https://i.stack.imgur.com/ZPTTN.jpg
if the image is too small/blurry, please say.
Offline
hi i dont use timeshift as i just manage my snapshots manually but you should be able to restore your root to a working shapshot manually too. I am not too experienced either but hopefully this will help a bit but just double check everything before typing commands
dont think you're using mount correctly there. i think you've mounted your btrfs top-level subvolume onto /home which is not gonna help. when you used mkfs.btrfs on /dev/nvme0n1p2 during install it creates a top-level subvolume automatically. you can specify -o subvol=/ or -o subvolid=5 (both mean the same) to mount the top-level like this: sudo mount -o subvol=/ /mnt
then if you cd into /mnt you will see the subvolumes using ls. from there you should be able to just use mv command to rename a snapshot (which is just a subvolume) to be ur new root subvol, which you've named @, if its a rw snapshot it should boot. Im not sure if timeshift makes it rw or ro when it creates the snapshot. but anyway, if its ro you can use btrfs command to make a rw copy of it to replace @:
so you first mv the /mnt/@ that you dont want to say /mnt/@.old (you can also deleted it if you wanted or just do that later)
if your snapshot is rw just use mv again to rename it from /var/timeshift/whatever/snapshot to /mnt/@
if your snapshot is ro use 'btrfs subvolume snapshot /var/timeshift/whatever/snapshot /mnt/@'
then you just cd and sudo umount /mnt and then you can reboot
make sure you use the correct path in that example to where timeshift has put your snapshot and check if the snapshot is ro or rw first before mv it to /mnt/@ (which is the name of your root subvol in /etc/fstab). you can also do this from booting into arch iso and mount your device and use arch-chroot too if you cant boot.
Please read this https://btrfs.wiki.kernel.org/index.php/SysadminGuide
I spent hours reading this to learn more about btrfs and the arch wiki page cos it was new to me too and it really helped
Offline