I've had the bad luck of removing a file that was not yet added to a git repository.

I'm trying to recover it with this code:

mount -o remount, ro /dev/sda1 # to remount in read only mode.
extundelete --restore-file path/to/file /dev/sda1 #restore in same partition
mount -o remount, rw /dev/sda1 #put partition back in write mode.

I'm doing that while logged on a tty.

But I get an error saying /dev/sda1 is unmounted or bad option.

If I run lsblk I get sda and the partitions sda1 to sda4, where sda1 is the /home. So I'm confused on how to proceed.

Any help?

  • Do you really have a space after the comma in the mount commands, or is that a typo? – Andy Dalton Jun 29 at 17:55
  • @AndyDalton thanks. Now I get mount point busy – mister nobody Jun 29 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.