How to boot two Windows Vista with one Grub without installing a Linux
Pretty wacky isn't it?
Just a demonstration to show how easy Grub can do such thing when Vista can’t do it itself.
I started with a Live CD, a Kanotix 64bit, to create 3 partitions of hda1, hda2 and hda3 of size 25Gb, 25Gb and 1Gb in NTFS, NTFS and Fat32 in a spare hard disk. Partition type for NTFS is 7 and for Fat32 it is type c. Since a Dos partition is involved I needed to reboot and then formatted only the hda3 Fat32 partition. I marked hda1 as bootable.
I then installed the 1st copy of Vista in hda1 and had it in working order first.
I then booted up a Live CD again and use its cfdisk program to mark hda1 hidden. Its partition type 7 changed to 17. By making hda2 bootable the active flag jumped from hda1 to hda2.
I could then install the second copy of Vista in hda2 and have it working. I chose different wall papers to distinguish the two Vistas.
Lastly I booted up the Live CD, create /mnt/hda3 to mounted hda3. I found Grub’s the stage1 file from the Live CD by
Code:
find / -name stage1
which locates in /KOPPIX/lib/grub/x86_64-pc subdirectory. I made a /boot/grub subdirectory in /mnt/hda3 and copies all the Grub files in /KOPPIX/lib/grub/x86_64-pc to /mnt/hda3/boot/grub. Strictly speaking only stage1, stage1.5 and stage2 are needed. The last command was to invoke Grub to set itself up in hda3 by commands
Code:
grub
root (hd0,2)
setup (hd0,2)
Grub is now inside the boot sector of the partition of hda3.
To make Grub booting the two Vistas I created a menu.lst in /boot/grub subdirectory in hda3 as that is where Grub will search for a booting menu. My boot menu looks like this
Code:
title 1st Vista in hda1
root (hd0,0)
makeactive
unhide (hd0,0)
chainloader +1
title 2st Vista in hda2
root (hd0,1)
makeactive
unhide (hd0,1)
hide (hd0,0)
chainloader +1
When I reboot the 2nd copy of Vista is active and so the M$’s own MBR boots it.
I don’t need to unhide hda2 when booting hda1 because hda2 will become “D” drive. Booting hda2 however I must hide hda1 as it can rob the “C” drive status from hda2.
Inside Vista I can click “start” and then right click “computer”, then click “manage”, then “storage” to activate the “disk Management” program. As hda1, hda2 and hda3 are all partitions supported by M$ and they all shown up there.
To give control to Grub I right click hda3 to select it to be “active”.
On a reboot the M$’s MBR has no choice but to boot hda3 because it is active and Grub is loaded with a screen listing the two Vistas available for booting.
The above scheme works well except to activate Grub I must in Vista to transfer the active flag to hda3 every time.
Points noteworthy:-
(1) Grub is inside hda3 unattached to any operating system.
(2) Grub is booted by the Vista’s MBR!
(3) Vista can't boot another copy of its own self.
(4) There is no operational Linux in the PC.
(5) Grub operates without the need to access the MBR