Ubuntu – How to partition the Hard drive to install Kubuntu

12.04installationkubuntupartitioning

I am a complete newbie to partitioning and I would like some guidance here. Can anyone explain what exactly I should be doing here?

I am installing Kubuntu 12.04 on a currently Windows 7 laptop. My current Partitions say this:

/dev/sda   
/dev/sda1   ntfs    104 MB     35 MB
/dev/sda2   ntfs    319965 MB  87164 MB

Basically, what I want is some guidance on what exactly to do here. All I want is a partition for my OS (Which will be Kubuntu 12.04) and a partition for all of my data. I also want to restart fresh with my hard drive, with only what I mentioned on here. I am installing Kubuntu from a flash drive (I set it up as a bootable device with Universal-USB-Installer-1.9.0.9), as I do not have any blank CDs/DVDs to burn to.

  • What should I name my partitions?
  • What should I set the type as?
  • What size do they need to be?

Edit: My hard drive is 320GB. Just looked it up in my BIOS. This computer will mainly be used for internet browsing and overall just messing around with the Linux OS.

Best Answer

First of all, be warned that (even though it's quite unlikely) you may lose all the data on the hard disk by doing any of the following operations. Before fiddling with partitions, be absolutely sure that you've saved all your important data on a separate storage device.

The first question here is, do you want to keep your current OS and install Kubuntu alongside it, or do you want to delete it? Kubuntu can read Windows partitions, but Windows can't read Linux partitions. So do consider dual-booting, using Windows partition as storage for data such as videos and music.

To setup a dual-boot configuration you will need to free some space for Kubuntu, so shrink the 319965 MB drive (it will probably be called C:). In Windows 7, go to the built-in disk partitioning program (you can find it by typing "part" in the Start Menu). Right click on the partition and select the shrink menu item (or something like that). Shrink it by something like 50000 MB (read to the end before deciding on the shrink amount, this will be the space available for Kubuntu).
(If you want to rewrite the whole drive with Kubuntu, ignore this paragraph)

Now we can proceed to install Kubuntu. Please note that the version 12.04.1 has been released recently and you should use it, but if you don't want to redownload, it's not a big problem too. Also make sure that you've downloaded the correct CD image. It should be Kubuntu Desktop, x64 if your computer is 64-bit (ignore the "recommended" label), else x86.

Boot with the USB drive plugged in (you may need to do some fiddling in the BIOS for it to be accepted as the boot device). Select Start Kubuntu. Then press Install Kubuntu. Check Install this third-party software and press Continue.

And here we proceed with the partitioning.
Select Manual and click Continue. If you want to remove the existing OS, click on every partition (/dev/sda1, /dev/sda2) and Delete them. Either way we should have free space to work with. Now we will create the partitions.

  • The root partition: here all the system files and applications installed with package manager will be stored.
    Click on free space to go to the Create Partition window. The absolute minimum for this partition would be 8000 MB, but that can be not enough. On the system I'm using right now I've installed tons and tons of different packages and I've used about 13 GB, so I recommend to make this partition 16000 MB or even 24000 MB. Also keep in mind this partition shouldn't be too large (i.e. more than 35% of the space), because the rest of the space will be used for your documents and application settings. The type for the partition should preferably be "Primary", but that's not a big deal. Leave the Location... as "Beginning". Use as: "Ext4 journaling file system". Mount Point: "/".
  • The swap partition: this partition is used as additional RAM if there's not enough of it and also to store the state of RAM for hibernation.
    Click on free space. This partition's size should be the same as the amount of RAM on the computer, 2000 MB or something like that. Type... can be Logical. Location...: "Beginning". Use as: "swap area".
  • The home partition is used to store all your data.
    Click on free space. You want this partition to take up all the remaining space, so don't change the partition size. Type... can be "Logical". Location: "Beginning". Use as: "Ext4...". Mount point: "/home"

To sum up, the / partition should be about 16 GB, swap is a few GB, /home is the rest. So if you have 50 GB of space in total, the /home partition will be about 30 GB. If you have more space, go on and make the / partition larger as mentioned before. swap can be made larger too, maybe twice the amount of RAM.
If you have less than 50 GB of space, it may be better to not have a separate /home partition. In that case make one large / partition and then a swap partition of a few GB. swap is actually optional too, but it's quite important...

The Format? checkbox should be on the / and /home partitions if everything went correctly.
Device for boot loader installation should be "/dev/sda" (no numbers in the end!).

No changes have been made until this point, but when you click Install Now, there is no going back. So check that everything is alright and make sure that the computer is connected to a power source. It is also nice to have an Internet connection (through an Ethernet wire).

Select your country and time zone and click Continue. You probably don't need to change the keyboard layout. Click Continue. Your name is a display name. The username is made out of it. The password is quite important: you will be required to enter it to do administrative actions (e.g. sudo command). You may want to choose automatic login. I wouldn't recommend to encrypt the home folder; I've never used it and I'm not sure if it's reliable.

Enjoy the slide show, wait until the installation ends and reboot the computer.

Related Question