lördag 15 juni 2013

Setting up Fedora 18 to dual-boot with factory installed Windows 8

This guide is not intended to be a complete Fedora-installation guide. There are probably plenty of them out there which I can't match in quality or detail.


The goal for me is to provide something that may fill the gaps in other descritptions of getting the OS installed alongside factory installed Win 8 and to be able to chose between the two at boot time.
And this on Toshiba PC hardware. Other brands may behave similarly but that is a bit out of my scope.

Microsoft requires hardware manufacturers who want to label their products with the Windows 8 logo, to use Secure boot. A feature part of the UEFI standard.
UEFI and secure boot may be a bit of a challenge to OS'es other than Windows 8.

UEFI is supported by Fedora and many other Linux distro's out there, but Secure boot is another issue.
Luckily, as of Fedora 18 Secure boot is supported too, so it does not need to be switched off in the BIOS.

Actually, setting up Fedora 18 to boot alongside a factory installed Windows 8 is quite easy.
In fact, it may be explained in 2 sentences: 


- Prepare some space on your storage device
- Install Fedora with the standard options

I will try to go through the steps in this guide.

Note 1) Before rushing along installing Fedora, I strongly suggest that you create recovery media for Win8. Not because the installation is unstable, behaving bad or anything like that.

Instead, think of the situation this way: Fedora is free software and can be downloaded. Your Windows installation on the other hand is not free. 
What may seem as a small mistake may cause Windows to not boot. Instead of having to pay for a Win 8 recovery set, you can then use your own created recovery-discs or USB stick to get the MS OS back.

Not much of a decision-problem, right?
A useful document describing the process of creating recovery media is found here.


Note 2) To be able to use the Boot menu (a feature in BIOS and UEFI) press F12 at the TOSHIBA-logo.
If the unit was shut down (in contrast to Restarted) from Windows 8, you will need to start Windows 8 again and choose Restart from Windows 8 to be able to access the Boot menu (Hybrid boot prevents access to the Boot menu among other things).

Step 1 - Prepare space for Fedora

 
You'll need to prepare space for the Fedora installation
I suggest to do that from Windows.
Shrinking a mounted partition is a snap and I was really surprised to see that is was done so fast.

In this first step, I will make use of the Disk Manager.
I am sure there are some quick-keys or simpler methods to get there compared to the way I do it.

Start Windows and see this UI...whatever it is called now....but it's not Metro anymore.



Locate the tile taking you to the Desktop and click it.
In the Desktop, locate Files (Explorer) in the Taskbar and click it.



Once Files have started, look in the side pane on the left side and locate Computer.



Right click and choose Manage.



This will start the Computer management tool. From here you can find Disk Management in the left side tree. Click it.
Your disks will be displayed similar to my screen below.



Now look at the disks available in the lower middle-row section.
My layout shows Disk 0 and Disk 1.
Disk 0 is my HDD on which Windows 8 is installed, and that's the one I'll make changes to. 
Look for the largest partition on this disk.
As you can see, the largest one in my case is about 455GB and this is the "C" partition.
That's a lot of space so I will reduce the C drive so that Fedora can be installed next to it.

Right click the section of Disk 0 which represents the C drive (in my case the 455GB partition) and select Shrink volume...



Here's a logic-test. If it becomes complicated, think of it as "how much space do you want to give to Fedora?"
I chose 200GB which is more than enough for the OS and some personal data. 
It's up to you.

Press Shrink to make the change effective.



 Now we have made us an empty, Unallocated, space beside the C partition. This is where we'll install Fedora.





Step 2) Install Fedora

Insert a Fedora 18 Live media into the USB port.
Reboot the unit and press F12 a few times when the TOSHIBA-logo is shown.
Select the USB stick to boot from.
If You are not able to see your stick in the list, it may mean that you need to create it according to this special instruction since the liveusb-installer may not be able to create a UEFI bootable  media.

Once Fedora 18 has booted, the test-or-install window should be displayed.
I recommend that you connect to internet before proceeding since seems to be mandatory to be able to install Fedora.

If you are ready to install, press the install button.


 
Choose a language to use during installation.



Now we are at the main installer screen. I will not go into screens showing how to set keyboard layout and the date/time settings. There are other such guides existing.
Instead I go straight to the Storage settings by clicking on it.

The Fedora installer shows a list of storage devices which could serve as install targets.
The target now is the internal HDD....


 ...which is selected here. Press Continue (lower right corner) to set up partitions on the disk.




Since we cleared some space on the HDD before, Fedora finds this and tells us we are done. 
Please note: The changes I make to the standard options given by the installer, are from this point my personal preferences.

I like to change the partition scheme and verify the layout. First I click Partition scheme configuration to change from LVM to...


... Standard partition. And I check the option to Customize the partitioning and click Continue.





Fedora installer finds 200 GB available space (shown in the magenta square in the lower left corner)  and reports the existing Windows partions under the label Unknown (in the list-view on the left side). 

If you can accept the standard Fedora partition layout, press the blue text saying "Click here to create them automatically
This should create a layout similar to the one below (depending on the space you have set aside for Fedora).


Interesting and also important in the above layout is that Fedora creates a separate EFI partition (mounted in /boot/efi).
This is needed for the UEFI firmware to be able find Fedora and present it as a boot-option.

Click Finish partitioning to drop back to the main installer screen.
We're actually almost done. Press Begin installation (lower right corner) to start installing.



During installation you'll need to set a root password.





Set the Root password and press Done.



Installation running.



After not too long, the installation is finished and you can quit the installer.
Reboot your PC.





3) Select OS to boot
Press F12 at the TOSHIBA-logo to bring up the boot menu.
Below is a sample of a boot menu. I choose the HDD as boot device and press ENTER,


Now comes the cool part - the UEFI recognizes the installed OS'es on the HDD and lists them for me to choose.


That's it!!
Now you can select which OS to start at every boot by first entering the boot menu.


Have fun with Fedora on your Toshiba PC!