Page 1 of 1

Can I install win7/xp without losing mint and all my data?

Posted: Tue Dec 04, 2012 10:14 pm
by l00mien
Hi, this is my first post on the forums, I installed mint 14 nadia mate 64-bit about a month ago and i love it! but for gaming purposes I was interested in having a dual-boot to either XP or 7, but as i recall you have to format the hdd you want to install windows on, i dont wanna lose mint and all my files, can anyone help me do this? I dont have a windows cd and havent downloaded anything so im not commited to one version over the other, and any and all input on this topic would be helpful, i pretty much just wanna be able to run LoL with having to use PoL and wine.
also if it matters I have a lenovo z580, intel core i7 ivybridge cpu, 16gb ram, intel hd4000 integrated graphics.
thanks!

Re: Can I install win7/xp without losing mint and all my dat

Posted: Wed Dec 05, 2012 6:24 am
by mintybits
Windows won't delete your linux partitions unless you tell it to.
All you need is some unallocated space on your disk for Windows (I'd allow 30GB+) and an unused primary partition slot.
Best to post your partitions here. Either a photo of GParted or the outputs of:

Code: Select all

sudo fdisk -lu
df -h

Re: Can I install win7/xp without losing mint and all my dat

Posted: Wed Dec 05, 2012 8:39 pm
by gnuuser
mintybits wrote:Windows won't delete your linux partitions unless you tell it to.
All you need is some unallocated space on your disk for Windows (I'd allow 30GB+) and an unused primary partition slot.
Best to post your partitions here. Either a photo of GParted or the outputs of:

Code: Select all

sudo fdisk -lu
df -h

correct using gparted you can create the partition you need and format it to ntfs then install your windows to that partition

Re: Can I install win7/xp without losing mint and all my dat

Posted: Sun Dec 16, 2012 5:36 am
by l00mien
Image
Sorry it has taken so long for me to get to this point,if anyone is still interested here is the partition i made, i set it to ntfs and i got a copy of win xp to install on the partition. thanks for solving this problem for me. :D

Re: Can I install win7/xp without losing mint and all my dat

Posted: Sun Dec 16, 2012 8:01 pm
by kingnick42
Hope it works for you, in my experience installing windows is likely to screw your linux system.

Re: Can I install win7/xp without losing mint and all my dat

Posted: Sat Dec 29, 2012 6:21 pm
by l00mien
kingnick42 wrote:Hope it works for you, in my experience installing windows is likely to screw your linux system.
How insightful, I tried to install xp and it wouldn't take my product key (probably because it was from a keygen) so i restart to get back into linux where i had the program to get a new key and it tries to go back to the winxp setup, i boot from my mint dvd and go into gparted make sure my original partitions are all still there which they are but the ext4 main partition is unmounted, and the NTFS winxp partition is set to boot, so i set ext4 to boot and unflag the NTFS, then it gives me the error loading operating system message after the bios, i don't see how to 'mount' ext4 in gparted, and i think that is why I'm getting the error message, because if i don't flag either of the partitions to 'boot' then i get the boot menu when i try to boot, i think this means that for some reason when i started the winxp setup it unmounted ext4 and if i can get it mounted again with gparted i should be fine, but i really have no idea whats going on, if you have any ideas hit me before i have to reinstall linux. Thanks

Re: Can I install win7/xp without losing mint and all my dat

Posted: Sat Dec 29, 2012 9:13 pm
by Biker
When you install Windows, it wants the MBR and tends to overwrite any Linux boot info. There are a few ways around it, you'll just need to decide which is best for you. Here is one way:

http://www.linuxbsdos.com/2011/06/11/du ... windows-7/

Re: Can I install win7/xp without losing mint and all my dat

Posted: Sun Dec 30, 2012 9:56 am
by mintybits
Hi, The partition boot flag setting only works for Windows and other MS-DOS compliant operating systems. Linux does not support it by default. This is why, if you set the boot flag to the ext4 partition, it will not boot. This is really a limitation of the linux installer rather than being XP's fault.

So, you either need to install Grub to the linux partition (sda1) and then set the boot flag to sda1 OR install Grub in the MBR instead of the standard MS-DOS boot code OR install Grub to the MBR of a different device. The drawback of the first option is that there is a chance it will stop working if there is a kernel update in the future (due to a drawback in the way the Grub installer works).


To install grub to the linux partition, boot linux DVD and open a terminal and type

Code: Select all

sudo mount /dev/sda1 /mnt
sudo grub-install --force --root-directory=/mnt /dev/sda1
To install grub to the MBR

Code: Select all

sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
In each case, after booting into Mint on your hard disk,

Code: Select all

sudo dpkg-reconfigure grub-pc
and reselect where Grub is to be installed.

Re: Can I install win7/xp without losing mint and all my dat

Posted: Sun Dec 30, 2012 11:17 pm
by l00mien
Perfect, i got back into mint on my HDD just fine, i ran the configure and made sure grub was installed to sda and everything seemed to check out, it output this check at the end, so i think my imediate problem is solved, thanks so much, now just to make sure it should be totally safe to install xp alongside mint correct?

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.5.0-17-generic
Found initrd image: /boot/initrd.img-3.5.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
done

Re: Can I install win7/xp without losing mint and all my dat

Posted: Fri Jan 11, 2013 9:36 pm
by l00mien
so I successfully installed win xp on my NTFS partition, then i booted into linux from my dvd, installed grub, when i config it the only device i see is sda1, now linux boots fine from my hdd but i dont see the grub menu when i boot and cannot boot into xp? what am i doing wrong? i read the link posted by biker and i seem to have done everything they wanted me to do.

Re: Can I install win7/xp without losing mint and all my dat

Posted: Tue Jun 04, 2013 4:26 am
by kingnick42
l00mien wrote:so I successfully installed win xp on my NTFS partition, then i booted into linux from my dvd, installed grub, when i config it the only device i see is sda1, now linux boots fine from my hdd but i dont see the grub menu when i boot and cannot boot into xp? what am i doing wrong? i read the link posted by biker and i seem to have done everything they wanted me to do.
Where did you install Grub to?

Re: Can I install win7/xp without losing mint and all my dat

Posted: Sun Jun 09, 2013 10:00 pm
by kingnick42
http://www.av8n.com/computer/htm/grub-reinstall.htm - this offers a working set of instructions for reinstalling the Grub bootloader. Worth trying it again, I know this tutorial works :)