Booting Windows 8 from Grub on Linux

Hello,

A while ago when reinstalling my computer on my new SSD RAID setup I wanted to make Linux my primary system and use Grub as my boot loader instead of the hideous Windows loader. Here is how I’m booting Windows 8 from my Grub:

/etc/grub.d/40_custom

menuentry "Windows 8 Loader" {
    insmod part_msdos
    insmod ntfs
    insmod ntldr
    set root='(hd0,msdos1)'
    ntldr /bootmgr
  }

The file would like something like this, in whole.

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Windows 8 Loader" {
    insmod part_msdos
    insmod ntfs
    insmod ntldr
    set root='(hd0,msdos1)'
    ntldr /bootmgr
  }

What you want to do is changed hd0 to the drive you want to boot from (the Windows partition that your bootmgr file is on). When you have made your changes run update-grub as root.

sudo update-grub

You should see that the config above was applied in the /boot/grub/grub.cfg file. You should as a good practice never edit directly in the grub.cfg config file.

cat /boot/grub/grub.cfg | grep custom -A 10
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Windows 8 Loader" {
    insmod part_msdos
    insmod ntfs
    insmod ntldr
    set root='(hd0,msdos1)'
    ntldr /bootmgr
  }
### END /etc/grub.d/40_custom ###

I hope this helps 🙂
/Trigger

0 Comments

Leave a Reply

Your email address will not be published.