{"id":5456,"date":"2019-07-17T09:39:06","date_gmt":"2019-07-17T14:39:06","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=5456"},"modified":"2019-07-17T15:36:04","modified_gmt":"2019-07-17T20:36:04","slug":"using-grub-rescue-to-boot-machine-and-repair-mbr","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=5456","title":{"rendered":"Using grub rescue to boot machine and repair MBR"},"content":{"rendered":"<p>Using grub rescue to boot machine and repair MBR<\/p>\n<p>Use &#8220;ls&#8221; to find your partition list:<br \/>\nls<br \/>\n(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)<\/p>\n<p>Check the content of each to find your Linux partition:<br \/>\nls (hd0,msdos3)\/<br \/>\nls (hd0,msdos2)\/<br \/>\nls (hd0,msdos1)\/<\/p>\n<p>You want the one with the \/boot folder. In our case, this is (hd0,msdos3). The following commands will boot your Linux OS.<\/p>\n<p>set prefix=(hd0,msdos3)\/boot\/grub2<br \/>\nset root=(hd0,msdos3)<br \/>\ninsmod normal<br \/>\nnormal<\/p>\n<p>&lt;root password for maintenance&gt;<\/p>\n<p>Use &#8220;df&#8221; or &#8220;mount&#8221; to figure out which disk holds the Linux partition. In our case, it is \/dev\/sdb. You don&#8217;t want the <em>partition <\/em>(e.g. \/dev\/sdb2) but the disk. The following commands install the grub2 bootloader and build a config file.<\/p>\n<p>grub2-install \/dev\/sdb<br \/>\ngrub2-mkconfig -o \/boot\/grub2\/grub.cfg<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using grub rescue to boot machine and repair MBR Use &#8220;ls&#8221; to find your partition list: ls (hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) Check the content of each to find your Linux partition: ls (hd0,msdos3)\/ ls (hd0,msdos2)\/ ls (hd0,msdos1)\/ You want the one with the \/boot folder. In our case, this is (hd0,msdos3). The following commands will &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[47,800,294],"class_list":["post-5456","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-fedora","tag-grub2","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5456"}],"version-history":[{"count":5,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5456\/revisions"}],"predecessor-version":[{"id":5464,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5456\/revisions\/5464"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}