<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Grub on bramp.net</title>
    <link>https://blog.bramp.net/</link>
    <description>Recent content in Grub on bramp.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-GB</language>
    <lastBuildDate>Thu, 10 Sep 2009 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.bramp.net/tags/grub/" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Grub2 and Windows</title>
      <link>https://blog.bramp.net/post/2009/09/10/grub2-and-windows/</link>
      <pubDate>Thu, 10 Sep 2009 00:00:00 +0000</pubDate>
      
      <guid>https://blog.bramp.net/post/2009/09/10/grub2-and-windows/</guid>
      <description><p>I’ve just installed grub2 on my Debian laptop, and I wanted to write a quick note on how to get dual booting working. Grub2 seems to have a far more complex configuration system than grub, this may be a good or a bad thing. One feature of this is a /etc/grub.d directory which contains a set of scripts to configure what items should be listed on the boot menu.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ ls /etc/grub.d/
</span></span><span class="line"><span class="cl">00_header  05_debian_theme  10_linux  30_os-prober  40_custom  README
</span></span></code></pre></div><p>The scripts get run in order, each adding features to the boot menu. To dual boot Windows you can acheive this in two ways.</p>
<ol>
<li>Write a script which manual adds windows</li>
<li>Use the os-prober script.</li>
</ol>
<p>I opted for option 2 since it seemed the easiest. However, this os-prober script does not work unless the package os-prober is installed. So:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo apt-get install os-prober
</span></span></code></pre></div><p>Once that is installed you can reconfigure grub by doing:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">$ sudo update-grub2
</span></span><span class="line"><span class="cl">Generating grub.cfg ...
</span></span><span class="line"><span class="cl">Found Debian background: moreblue-orbit-grub.png
</span></span><span class="line"><span class="cl">Found linux image: /boot/vmlinuz-2.6.30-1-amd64
</span></span><span class="line"><span class="cl">Found initrd image: /boot/initrd.img-2.6.30-1-amd64
</span></span><span class="line"><span class="cl">Found Microsoft Windows XP Professional on /dev/sda1
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span></code></pre></div><p>When you reboot you should now have Windows on your boot menu.</p>
</description>
    </item>
    
  </channel>
</rss>
