{"id":311,"date":"2019-11-11T22:45:06","date_gmt":"2019-11-11T22:45:06","guid":{"rendered":"https:\/\/trulyone.net\/blog\/?p=311"},"modified":"2019-11-11T22:45:06","modified_gmt":"2019-11-11T22:45:06","slug":"debian-installer-fails-to-install-grub-solved","status":"publish","type":"post","link":"https:\/\/www.trulyone.net\/blog\/computers\/debian-installer-fails-to-install-grub-solved\/","title":{"rendered":"Debian installer fails to install GRUB: solved"},"content":{"rendered":"\n<p>I recently installed the latest version of Debian on my laptop. I always do this when a new version comes out rather than upgrade, I prefer a fresh install which gives a sort of spring clean to my system. Unfortunately one of the final steps, installing the bootloader, failed. The error message was:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Unable to install GRUB in dummy. \nExecuting 'grub-install dummy' failed. \nThis is a fatal error.<\/pre>\n\n\n\n<p>You can&#8217;t exactly have a productive system if it won&#8217;t boot so how do we get around this little conundrum?<\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\">Finishing the installation<\/h3>\n\n\n\n<p>First of all, I didn&#8217;t bother to try and solve the problem with the Debian installer, instead I booted the system by alternate means and then configured the bootloader from within the running system. I don&#8217;t know why it failed, but a quick google suggests I am not the only one. If you have set up everything else correctly during installation then hopefully this solution will allow you to get the system up and running.<\/p>\n\n\n\n<p>After the error occurs hit continue until you get back to the Debian installer main menu and select <em>Continue without boot loader<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/trulyone.net\/blog\/debian-installer_main-menu_0\/\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/debian-installer_main-menu_0.png\" alt=\"Debian installer main menu\" class=\"wp-image-303\" srcset=\"https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/debian-installer_main-menu_0.png 800w, https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/debian-installer_main-menu_0-300x225.png 300w, https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/debian-installer_main-menu_0-768x576.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption>Continuing the installation without bootloader after grub installation failed.<\/figcaption><\/figure>\n\n\n\n<p>You&#8217;ll be presented with this useful screen telling you that there is no boot loader:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/nobootloader_confirmation_common_1.png\" alt=\"Continue without boot loader\" class=\"wp-image-308\" srcset=\"https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/nobootloader_confirmation_common_1.png 800w, https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/nobootloader_confirmation_common_1-300x225.png 300w, https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/nobootloader_confirmation_common_1-768x576.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption>Continue without boot loader<\/figcaption><\/figure>\n\n\n\n<p>This is what we expected because the previous step had failed. Continue until you are back to the installer main menu and select <em>Finish the installation.<\/em> Ensure the installation media is still attached. Even though it&#8217;s 2019 I had actually burnt a CD as believe it or not I didn&#8217;t even have a USB stick handy which shows that even these are getting obsolete these days. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Booting from the GRUB command line<\/h3>\n\n\n\n<p>When the installer boots up again ignore the options and hit <em>c<\/em> for GRUB command line. You can now list all the partitions on the system by typing <em>ls.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/20191001T012743-696_v2-1024x576.jpeg\" alt=\"booting from grub command line\" class=\"wp-image-310\" srcset=\"https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/20191001T012743-696_v2-1024x576.jpeg 1024w, https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/20191001T012743-696_v2-300x169.jpeg 300w, https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/20191001T012743-696_v2-768x432.jpeg 768w, https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/20191001T012743-696_v2-1536x864.jpeg 1536w, https:\/\/www.trulyone.net\/blog\/wp-content\/uploads\/2019\/11\/20191001T012743-696_v2.jpeg 2000w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><figcaption>booting from grub command line<\/figcaption><\/figure>\n\n\n\n<p> You can this list the contents of each partition by typing:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ls (partition name)\/<\/pre>\n\n\n\n<p>Check the contents of the various partitions until you find the one with the<em> vmlinuz-&#8230; <\/em>kernel. When you find the right one you can boot this kernel directly from the grub command line by specifying the kernel, initrd and the root partition. For example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">set root=(hd1,gpt2)\nlinux \/vmlinuz=4.19.0.6-amd64 root=\/dev\/mapper\/vg-root quiet\ninitrd \/initrd.img.4.19.0.6-amd64\nboot<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Making the system bootable<\/h3>\n\n\n\n<p>If the rest of the installation had gone ok then this should boot into the new system. Of course you don&#8217;t want to have to use the installation CD everytime you want to boot your system so we now need to install grub where the installer failed. This is fairly straight forward. Once you have logged in type the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install --reinstall grub-efi\nsudo grub-install \/dev\/sdb\nsudo update-grub\nsudo reboot<\/pre>\n\n\n\n<p>If it all goes without a hitch then the boot loader will install and configure itself in the correct boot partition. I didn&#8217;t have to do any further configuration as this was all done by the Debian installer. The only step that failed during installation was the boot loader. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>This is an overview of how to solve this particular problem. I have assumed that everything else was correctly configured during the first part of the installation. If any of this has failed or does not make sense then have a look at your particular boot setup. Is it UEFI? Have you a separate EFI partition? Is it secure boot? If you are still stuck then <a href=\"mailto:phil@trulyone.net\">get in touch<\/a> and maybe I can help. Finally, if you have any questions or anything to add please leave a comment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently installed the latest version of Debian on my laptop. I always do this when a new version comes out rather than upgrade, I prefer a fresh install which gives a sort of spring clean to my system. Unfortunately one of the final steps, installing the bootloader, failed. The error message was: Unable to &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trulyone.net\/blog\/computers\/debian-installer-fails-to-install-grub-solved\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Debian installer fails to install GRUB: solved&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":305,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,16],"tags":[31,33,43,69],"class_list":["post-311","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computers","category-sysadmin","tag-computers","tag-debian","tag-grub","tag-solution"],"_links":{"self":[{"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":0,"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/media\/305"}],"wp:attachment":[{"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trulyone.net\/blog\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}