{"id":776,"date":"2014-11-27T20:35:05","date_gmt":"2014-11-27T20:35:05","guid":{"rendered":"https:\/\/stevepedwards.today\/DebianAdmin\/?p=776"},"modified":"2014-11-27T20:35:05","modified_gmt":"2014-11-27T20:35:05","slug":"cool-cmd-6-dd_rescue","status":"publish","type":"post","link":"https:\/\/stevepedwards.today\/DebianAdmin\/cool-cmd-6-dd_rescue\/","title":{"rendered":"Cool Cmd #6 &#8211; dd_rescue"},"content":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_776\" class=\"pvc_stats all  \" data-element-id=\"776\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p><span style=\"color: black; font-size: 12pt;\">Continuing from the last Post, I want look at dd_rescue...<br \/>\n<\/span><\/p>\n<p><span style=\"color: black; font-size: 12pt;\">Simply, it recovers data blocks as small as 512k in fwd or rev directions to maximise the potential for reading bad sectors. If it can't, it continues on without quitting to the next sector, writing zeros in place of the corruption, which may mean possible recovery of a file once the file system is checked, then mounted again after recovery copying.<br \/>\n<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><span style=\"color: black;\">The input is an unmounted block device and the output is an image file usually, which can be mounted via loopback after processing...\u00a0<\/span><\/span><\/p>\n<p><span style=\"color: #0070c0;\"># dd_rescue \/dev\/sdf1 \/sahara\/mstest.img<\/span><span style=\"color: black;\">\u00a0<\/span><\/p>\n<p><span style=\"color: red;\">dd_rescue: (info): ipos: 243776.0k, opos: 243776.0k, xferd: 243776.0k\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">errs: 0, errxfer: 0.0k, succxfer: 243776.0k\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">+curr.rate: 3493kB\/s, avg.rate: 3657kB\/s, avg.load: 3.0%\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">dd_rescue: (info): \/dev\/sdf1 (243810.0k): EOF\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">Summary for \/dev\/sdf1 -&gt; \/sahara\/mstest.img:\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">dd_rescue: (info): ipos: 243810.0k, opos: 243810.0k, xferd: 243810.0k\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">errs: 0, errxfer: 0.0k, succxfer: 243810.0k\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">+curr.rate: 358kB\/s, avg.rate: 3652kB\/s, avg.load: 3.0%\u00a0<\/span><\/p>\n<p><span style=\"color: #0070c0;\"># ls -ls \/sahara\/mstest.img<\/span><span style=\"color: black;\">\u00a0<\/span><\/p>\n<p><span style=\"color: red;\"><strong>243812<\/strong>\u00a0-rwxr-xr-x 1 root root 249661440 2012-05-14 01:06 \/sahara\/mstest.img<\/span><span style=\"color: black;\">\u00a0<\/span><\/p>\n<p>It looks like it has copied the full\u00a0<strong>243MB<\/strong>\u00a0of card partition so far, so now to check and mount the image...<\/p>\n<p><span style=\"color: #0070c0;\"># fsck.vfat \/sahara\/mstest.img<\/span><\/p>\n<p><span style=\"color: #ff0000;\">dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\/sahara\/mstest.img: 2 files, 10\/60888 clusters\u00a0<\/span><\/p>\n<p>To mount the image...<strong><br \/>\n<\/strong><\/p>\n<p style=\"margin-left: 7pt;\"><span style=\"font-size: 12pt;\"><span style=\"color: #0000ff;\"># mount -o loop\u00a0<em>\/sahara\/mstest.img \/mnt\/<\/em>\u00a0<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff;\"># ls\u00a0<em>\/mnt\/<\/em>\u00a0<\/span><\/p>\n<p><span style=\"color: #ff0000;\">hashes.txt ReportTemplate.doc\u00a0<\/span><\/p>\n<p>The files are there obviously this did not have to prove anything other than to copy and convert good data, as nothing was corrupt but shows the procedure of imaging original data.<\/p>\n<p style=\"margin-left: 7pt;\"><span style=\"color: black; font-size: 12pt;\">Now you can try on corrupt media\u00a0by making the dd_rescue image of it to maximise recovery of what is there and not overwriting the original further.<br \/>\n<\/span><\/p>\n<p style=\"margin-left: 7pt;\"><span style=\"color: black; font-size: 12pt;\">You do any further data recovery operations on the image, leaving the original corrupt media as is, to be able to make further images from if there is a problem or mistake in recovery.<br \/>\n<\/span><\/p>\n<p style=\"margin-left: 7pt;\">See also <span style=\"color: #0000ff;\">testdisk<\/span> and <span style=\"color: #0000ff;\">photorec<\/span><\/p>\n<p><a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2014\/11\/photorec.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3121\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/uploads\/2014\/11\/photorec.png\" alt=\"photorec.png\" width=\"674\" height=\"513\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_776\" class=\"pvc_stats all  \" data-element-id=\"776\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/stevepedwards.today\/DebianAdmin\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p>Continuing from the last Post, I want look at dd_rescue... Simply, it recovers data blocks as small as 512k in fwd or rev directions to maximise the potential for reading bad sectors. If it can't, it continues on without quitting to the next sector, writing zeros in place of the corruption, which may mean possible <a href=\"https:\/\/stevepedwards.today\/DebianAdmin\/cool-cmd-6-dd_rescue\/\" class=\"more-link\">...<span class=\"screen-reader-text\">\u00a0 Cool Cmd #6 &#8211; dd_rescue<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-776","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"a3_pvc":{"activated":true,"total_views":1,"today_views":0},"_links":{"self":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/comments?post=776"}],"version-history":[{"count":0,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/posts\/776\/revisions"}],"wp:attachment":[{"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/media?parent=776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/categories?post=776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stevepedwards.today\/DebianAdmin\/wp-json\/wp\/v2\/tags?post=776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}