Creating a dual boot setup for Windows/Linux at the University of Groningen, with unattended installs for both

March 2009


  1. Wipe the boot sector

    From Linux, wipe out the boot sector, either with shred: shred -n10 -s5M -z /dev/sda or with dd: dd if=/dev/zero of=/dev/sda bs=512 count=2000.

    [Note]Note

    I don't know how to do this from DOS or Windows. The point is that no previous bootloader/partition table/filesystem should be recognizable on the system, or Windows may just decide not to boot later on.

  2. Run GDisk to partition for UWP

    Use a boot image with GDisk to partition. As of this writing, the available GDisk boot images will partition the disk into a primary C:-drive of type fat32 with LBA on, and an extended/logical (equal size) D:-drive of type fat32, but with the LBA setting omitted. There is a choice between 20, 30 or 40GB used for the C:-partition. For future-proofing, pick the 40GB.

    [Note]Note

    The unattended Windows XP installer fails without notice on partitions created with Linux tools (parted, fdisk, sfdisk), unless they closely mimick the idiosyncracies of GDisk. There would be a point in trying to do just that to shorten the installation sequence, but for simplicity, just use GDisk.

  3. Run the Windows installer

    Start the unattended installer of XP, and let it run to the point where it reboots for the first time.

    [Note]Note

    There is no problem in letting the XP install finish. It's just that it's a waste of time now.

  4. Repartition the disk for Linux

    Boot into a diskless Linux. (The entry LiveDistros->32-bit in the Osis boot menu will work for now, later this step can be automated away on a boot image as has been done with GDisk.) Fetch the script partitioner.sh and run it: bash ./partitioner.sh -x (run it with -h option to see more possible command line parameters). This will leave the C:-drive alone, but remove the D:-drive and replace it with an empty extended partition for the LWP, and then re-create a smaller, empty D:-drive.

    [Warning]Warning

    Be aware that even with the volume name properly set on the first partition, the XP unattended install will run, but fail to reboot. The exact reason/cause for this is unknown to me, my rule is: in order to install XP, GDisk must be used for creating the first partition. Please send in intelligence.

  5. Run the LWP installer

    Run the unattended installer of the LWP.

  6. Finish the XP install

    If you didn't already in , then let the XP installer finish now.

  7. Optionally test boot both OSes

    Try to boot into both Windows and Linux if you want.