{"id":143,"date":"2014-02-04T22:17:53","date_gmt":"2014-02-04T22:17:53","guid":{"rendered":"http:\/\/nofl.biz\/blog\/?p=143"},"modified":"2014-02-04T22:17:53","modified_gmt":"2014-02-04T22:17:53","slug":"fix-a-non-booting-linux-disk","status":"publish","type":"post","link":"https:\/\/beneford.com\/Blog\/index.php\/2014\/02\/04\/fix-a-non-booting-linux-disk\/","title":{"rendered":"Fix a non-booting Linux disk"},"content":{"rendered":"<p>If you boot from a Linux CD, you can switch to your non-booting disk as follows:<\/p>\n<p>1. Find the device that is your non-booting disk.<br \/>\nThis could be \/dev\/sda, \/dev\/sdb etc. (Disks presented as SCSI)<br \/>\nThis could be \/dev\/hda, \/dev\/hdb etc. (Disks presented old-style HDs)<br \/>\nOr even \/dev\/vda etc. (Disks in virtual systems)<br \/>\n2. Mount it, and then remound \/dev, \/proc, and \/sys onto the non-booting disk<\/p>\n<pre>mount \/dev\/sda2 \/mnt\nmount --rbind \/dev \/mnt\/dev\nmount --rbind \/sys \/mnt\/sys\nmount --rbind \/proc \/mnt\/proc<\/pre>\n<p>3. Set your non-booting disk to root<\/p>\n<pre>chroot \/mnt<\/pre>\n<p>Now you can run your normal commands to fix your boot<\/p>\n<pre>grub2-install \/dev\/sda # restore grub\n# Note: you may need to update the Disk UUID in \/boot\/grub2\/grub2.cfg\n# to the value returned by blkid \/dev\/sda2<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you boot from a Linux CD, you can switch to your non-booting disk as follows: 1. Find the device that is your non-booting disk. This could be \/dev\/sda, \/dev\/sdb etc. (Disks presented as SCSI) This could be \/dev\/hda, \/dev\/hdb etc. (Disks presented old-style HDs) Or even \/dev\/vda etc. (Disks in virtual systems) 2. Mount [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-143","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/posts\/143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":0,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/posts\/143\/revisions"}],"wp:attachment":[{"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/categories?post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beneford.com\/Blog\/index.php\/wp-json\/wp\/v2\/tags?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}