Tuesday, 30 April 2019

grub - Triple booting Windows 8 Consumer Preview with Windows 7 and Ubuntu 11.10


I already have Windows 7 and Ubuntu 11.10 installed on my laptop, and would like to add Windows 8 Consumer Preview to that list. Here's some information which may be relevant to this question:



  • The laptop only has one hard drive.

  • The hard drive has plenty of space to accommodate all 3 OSes

  • The GRUB menu currently controls which OS boots up.

  • When I originally decided to dual boot, I already had Windows 7 installed and I re-partitioned my hard drive and installed Ubuntu on the new partition.


What would be the correct way to install Windows 8 without screwing up Windows 7 and Ubuntu?



Answer



Windows 8 has a new bootloader that's a bit different than what you may have seen before, and after installing, it will give you the option to boot Windows 7 or 8 but not Ubuntu.
I don't know of any way to stop Windows 8 from installing that bootloader, so you have to install Windows 8 to whichever partition you set aside for it, then boot up any linux live environment and reinstall Grub to your first partition (Which is either 7 or ubuntu, depending).


Once you boot up in the linux environment, browse to your existing /boot/grub/menu.lst file -- it should show entries for ubuntu and windows 7. If you have changed the partition order installing Windows 8 (e.g. changed the partition number where ubuntu resides) you need to update the line root(hd0,0) accordingly, where the first number is the harddrive number (0 if you only have one) and the second is the partition number -1 (sda1 = 0, sda2 = 1, etc...)


You can create a third entry for Windows 8 in exactly the same way as windows 7, changing only the rootnoverify line to apply to the appropriate partition where Windows 8 is installed.


Once that's all set, go ahead and reinstall grub to your primary partition by opening up a terminal as root and running


grub

then at the grub console type


setup (hd0)

my grub config for this looks like this:


    # (0) Arch Linux
title Arch Linux
root (hd0,2)
kernel /vmlinuz-linux root=/dev/sda3 ro
initrd /initramfs-linux.img

# (1) Windows 7
title Windows 7
rootnoverify (hd0,0)
chainloader +1

# (2) Windows 8
title Windows 8
rootnoverify (hd0,1)
chainloader +1

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...