{"id":798,"date":"2023-11-04T23:57:00","date_gmt":"2023-11-04T22:57:00","guid":{"rendered":"https:\/\/patrick-nagel.net\/blog\/?p=798"},"modified":"2023-11-04T23:57:00","modified_gmt":"2023-11-04T22:57:00","slug":"windows-installation-broke-grub-easy-fix","status":"publish","type":"post","link":"https:\/\/patrick-nagel.net\/blog\/archives\/798","title":{"rendered":"Windows installation broke grub &#8211; easy fix"},"content":{"rendered":"\n<p>Quick post, mainly for my future self&#8230;<\/p>\n\n\n\n<p>Today I had to reinstall Windows. Because that&#8217;s what you apparently have to do with Windows, even if you barely ever use it. As always after a Windows installation, afterwards the machine directly booted into Windows. No sign of my usual grub boot menu.<\/p>\n\n\n\n<p>So I downloaded <a href=\"http:\/\/grml.org\" data-type=\"link\" data-id=\"grml.org\">grml<\/a>, wrote it to a USB thumb drive and booted from it by selecting the device in the BIOS (or whatever the mainboard firmware is called nowadays). After some struggling with <code>grub-install<\/code>, I found out that in the age of EFI, there is a much simpler way to get things in order again: <code>efibootmgr<\/code> to the rescue!<\/p>\n\n\n\n<p>Directly after the Windows re-installation, its output looked (roughly) like that:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># efibootmgr\nBootCurrent: 0002\nTimeout: 5 seconds\nBootOrder: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-bright-red-color\">0000<\/mark>,<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-bright-blue-color\">0003<\/mark>,0001,0002,0004\nBoot<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-bright-red-color\">0000<\/mark>* Windows Boot Manager\nBoot0001* UEFI:CD\/DVD Drive\nBoot0002* UEFI:Removable Device\nBoot<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-bright-blue-color\">0003<\/mark>* ubuntu\nBoot0004* UEFI:Network Device<\/code><\/pre>\n\n\n\n<p>After a simple <code>efibootmgr --bootorder 0003,0000,0001,0002,0004<\/code> I got this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># efibootmgr\nBootCurrent: 0002\nTimeout: 5 seconds\nBootOrder: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-bright-blue-color\">0003<\/mark>,<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-bright-red-color\">0000<\/mark>,0001,0002,0004\nBoot<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-bright-red-color\">0000<\/mark>* Windows Boot Manager\nBoot0001* UEFI:CD\/DVD Drive\nBoot0002* UEFI:Removable Device\nBoot<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-bright-blue-color\">0003<\/mark>* ubuntu\nBoot0004* UEFI:Network Device<\/code><\/pre>\n\n\n\n<p>And tadaa, once I rebooted grub greeted me (with its Windows entry down the bottom, and the Linux entry pre-selected as it should be).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quick post, mainly for my future self&#8230; Today I had to reinstall Windows. Because that&#8217;s what you apparently have to do with Windows, even if you barely ever use it. As always after a Windows installation, afterwards the machine directly booted into Windows. No sign of my usual grub boot menu. So I downloaded grml, &hellip; <a href=\"https:\/\/patrick-nagel.net\/blog\/archives\/798\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Windows installation broke grub &#8211; easy fix&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-798","post","type-post","status-publish","format-standard","hentry","category-linux-general"],"_links":{"self":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/comments?post=798"}],"version-history":[{"count":1,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/798\/revisions"}],"predecessor-version":[{"id":799,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/798\/revisions\/799"}],"wp:attachment":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/media?parent=798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/categories?post=798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/tags?post=798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}