0

Some rescue operations and similar need to be done with the the drive or volume unmounted.

Previously I have downloaded an .iso of GParted which I put on a USB stick and booted up from it into a basic gui from which it was possible to rearrange the partitions on the disk.

Now I just deleted a single file I've been working on for days with rm (I know..) and need to really try to get it back.

ext4magic should be able to do it, I have the command ready to go.

extundelete maybe but that one is unmaintained.

I just put my debian-11.3.0-amd64-DVD-1.iso onto the USB from a dd command and booted from it. There was a 'rescue mode' option. That provided a semi-useless terminal with almost no commands or otherwise it allowed the root partition of the PC to be brought to life in a terminal. So I did that but the partition with the file I wanted to recover being /home was also mounted but I needed it unmounted.

There are a few rescue things out there such as -

https://www.supergrubdisk.org/

https://www.system-rescue.org/

...which don't look like they have it.

I just tested

https://www.finnix.org/

  • dd'd it to the USB and booted it into its terminal. It had a lot of commands but none to recover ext4

Does anyone know where can I find a bootable CD .iso image to put on the USB-stick which will boot into some kind of live system, not insist on partitioning the drive or installing itself, and have available the command ext4magic or otherwise extundelete ?

cardamom
  • 528
  • 1
  • 5
  • 22
  • https://www.linuxandubuntu.com/home/5-best-linux-distributions-to-recover-dead-computers-data-linux-data-recovery – cardamom Aug 16 '23 at 17:28
  • https://ext4magic.sourceforge.net/ext4magic_en.html – cardamom Aug 16 '23 at 17:34
  • Actually, not sure one can "emergency" unmount a drive easily while one is using it https://stackoverflow.com/questions/7878707/how-to-unmount-a-busy-device – cardamom Aug 17 '23 at 03:13

1 Answers1

1

ext4magic is on the downloadable systemrescue bootable system which can be seen here: https://www.system-rescue.org/Detailed-packages-list/

currawong
  • 153
  • 5
  • Thanks for the answer, pleased someone answered that. Had realised it myself in the mean time and was madly trying to recover my file from Luks encrypted volume. A lot of procedure to even get it mounted from the terminal in system-rescue but good the required `cryptsetup` command was in there as well. Is quite a friendly terminal in the system-rescue image. Anyway, I recovered _something_ in the end with the name of my file but corrupted content. If you type `rm` by accident you are in God's hands. Next time will try to emergency unmount the volume faster. – cardamom Aug 17 '23 at 03:06