Dualbooting Windows 7 And Linux Mint 12 - Page 2

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:

Select your language:

Continue if your machine matches the prerequisites:

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 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:

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.

Share this page:

11 Comment(s)

Add comment

Comments

From: Slopoke at: 2012-01-24 20:02:57

I agree with letting the OS installer do the formatting etc.  Rather than try to understand that windows shrinking episode;  if you aren't concerned with home parts. etc and just want Mint and windows dual boot, it is a lot easier to just click "install along-side windows" and let the installer do it all.  Later  you can use the linux partition tool (Gparted) to set up other partitions or free space, orrr, shrink partitions if you wish.  This way Linux will set up swap space, make a windows recovery option in the Grub page, and Linux recovery.  I've always had 99.9% luck letting Linux do the work.  

From: Stephen Green at: 2012-01-24 21:27:50

Good article as far as it goes. If win 7 is installed on certain laptops you'll not be successful. The graphics card installed that use 1360x768 won't be recognized by any new Linux distro. I know this because this laptop (Acer) useas this cheapo setup and modern Linux's don't work ..

From: rijnsma at: 2012-01-27 10:44:26

It is time to use a computer for Windows and another computer for Linux.

Think of the UEFI & MS Secure Boot story... :shock:

From: Anonymous at: 2012-02-02 04:32:51

i have multiple hard drives. can i create a partition on one of the other hard drives, install Mint there and still use dual boot?

From: this is what i did at: 2012-02-12 00:54:14

yes you can, what i did was. I disconnected all my hdd exept for the one i wanted mint on, installed mint on that drive once mint was installed and rebooted updated all the packages installed graphics drivers and anything else i would need and use, i shut down the pc unplugged the drive mint is on and plugged back in my windows drive and booted up, to make sure windows started fine. then shut down plugged back in the drive with mint on it leaving all the other drives plugged in, booted back up into the bios and told the system to boot off the drive i have windows on. restarted the machine and windows boot fine, restarted and my motherboard allows for me to choose a boot device by pressing f11  yours may not i don't know, but if it does you just choose wich drive you want to boot from and it should boot fine. this worked for me maybe it will work for you aswell. The reason i did it this way was i did not want mint on my windows drive just in case something went wrong with the install. if windows boot loader gets corrupted you can fix it if you have the windows installation or recover cd by booting up the recovery or installation cd and openting up the cmd promt and typing "bootrec/fixmbr" then press enter and type "bootrec/fix boot" press enter and then restart. the machine.

From: Anonymous at: 2012-01-26 00:19:03

Since Mint is derived from Ubuntu newbies could use Startup Manager to make the mentioned changed with GUI easily. Startup Manager could be found in software center.

From: Dave at: 2012-01-27 12:56:32

I was wondering if this still works if Windows 7 is installed on an UEFI system with a GPT disk

From: Anonymous at: 2012-05-27 16:01:30

mate, this way to edit the GRUB file is wrong!

just go to "/etc/default/grub" and change the constants there, so ur OS dont get anny inconsistency...

From: NikHoxha at: 2012-08-25 13:30:50

Worked great for me! :)


From: Jamil at: 2013-06-24 12:55:49

The above method is not a
good way of doing this. The best way to this is described in Grub2
tutorial at "http://www.dedoimedo.com/computers/grub-2.html". Read it
thoroughly if you want to be advanced user of grub2 but if you only want
to change the boot order here is how I did this. I had my window 7 in C
and then installed Linux Mint 15 and there was no Windows 7 loader.

1. type in terminal "sudo update-grub". It will get the windows 7 bootloader in the boot menu of linux mint during.

2. Now suppose I want window 7 to boot first. In the /etc/grub.d
directory there will be different files starting with numbers (i.e.
00_header, 10_linux, 30_os-prober (window 7 loader) etc). The principal
is simple, 10_linux will boot first as its number is less then
30_os-prober. Rename the file 30_os-prober to 09_os-prober. You will not
be able to rename it directly. Enter following commands in the terminal
to rename it.

sudo mv /etc/grub.d/30_os-prober /etc/grub.d/09_os-prober

sudo update-grub

3. Now restart your computer and window 7 will boot first by default.



The grub.cfg reads from grub.d folder.

 If you have problem, add your comment.

From: Ramón B. at: 2013-10-23 18:13:49

VIELEN VIELEN DANK. SEHR GUT. ALLES KLAR. DANKE SCHON