First you need to install Windows 7, and safeboot / Mcafee endpoint protection.
Then you need to take a backup of the MBR, this is done with a Ubuntu live cd, run this commands:
1 |
dd if=/dev/sda of=/path/safeboot.mbr bs=512 count=1 |
Put it on a USB flash drive or something else, that you can access after the installation.
After you have make a backup of the MBR, just install Ubuntu the normally way, after you have make changes to grub2 config files.
1 2 |
cp /path/safeboot.mbr /boot/ nano /etc/grub.d/40_custom |
At the buttom of this files you need to insert this:
1 2 3 4 5 |
menuentry "Windows 7" { set root='hd0,msdos1' chainloader (hd0,msdos5)/boot/safeboot.mbr boot } |
Where set root=’hd0,msdos1′ is becuase my windows 7 root partition is locate on disk 0, and msdos partition 1, and chainloader (hd0,msdos5)/boot/safeboot.mbr is because my ubuntu partition is located on disk 0 and msdos partition 5.