How to boot two Windows Vista with one Grub without installing a Linux


Results 1 to 8 of 8

Thread: How to boot two Windows Vista with one Grub without installing a Linux

Hybrid View

  1. #1
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978

    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
    Last edited by saikee; 10-23-2006 at 11:20 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  2. #2
    Join Date
    Jan 2003
    Location
    Zurich, Switzerland
    Posts
    2,657
    Quote Originally Posted by saikee
    I chose different wall papers to distinguish the two Vistas.
    I bet this was the hardest part. Thank you for this great howto.

    "What can be said at all can be said clearly, and what we cannot talk about we must pass over in silence."

    Tractatus Logico-Philosophicus by Ludwig Wittgenstein (1889-1951)

  3. #3
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    I just got Vista for the first time and was testing it to see if Grub could boot it same as every other MS system.

    Some time ago I made a statement saying Grub can boot ancient PC systems before Grub was invented and also new systems that have not yet been invented.

    I guess Vista belonging to the latter.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  4. #4
    Join Date
    Aug 2001
    Location
    Somewhere, Texas
    Posts
    9,627
    Quote Originally Posted by saikee
    Some time ago I made a statement saying Grub can boot ancient PC systems before Grub was invented and also new systems that have not yet been invented.
    It was Grub that booted human evolution!

  5. #5
    Join Date
    Jan 2003
    Location
    Zurich, Switzerland
    Posts
    2,657
    Quote Originally Posted by Icarus
    It was Grub that booted human evolution!
    If there is a way to install a bootloader and a better OS into my brain, please let me know.

    "What can be said at all can be said clearly, and what we cannot talk about we must pass over in silence."

    Tractatus Logico-Philosophicus by Ludwig Wittgenstein (1889-1951)

  6. #6
    Join Date
    Sep 2009
    Location
    Toronto
    Posts
    24
    Hi Saikee
    Great tutorial... I have a question though... If I wanted to put GRUB in the MBR (I don't like MS bootloader in the MBR), I would change your command:

    grub
    root (hd0,2)
    setup (hd0,2)

    TO

    grub
    root (hd0,2)
    setup (hd0)

    And then, using the same menu.lst entries, I could boot up either of the two vistas? Will this work? Could you confirm please.
    And using your method of hiding the current Windows partition before installing the next Windows OS, I could install Windows 7 as well right?
    Last edited by crazy4nix; 06-06-2010 at 12:17 AM.

  7. #7
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    The answer is yes! My post is to use the absolute minimum of Grub (and no Linux) to show its ability.

    I have not tried the multiple copies of Win7 but I am aware of the latest bootmgr does carry out a check on every partition.

    If you are using a single copy of Vista and Win7 then this thread may be of interest to you as I put Grub in a Dos Partition to booting Dos, Win2k, Xp, Vista, Win7 and all other Linux.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  8. #8
    Join Date
    Sep 2009
    Location
    Toronto
    Posts
    24
    Thank you. The thread you referred to here is exactly what I am looking for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •