{"id":29,"date":"2010-01-02T02:48:12","date_gmt":"2010-01-01T19:48:12","guid":{"rendered":"http:\/\/www.jfdesignnet.com\/?p=29"},"modified":"2010-01-02T02:48:12","modified_gmt":"2010-01-01T19:48:12","slug":"restoring-missing-grub","status":"publish","type":"post","link":"https:\/\/www.jfdesignnet.com\/?p=29","title":{"rendered":"Restoring missing grub"},"content":{"rendered":"<p>Did you ever lost your grub bootloader after installing winblows on a dual boot system ? I bet you do \ud83d\ude00 , since winblows always re writing the MBR of the harddisk at the end of installation, then the grub bootloader will always lost after winblows installation. In KLIXs since 2007 version till now I always include the utility named as &#8220;redo-mbr&#8221; as a part of basic tool utility on each KLIXs release, to help user restoring the grub bootloader. The &#8220;redo-mbr&#8221; utility is using shell script and zenity \/ kdialog as the UI, it was easy to use just point and click, there are no point to explain. Rather than explaining how to use that redo-mbr, I will explain now how to restore the grub back using grub itself from konsole.<\/p>\n<p><strong>Here is the steps :<\/strong><\/p>\n<p>At konsole screen logon as root and enter the grub utility :<\/p>\n<blockquote><p>GNU GRUB\u00a0 version 0.97\u00a0 (640K lower \/ 3072K upper memory)<\/p>\n<p>[ Minimal BASH-like line editing is supported.\u00a0 For the first word, TAB<br \/>\nlists possible command completions.\u00a0 Anywhere else TAB lists the possible<br \/>\ncompletions of a device\/filename. ]<\/p>\n<p>grub&gt;<\/p><\/blockquote>\n<p>then try to find the menu.lst along the available harddisk, you should see something like this :<\/p>\n<blockquote><p>grub&gt; find \/boot\/grub\/menu.lst<br \/>\n(hd0,0)<br \/>\n(hd1,0)<\/p><\/blockquote>\n<p>To make sure you point the &#8220;right&#8221; harddisk to restore the grub bootloader, do this command to see the partition on target :<\/p>\n<blockquote><p>grub&gt; geometry (hd1)<br \/>\ndrive 0x81: C\/H\/S = 30401\/255\/63, The number of sectors = 488395055, \/dev\/sdb<br \/>\nPartition num: 0,\u00a0 Filesystem type is ext2fs, partition type 0x83<br \/>\nPartition num: 1,\u00a0 Filesystem type unknown, partition type 0x82<br \/>\nPartition num: 2,\u00a0 Filesystem type is ext2fs, partition type 0x83<\/p><\/blockquote>\n<p>Yep, I grab the right harddisk partition to restore, so now I must select it :<\/p>\n<blockquote><p>grub&gt; root (hd1,0)<br \/>\nFilesystem type is ext2fs, partition type 0x83<\/p><\/blockquote>\n<p>Now I grab the first partition on my second harddisk and ready to restore the grub on that partition. Now restore the grub with this command :<\/p>\n<blockquote><p>grub&gt; setup (hd1,0)<br \/>\nChecking if &#8220;\/boot\/grub\/stage1&#8221; exists&#8230; yes<br \/>\nChecking if &#8220;\/boot\/grub\/stage2&#8221; exists&#8230; yes<br \/>\nChecking if &#8220;\/boot\/grub\/e2fs_stage1_5&#8221; exists&#8230; yes<br \/>\nRunning &#8220;embed \/boot\/grub\/e2fs_stage1_5 (hd1,0)&#8221;&#8230; failed (this is not fatal)<br \/>\nRunning &#8220;embed \/boot\/grub\/e2fs_stage1_5 (hd1,0)&#8221;&#8230; failed (this is not fatal)<br \/>\nRunning &#8220;install \/boot\/grub\/stage1 (hd1,0) \/boot\/grub\/stage2 p \/boot\/grub\/menu<br \/>\n.lst &#8220;&#8230; succeeded<br \/>\nDone.<\/p>\n<p>grub&gt;<\/p><\/blockquote>\n<p>Succeed, and now reboot to see the fruit of my labour.<\/p>\n<h3>More Information<\/h3>\n<p>At this point you should be fully ready to head off into restoring your grub bootloader. However, it should be noted that this is just the tip of the iceberg. What we&#8217;ve now constructed is a &#8220;Trivial Steps&#8221;, and a rather bare-bones one at that. While more than adequate for most usages, some users will have more complicated requirements and conditions. For these users I may refer the following resources:<\/p>\n<ol>\n<li>The grub manual &#8211;&gt; type <strong>man grub<\/strong> on konsole<\/li>\n<li>http:\/\/www.gnu.org\/software\/grub\/manual\/grub.html<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Did you ever lost your grub bootloader after installing winblows on a dual boot system ? I bet you do \ud83d\ude00 , since winblows always re writing the MBR of the harddisk at the end of installation, then the grub bootloader will always lost after winblows installation. In KLIXs since 2007 version till now I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts\/29"}],"collection":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29"}],"version-history":[{"count":0,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=\/wp\/v2\/posts\/29\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jfdesignnet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}