# Copying Existing Linux Install to Win 7 Machine (Dual Boot)



## theonedub (Jan 29, 2015)

So I want to move over my existing Linux Mint 17 install to a Windows 7 machine, however, I want to be able to dual boot. No idea how to get this done, but I do know I would like to use free software only  

The Win7 machine is not configured for dual boot right now, it essentially has a fresh and updated Win7 install. The Linux Mint setup is already configured exactly how I want it. Both machines are using 90% same hardware including identical APU and MB. 

Thanks guys!


----------



## blobster21 (Jan 29, 2015)

*For future reference (PC1 = former linux computer, PC2 = windows seven computer):*

- Resize your windows 7 partition and free up enough space to match the size of your linux mint partition(s)
- Remove PC1's hardrive and plug it into PC2, at this point you should have 2 hardrives in PC2
- Start PC2 and boot from a gparted live DVD (preferred) or a linux mint live DVD, then clone your linux mint partition(s), using a simple copy & paste between /dev/sdX and /dev/sdY. Feel free to ignore the Linux swap partition, it can be recreated later, provided there's enough space space left on the harddrive.






- When you're done, shutdown PC2 and remove the linux mint harddrive.
- Restart PC2 to make sure windows seven bootloader is still working properly.

Now let's move on to the dual boot preparation, where Linux mint bootloader is the one responsible handling all your operating systems in a single boot menu:

- Start PC2 and boot from a gparted live DVD or a linux mint live DVD
from now on you'll have to use *your own partitions names*, first check you local partition table and find which one contains linux mint:


```
sudo lsblk -f
```

which gives an output like this:





Following the partitions table in the example above where my linux mint installation is /dev/sda6, you could do something like this :


```
# Bind the directories that grub needs to have access to :
sudo mkdir /mnt/mint
sudo mount /dev/sda6 /mnt/mint
sudo mount --bind /dev /mnt/mint/dev
sudo mount --bind /dev/pts /mnt/mint/dev/pts
sudo mount --bind /proc /mnt/mint/proc
sudo mount --bind /sys /mnt/mint/sys
#
# Set up the chroot environment :
sudo chroot /mnt/mint
#
# Create grub's configuration file:
sudo grub-mkconfig -o /boot/grub/grub.cfg
# Now install grub to the MBR of your drive
# In the following command we are refering to the physical volume MBR so YES,
# it's /dev/sda without number !!
grub-install /dev/sda
#
# we're almost done, exit the chroot and unmount everything
# so your running system is back to normal:
exit
sudo umount /mnt/mint/dev/pts
sudo umount /mnt/mint/dev
sudo umount /mnt/mint/proc
sudo umount /mnt/mint/sys
sudo umount /mnt/mint
sudo reboot
#
#
# source of this slightly modified HOW-To :
# http://unix.stackexchange.com/questions/109464/how-can-i-fix-install-reinstall-grub
```

Now try booting from your harddrive, you should have a grub menu with both Windows and linux mint entries


----------



## theonedub (Jan 29, 2015)

Awesome, I'll try this over the weekend. Thanks for the detailed instructions.


----------

