LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Intsalling Windows XP after Linux (https://www.linuxquestions.org/questions/linux-newbie-8/intsalling-windows-xp-after-linux-439126/)

okok 04-26-2006 03:51 PM

Intsalling Windows XP after Linux
 
It will take some time before I get my Windows XP CD and in the meantime I want to install Linux.

But I read that the best way to insure both OSs are availoable at startup is to intall Windows first, and then install linux and let the installer handle whatever is necessary.

If I just leave a partition for windows and install Linux now, what will I have to do in order to get the dual boot working properly after Win XP is intalled at a later stage?

I'll be using either Mepis or Mandriva.

jonaskoelker 04-26-2006 04:44 PM

The short answer is: it depends. Assuming that you have a single physical disk with multiple partitions, what will happen when you install windows is that it will override the master boot record. So, in order to boot GNU/Linux the easy way, you will want to restore the boot loader.

The--probably--easiest way is to have some bootable media (floopy or Ubuntu live CD) which will allow you to boot some GNU/Linux system. From there, chroot into your "real" filesystem root, and run grub-install as root.

Make sure to read the grub manual first, and try "practicing" by installing grub on, say, a floppy.

okok 04-26-2006 04:47 PM

Thanks. I hope that from reading that manual I'll also understand what "chroot into your "real" filesystem root" means...

jonaskoelker 04-26-2006 05:12 PM

run the commands "df -h", "mount" and "fdisk -l" (the last one probably needs root); you should be able to find out which partition (something similar to "hda1") is mounted on "/"; in your "bootstrapping" system (live CD / boot floppy), mount that partition ("mount /dev/hda1 /mnt"), then run "chroot /mnt"; you may want to manually mount the partitions listed in /etc/fstab after chrooting.

Note, though, that if you're booting your system almost-as-normal with a boot floppy, you might not need this; I have needed this when booting from a live CD.

hth --Jonas

saikee 04-26-2006 06:02 PM

The order of installation doesn't matter but with XP availaable first most Linux will set up the dual boot automatically.

Doing the opposite way is OK and jonaskolker has given a good run down of what is needed.

The only thing I add is some Linux may use Lilo instead Grub. The last link of my signature carries the commands to restore XP, Grub and Lilo.


All times are GMT -5. The time now is 10:28 PM.