Menu Close

Install debian as dual boot system on a computer with Win 7 preinstalled

This guide describes installing of debian linux OS on a computer with Windows 7 system preinstalled. System will use grub2 as the system loader with predefined win7 boot option.

Steps required to do:

1) create a free space on your HDD, that you have space to install debian OS. You may use built in windows disk management tool to resize win partion (left click on start button, then right click on computer, choose manage, then choose disk management). There should be a frees space, like it is shown on the picture:

2) prepare installation media (CD or USB stick, I preffer USB) and download your OS (I’m using small netinstall of debian)

3) download some software to make USB bootable, i’m using UNetbootin.

4) Prepare USB using ENetbootin to copy debian OS files to the USB and to make the USB stick bootable. After finish, put the stick in an USB port of the machine on which you will do dual boot installation.

5) reboot or boot machine on which we are doing the installation, during the boot of your computer press F8 function key on your keybord and choose the boot device, here the USB stick. This was import in my case, because setting up the BIOS to boot from removable device failed, and BIOS during computer booting ignored inserted USB stick with debian.

6) if everything is OK, starting menu is loaded from the USB stick and should appear. Choose install from the UNetbootin menu and the installation of the debian will start.

7) follow all of steps required during installation:

– language, country, local setting, keymap, network interface and network settings, root password and a new user name and password, ). repositary and so on.

Be carefull on steps named Partitioning, where are you asking which partion will be used to install a new debian OS. To make things under control choose a manual way of partitioning method. Then choose unused disk space and create a new partition as logical and at the end with / mounting point and ext4 (or ext3) journal file system and then a new partion again, wich will be used as a swap space. Then write changes and continue in your installation steps. 

Modifying the grub2 loader to boot win 7 by default

Edit

/etc/default/grup 

and setup GRUB_DEFAULT to the number identifying win7 boot menu, in my case it is 2 (default is 0, which is first boot menu options, usually debian installation, 1 is linux revovery, 2 is other systems here win 7 ).

And make changes to the grub.cfg file:

grub-mkconfig -o /boot/grub/grub.cfg

 -o options means to save grub-mkconfig output to the file. Here /boot/grub/grub.cfg, which contain grub boot menu options.

Install mouse service

To use mouse in your command line terminal (usuall for small server installation like here) we have to install gpm package

apt-get install gpm
Rate this post

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.