I messed up with the / diretory

I am sorry but I am posting from another machine since I cannot boot my garuda anymore. I cant post my inxi.

So I have messed with the / by accident but I can see my home (it shows with an @before so @home) is intact. Also I can see at least the last 7 snapshots, So I guess it is possible to fix it.

I have checked the wiki for using the snapper tool but still I can't get it to fix my boot for my case.

The wiki assumes you can still boot the disk. All I can do is mount that disk using the live flash usb.

Please would someone help me to fix it.

Thank you so much.


Edit: This is what I have done

Well, I am embarassed... so I was going to move files from the current directory in a another drive, and did mv /* /run/media/another/direcotry/

Then I tried to move everything back but it wouldn't allow me because my user no longer existed.

Then I booted from live usb, no errors when I mount the btfrs volume, I used the root user to move everything back but it was throwing an error because there were sub-directories. Then I did cp -r to copy everything back and deleted everything, keeping only the recent copies to their rightful location. Still I cannot boot though.

In this case you can either try chroot or if that doesn't works then the only option left is you can backup your /home and then reinstall garuda on that partition in which it was previously installed.

You should atlest tell us how you messed up the / if you want some better help , we can't provide you with much help without your complete explanation.

5 Likes

Mount any part of the Btrfs filesystem from the live environment, then roll the @ subvolume back to a working snapshot with Btrfs Assistant.

7 Likes

Well, I am embarrassed... so I was going to move files from the current directory in a another drive, and did mv /* /run/media/another/direcotry/

Then I tried to move everything back but it wouldn't allow me because my user no longer existed.

Then I booted from live usb, no errors when I mount the btfrs volume, I used the root user to move everything back but it was throwing an error because there were sub-directories. Then I did cp -r to copy everything back and deleted everything, keeping only the recent copies to their rightful location. Still I cannot boot though.

I have done it twice now and still my disk doesn't get listed in the UEFI boot selection.

(what I do is select the snapshot with snapper or with btrfs assistant and hit restore.)

In that case, you may have wiped your EFI partition. The EFI partition does not roll back with Btrfs snapshots, because it is on a different filesystem.

You will need to chroot into the system from the live media, mount the EFI partition, reinstall the bootloader, and regenerate the Grub configuration file. This topic explains how to do it:

3 Likes

Thank you very much. Tonight I will be back home and will try it. Thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.