You are not logged in.
So I have an external hard drive and I wanted to use an arch iso on it to write to a usb key. However, I accidentally ended up writing to the very hard drive that I had the iso on. See below it stopped working because it overwrote itself on the first try:
ubuntu@ubuntu:/media/ubuntu/mybook/data/isos$ dd bs=4M if=archlinux-2017.10.01-x86_64.iso of=/dev/sdc status=progress && sync
dd: failed to open '/dev/sdc': Permission denied
ubuntu@ubuntu:/media/ubuntu/mybook/data/isos$ sudo dd bs=4M if=archlinux-2017.10.01-x86_64.iso of=/dev/sdc status=progress && sync
dd: error reading 'archlinux-2017.10.01-x86_64.iso': Input/output error
1+1 records in
1+1 records out
4341760 bytes (4.3 MB, 4.1 MiB) copied, 0.477935 s, 9.1 MB/s
ubuntu@ubuntu:/media/ubuntu/mybook/data/isos$ sudo dd bs=4M if=archlinux-2017.10.01-x86_64.iso of=/dev/sdc status=progress && sync
dd: error reading 'archlinux-2017.10.01-x86_64.iso': Input/output error
1+1 records in
1+1 records out
4341760 bytes (4.3 MB, 4.1 MiB) copied, 0.00354967 s, 1.2 GB/s
ubuntu@ubuntu:/media/ubuntu/mybook/data/isos$ pwd
/media/ubuntu/mybook/data/isos
ubuntu@ubuntu:/media/ubuntu/mybook/data/isos$ sudo dd bs=4M if=/media/ubuntu/mybook/data/isos/archlinux-2017.10.01-x86_64.iso of=/dev/sdc status=progress && sync
dd: error reading '/media/ubuntu/mybook/data/isos/archlinux-2017.10.01-x86_64.iso': Input/output error
1+1 records in
1+1 records out
4341760 bytes (4.3 MB, 4.1 MiB) copied, 0.00608694 s, 713 MB/sthe harddrive just had one partition, and it was directly mounted to /media/ubuntu/mybook as can be seen here in part of the output of "findmnt" that I ran before I made my mistake:
/dev/sdc /media/ubuntu/mybook ext4 rw,nosuid,nodev,relatime,data=ordered 0 0There is a post here on a similar topic, but the prognosis does not look good because I only had one partition and so it probably overwrote the file list:
https://superuser.com/questions/1044576 … to-recover
Any suggestions on how best to proceed? I haven't tried anything yet because I wanted suggestions first. Thanks.
Last edited by felixtheratruns (2017-11-02 23:45:20)
Offline
Offline
Well text search didn't work "grep -a -C 200 -F 'Unique string in text file' /dev/sdXN > OutputFile" from here: https://wiki.archlinux.org/index.php/Fi … _you_start although it did work for a file I didn't need. What makes me angry is that testdisk took forever to analyse things and then informed me that it would have reboot to write anything (which sucks because I'm on a livecd and any log it has saved will be wiped). So I gave up there because in this case it isn't worth spending more time on it.
UPDATE: "You can also use a live rescue CD or USB to boot from, to recover lost partitions." http://www.tipsninja.com/testdisk-recov … artitions/ Would it have worked if I had just rebooted it on my live usb? Weird I don't understand how that would work.
Last edited by felixtheratruns (2017-11-02 23:50:22)
Offline