Triple Boot - How to install Win98SE, WinXP Pro, and Linux on a single hard drive


Cautionary Note on back up (better safe than sorry):
First, before starting anything, make sure you fully backup your critical files. If something goes wrong during this procedure you can easily lose everything if you have no backup. However, if it goes smoothly then you will not need the backup.


  1. Plan your partition layout. You will need a partition for Win98SE, one for WinXP/2k and one for Linux.

    I suggest the following partition strategy:

    Partition Number Partition Type Minimum size recommended For Installing OS Type
    Partition 1 Primary 2 G Bytes Windows 98SE
    Partition 2 Part 0f Extended 5 G Bytes Windows XP/2k Pro
    Partition 3 Part 0f Extended 5 G Bytes Linux (Mandrake 10)


    Notes on partitioning

    • Partitions 2 and 3 should NOT be created as primary partitions. Create them as logical partitions within the extended partition. If you wanted to use primary partition for these two then you would need to use some kind of boot manager such as bootmagic or similar.

    • Size your partitions carefully. It is best to be generous with the sizes as once they fill up it will not be possible to resize them without the use of third party tools such as Partition Magic.


  2. The steps: This is how it is done.

    1. Install Win98SE (Note: this is your primary DOS partition - 'drive C'). (Linux sees this as hda1)

    2. Before continuing with the next OS, I recommend using 'fdisk' and create an extended partition (for the rest of the drive) and create a logical drive (D:) to be the size you want for the winXP/2k partition. You may create additional logical FAT32 partitions if required. Leave the rest of the extended partition undefined for use by Linux. This will prevent the whole of the extended partition being used for winXP/2k.

      This way you avoid having to get WinXP/2k install to only use part of the extended partition. You just need to tell it to use the logical partition already created leaving the rest of the extended partition ready for Linux.

    3. Install WinXP/2k. This will be in a logical partition. Linux will see this as hda5 if using the first logical drive or hda6 if using the second logical drive and so on. For simplicity, for the rest of the procedure, we will assume it is in the first logical drive (i.e. hda5).

      If you already have a partition setup that WinXP/2k will be installed on, select it and allow it to be formatted. This will be the case if you have followed step 2 above.

      If you have not set up a partition for WinXP/2k, you can choose to create a partition using un-partitioned space on the hard drive. Make sure to leave space for your Linux installation.

      You have two formatting options, NTFS or FAT32. Select NTFS for the file system when prompted. Yes I know you can use Fat32; however, I don't recommend it so Win98SE can't screw up WinXP/2k. Also NTFS is a far better filesystem. WinXP/2k performs best when using NTFS partitions. WinXP/2k has built-in security features that use the NTFS file system.

      The WinXP/2k install process will install the NT Boot Loader and put a "boot.ini" on the C drive, which will contain your boot up option menu. This will allow you to select whether to boot Windows 98SE or WinXP/2k.

    4. Install Linux (Mandrake 10) in the remaining part of the hard drive. If you did not create any additional logical drives, then this will be seen by Linux as hda6. For simplicity, of the procedure, we will assume this is the case.

      Choose 'lilo' (graphical or text mode - I prefer graphical) when prompted and (for now) put it in the MBR. We will move it later to the partition where your /boot will reside (NOT in the MBR). In this example boot is within the "/" partition which is located on the hda6 partition.

      This will replace the NT boot loader installed by WinXP. However, before Linux does that it will take a backup of the current NT Boot loader in case a user wants to uninstall the Linux boot loader.

    5. If you wish to use LILO as your boot loader then you may skip this section. However, if like me, you wish to use the NT BOOT Loader then the next steps show you how to achieve that.

      Procedure to replace LILO Boot Loader with the NT Boot Loader.

      • Boot to Linux and Login to Linux. Open a terminal window and Su as root. Restore your original NT Boot Loader by typing:
        lilo -U.

      • Still as root, modify your LILO so that it is loaded where your /boot resides. In this example that will be hda6. This can be done by tools or manually by editting the /etc/lilo.conf file .

        If editting manually then: As 'root', edit '/etc/lilo.conf': the first line of lilo.conf will read boot=/dev/hda, change the 'hda' to whereever the '/boot' partition is located in this case hda6 (i.e. boot=/dev/hda6). Then update lilo by typing:
        /sbin/lilo -v

      • Copy the new boot sector information to a file. You will need to su as root.

        Make a copy of the new boot sector with dd if=/dev/hd[x][n] bs=512 count=1 of=man10.lnx
        Note: hd[x][n] is where the '/boot' partition is, where
        [x] denotes the hard drive and
        [n] denotes the partition in it.
        In this example this is
        dd if=/dev/hda6 bs=512 count=1 of=man10.lnx

      • Copy the linux bootsector file man10.lnx to the windows 'C: drive' as follows:
        cp man10.lnx /mnt/win_c

      • Exit from Linux and Boot into Windows 98SE.
        Modify the 'boot.ini' on the 'C: drive' by appending a line for Linux pointing to the location of the copied LILO boot sector: Note - The default in the example below is set for Microsoft Windows 98SE

        [boot loader]
        timeout=15
        default=C:\
        [operating systems]
        multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="MS WinXP Pro" /fastdetect
        C:\="Microsoft Windows 98SE"
        C:\man10.lnx="Linux Mandrake 10"

        For different defaults replace default line as follows:
        default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
        default=C:\man10.lnx

    6. Reboot and your chosen Boot loader (LILO or NT Boot Loader) will give you the boot menu option of OS'es to select. Select OS as desired.


  3. Now your triple-boot system is complete - Enjoy your triple-boot system - Some notes on access

    As far as access to the filesystem of the three OSes is concerned you will be able to do the following:

    1. Linux will be able to access Windows 98 filesystem but not Windows XP filesystem.

    2. Windows XP will be able to access Windows 98 filesystem but not Linux filesystem.

    3. Windows 98 will not be able to access either Linux or Windows XP filesystems.
      Assuming you installed WinXP using NTFS (as recommended) and not FAT32.

    4. It is possible to allow both Windows 98 (FAT32) and WinXP/2k (NTFS) to access the same files. This can be achieved by siting the files you want shared between the two OSes either on the Windows 98 partition or on another FAT32 partition.


    NOTE - This procedure can also be used for other combinations of windows as follows:

    Win98SE    - Can be any of Win95 / Win95R2 / Win98 / Win98SE / Windows ME
    WinXP Pro - Can be any of WinXP / Win2k / WinNT
    Linux            - Can be either Mandrake or Redhat (Other flavours of Linux should also work)


© MAK 2004
End of Document