Articles

Dual booting Porteus & Windows

Dual booting Windows 7, Vista  & Porteus

After using Porteus from a USB for a while you may want to have Porteus work from your hard drive. Many people still want to have Windows on their computer and this situation calls for a dual booting system. This is where a bootloader gives you an option for which operating system you want to use at start time. Porteus will quite easily co-exist on the same partition as Windows, or you can setup a separate partition for your Porteus files. Setting up a partition for Porteus is the most stable way and this tutorial will show you how to do this.  It will also show you how to change the Windows bootloader to know that Porteus is available and present it as an option in the boot menu when you start your system.

Windows 7 users should know that most computers set up a hidden first partition for the Windows 7 boot files and this partition should not be disturbed else you risk not being able to boot into Windows. If you create your own partitions using a partition manager boot disk such as gparted then be aware of this.

Creating a separate partition for Porteus

gparted boot diskBootdisk method 

Personally i favour the bootdisk method which involves downloading and burning a partition manager bootdisk such as gparted. After booting from this disk you can first resize your windows partition by selecting the partition and choose the option to resize. You can then choose to format the new partition with a linux ext2 file system. Once you click apply gparted will go about shrinking your windows partition and creating the new partition. This could take a long time. Once again if you choose this method make sure you do not upset the very first partition which is usually around 200Mb and contains the Windows 7 boot files.

After this you can boot from your Porteus Livecd and begin to install Porteus to the new partition.

New partition from within windows

Click the start button and then right click on 'Computer' and choose 'Manage'. A window will popup from which you can choose Disk Management. Once you select this windows willwin7-disk-manager search and find all the partitions on your system and list them.  Remember that you DON'T want to touch the first small partition (about 200Mb) if it exists as this will be your boot partition. You should choose the largest partition (usually c:) which is the one that will contain the windows operating system. Some systems also have a separate partition setup where a restore image lives. You probably shouldn't disturb this partition either unless you know what you are doing. Once you have found your Windows partition you should right click on it and choose the shrink option. Select a suitable size. Porteus doesn't need much and 2Gb should be ample. Now click on a New Simple Volume and follow the prompts. The default choice should be fine except for when you get to the partition type. Make sure you choose FAT32 here. You can give the new volume the descriptive name of Porteus.

The down side here is that Windows can not create a linux file system so you can either install Porteus to the new FAT32 partition or boot from a Porteus livecd/USB and format the partition as ext2. (see here for a guide)

Once you have your new partition it is time to copy the Porteus files onto the partition.  Copy the porteus and boot folders over to the new partition.

EasyBCD Boot Program

By far the simplest way to get your dual boot system running is to use the EasyBCD program which you install on your windows operating system and use to set up your bootloader.  You can download it here. Run EasyBCD and choose Add New Entry and then the Linux tab.
Pick GRUB legacy from the type drop down menu and give your system a name in the Name box. Tick the box that says 'GRUB is not installed to the MBR' and click the 'Add Item' button.

This will add a new entry to the bootloader but it still needs to know where to locate the Porteus files. EasyBCD uses NeoGRUB and the configuration file for this should now be located at C:\NST\menu.lst. You can close EasyBCD now and open up the menu.lst file directly in a text editor like wordpad.

Delete all the text from the menu.lst file and paste in the following:

menu.lst
default 0

timeout 5
 
title Porteus Graphics mode (KDE)
root (hdx,y)
kernel /boot/syslinux/vmlinuz initrd=/boot/syslinux/initrd.xz changes=/porteus
initrd /boot/syslinux/initrd.xz
 
title Porteus Always Fresh
root (hdx,y)
kernel /boot/syslinux/vmlinuz initrd=/boot/syslinux/initrd.xz norootcopy nomagic
initrd /boot/syslinux/initrd.xz

 
title Porteus Copy To RAM
root (hdx,y)
kernel /boot/syslinux/vmlinuz initrd=/boot/syslinux/initrd.xz copy2ram
initrd /boot/syslinux/initrd.xz
 
title Porteus Text Mode
root (hdx,y)
kernel /boot/syslinux/vmlinuz initrd=/boot/syslinux/initrd.xz changes=/porteus 3
initrd /boot/syslinux/initrd.xz
 
 

 

You will need to change x,y to suit your system. Essentially x and y both start at 0. The x refers to the physical hard drives in your system. The first hard drive is x and the second hard drive is 1. The y refers to the partitions on the hard disks. The first partition on the first hard disk would be hd,0,0. The second partition on the first hard disk would be hd0,1. The second partition on the second hard disk would be hd,1,1. Most new computers only have one physical hard disk which is divided into partitions. That is what you saw in the disk management part above. On Windows 7 the hd0,0 would be the boot partition. The second partition (hd,0,1) would most likely be the windows partition. If you created a partition after that for Porteus then it would be hd0,2.