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.

  • cannot@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    How did you mess it up? What actions lead to the problem and what are the symptoms? When you mount the disk from live USB, what happens? Do you see any errors in dmesg after doing that?

    • CauêOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      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.

      • cannot@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        1 year ago

        I’m not sure if this is the problem, but it might be that cp -r creates the new files according to the current user’s umask and uid/gid. Which, if done from a live CD, would be a user that does not exist on the system when you try to boot it. What you want is cp -a.

        https://unix.stackexchange.com/questions/44967/difference-between-cp-r-and-cp-a

        You might be able to correct this without re-copying everything by using rsync. I don’t recall the incantation off-hand (you’ll want to google it) but I think you want rsync --partial --archive.

        https://serverfault.com/questions/141773/what-is-archive-mode-in-rsync

        Edit: Would also help to know if you are getting any error messages at boot time.

        • CauêOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Would also help to know if you are getting any error messages at boot time.

          The UEFI partition no longer gets listed, I am not able to even try to boot :(

          You might be able to correct this without re-copying everything by using rsync.

          I would rsync targeting the files I have copied without trying to move them, right? (sorry if my question is too stupid)

          • cannot@lemmy.ml
            link
            fedilink
            arrow-up
            3
            ·
            1 year ago

            Yes to rsync. It will update the destination files in place without deleting the source files (unless you provide that flag – don’t.)

            You might actually be screwed if you ended up overwriting the EFI variables in /sys/firmware/efi/efivars. See https://unix.stackexchange.com/questions/414799/efi-variable-entries-in-sys-firmware-efi-efivars.

            If you still have all your files backed up, it might be easiest to reinstall the base system and then selectively copy back over the directories you want with cp -a. Sorry to be the bearer of bad news, but if you can’t even attempt to boot, that’s not good.

            • CauêOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              Yeah, I messed up pretty bad. Lesson learned, I hope. LOL.

              f you still have all your files backed up, it might be easiest to reinstall the base system and then selectively copy back over the directories you want with cp -a. Sorry to be the bearer of bad news, but if you can’t even attempt to boot, that’s not good.

              Yes, I have my home, but I will remake the backup properly now. Thank you very much!