{"id":969,"date":"2014-04-14T21:43:11","date_gmt":"2014-04-14T21:43:11","guid":{"rendered":"http:\/\/scunster.co.uk\/?p=969"},"modified":"2014-04-14T21:43:32","modified_gmt":"2014-04-14T21:43:32","slug":"fix-grub2-after-installing-another-os-linux-distribution-or-after-a-grub-failure","status":"publish","type":"post","link":"https:\/\/scunster.co.uk\/?p=969","title":{"rendered":"Fix GRUB2 (after installing another OS \/ Linux distribution or after a GRUB failure)"},"content":{"rendered":"<p>To fix GRUB 2, you need an Ubuntu live CD from which you need to boot. Once you boot to the LIVE CD, open a terminal an and type these commands:<\/p>\n<p>Firstly, you need to find out on which partition your Linux system is installed:<\/p>\n<pre>sudo fdisk -l<\/pre>\n<p>Now, we must mount this partition:<\/p>\n<pre>sudo mount \/dev\/sda1 \/mnt<\/pre>\n<p>Where &#8220;sda1&#8221; is the partition where you installed Ubuntu (or any other Linux distro). It could be &#8220;sda5&#8221;, &#8220;sda6&#8221;, etc. for you.<\/p>\n<p>Install grub to the partition you&#8217;ve mounted:<\/p>\n<pre>sudo grub-install --root-directory=\/mnt\/ \/dev\/sda<\/pre>\n<p>Important: Please notice that it&#8217;s &#8220;\/dev\/sda&#8221;, not &#8220;\/dev\/sda1&#8221;. &#8220;sda&#8221; is the hard disk on which your Linux distribution is installed!<\/p>\n<p>Restart your computer. As previous Grub 2 entries are removed, run the following command to restore them:<\/p>\n<pre>sudo update-grub<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To fix GRUB 2, you need an Ubuntu live CD from which you need to boot. Once you boot to the LIVE CD, open a terminal an and type these commands: Firstly, you need to find out on which partition your Linux system is installed: sudo fdisk -l Now, we must mount this partition: sudo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[164,3,186,131,12],"tags":[],"class_list":["post-969","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-slitaz","category-ubuntu-linux","category-webhosting"],"_links":{"self":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=969"}],"version-history":[{"count":3,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/969\/revisions"}],"predecessor-version":[{"id":989,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/969\/revisions\/989"}],"wp:attachment":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}