{"id":3516,"date":"2024-05-28T00:23:25","date_gmt":"2024-05-27T21:23:25","guid":{"rendered":"https:\/\/demensdeum.com\/blog\/?p=3516"},"modified":"2024-12-16T22:32:14","modified_gmt":"2024-12-16T19:32:14","slug":"dd-input-output-error","status":"publish","type":"post","link":"https:\/\/demensdeum.com\/blog\/2024\/05\/28\/dd-input-output-error\/","title":{"rendered":"dd input\/output error"},"content":{"rendered":"<p>What to do if you get an input\/output error when copying a normal disk using dd in Linux?<\/p>\n<p>The situation is very sad, but solvable. Most likely, you are dealing with a failed disk containing bad blocks that are no longer usable, writeable, or readable.<\/p>\n<p>Be sure to check such a disk using S.M.A.R.T., most likely it will show you disk errors. This was the case in my case, the number of bad blocks was so huge that I had to say goodbye to the old hard drive and replace it with a new SSD.<\/p>\n<p>The problem was that this disk had a fully working system with licensed software that was necessary for the work. I tried to use partimage to quickly copy data, but suddenly discovered that the utility copies only a third of the disk, then ends with either a segfault or some other funny C\/CPlus joke.<\/p>\n<p>Then I tried to copy the data using dd, and it turned out that dd goes to about the same place as partimage, and then an input\/output error occurs. At the same time, all sorts of funny flags like conv=noerr, skip or something like that did not help at all.<\/p>\n<p>However, the data was copied to another disk without any problems using a GNU utility called ddrescue.<\/p>\n<div class=\"hcb_wrap\">\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code><\/div>\n<p><em>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0438 \u0432\u043e\u043b\u043e\u0441\u044b \u0441\u0442\u0430\u043b\u0438 \u0448\u0435\u043b\u043a\u043e\u0432\u0438\u0441\u0442\u044b\u043c\u0438, \u0432\u0435\u0440\u043d\u0443\u043b\u0430\u0441\u044c \u0436\u0435\u043d\u0430, \u0434\u0435\u0442\u0438 \u0438 \u0441\u043e\u0431\u0430\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u043a\u0443\u0441\u0430\u0442\u044c \u0434\u0438\u0432\u0430\u043d.<\/em><\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043c \u043f\u043b\u044e\u0441\u043e\u043c ddrescue \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0431\u0430\u0440\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u043e\u0441\u0442\u044b\u043b\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0443\u0445\u0438\u0449\u0440\u0435\u043d\u0438\u044f \u043d\u0430\u0432\u0440\u043e\u0434\u0435 pv \u0438 \u0432\u0441\u044f\u043a\u0438\u0445 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0445 \u0444\u043b\u0430\u0436\u043a\u043e\u0432 dd. \u0422\u0430\u043a\u0436\u0435 ddrescure \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435; \u0435\u0449\u0435 \u043d\u0430 \u0432\u0438\u043a\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0447\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0441\u0432\u0435\u0440\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0434\u043b\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u044d\u0442\u043e \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043b\u044e\u0434\u044f\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u044e\u0431\u044f\u0442 \u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445, \u043c\u044b \u0436\u0435 \u043d\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0434\u0430?<\/p>\n<p><a href=\"https:\/\/ru.wikipedia.org\/wiki\/Ddrescue\" target=\"_blank\" rel=\"noopener\">https:\/\/ru.wikipedia.org\/wiki\/Ddrescue<\/a><br \/>\n<a href=\"https:\/\/www.gnu.org\/software\/ddrescue\/ddrescue_ru.html\">https:\/\/www.gnu.org\/software\/ddrescue\/ddrescue_ru.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What to do if you get an input\/output error when copying a normal disk using dd in Linux? The situation is very sad, but solvable. Most likely, you are dealing with a failed disk containing bad blocks that are no longer usable, writeable, or readable. Be sure to check such a disk using S.M.A.R.T., most<a class=\"more-link\" href=\"https:\/\/demensdeum.com\/blog\/2024\/05\/28\/dd-input-output-error\/\">Continue reading <span class=\"screen-reader-text\">&#8220;dd input\/output error&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[61],"tags":[220,221,222],"class_list":["post-3516","post","type-post","status-publish","format-standard","hentry","category-techie","tag-dd","tag-ddrescue","tag-linux","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"en","enabled_languages":["en","ru","zh","de","fr","ja","pt"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"ru":{"title":true,"content":true,"excerpt":false},"zh":{"title":true,"content":true,"excerpt":false},"de":{"title":true,"content":true,"excerpt":false},"fr":{"title":true,"content":true,"excerpt":false},"ja":{"title":true,"content":true,"excerpt":false},"pt":{"title":true,"content":true,"excerpt":false}}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/posts\/3516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/comments?post=3516"}],"version-history":[{"count":6,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/posts\/3516\/revisions"}],"predecessor-version":[{"id":3868,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/posts\/3516\/revisions\/3868"}],"wp:attachment":[{"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/media?parent=3516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/categories?post=3516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/wp-json\/wp\/v2\/tags?post=3516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}