Monday, December 15, 2008

Duall boot Vista and Fedora 10, installed from hard drive

I wanted to install Fedora 10 on my wife's Dell notebook from a downloaded dvd iso image, without burning it on a disk. I found that it could be possible with UNetbootin, but the problem was that Vista came installed on NTFS, which is not readable by anaconda installer. The solution was to create a temporary FAT32 partition.
This is how it worked:

In Vista use Disk Manager to create space on your HDD (right click on Computer and select Manage). Shrink the last partition by at least 10G and in the created space make a new 4G FAT32 partition and give it a drive letter. Your linux distro will be installed in the remaining space.

Download the Fedora 10 dvd iso and save it to the new partition.
Download and run UNetbootin. Choose to install from ISO image and select the image. Choose to install to hard drive. UNetbootin will then create c:\images folder and also extract packages from the iso image, which is pointless, but just let it do what it's doing.

Move the c:\images folder to the new partition. The partition should now contain your distro ISO image and the images folder.
After reboot, you should see a new boot menu. Select UNetbootin and when asked from which partition to install, select the last one. Then select to install in free space.

When the installation was finished, linux booted fine, but Vista complained about a missing boot loader. The problem was that grub was pointing to the first partition, but Vista was installed on the second (or even third - this is confusing me :), courtesy of Dell. The fix was to edit grub.conf and find the second occurance of rootnoverify and change 1 to 2 on that line:

vim /boot/grub/grub.conf


title Windows Vista
rootnoverify (hd0,1)


title Windows Vista
rootnoverify (hd0,2)

(the title will differ, could be "other" if you haven't changed it during installation)

When in Vista, run UNetbootin again and let it uninstall itself. The UNetbootin boot menu and all folders it created on the Vista drive will be gone.

I haven't yet come to deleting the termporary 4G Fat32 partition, but I guess the partition number in groub.conf for the linux partitions would have to be decreased by one when the partition is deleted or linux wouldn't boot.

Accessing the Vista NTFS partition from linux

yum -y install ntfs-3g
mkdir -p /mnt/c
mount -t ntfs-3g /dev/sda2 /mnt/c

to make it permanent add an entry to fstab file.

echo '/dev/sda2 /mnt/c ntfs-3g defaults 0 0' >> /etc/fstab

(sda2 might be sda1, depending on where Vista lives)

Allowing root gui login

sed -i '/root/ s/^/#/' /etc/pam.d/gdm
sed -i '/root/ s/^/#/' /etc/pam.d/gdm-password
sed -i '/root/ s/^/#/' /etc/pam.d/gdm-fingerprint

No comments: