r/debian • • 4d ago

Help!

I can't open one of disks on my PC, I don't know what to do. I'm not sure what could have done this. Last time I turned on PC everything was fine. Do you think the fact that PC went without electricity for nearly 24 hours? I wasn't able tot turn it off properly because of my UPS no longer working properly.

Update: I managed to copy all my data to a different disk. Problem was caused by one .odt file that was saved incorrectly due emergency incorrect shutdown of PC (thanks to my broken UPS).

20 Upvotes

31 comments sorted by

View all comments

Show parent comments

2

u/maria08042009 3d ago

Thanks, that's probably going to be last resort, but useful to know nevertheless.

1

u/KlePu 3d ago edited 3d ago

Whatever you do, try to use read-only mode when accessing the troubled disk until you got a clean copy of all the data. If you do have a disk with enough free space, you could try to create a 1:1 copy and only work on that. dd can copy block data directly, you can then redirect that data to a file:

  • find a place that has enough space: df -h to get /path/to/place/with/space/ (this is a read only command, cannot do any harm)
  • check the path of your NTFS disk: lsblk -f to get /dev/sdX (this is read only as well)
  • then create the actual image: sudo dd if=/dev/sdX of="/path/to/place/with/space/my-data.img" bs=4M conv=noerror,sync status=progress && sync (this can destroy all of your data if used incorrectly ;-p)

edit: mixed up my variables, sorry <.<

If you do want to try this, I can give more detailed instructions ;)

2

u/CardOk755 3d ago

df only works on mounted filesystems.

1

u/KlePu 3d ago

Yep, mixed up the outputs. Corrected ;)