Zemanta Related Posts Thumbnail

Dual-boot Fedora 17 on LVM and Windows 7 on a PC with 2 hard drives

This article offers a step-by-step guide on how to dual-boot Windows 7 and Fedora 17 on a computer with two hard drives, with Fedora 17 installed on an LVM partitioning scheme. LVM, the Linux Logical Volume Manager, is the default disk partitioning scheme in Fedora 17, but disk space allocation to the logical volumes could be better.

Take the image below, for example, which was taken from a test installation of Fedora 17 KDE. It shows the default disk space allocation to the logical volumes. You can see that there are two primary partitions, one of which is a boot partition (/dev/sdb1) and the other (/dev/sdb2), the LVM Physical Volume. In addition, there are three logical volumes (see the top of section of the image). They are: lv_root, lv_home and lv_swap. Notice that there are no free space available.

That is because Anaconda allocates all available disk space to the logical volumes, when it is supposed to allocate just enough to install the system, especially to the root logical volume. For a desktop system, allocating 51 GB to the root logical volume is a waste of disk space.
Default Fedora 17 Partitions

The point of this tutorial, then, is to show how to dual-boot Fedora 17 and Windows 7 on a computer with two hard drives, with proper disk allocation to the logical volumes. Because the installation process is the same across all the Fedora 17 editions, this tutorial can be used to set up a dual-boot system between Windows 7 and Fedora 17 (main edition), which uses the GNOME 3 desktop environment, or any of the Fedora 17 Spins.

If you are not familiar with LVM and with disk partitioning in Linux, it is highly recommended that you read guide to disks and disks partitions in Linux and introductory articles to LVM here.

As on a default installation, two primary partitions and three logical volumes will be created. The first primary partition, which is a Standard partition, will be mounted at /boot, that is, it is the boot partition, where all boot-related programs will be located. The second primary partition will be the LVM Physical Volume, under which the three logical volumes will be created.

After the installation has completed, the computer will always boot into Windows, since it is installed on the first hard drive. At that stage, you have two options, if you want to be able to boot into Fedora: Change the default boot disk to /dev/sdb in the BIOS, or add an entry for Fedora in Windows 7’s boot menu. Because Fedora’s installer automatically adds an entry for Windows 7 in GRUB’s boot menu, using the first method requires very little effort; no additional software installation is required. The second method involves installing a special program on Windows 7. From experience, the second method is not necessary, so the recommendation is to use the first method.

If you have not done so already, download an installation image of Fedora 17 from here. Transfer it to a suitable media and boot the computer from it. Start the installer and click through the first steps until you get to the one shown in the image below. Select Basic Storage Devices, the click Next.
Fedora 17 Storage Devices

Because the hard drive that will be used for Fedora will be partitioned manually, select Create Custom Layout. Next.
Fedora 17 Partition Methods

Selecting Create Custom Layout and clicking Next in the previous step should land you in the window shown in the image below, where the disks and partitions connected to the computer are listed. At the top of the list is sda, where Windows 7 is installed. You do not want to mess with that one. Any action you take here MUST be on sdb, the target disk for Fedora 17. If there are existing partitions on it, as in this example, delete them. You do that by selecting each partition and clicking Delete. Again, be sure that you are not messing with any partition under sda.
Existing Partitions

After deleting the partitions under sdb, select the free space and click Create to start creating partitions. You will be presented with the window shown here. The default option on this window is Standard, which is what we want. Click Create.
Storage Types

On the next window, shown here, there are three options that we have to modify. They are: Mount Point, File System Type, and Size (in megabytes). For the boot partition, the mount point will, of course, be /boot. While the default file system type on Fedora and virtually all Linux distributions is Ext4, there are other options. However, you do not have to bother about them. Aside from physical volume (lvm) and swap, which we will be using further later, you do not need to bother about the rest, at least for this tutorial.
Anaconda Filesystem Options

When the right options for the boot partition have been selected, the window should look just like the one shown here. Notice that for the size, 500 MB was allocated. That is the default size allocation for a boot partition on most Linux distributions. If you do not have a lot of disk space to spare, you can go lower than that. As low as, say, 100 MB. OK.
Create /boot

With the boot partition out of the way, select the free space on the main window, and click Create. That should bring up the same window you saw earlier. Since the next partition is a primary partition for LVM, select LVM Physical Volume. Create.

Please share:

8 Responses

Add a Comment

Your email address will not be published. Required fields are marked *