[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing Windows with Debian already installed



On Sun 26 Feb 2012 at 13:34:12 -0430, Gustavo J Mata wrote:

I recently installed Debian on a new hard disk. Although I rarely used
Windows I kept a 20 Gb partition to +install it, just in case.

I've found out that if I do install Windows, I won't be able to boot
Debian. Although it appears that this +can be fixed, I want to make sure
I know what I'm doing before risking having to start all over again.

Any hints?

Have you got a USB stick handy? Using fdisk make a Linux primary
partition on it, or part of it. Format the partiton ext2 (mkfs.ext2).

Mount the partition you have created:

   mount /dev/sdb1 /mnt

Install GRUB to the MBR of the stick:

   grub-install --boot-directory=/mnt/boot /dev/sdb

This will create /boot/grub on the stick and put GRUB's files there.

Copy /boot/grub/grub.cfg to /mnt/boot/grub/grub.cfg. Boot from the USB
stick. Can you get into your expected Debian?

The sdb is on my machine (not yours) and I'm using testing. I'm unsure
whether --boot-directory is --root-directory on Squeeze. Read the manual
for this.

I've no idea what Windows does when it installs but if it leaves the
other partitions undisturbed you should be able to get Debian running
and put GRUB back on the hard disk's MBR.


Reply to: