neděle, ledna 20, 2008

Windows XP and Fedora 8 Dual Boot

This is how I installed Fedora 8 and Windows XP on my laptop Dell Inspiron 8200.

I had to install both OSes on a single physical drive. I wanted a kind of installation which will allow me to comfortably delete all linux partitions without affecting Windows. Practically that meant to use the Windows boot manager NTLDR to give me the option between booting Windows XP or Fedora 8.

I began with a clean drive, made a 10 GB partition and installed Windows onto it. Windows made it the Master Boot Record (MBR).

Then I booted from the Fedora 8 DVD. To preserve the Windows XP partition and the NTLDR, I created custom partition layout. The partitions on the disk were:

/dev/sda1 (NTFS) already created by Windows XP (10 GB)

/dev/sda2 (ext3) mounted in /boot (78 MB)

then a LVM volume group of 16 GB consisting of two additional partitions:

2 GB swap partition (no mount point)

and the actual linux harddrive (14 GB) mounted in /

The rest of the harddrive was free unpartitioned space which I want to use later in Windows XP

Since I am going to use the Windows XP bootloader, I selected in advanced boot loader options that GRUB shall be installed to the first boot sector of the /boot partition and not into the MBR.

When Fedora finished installing laptop booted again to Windows, just as expected.

To tell Windows XP about the second OS on the hard drive, it was necessary to extract the first 512 bytes of the linux /boot partition. To do that, I booted again from the Fedora 8 installation DVD but selected to rescue OS. The previously installed Fedora was found and mounted in /mnt/sysimage

I changed the root path for more comfortable navigation

chroot /mnt/sysimage

then I checked which partition is mounted in /boot by typing

df

There I saw /dev/sda2 mounted in /boot (as I set up when installing Fedora 8)

To extract the first bytes of this boot partition i typed

dd if=/dev/sda2/ of=/boot/lost+found/fedora.bin bs=512 count=1

The first bytes of /boot partition were saved in the file fedora.bin located on the /boot partition itself in the folder /lost+found

I quit the linux rescue console by typing twice

exit

I booted again to Windows XP. I used Total Commander with the Ext2+/Reiser file system plugin to access the /boot partition. Certainly there is also another software around, which allows access to linux partitions from Windows XP. The file system plugin for Total Commander allows only access to partitions which are not part of a LVM volume group. Therefore it was necessary for me to save the fist bytes of the /boot partition on itself, since I cannot access any other ext3 disk in Windows XP. As soon as I found there the file fedora.bin I copied it to the root of the Windows drive C:

Then I edited C:\boot.ini with Emeditor and added the line

c:\fedora.bin="Fedora 8"

at the end of it which enables NTLDR to choose between Windows XP (default) or Fedora 8 when booting.

Thatʼs all.

When figuring out how to manage the whole operation I found these sites particularly helpful:

Žádné komentáře: