A Linux way to triple boot itself, XP and Vista


Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: A Linux way to triple boot itself, XP and Vista

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

    A Linux way to triple boot itself, XP and Vista

    When multi-booting different operating systems it would be useful to arrange them in such a way so that they can be easily maintained or requiring the minimum attention. Preferably should one system go down it should not affect the operation of the others. The system in trouble should be independent, isolated and easily rescued.

    The following scheme is designed for such purposes and is simple enough for a newbie to Linux.


    Step 1 - Prepartition a hard disk with 4 partitions

    This should be done with a Linux Live CD using terminal program cfdisk. The commands aare
    Code:
    sudo su
    cfdisk /dev/sda
    Create the following partitions. All partitions created in Linux are automatically Type 83. You need to use the "Type" option to change to another type. Remember you do not have to use up all the hard disk space.

    • sda1 of primary partition type 7 for xp, size 15 to 20Gb or more as required
    • sda2 of primary partition type 7 for Vista, size 15 to 20Gb or more as required
    • sda5 of logical partition type 82 for a swap, size 1Gb (for simplicity)
    • sda6 of logical partition type 83 for Linux, 10 or more as required


    Write the partition table, confirm with "yes", quit cfdisk, reboot and check the partition details with this terminal command
    Code:
    fdisk -l
    .

    In Linux the first logical partition created is always the 5th one. The creation of which will automatically use up a primary partition by converting it into an extended partition. Thus the "fdisk -l" will show up sda3, as an extended partition, even you have not created it and that is the reason I recommend using cfdisk because it teaches you about hard disk partitioning.

    Step 2 - Install XP.

    Tell its installer to use the first partition for installation. Have it working before proceeding to the next step. XP installer will place XP's own boot loader NTLDR inside sda1 or the "C" drive.

    Step 3 - Hide the sda1

    This can be done by a Live CD with Grub. Commands are
    Code:
    sudo su
    grub
    geometry (hd0)
    hide (hd0,0)
    geometry (hd0)
    quit
    Grub counts from 0 so 1st disk is called (hd0) and its first partition is named (hd0,0) which corresponds to the sda1 in Linux and the "C" drive in XP. The "geometry (hd0)" statements before and after the "hide" command are to show the change of the first partition, from type 7 to Type 17, in front of your eyes. MS system does not support partition types not used by the MS so the XP partition, with type 17, is temporarily foreign to MS systems even though not a single byte has been changed in the partition interior.

    Step 4 - Install Vista

    Just a normal installation as its installer will find sda2 and use it as the "C" drive. It will place its own boot loader bootmgr inside the "C" drive (or sda2 this time). Have it working before proceed to the next step. XP is not available temporarily.

    Step 5 - Install Linux of your choice (I assume it is booted by Grub)

    Just a normal installation but make sure the installer uses only the sda6 for the installation. The installer does not needed to be told about the swap as it will use it regardless. Let the boot loader Grub takes over the MBR.

    It is not necessary if it dual-boots Vista/XP or not at the installation stage, just make sure it is operational.

    Step 6 - Amend Grub to triple boot

    Edit Linux's /boot/grub/menu.lst to include these two choices for booting XP and Vista
    Code:
    title                   xp pro @ sda1
    root                    (hd0,0)
    unhide                  (hd0,0)
    hide                    (hd0,1)
    makeactive
    chainloader     +1
    
    title                   Vista  @ sda2
    root                    (hd0,1)
    unhide                  (hd0,1)
    hide                    (hd0,0)
    makeactive
    chainloader     +1
    Save the file and on the next reboot you can fire up any of the three systems.

    --------------------------------------------------------------------------------------------------

    Theory

    You let Grub hide XP when booting Vista.
    When you boot Vista Grub hides XP.
    The booting MS partition is made "active" on-the-fly (not needed by Linux but required by XP & Vista)
    Hiding a ntfs type 7 changes it to type 17 (see observed PC standard for extra details)
    unhiding a type 17 reverts back to type 7
    Not much to it really.

    -------------------------------------------------------------------------------------------------

    The above is my preferred method. The standard method is don't do any hiding. With the above sequence of installation Vista will install its boot loader in sda1 to dual boot XP and itself and there will be no boot loader inside sda2. Therefore in a standard arrangement you do not triple-boot but only dual-boot; Choice (1) To Windows and Choice (2) to Linux. Inside Choice (1) you then select XP or Vista.

    My preferred method does have the disadvatage of each MS system cannot see another. For that you gain the following advantages

    • The order of installation of different systems has no consequence.
    • The scheme is not only suitable for two MS systems it can cope any number of them (I use it to boot 3 Dos and 5 Windows)
    • Each system can be maintained/reinstalled without affecting the others
    • The scheme is suitable for any number of Linux plus any number of non-MS systems like Solaris and BSD.
    • Each system always has its own boot loader and able to survive idependently.
    • Grub can be replaced by Lilo if desired.


    For different operating systems using the same personal data, like photos, Mp3 etc, it is a good practice to put it in a "neutral" partition like in fat32 accessible by all the other systems.
    Last edited by saikee; 11-10-2007 at 07:52 PM.
    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
    Aug 2005
    Posts
    17
    But that way I can't see the drives from one Windows OS when I'm using the other...

    Any suggestion?

  3. #3
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,983
    You can go with the normal installation of two MS Windows. The second one makes use the boot loader of the first one. That way you see two Windows partitions.

    The disadvantage of the normal installation is one broken Windows can lead to both Windows out of action.

    I store personal data in a data-only partition and have no need to use one Windows to access the system files of another. Thus I favour each system to be maintained without affecting the another. The data partition is accessible by all systems.
    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 2005
    Posts
    17
    What if, after following everything from this tutorial I unhide the first partition?

    Since Grub Boot Loader manages the booting, that wouldn't affect the availability of booting each of the three systems, would it (in my case Windows XP x64, Windows XP 32-bit and Ubuntu 64-bit)?

    [edited]
    Last edited by pxumsgdxpcvjm; 01-10-2008 at 10:53 AM.

  5. #5
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,983
    If you have two licenses of XP, one 32-bit and one X64 then you don't need to hide the one that is detected second because it will be automatically mounted as a "D" drive.

    If you boot the 2nd Xp with the 1st detectable XP unhide then the 2nd XP cannot run as a "C" drive and may re-arrange the drive letters or alter your boot loader file, therby making later changes much more difficult.

    Thus hiding the partition is just to suit the way you have installed it. The other benefit is to prevent confusion to XP finding similar system files, not knowing what to do with them and thinking the system may have corruption or under attack.
    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"

  6. #6
    Join Date
    Aug 2005
    Posts
    17
    'If you have two licenses of XP, one 32-bit and one X64 then you don't need to hide the one that is detected second because it will be automatically mounted as a "D" drive.'

    I had already followed your full tutorial before reading that... So, I don't know what to do. With Ubuntu 64, I can see all drives, but in Windows x64 I can't see Windows x32 and in Windows x32 I can't see Windows x64. As for the drive D, It appears, but it's a second physical harddrive and not the other XP partition.

    Maybe I shouldn't mess anymore, 'cause I can access everything under Ubuntu 64-bit...

  7. #7
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,983
    The important point is to understand the reason why.

    You can have the two XP accessing each other at the expense of using the one boot loader and allow it to dual boot the two.

    To isolate one from another, as this thread suggests, each XP has a working NTLDR and should easier to maintain.

    In any case I don't think you can mix the system files of the two XP, but I do not have experience on it, so able to see the partition means very little.

    For multibooting you are better off having a data only partition that you can mount in every system. The operating system should be keep separated from your own work because you don't want your own data to go down with it.

    With Ubuntu you can move the two XP system files around if that is what you after. It is alightly safer that way. Hiding the partition does have the advantage that it can not be tempered with by another system that could inflicit damage to it.
    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
    Jan 2008
    Posts
    1
    I've followed your instructions to the letter, and installed XP without any problems. However, when I then try to install Vista, with the XP partition hidden, I receive an error message about not being able to assign a drive letter to a partition (I don't have the exact error message in front of me at the moment). The Vista installation then stops.

    When I remove the Linux partitions, leaving just two NTFS partitions on the drive with the XP partition hidden, I still get the same error message. Unhiding the XP partition removes the error message...but it then installs the Vista bootloader in the XP partition during the install. Exactly what I don't want...



    UPDATE - I figured it out...sorta. After installing XP, but prior to installing Vista, I flagged the Vista partition as the "boot" partition using GParted. This then allowed the Vista installer to place the Vista boot files in the Vista partition. I left the XP partition unhidden during the Vista install, and no XP files were harmed in the making of the Vista install.

    Thanks for the great guide - I'd been trying to do this for a week before finding it!
    Last edited by jrf2027; 01-16-2008 at 11:42 PM. Reason: Updated after further experimentation

  9. #9
    Join Date
    Aug 2005
    Posts
    17
    I have a problem regarding my triple boot:

    I followed your instructions and installed XP 32, XP x64 and Ubuntu 64 successfully. However, I don't know why, my XP 32 got corrupted and I had to reinstall it. So, I removed the partition with the XP 32 and created another one on its place to make a fresh reinstallationg of XP 32. I installed it correctly, ran it and then I followed the instructions under https://help.ubuntu.com/community/Re...tallingWindows to restore grub loader.

    Now, the triple boot has got issues: when I run Ubuntu 64, there is no problem, but:

    1. when I try running XP 32 I get a black screen with white letters saying NTLDR is missing or corrupted, or something;

    2. when I try running XP 64, I get to another boot menu with two options: XP 32 and XP x64 and XP x64 runs ok while following the alternative, XP 32, I get a blue screen saying there is some kind of problem link missing files or something.

    Could you please help me with these issues?

    Thank you very much.
    [url=http://brainstorm.ubuntu.com/idea/6138/]TrueCrypt - Full Disk Encryption - Documentation Request - please vote - any advancend user can contribute starting a wiki article[/ur

    ---DONT PANIC--- ASK.

  10. #10
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,983
    My prediction is when you installed the 32 bit version of Xp you didn't hide the Xp 64 bit partition. As a direct result the boot noader of the two Xp is now combined together.

    If this is the case you can no longer be able to hide one Xp when booting to the other because the boot loaders would be concentrated in the Xp 64 bit partition.

    You should still be able to boot the 2 Xp but we need the following information

    (1) The listing of the boot.ini in the Xp 64 bit partition.
    (2) Menu.lst of your Ubuntu
    (3) The output of command "sudo fdisk -l"

    The boot.ini is a hidden file in Xp but you can see it with Ubuntu. Linux can see and amend all the hidden files of MS Windows.
    Last edited by saikee; 06-10-2009 at 11:04 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"

  11. #11
    Join Date
    Aug 2005
    Posts
    17
    I've put the information in the txt files saved with Ubuntu's text editor as attachments.

    I have another question... Let's assume I buy in the future Windows 7 32-bits and Windows 7 64-bits and want to triple boot them with Ubuntu 64-bits. What do I need to do if I need to reinstall one of the two Windowses without messing up with the triple boot, just as I did?

    Assuming that I install only one Windows 7 with Ubuntu 64-bits, does the answer change (that is, do I have to be careful with something when reinstalling the Windows to avoid messing up with the dual-boot)?

    Thank you very much for your help!
    Attached Files Attached Files
    [url=http://brainstorm.ubuntu.com/idea/6138/]TrueCrypt - Full Disk Encryption - Documentation Request - please vote - any advancend user can contribute starting a wiki article[/ur

    ---DONT PANIC--- ASK.

  12. #12
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,983
    I am booting 2 Win7 (one 32 bit and another 64 bit), a Vista 64 bit and a Xp myself. MS systems need the first detectable NTFS partition to house all the boot loaders and in my case it is in sda1 where Vista sits. The two boot loaders are bootmgr and NTLDR.

    All Win7 and Vista share the same boot loader which I call bootmgr (boot manager) controllable by running mainly by BCDedit.exe with assistance from boot.sect.exe and bootrec.exe. With bootmgr you can put any number of Vista and Win7 in it. There is no text configuration file like boot.ini any more in bootmgr.

    You only have a problem if you add Xp to it because Xp uses NTLDR which cannot boot Vista/Win7. Thus if you add Xp then NTLDR will have to be installed and you will need to used BCDedit to add Xp to the booting list.

    The method I used in this thread is to hide all the other MS Windows when you install a new one. This method can allow unlimited number of MS Windows to be installed but you only have access to one Windows at any one time (as the rest is hidden).

    The traditional MS method is to use one partition to house all the boot loaders. It has the advantage of seeing evey MS Windows partition which will be mounted. The drawback is if the system providing the booting partition suffers corruption the other systems may become unbootable, unless you know how to separate them.

    In conclusion

    If you use only bootmgr (Vista and Win7 and no Xp) then no need to hide any of them. The bootmgr will configure everything for you. You will actually dual boot the 3 systems. One to Ubuntu and the other bootmgr. Inside bootmgr you have a second level of booting either to WIn7 or Vista.

    If you want each MS Windows has a boot loader in its own partition then follow this thread.
    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"

  13. #13
    Join Date
    Aug 2005
    Posts
    17
    And what do I have to do in order to fix this mess up?

    Thank you.
    Last edited by pxumsgdxpcvjm; 06-18-2009 at 08:38 PM.
    [url=http://brainstorm.ubuntu.com/idea/6138/]TrueCrypt - Full Disk Encryption - Documentation Request - please vote - any advancend user can contribute starting a wiki article[/ur

    ---DONT PANIC--- ASK.

  14. #14
    Join Date
    Aug 2005
    Posts
    17
    Sorry, what can you say about the files:

    File Type: txt boot.ini.txt (322 Bytes)
    File Type: txt menu.lst.txt (4.7 KB)
    File Type: txt fdisk.txt (796 Bytes)

    so that I can repair my triple boot?

    Thank you.
    [url=http://brainstorm.ubuntu.com/idea/6138/]TrueCrypt - Full Disk Encryption - Documentation Request - please vote - any advancend user can contribute starting a wiki article[/ur

    ---DONT PANIC--- ASK.

  15. #15
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,983
    Sorry I have been away and am trying to conclude this thread.

    Can you give us exactly the help you need as the situation has changed somewhat and I am not sure where we are?

    The boot loader Grub is controlled by mainly the text file menu.lst which is located always in /boot/grub directory. For a Red Hat family distro it may use grub.conf sometime symbolically linked to menu.lst.

    boot.ini is the equivalent configuration file of NTLDR boot loader used only by Xp and Win2k. It is also a text file but with very limited functions. boot.ini is a hidden file within a MS Windows and must be unhidden first, edited and then hidden again. However the same file is visible in any Linux which can be used to edit it.

    I don't see any technical reason not able to repair your triple boot.
    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"

Posting Permissions

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