Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am new to Linux and would like to install Fedora 11 on a notebook with Windows 7 already installed. Currently the HDD has 2 primary partitions (System Reserved and C:), some free space and an extended partition (D: with user data).

When installing Fedora, I would like to use a recommended partitioning scheme (/boot, swap and LVM for other partitions). However, since only 4 primary partitions are allowed, how do I fit everything onto one HDD?

share|improve this question
add comment

migrated from serverfault.com Jan 27 '10 at 3:33

This question came from our site for professional system and network administrators.

5 Answers

First, I strongly recommend that you read the Fedora 11 Install Guide

It's really going to depend on the existing layout of your system, but here's how I would do it:

  1. Go get a Live CD with GParted on it. I would suggest either the official GParted LiveCD or SystemRescueCD.

  2. Plan the partition layout (this is somewhat dependent on the amount of free space you have available). It's typically easier to have all of your Windows partitions at the beginning of the drive and then your Linux partitions after them, but you also want to have your /boot partition be a primary partition (not technically necessary, but you may confuse the installer if it's not). You may need to shrink or move some of your existing Windows partitions to free up enough space (This is typically safe, but the usual backup warnings apply). It is best if you end up with at least 10GB available for Fedora, although you can fit it into less. Here's the layout I would suggest:

    • System Reserved
    • Windows Root (C:)
    • /boot (~200 MB is plenty)
    • Extended Partition (Contains the rest of the partitions)
    • Windows Data (D:)
    • Free Space (to be filled by Fedora when you do your install)

    Alternatively, you may prefer to just slide all of the windows partitions to the beginning of the drive and see if Fedora will be happy to install to an Extended Partition in the Free space area (it would put /boot and the LVM block all in the Extended Partition).

  3. Start the Fedora 11 install (whether from the Fedora 11 LiveCD or the Install DVD, my preference is for the latter but YMMV).

  4. At the Partitioning screen, tell it you want to do a custom layout and that you want to review it first. This should take you to the Partitioning screen.

  5. Assign the pre-created /boot partition to the /boot mount point (edit that partition in the partitioning screen).

  6. Create an LVM block taking up all of the free space.

  7. In the LVM block, create a swap LV the same size as the amount of RAM you have in your machine.

  8. In the LVM block, create a root partition ( / ). You can have it take up the rest of the space in the LVM (this is the default layout), although it's easier and more flexible to keep it small (10-20GB) and leave the unused space available for future use. If you find you're running out of space on your root partition, you can extend the LV and the filesystem -- the ext3/4 & XFS file systems can even be grown while mounted (lvextend then resize2fs or xfs_growfs).

That should work fine... but seriously, read the Install Doc as I'm sure it will have both more detail and better clarity than I.

share|improve this answer
    
I was just typing out something similar and you beat me to it :). –  dagorym Jul 21 '09 at 14:27
    
I had similar thoughts... Got GParted LIveCD, read the manual (partitioning part of it), created /boot as primary... Only I thought I would create the rest of the partitions without creating LVM - directly in the extended partition. Is this wrong? And another thing just to make sure my understanding is correct: in your setup the D: partition and free space would be a part of the extended partition, right? –  Denys Jul 21 '09 at 16:39
    
D: and free space in the Extended, yes. The main benefit to LVM rather than direct extended partitions (which would also work just fine) is that you have the free space available to allocate to other things (separate LV's for virtual machines, or a separate storage LV for video files that you can grow as needed, etc). Typically, it's much much easier to grow your available storage space as needed than to reduce when you discover you really need that free space on the root partition for something else. –  Ophidian Jul 21 '09 at 18:17
add comment

Have you considered a virtual machine, such as VirtualBox, instead of dual boot? That way you can run Fedora as a guest with Windows as a host - at the same time. That is to say, Fedora would run as a window in Windows. They act like two computers on a network, plus you can do things like copy/paste between windows and of course Samba shares, scp, etc.

share|improve this answer
    
Yes, I tried Sun VirtualBox - it is a bit slow. Finally, if no other choice, I will probably to revert to a virtual scenario. However, my original goal was to come to a state where I run Linux most of the time and occasionally switch to Windows, not vice versa. –  Denys Jul 21 '09 at 12:25
2  
Well, Linux can be the host with Windows as the guest. –  Dennis Williamson Jul 21 '09 at 12:36
    
Ummm... sure, but I don't think I am ready for that yet :) –  Denys Jul 21 '09 at 12:53
    
I recommend Windows host, Linux guest. That's what I run on my laptop. I recommend disabling X-windows if you don't need it. –  Scott Jul 21 '09 at 14:55
add comment

First, BACK UP THE DATA

Second...I know this isn't exactly what you wanted, but if you want Linux installed with Windows intact for your partitions, have you looked at Wubi? It installed Ubuntu into a file that resides inside the Windows filesystem, so you wouldn't have to worry so much about partitioning. It's a full Linux install too, no emulation.

Third, if you want to alter partitions a bit to resize or delete them, try booting Rescue Is Possible (a liveboot Linux rescue disc) with X and use gparted to alter partitions. Whenever you edit partitions, though, you run the risk of losing data! So make sure you have a backup.

Personally I think you could probably get away with having two partitions added to the notebook, a / and a swap, on top of your reserved partition and Windows partition. The /boot and / partitions are there traditionally for rescue purposes or if you overflow your storage capabilities; you should be able to boot with a rescue disk and mount the /boot partition to get to some basic state of functionality.

Another possibility is to research going with a swap file instead of a swap partition.

My advice would first be to look at Wubi which has the least chance of damaging your data, then think about not using a separate data and /boot partition (just a swap and data), then think long and hard about playing with partition schemes, in that order.

Hope that helps!

share|improve this answer
    
Wubi sounds like a nice thing, however I would like Fedora (or CentOS) for development purposes. 'On top of reserved partition' means it would be erased, right? Wouldn't Windows 7 suffer from that? –  Denys Jul 21 '09 at 12:22
    
If I opt for swap file instead of swap partition, then I can create a /boot partition as primary and create others within the extended partition - is it an option? –  Denys Jul 21 '09 at 12:29
    
On top of-I meant that you could keep the other partitions (you'd have your reserved partition, windows partition, a root partition and boot partition, with a swapfile in the / (root) partition. If there's not space, you're going to need to alter your Windows partition anyway with something like gparted...which can lead to data loss, so back up first!... –  Bart Silverstrim Jul 22 '09 at 15:12
    
You might be able to do that idea with the extended partition, I haven't tried it. I think you'd actually want a / and just keep the boot files there, though, along with a swapfile. That way you just have one primary partition for everything. The partition are there to prevent data overflows, things like if a process goes nuts and fills the logs with gigs of data, potentially crashing the OS and rendering it unbootable. Having logs in their own /var partition means it can't overflow the drive, just create havoc that you can still troubleshoot with a usable system. That's a nogo with one part. –  Bart Silverstrim Jul 22 '09 at 15:15
    
Last...I don't know what you're attempting to do with Linux, but like another person suggested...you could download Virtualbox and install CentOS/Fedora in that. Then you don't need to worry about partitioning at all... –  Bart Silverstrim Jul 22 '09 at 15:24
add comment

There is a problem with Windows 7: It makes a small partition on the hard disk during installation, and installing Fedora will write GRUB on the MBR. You can however override it, by manually adding Windows 7 to menu.lst if you don't do it during the installation. Use chainloader +4 too, not +1 as in previous versions of Windows.

share|improve this answer
add comment

i guess now that a free virtualization application like virtualbox is available, there is no need to bual boot. u can install 1 OS as ur primary OS and install the other inside virtualbox as a gues OS.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.