Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Dualbooting Windows 7 And Linux Mint 12


Dualbooting means having installed two operating systems on one hard disk and being able to boot from any of them. This tutorial will explain how to install Linux Mint 12 alongside Windows 7 – the procedure however should be the same for all Ubuntu based distributions and only slightly different for every other.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

Installing multiple operating systems involves the partitioning of your hard disks (each operating system needs its own partition, a seperate part of the hard disk) – this can cause damage or file loss if you do not know what you are doing. Therefore back up the files of the existing operating system on an external medium before you proceed with partitioning.

 

2 Freeing Hard Disk Space

If you want to install both operating systems on one hard disk, you need to partition it first. Most likely your Windows 7 installation will take up all space on your disk by default and even if not all of this space is used, it still is assigned to the Windows OS. Therefore you first have to shrink the extent of Windows on your HDD. Enter partitions into the Windows 7 search bar and open the Create and format hard disk partitions tool:

800

The entries you will be shown in the Volume column are your hard disks’ partitions. By default, your computer’s hard disk is either one big partition or it is already divided into two parts, one smaller boot/system partition and one file partition. In my case I have one big file partition and a much smaller boot partition. If your main partition still has enough Free Space left, it is possible to shrink it and install another operating system on the hard disk. To do that, right-click it and select Shrink Volume…:

801

You will have to wait a short time for your system to scan the disk for the possible amount to shrink:

8

Afterwards you will be shown a menu where you can give the size of the space that shall be made unallocated, this is the space that will be available for your second operating system afterwards. Click on Shrink to initiate the process:

9

After shrinking, the graphical view of the hard disk’s partitions will have changed and you will see the unallocated space on it. You could now create a new partition by right-clicking the space and clicking New Simple Volume…, but in case of installing a Linux system it is recommended to let the OS installer do the formatting because of the correct file system format. Therefore, it is now time to insert your installation medium and install your second operating system.

3 Format Drive And Install Linux

The Linux Mint installer is able to automatically format all unallocated space on your hard disk. To install, boot from your installation medium and double-click Install Linux Mint:

1

Select your language:

2

Continue if your machine matches the prerequisites:

3

On the next screen, select Install Linux Mint alongside Windows 7. Linux Mint will then take all unallocated hard disk space, format it and install itself on it:

4

18

19

20

4 Configuring Boot Order

Linux Mint comes with GRUB, its own bootloader, and will set itself as the default OS to boot with. On boot, you will be presented a selection screen for the different choices where you have ten seconds to choose:

21

You can change this order however if you rather want to boot from your Windows volume again. To do so on all systems derived from Ubuntu, open the grub.cfg as root:

sudo nano /boot/grub/grub.cfg

Although the file tells us to NOT EDIT it we will do so, but with care. The boot options are specified inside this configuration file. You will see a list of entries looking somewhat like this:

[...]
menuentry 'Linux Mint 12 64-bit, 3.0.0-12-generic (/dev/sda5)' --class linuxmint --class gnu-linux --class gnu --class os {
        recordfail
        set gfxpayload=$linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root 7df91f6c-5351-4336-a3c5-eac1cf58efca
        linux   /boot/vmlinuz-3.0.0-12-generic root=UUID=7df91f6c-5351-4336-a3c5-eac1cf58efca ro   quiet splash vt.handoff=7
        initrd  /boot/initrd.img-3.0.0-12-generic
}
menuentry 'Linux Mint 12 64-bit, 3.0.0-12-generic (/dev/sda5) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
        recordfail
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root 7df91f6c-5351-4336-a3c5-eac1cf58efca
        echo    'Loading Linux 3.0.0-12-generic ...'
        linux   /boot/vmlinuz-3.0.0-12-generic root=UUID=7df91f6c-5351-4336-a3c5-eac1cf58efca ro recovery nomodeset
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.0.0-12-generic
}
[...]
menuentry "Memory test (memtest86+)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root 7df91f6c-5351-4336-a3c5-eac1cf58efca
        linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos5)'
        search --no-floppy --fs-uuid --set=root 7df91f6c-5351-4336-a3c5-eac1cf58efca
        linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
[...]
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 7EE8C5C2E8C578C3
        chainloader +1
}

[...]

These are the operating system choices you are given on boot. They are numbered from 0 to n, n being the number of entries -1. To change the default option, look for the following block in the beginning of the file…

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"

… and change the number in set default to the one of your choice. Remember that if you want to use Windows 7, which is the fifth entry in my case, you have to put in a 4, since the numbering starts with 0.

If you also want to shorten the time the system takes to automatically boot the selected option, look for the following block a few lines further down…

if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi

… and replace the number in set timeout=10 with a number from 0 upwards. This will determine the time in seconds the machine waits before it boots the selected choice without your interaction.

Comments

comments