1

I have an arch linux with ext4 partition

I had a working system and decided to make some backups

Here's what I've did:

  1. Installed timeshift
  2. After opening it I've decided to install btrfs-progs (I was thinking it's some kind of a utility, not a filesystem), but did nothing with btrfs after that
  3. I've started backing up my system, but noticed it was backing up some of unnecessary files, so I've stop backing up
  4. I've edited the ignore list, and also noticed although I've stopped backup very early, 15GB of free space was gone
  5. Because there was nothing in the gui, I've decided to run ncdu and find the backup
  6. I've found something like /timeshift/somelettersandnumbers/backup and decided to delete it from ncdu
  7. After that my laptop decided to turn off(?) (like I've pressed the power button, it stopped the gnome and showed terminal as usual)
  8. But it was stuck and not turning off, so I've turn off it with long power button press
  9. And then I got error on boot

The error was root device mounted successfully but /sbin/init, but I think that is not important

The important part, that my partition now is almost empty.

I have made live usb, mounted the partition and tree returns:

/mnt boot dev etc cron.d timeshift-hourly home leviska (my username) .Xauthority .local share TelegramDesktop ... .zsh_history Desktop proc run sys tmp 

And the partition is basically empty, only 80kb is used

I've tried running e2fsck and ext4magic, but they didn't do/returned anything useful

ext4magic /dev/nvme0n1p2 -l Filesystem in use(...) Using internal Journal at Inode 8 Inode 2 is allocated 100% home/leviska/.zsh_history ext4magic : EXIT_SUCCESS 

With the exception of the above, I didn't write anything to the partition after reboot, and hope there is some way to restore files

I think the partition is the same, because it's UUID is the same (as in the grub on boot), but now it's just empty

3
  • And yes, it is very ironic that I've lost all data while trying to backup a system :( Commented Jul 15, 2023 at 23:56
  • I assume that timeshift mounted root into that folder, that I've deleted, and now everything is gone, although I don't understand why I can't recover anything Commented Jul 16, 2023 at 0:35
  • Ok, testdisk seems to be doing something. I hope I'll be able to restore some of the files, but I'll probably reinstall the os from scratch Commented Jul 16, 2023 at 0:43

1 Answer 1

0

Ok, I think (?) what happened is that timeshift mounted root into the folder, and when I blindly deleted the folder, ncdu deleted my whole partition, basically calling sudo rm -rf / (I've run ncdu as sudo)

I've managed to recover a lot of files using photorec (god-tier tool)

But unfortunately all the directory structure is lost, so there is no way to recover the partition fully, and I need to reinstall the OS

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.