{"id":184,"date":"2010-08-30T15:06:29","date_gmt":"2010-08-30T20:06:29","guid":{"rendered":"http:\/\/www.compdigitec.com\/labs\/?p=184"},"modified":"2010-08-30T15:06:29","modified_gmt":"2010-08-30T20:06:29","slug":"solving-the-infinite-grub-loop-grub-grub-grub-grub-grub-problem","status":"publish","type":"post","link":"http:\/\/www.compdigitec.com\/labs\/2010\/08\/30\/solving-the-infinite-grub-loop-grub-grub-grub-grub-grub-problem\/","title":{"rendered":"Solving the infinite GRUB loop (GRUB GRUB GRUB GRUB GRUB) problem"},"content":{"rendered":"<p>Sometimes, especially after changes to the hard drive or changes to partitioning, you will find that your Linux computer would no longer boot, but instead fill the screen up with GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB, etc infinitely without giving the boot menu, and the only way to exit out would have been to press Ctrl-Alt-Delete and reset the machine.<\/p>\n<p>Apparently the problem is caused when GRUB tries to load the next stage of the bootloader, but <a href=\"http:\/\/www.trilithium.com\/johan\/2005\/06\/grub-grub-grub\/\">fails to load it<\/a> and instead hangs in an infinite loop because it can&#8217;t read out of the next stage. However in our case the BIOS settings were perfectly fine and there was nothing wrong with that. It turns out that the actual problem lying below the infinite loop was that the GRUB bootloader was <strong>corrupted<\/strong> and had to be reinstalled.<\/p>\n<p><strong>Prerequisites<\/strong><\/p>\n<ul>\n<li>Floppy drive &amp; real 3.5 inch floppy<\/li>\n<li><a href=\"\/labs\/files\/bootgrub.img\">Download<\/a> the <a href=\"http:\/\/cstein.kings.cam.ac.uk\/~chris\/bootgrub.html\">grub boot floppy <\/a>(1.44 MB)<\/li>\n<li>Write the floppy image to a real floppy, if you are on Linux you can simply <strong>dd if=bootgrub.img of=\/dev\/fd0<\/strong> whereas if you are on windows you can use something like <a href=\"http:\/\/www.chrysocome.net\/rawwrite\">rawrite<\/a> to write out the image.<\/li>\n<\/ul>\n<p><strong>Steps<\/strong><\/p>\n<ol>\n<li>Boot your computer from floppy.<\/li>\n<li>Once the floppy has fully loaded with the menu, press &#8220;c&#8221; on your keyboard to enter the command prompt.<\/li>\n<li>Type in the following commands:\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">find \/boot\/grub\/stage1<\/pre>\n<p>Skip the (fd0) entry that it produces and note down the one that matches your \/boot partition. If it does not find it, then note down your \/boot partition in the form of (hdx,y) where x is the hard disk number and y is the partition number. For example, (hd0,0) is equivalent to \/dev\/sda1 in Linux.<\/li>\n<li>Type in the following:\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">root (hd&lt;strong&gt;x&lt;\/strong&gt;, &lt;strong&gt;y&lt;\/strong&gt;)<\/pre>\n<p>where thew (hdx,y) is the location of \/boot (from above command).<\/li>\n<li>Set up grub and reboot:\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">setup (hd0)\r\nreboot<\/pre>\n<p>If you wish to install grub to different drive, you can do so by changing hd0 to hd + your hd number.<\/li>\n<li>Remove floppy.<\/li>\n<\/ol>\n<p><strong>Errors<\/strong><\/p>\n<p>If you receive &#8220;Read Error&#8221; while starting the floppy you should double check your floppy and floppy drive for errors.<\/p>","protected":false},"excerpt":{"rendered":"<p>Sometimes, especially after changes to the hard drive or changes to partitioning, you will find that your Linux computer would no longer boot, but instead fill the screen up with GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB, etc infinitely without giving the boot menu, and the only way to exit out would have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[76,717,714,713,716,715,712],"_links":{"self":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts\/184"}],"collection":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":0,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.compdigitec.com\/labs\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}