Friday, March 9, 2012

Windows 7 and Fedora 16 on your Dell.


I think I'll forget how I did this so I'll document it here while it is fresh. So, I received my new computer on Monday and finally bought the DVDs to create the restoration copies. Even though Windows 7 is nice and shiny, I still feel better with Fedora somewhere so I can hack around.

Since Dell creates protected partitions on your hard drive, the installation is NOT straightforward. In fact, the bootloader needs special care. I also want to preserve the Dell-defined partitions including Windows 7.

Step 1 - Downloads
Grab the FC16 DVD ISO, LiveUSB Creator, and EasyBCD (free limited for non-commercial use). Install LiveUSB Creator (LUC) and EasyBCD. Insert an USB stick and "burn" the FC16 ISO onto the stick using LUC. This takes ~10 minutes.

Step 2 - Installation
Close everything and reboot. After the self-test press F12 and select "USB Drive".  If it doesn't appear, reboot (it is sometimes not detected).

In the boot menu select "Install Fedora 16...". After a few seconds a text-mode program should start and you should be able to select your language and keyboard. Then the graphical mode begins.

I won't go into the details, instead I'll just focus on the disk setup. Select "Basic disk setup", next, "Custom Layout" and move on.

Destination Drive
The installer will list the mass storage devices and you must put on the right the disks that will be modified (new partitions to host fedora), and on the left those that will only be mounted. On the right you must also select the device that will host the bootloader.

On my laptop, I just have one hard drive, it is in the right list and it is checked to host the bootloader. Easy!

The next frame is where you'll configure the partitions. You should see:
  • sda
    • sda1: ~ 110 MB FAT : DellRecovery 
    • sda2: ~ 20 GB NTFS : RECOVERY
    • sda3: the remaining size NTFS: OS
    • Some other strange little partitions: DO NOT TOUCH!
We want to resize sda3 to create some free space. It hosts my Windows installation so I want to give it some nice capacity. Double click, resize to 100000MB (enough to hold its current content plus a lot more).

This frees up some space in which I can create:
  • sda
    • sda4 (extended) (created automatically, don't worry)
      • sda5 ~100000MB Ext4: Mounted as /
      • sda6 ~100000MB Ext4: Mounted as /home
      • sda7 (RAM in MB * 2)  swap.
The rest of the free space will be a shared NTFS partition. Now check, double check, triple check your settings! There should be tick marks next the the sda5, 6 and 7 drives. Press next, check again, confirm, wait...

Here comes the tricky part. Do NOT install the bootloader to sda MBR as this will fail but to sda/sda5.
Now finish the installation and reboot into Windows (no choice anyway).

The MBR seems to be protected so if you install the bootloader there, the installation will happily fail at the very end ("An error occured duing bootloader installation, computer may not boot." and then "Congratulations! You have successfully installed [...] now reboot" and reboot boots into Windows, what a success!).

Using the Windows bootloader to load Linux
We will simply add an entry the the windows bootloader using EasyBCD. Launch EasyBCD (with admin rights). On the left, pick "Add Entry". On the right select the "Linux/BSD" tab. Use the legacy grub bootloader, give a name to the entry ("Fedora Core 16"), and select the partition that corresponds to sda/sda5. Press "Add Entry" and you're done!

Reboot and you should have a boot menu to launch Linux. It simply forwards the boot to Fedora's own bootloader (grub2).


Edit : Why not UnetBootIn? Actually, until today, I've always used UnetBootIn and got used to its quirks. The biggest issue is that during the installation, Anaconda will detect two mass storage devices : the hard drive and the bootable USB key, and you have to be careful to remove it from the disk layout.

Also, on my PC, Anaconda only offered me to install the bootloader on sdb's MBR (that is the USB key used for the installation) or sda/sda5. In both cases, there was no booting to Fedora. That is why I tried LiveUSB Create : sdb is not visible anymore during the Anaconda installation.

No comments:

Post a Comment