Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
1978 views
Safecopy a whole directory
[Safecopy][1] can rescue a file or a partition from a failing hard drive. But what if you want to rescue a whole directory? It doesn't look like there's a way to do this in safecopy. Is there a command that will run safecopy, recusrively, on every individual file in a directory, and put it in the ap...
Safecopy can rescue a file or a partition from a failing hard drive. But what if you want to rescue a whole directory? It doesn't look like there's a way to do this in safecopy. Is there a command that will run safecopy, recusrively, on every individual file in a directory, and put it in the appropriate place on the rescued media? I have a huge, failing drive but I only need to rescue one directory from it.
3x5 (121 rep)
Aug 28, 2017, 08:19 PM • Last activity: Jul 10, 2025, 10:04 PM
2 votes
1 answers
2012 views
SafeCopy manually finish ISO
Good Morning, I am currently helping a good friend to recover her broken 1TB external HDD. She dropped the drive and now, it cannot be mounted anymore. After some research I gave safecopy a try. I am working with a Kali Linux live CD and an internal 3TB HDD that is connected and mounted via USB stat...
Good Morning, I am currently helping a good friend to recover her broken 1TB external HDD. She dropped the drive and now, it cannot be mounted anymore. After some research I gave safecopy a try. I am working with a Kali Linux live CD and an internal 3TB HDD that is connected and mounted via USB station. The external drive has less than 100GB space occupied. SafeCopy collects ~30GB per day. My first try aborted after ~260GB with an "location not found" error, the drive has reconnected to another mount path. The current try is at ~280GB. Since the drive is brand new, all stored data should already be collected in the output ISO. However, when I try to mount the 260GB ISO I get an file error, something about corrupted file and I/O error I used this command for safecopy: sudo safecopy --stage1 /dev/sda1 /path/to/3tb/drive/data.iso /dev/sda1 is the place where the external HDD is detected. Is there a way to manually finish the build of the ISO file? This would save me a lot of time, since safecopy would need ~34 days to complete the job. EDIT: As mentioned in the comments, I had to abort the process for some time. I've now set it all up again and after some difficulties, this is what fdisk produced: sudo fdisk -l /dev/sdc1 Disk /dev/sdc1: 931.5 GiB, 1000169537536 bytes, 1953456128 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x69205244 Device Boot Start End Sectors Size Id Type /dev/sdc1p1 ? 218129509 1920119918 1701990410 811.6G 72 unknown /dev/sdc1p2 ? 729050177 1273024900 543974724 259.4G 74 unknown /dev/sdc1p3 ? 168653938 168653938 0 0B 65 Novell Netware 386 /dev/sdc1p4 2692939776 2692991410 51635 25.2M 0 Empty Partition table entries are not in disk order. I forgot to save the stage1.badblocks file, so I cannot really continue the first run. I now started a new stage1 safecopy run, hope it will be a bit faster than before since I now run a Debian Linux directly from this notebook. Since then, is there a way to use the iso files from the first run and make it readable? EDIT2: Ok, after 3 hours, this is the output so far: (+0){XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXX 8-X 0% the drive makes terrible clicking noises. If I interprete the fdisk output form earlier, the data seems to be written way more back on the drive, not from sector 0 onwards. Is it possible to read and rescue the data by starting at the end of the disk? I fear I am more or less dependant on extracting the data from the iso file I created so far. Again, i it somehow possible to extracxt portions from an unfinished iso file and build a valid one from it? EDIT 3: I now tried ddrescue. It now runs for ~ 23h. The output file has a size of 134MB, the size I already knew from safecopy to be ok. gmesg | tail produces the following output: [80840.705000] usb 2-1.1: reset high-speed USB device number 8 using ehci-pci [80880.711821] usb 2-1.1: reset high-speed USB device number 8 using ehci-pci [80920.718561] usb 2-1.1: reset high-speed USB device number 8 using ehci-pci [80922.888408] sd 8:0:0:0: [sdb] Unhandled error code [80922.888413] sd 8:0:0:0: [sdb] [80922.888415] Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK [80922.888417] sd 8:0:0:0: [sdb] CDB: [80922.888419] Read(10): 28 00 49 a5 38 80 00 00 08 00 [80922.888426] end_request: I/O error, dev sdb, sector 1235564672 [80922.888430] Buffer I/O error on device sdb1, logical block 154445328 So what I can see there is that there are difficulties with the usb access and something with hostbyte=DID_TIME_OUT dd has this output so far: rescued: 123928 kB, errsize: 0 B, current rate: 12976 kB/s rescued: 134742 kB, errsize: 39649 kB, current rate: 0 B/s ipos: 635829 MB, errors: 605, average rate: 1688 B/s ago opos: 635829 MB, run time: 22.17 h, successful read: 22.01 h ago Copying non-tried blocks... Pass 1 (forwards) After dd has finished I will try to extract at least a little bit with tsk_recover from the dd image. As mentioned in the comments I looked up the hardware specs of the drive. THe problem is that the USB connector (USB 3.0 Type B Micro) is placed on the main PCB so I cannot access a ATA/SATA connection. Or at least thats what I found out (I didn't open the case so far). I couldn't find a data sheet with circuit diagram. The product number is WDBHHG0010BBK-04. I found a video of a similar looking (!) drive that has pins next to the usb port. I don't know enough about hard drives and electronics to see if I could use these. As soon as dd finished I will open the case. I am asking myself what could have damaged the drive that bad. My friend told me she just dropped it. It seems like the rw head is damaged or has smashed the disk. As far as I know, HDDs move their heads aside while idle or powered off. My attempts of rescue seem to have not dealt much more damage since the result of readable sectors are the same as from the start. So, much text. my current question is what the syslog entries should tell me. Some Pics of the drive: enter image description here enter image description here enter image description here
Ueda Ichitaka (81 rep)
Aug 18, 2016, 09:20 AM • Last activity: Jun 25, 2025, 04:03 AM
2 votes
0 answers
209 views
Interpreting safecopy's output to a device file
So recently we've had a dying hard drive that we tried to copy all the data from using `safecopy`. The documentation as well as any guides I could find specified that `safecopy`'s output has to be an image file. The command processed, but only yielded `XXX` as output, indicating unsuccessful reads f...
So recently we've had a dying hard drive that we tried to copy all the data from using safecopy. The documentation as well as any guides I could find specified that safecopy's output has to be an image file. The command processed, but only yielded XXX as output, indicating unsuccessful reads for hundreds and thousands of blocks. Evidently that can't be correct since the drive was still mountable and most files were readable. Next I retried, specifying an HDD partition (/dev/sdb2) as the output, as someone suggested (I can't find the thread anymore, that was over a week ago). The command ran, outputting successful reads, finishing in the estimated time of over 5 days. Now the drive has all the recovered data on it, but the partition has become unreadable. We can't repeat the recovery, as the damaged drive died soon afterwards (head crash, and a quite violent one at that) and we somehow have to get the data from the other HDD, which is definitely there since the command completed and wrote over the partition. Is it possible to retrieve it somehow? I was thinking if the intended target was an .img file, then copying the raw data from the device file to an .img with dd might give us the "intended result" that the command should have gotten us to begin with (that being having safecopy's output in the form of an .img file and not on a device), but dd froze after a few percent into the operation, which did not resume even after several hours. The exact copy and output was lost due to running on a volatile system, but based on the devices and parameters I remember it must have been sudo safecopy --stage1 -b 4096 -R 2 /dev/sda2 /dev/sdb2, i.e. doing a stage 1 copy with added double retries from /dev/sda2 (broken) to dev/sdb2 (backup), both having a block size of 4096 bytes. The output yielded mostly ... as far as I could see, indicating successful block reads. The output ended with safecopy informing me that it concluded successfully, writing ~3TB of data. sudo file -s /dev/sdb2 only yields the error message /dev/sdb2: ASCII text, with very long lines, with no line terminators, retrying with hexdump -C /dev/sdb2 gives a bit more insight on what's on the device:
00000000  42 61 44 62 4c 6f 43 6b  42 61 44 62 4c 6f 43 6b  |BaDbLoCkBaDbLoCk|
*
01000030  42 61 44 62 4c 6f 43 6b  10 00 00 00 4c 6f 43 6b  |BaDbLoCk....LoCk|
01000040  c4 7b 00 00 4c 6f 43 6b  42 61 44 62 4c 6f 43 6b  |.{..LoCkBaDbLoCk|
01000050  42 61 44 62 4c 6f 43 6b  42 61 44 62 4c 6f 43 6b  |BaDbLoCkBaDbLoCk|
*
0101ef10  c8 7b 00 00 4c 6f 43 6b  42 61 44 62 4c 6f 43 6b  |.{..LoCkBaDbLoCk|
0101ef20  c9 7b 00 00 ca 7b 00 00  cb 7b 00 00 cc 7b 00 00  |.{...{...{...{..|
0101ef30  cd 7b 00 00 ce 7b 00 00  cf 7b 00 00 d0 7b 00 00  |.{...{...{...{..|
0101ef40  d1 7b 00 00 d2 7b 00 00  d3 7b 00 00 d4 7b 00 00  |.{...{...{...{..|
The remaining lines look like normal disk data. What is odd is that the first lines of the hexdump show bad blocks, despite Safecopy claiming that at least the first few thousand blocks were all read successfully.
Bobcat (21 rep)
May 2, 2023, 12:05 PM • Last activity: Mar 19, 2025, 03:20 PM
3 votes
2 answers
3521 views
How to clone a read-only portion of /proc file system
The problem with reading /proc file system is that it is not atomic. I tried using a library (procfs in Python) that wishes to read it, but it has glitches about 5% of the time because the process that I am after is now gone. So, I wish to copy everything in /proc to another location, say `/proc_clo...
The problem with reading /proc file system is that it is not atomic. I tried using a library (procfs in Python) that wishes to read it, but it has glitches about 5% of the time because the process that I am after is now gone. So, I wish to copy everything in /proc to another location, say /proc_clone//. A GUID can be generated using the uuidgen command. The naive approach would be trying to use cp -r, but I am getting a whole bunch of 'permission denied' errors and it is taking more than a second. I am only after a subset /proc/ and even then, only the read-only stuff that can be turned into a string (ultimately I wish to build a single JSON file that contains all of this). I am looking for a script that would do that for me and is also short, simple, very fast, **can deal with processes dying mid-flight by skipping them**, however, I would like to avoid writing C code - I would much rather stick to bash, existing utilities and maybe Perl / Python. The goal here is just to take a snapshot of a subset of /proc, not produce the JSON file itself. I have heard opinions that "one should not ever try to copy /proc but just read from it". Well, the non-atomic nature of it means that one has to throw a bunch of try/catch all over the code when trying to do very simple operations. Using a high level language like Python (what I ultimately want to use) to iterate over /proc is a slow method, which involves both IO and CPU time. This increases the risk of seeing a process die on you (I certainly see it often; I have a script that interrogates /proc every minute and I run into plenty of exceptions). I would like to build a library that outputs a single JSON file that contains cpu and memory usage information about processes in a human-readable format (e.g. using seconds and not jiffies, bytes and not pages, have units in addition to values. I am not concerned that it would take some time to create that file out of a directory dump; I just want to make sure that the snapshot is as accurate as possible. So. if I should not just copy /proc over, then which other method should I use?
Leonid (161 rep)
Apr 26, 2013, 11:29 PM • Last activity: Jun 10, 2024, 02:20 AM
0 votes
2 answers
1151 views
Why safecopy won't recover to /media/?
I tried to recover an HDD to a mounted device: safecopy --stage1 /dev/sdb3 /media/Volume/abc and it says `Error opening destination: /media/Volume/abc is a directory`. If I run `safecopy` with safecopy --stage1 /dev/sdb3 /dev/sdc1 it starts working. But after finishing this process, I can't open the...
I tried to recover an HDD to a mounted device: safecopy --stage1 /dev/sdb3 /media/Volume/abc and it says Error opening destination: /media/Volume/abc is a directory. If I run safecopy with safecopy --stage1 /dev/sdb3 /dev/sdc1 it starts working. But after finishing this process, I can't open the destination. It should simply copy all files from the bad HDD to the new HDD (not cloning, just copy the data), so what is the problem?
Steve (1 rep)
Jun 20, 2014, 08:39 AM • Last activity: Sep 12, 2022, 12:42 AM
0 votes
1 answers
372 views
Cannot find SafeCopy In Ubuntu
Sorry, I'm very new with this. I have installed SafeCopy with the following commands, and everything was looking fine. sudo apt-get update sudo apt-get install safecopy My problem is that I just cannot find the application in Ubuntu. It is not in app list. Please let me know where can I find it and...
Sorry, I'm very new with this. I have installed SafeCopy with the following commands, and everything was looking fine. sudo apt-get update sudo apt-get install safecopy My problem is that I just cannot find the application in Ubuntu. It is not in app list. Please let me know where can I find it and run it. Thank you. Megasurf enter image description here
Megasurf (1 rep)
Aug 9, 2021, 09:56 AM • Last activity: Aug 9, 2021, 11:21 AM
2 votes
1 answers
1229 views
Recover Data from Failing External Hard Drive
I am attempting to recover the data from a failing Seagate external hard drive. I was going to attempt using `ddrescue` or `safecopy`. I am currently using Kali. The drive will not mount and the output from `dmesg` is: ``` [ 657.245471] sd 7:0:0:0: Attached scsi generic sg3 type 0 [ 657.245713] sd 7...
I am attempting to recover the data from a failing Seagate external hard drive. I was going to attempt using ddrescue or safecopy. I am currently using Kali. The drive will not mount and the output from dmesg is:
[  657.245471] sd 7:0:0:0: Attached scsi generic sg3 type 0

[  657.245713] sd 7:0:0:0: [sdc] Spinning up disk...

[  668.496738] sd 7:0:0:0: [sdc] 732566645 4096-byte logical blocks: (3.00 TB/2.73 TiB)

[  699.452260] sd 7:0:0:0: tag#1 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN 

[  699.452270] sd 7:0:0:0: tag#1 CDB: Mode Sense(6) 1a 00 3f 00 04 00

[  743.428575] sd 7:0:0:0: Device offlined - not ready after error recovery

[  743.428602] sd 7:0:0:0: [sdc] Write Protect is off

[  743.428606] sd 7:0:0:0: [sdc] Mode Sense: 00 00 00 00

[  743.428617] sd 7:0:0:0: rejecting I/O to offline device

[  743.428625] sd 7:0:0:0: [sdc] Asking for cache data failed

[  743.428627] sd 7:0:0:0: [sdc] Assuming drive cache: write through

[  743.428636] sd 7:0:0:0: [sdc] Optimal transfer size 268431360 bytes

[  743.448448] sd 7:0:0:0: [sdc] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK

[  743.448452] sd 7:0:0:0: [sdc] Sense not available.

[  743.448461] sd 7:0:0:0: [sdc] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
when I run fdisk -l obviously the device does not show up. I attempted to use safecopy --stage1 /dev/sdc /dev/sdb where sdc is the failing drive as shown in dmesg and sdb is the destination drive. Safecopy fails because it cannot find sdc. Any thoughts on the way forward. Thank you.
tanker1812 (21 rep)
Mar 20, 2021, 06:26 PM • Last activity: Mar 21, 2021, 03:34 AM
0 votes
0 answers
554 views
How can I rescue broken data on an USB stick when ddrescue and safecopy do not find any errors on the drive?
After a friend wanted to copy pictures onto my 8 GB USB stick all data is corrupted. The USB stick was mainly used on Windows before. Also my friend used Windows to copy the pictures. Maybe he unplugged it while the writing process was not yet finished, I don't know. Now neither Windows nor Linux (U...
After a friend wanted to copy pictures onto my 8 GB USB stick all data is corrupted. The USB stick was mainly used on Windows before. Also my friend used Windows to copy the pictures. Maybe he unplugged it while the writing process was not yet finished, I don't know. Now neither Windows nor Linux (Ubuntu 18.04) can read the data. The filenames are a complete mess with symbols and other characters (see below). While I can ask again for the pictures, there were other files on the USB stick before which are now lost. I thought to give it a try with **ddrescue** and **safecopy**. But both run through without any error detection and the created .iso files show the same problem after mounting as the USB stick. What can I further try to rescue the data? Any guess what is wrong with the data? userxxx@PC:~/Desktop/broken_USB$ ll /media/userxxx/288A-C7BD1/ ls: cannot access '/media/userxxx/288A-C7BD1/τfσ¼╨σ%$.ú%a': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/ì5∙'$'\025''2╤û∩.╧σz': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/╫ß[yp╟sv.>■ö': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/û┴'\''üäe,n.'$'\017''jñ': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/'$'\003'',1∙╥╢'$'\002''π.╛jw': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/üπ¿'$'\035''Ωv`ç.'$'\016''1╪': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/ü⌐'$'\a''╪⌡▓|D.¿c`': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/zqmφ╒╬¼i.'$'\024''àv': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/≤╡l∩'$'\026''»s▐.rmm': Input/output error ls: cannot access '/media/userxxx/288A-C7BD1/'$'\f\017''nob>ò.i■=' -r--r--r-- 1 userxxx userxxx 2,5G Jul 30 2083 '\êFπô╧z╤.╖(c' -rw-r--r-- 1 userxxx userxxx 1,2G Jan 22 2102 '£h'$'\v''╔╧¡"ô.√ê6' d?????????? ? ? ? ? ? '≥_┼'$'\031''▄:'$'\035''°.'$'\b''I+'/ d?????????? ? ? ? ? ? 'ì5∙'$'\025''2╤û∩.╧σz'/ -r--r--r-- 1 userxxx userxxx 3,5G Sep 22 2070 'i▓[█jæe#.'$'\027''è\' -r--r--r-- 1 userxxx userxxx 1,4G Mai 10 2006 'iy╜ymh!'$'\030''.√▌j' d?????????? ? ? ? ? ? '%k«çåxû'$'\b''.τäÉ'/ d?????????? ? ? ? ? ? '≤╡l∩'$'\026''»s▐.rmm'/ d?????????? ? ? ? ? ? ╗⌡▄╩₧o.c.ô≥τ/ -r--r--r-- 1 userxxx userxxx 2,0G Jan 3 2086 Oc°W╥6WQ._≥Ç d?????????? ? ? ? ? ? '╫ß[yp╟sv.>■ö'/ -rw-r--r-- 1 userxxx userxxx 168M Sep 19 2069 '>ƒ°sΓºƒJ.ìe`' -r--r--r-- 1 userxxx userxxx 2,0G Apr 10 2090 '¡t╢▌'$'\025''£àü.,'$'\024''▒' d?????????? ? ? ? ? ? 'ü⌐'$'\a''╪⌡▓|D.¿c`'/ d?????????? ? ? ? ? ? 'û┴'\''üäe,n.'$'\017''jñ'/ d?????????? ? ? ? ? ? 'üπ¿'$'\035''Ωv`ç.'$'\016''1╪'/ d?????????? ? ? ? ? ? 'W═g'$'\t''║≈g╥.e≥'$'\177'/ -rw-r--r-- 1 userxxx userxxx 1,2G Mai 29 1987 'x£ôδrpw╛.'$'\r''6«' -r--r--r-- 1 userxxx userxxx 2,0G Jun 22 2028 '°zƒ1Y?l∩.ú=w' d?????????? ? ? ? ? ? 'zqmφ╒╬¼i.'$'\024''àv'/ -rw-r--r-- 1 userxxx userxxx 1,7G Sep 23 2093 "┘δS░E╧9'.¡k╗" -r--r--r-- 1 userxxx userxxx 2,4G Jan 7 2064 'πM*¡4v'\''═.'$'\023''ü╫' d?????????? ? ? ? ? ? 'τfσ¼╨σ%$.ú%a'/ -r--r--r-- 1 userxxx userxxx 143M Jan 7 2027 'Ω┘'$'\v''αâôpô.ü°⌡' userxxx@PC:~/Desktop/broken_USB$ sudo ddrescue -v /dev/sdh1 usb.iso ddrescue.log GNU ddrescue 1.22 About to copy 8102 MBytes from '/dev/sdh1' to 'usb.iso' Starting positions: infile = 0 B, outfile = 0 B Copy block size: 128 sectors Initial skip size: 256 sectors Sector size: 512 Bytes ipos: 8102 MB, non-trimmed: 0 B, current rate: 4718 kB/s opos: 8102 MB, non-scraped: 0 B, average rate: 10140 kB/s non-tried: 0 B, bad-sector: 0 B, error rate: 0 B/s rescued: 8102 MB, bad areas: 0, run time: 13m 18s pct rescued: 100.00%, read errors: 0, remaining time: n/a time since last successful read: n/a Finished **Update** With sudo photorec I was able to rescue lots of files, as it detects by far not only picture files. Unfortunately, the folder structure and the filenames are lost. Any ideas why there are no errors detected but I can still not access the USB drive normally? Could be something wrong with the partition table or similar?
Philipp Leitl (131 rep)
Oct 5, 2020, 11:10 AM • Last activity: Oct 5, 2020, 06:05 PM
1 votes
1 answers
913 views
ddrescue: 0% rescued on audio CD with 1 track that skips
I'm trying to get some lightly scratched albums (audio CDs) onto my computer via `ddrescue`. I ran the program on one disc with one track that has skipping problems, and it rescued 0%. The .iso was unmountable. I tried `safecopy` (ran for 3 days) and also ended up with an unmountable iso. I've tried...
I'm trying to get some lightly scratched albums (audio CDs) onto my computer via ddrescue. I ran the program on one disc with one track that has skipping problems, and it rescued 0%. The .iso was unmountable. I tried safecopy (ran for 3 days) and also ended up with an unmountable iso. I've tried a couple of different command line options, to no avail. Sudo and non-sudo.
ddrescue -f -n /dev/sr0 /path/to/iso.iso
ddrescue -n -b 2048 
ddrescue -f -d -R --force
I've tried ddrescue on another CD without any playback issues and still got 0% recovered. What gives?
Kale (11 rep)
Dec 22, 2019, 10:32 PM • Last activity: Dec 23, 2019, 03:50 PM
3 votes
1 answers
1334 views
Recover audio CD after safecopy
I have an audio CD (burnt a few years ago) that I want to rip (with `K3B` or other) to `flac`. `K3B` was unable to complete and I realized the CD was damaged. I managed to recover the data with `safecopy` and the `--stage-1-3` arguments. From the output (see below) it seems that the data was properl...
I have an audio CD (burnt a few years ago) that I want to rip (with K3B or other) to flac. K3B was unable to complete and I realized the CD was damaged. I managed to recover the data with safecopy and the --stage-1-3 arguments. From the output (see below) it seems that the data was properly recovered. However, I expected to be able to mount the file and take it from there. Unfortunately it doesn't seem to be the case: $ sudo mount -o loop -t iso9660 diskimage /media/cdrom1/ mount: block device /mnt/data/Bureau/diskimage is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/loop1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so dmesg doesn't show much useful output: $ dmesg | tail ISOFS: Unable to identify CD-ROM format. Indeed it seems to be in an unrecognized format: $ file diskimage diskimage: data Unsurprisingly, renaming the file to .iso, .raw, .img or .bin made no difference. Some people on the Internet recommend using ccd2iso but it fails as well (Unrecognized sector mode (0) at sector 0!). How can I proceed to extract the audio from this raw data dump? Here is the output from safecopy. The stage3.badblocks is empty. $ safecopy /dev/sr0 diskimage --stage1 Low level device calls enabled mode: 2 Reported hw blocksize: 4096 CDROM audio - low level access: drive reset, raw read CDROM low level disk size: 784954128 CDROM low level block size: 2352 Reported low level blocksize: 2352 File size: 784954128 Blocksize: 2352 Fault skip blocksize: 78493296 Resolution: 78493296 Min read attempts: 1 Head moves on read error: 0 Badblocks output: stage1.badblocks Marker string: BaDbLoCk Starting block: 0 Source: /dev/sr0 Destination: diskimage ......................................... ......................................... ......................................... ......................................... ......................................... ......................................... ................................(+669325104){X }(+78493296) ................(+37135728){X}(+78493296) Done! Recovered bad blocks: 0 Unrecoverable bad blocks (bytes): 2 (156986592) Blocks (bytes) copied: 333739 (784954128) xavier@marvin:~/Bureau$ safecopy /dev/sr0 diskimage --stage2 Low level device calls enabled mode: 2 Reported hw blocksize: 4096 CDROM audio - low level access: drive reset, raw read CDROM low level disk size: 784954128 CDROM low level block size: 2352 Reported low level blocksize: 2352 File size: 784954128 Blocksize: 2352 Fault skip blocksize: 301056 Resolution: 2352 Min read attempts: 1 Head moves on read error: 0 Incremental mode file: stage1.badblocks Incremental mode blocksize: 2352 Badblocks output: stage2.badblocks Starting block: 0 Source: /dev/sr0 Destination: diskimage Current destination size: 863447424 ........................(+726878544){X <<<<<<<}(+2352) .....(+10090080){X<<<<<<<}(+2352) ..... 8-( 95% Done! Recovered bad blocks: 0 Unrecoverable bad blocks (bytes): 2 (4704) Blocks (bytes) copied: 317950 (747818400) $ safecopy /dev/sr0 diskimage --stage3 Low level device calls enabled mode: 2 Reported hw blocksize: 4096 CDROM audio - low level access: drive reset, raw read CDROM low level disk size: 784954128 CDROM low level block size: 2352 Reported low level blocksize: 2352 File size: 784954128 Blocksize: 2352 Fault skip blocksize: 2352 Resolution: 2352 Min read attempts: 4 Head moves on read error: 1 Incremental mode file: stage2.badblocks Incremental mode blocksize: 2352 Badblocks output: stage3.badblocks Starting block: 0 Source: /dev/sr0 Destination: diskimage Current destination size: 863447424 . 8-( 93% Done! Recovered bad blocks: 0 Unrecoverable bad blocks (bytes): 0 (0) Blocks (bytes) copied: 313339 (736973328)
Calimo (280 rep)
Jan 3, 2015, 08:31 AM • Last activity: Apr 5, 2019, 11:51 PM
8 votes
3 answers
26495 views
How do I run safecopy in terminal?
I'm very new to terminal and Linux. I have a crashed external hard drive that is spinning but won't appear on the desktop. I ran `safecopy` from terminal and this is what it said at the end Description of output: . : Between 1 and 1024 blocks successfully read. _ : Read of block was incomplete. (pos...
I'm very new to terminal and Linux. I have a crashed external hard drive that is spinning but won't appear on the desktop. I ran safecopy from terminal and this is what it said at the end Description of output: . : Between 1 and 1024 blocks successfully read. _ : Read of block was incomplete. (possibly end of file) The blocksize is now reduced to read the rest. |/| : Seek failed, source can only be read sequentially. > : Read failed, reducing blocksize to read partial data. ! : A low level error on read attempt of smallest allowed size leads to a retry attempt. [xx](+yy){ : Current block and number of bytes continuously read successfully up to this point. X : Read failed on a block with minimum blocksize and is skipped. Unrecoverable error, destination file is padded with zeros. Data is now skipped until end of the unreadable area is reached. < : Successful read after the end of a bad area causes backtracking with smaller blocksizes to search for the first readable data. }[xx](+yy) : current block and number of bytes of recent continuous unreadable data. I don't know what to do next. Is it telling me that it cannot be resurrected or is it telling me that it is waiting for me to do something?
francis (81 rep)
May 12, 2012, 02:15 PM • Last activity: Oct 8, 2016, 03:19 AM
10 votes
2 answers
123572 views
How to select, copy and paste some columns from different files and create one file from them?
I want to create and organize data in a file from a number of files by selecting parts of the columns of the given files. I have more than 10 file to copy the second, third and forth columns of each file and pasting them into a single file.
I want to create and organize data in a file from a number of files by selecting parts of the columns of the given files. I have more than 10 file to copy the second, third and forth columns of each file and pasting them into a single file.
AiB (797 rep)
Sep 9, 2013, 08:15 PM • Last activity: Jul 14, 2015, 10:29 AM
1 votes
0 answers
385 views
basic help with safecopy
I have a drive with "**Many Bad Sectors**". After much deliberation I've chosen to try recovering with safecopy (the choices of tools are overwhelming, and they are all just as cryptic to me - but I digress). There aren't any tutorials explaining the basic concepts of running safecopy. Hopefully my...
I have a drive with "**Many Bad Sectors**". After much deliberation I've chosen to try recovering with safecopy (the choices of tools are overwhelming, and they are all just as cryptic to me - but I digress). There aren't any tutorials explaining the basic concepts of running safecopy. Hopefully my questions are simple enough to answer quickly. They go like this: - Can the operation of safecopy be as simple as running it three times (once for each of its "stages")? - Do I run each "stage" into the same output file (e.g., harddrive.img)? Does it mount the image file and continue to add recovered files to it? - Is it copying empty space into the image file (i.e., do I need a destination that is as big as the source drive, or simply as big as the data)? - Is it truly copying the drive (directory structure and all), or just file dumping? Thanks
Wolf (91 rep)
Jan 20, 2015, 10:46 PM • Last activity: Jan 21, 2015, 01:54 PM
1 votes
1 answers
834 views
How to interpret the output of safecopy
Just as an example, this is one typical output line. > ...........................[12767109]\(+112394240){X [12792709] X}[12818309]\(+209715200) I have gone through the DESCRIPTION OF OUTPUT in [safecopy's manpage][1] but I still am not quite sure what exactly it means. For example, if `(+112394240)...
Just as an example, this is one typical output line. > ...........................\(+112394240){X X}\(+209715200) I have gone through the DESCRIPTION OF OUTPUT in safecopy's manpage but I still am not quite sure what exactly it means. For example, if (+112394240) is "the number of blocks (or bytes) [which is it?] continuously read successfully up to this point." and if (+209715200) is the "number of blocks (or bytes) of recent continuous unreadable data.", then how can the latter be larger than the former? Additionally, what is the meaning of {X X}, does it mean that only one block (block 12792709) was unreadable? Any clarification would be greatly appreciated.
Isopycnal Oscillation (138 rep)
Sep 12, 2014, 03:47 AM • Last activity: Sep 12, 2014, 05:54 AM
2 votes
0 answers
271 views
SafeCopy worked but I have a few problems
I had a 60G NTFS drive that had 28 physically bad blocks as reported by GParted. I used SafeCopy to recover to the root of an empty 500G drive using SafeCopy defaults. Everything worked as expected and I can access the data fine, but now the 500G drive has a couple of issues. 1. The bad blocks, whic...
I had a 60G NTFS drive that had 28 physically bad blocks as reported by GParted. I used SafeCopy to recover to the root of an empty 500G drive using SafeCopy defaults. Everything worked as expected and I can access the data fine, but now the 500G drive has a couple of issues. 1. The bad blocks, which I guess SafeCopy filled with zeroes or whatever, are apparently still marked as bad on the 500G drive that I copied to, preventing GParted and numerous other programs from being able to work with it. 2. The 500G drive now shows the remaining free space to be the same as the 60G drive that I copied from instead of the 400G+ that it should show. I can't get access through GParted to see if I can fix this because GParted says that the drive has 28 physical errors and it won't mount it. I thought I might be able to make a backup image and restore it back to the drive but the backup software that I use, Acronis, shows that the image file would be 500G instead of the less than 60G of actual data. This drive is being used as a Windows non-system drive. Windows Explorer shows the drive as 60G but when you go into Disk Management the top pane shows 60G while the bottom pane shows a graphical image of a 500G primary partition. Since this is a non-system disk I realize that I could simply just transfer all the files over to another properly partitioned and formatted disk but for future reference I would like to know how to avoid or fix this. Is this normal behavior for a SafeCopy transfer? Did I make a mistake in using the SafeCopy defaults?
Jimmi (21 rep)
Dec 14, 2012, 08:44 PM • Last activity: Dec 14, 2012, 09:26 PM
Showing page 1 of 15 total questions