This is the first time I made my laptop 100% Linux. I installed the latest version of Ubuntu 14.04.2. I am a windows user and in the ubuntu installation I selected "Erase Disk and Install Ubuntu". After the installation I expected to see some partitions in Devices > Computer just like how I can see partitions like C: , D: etc in windows.

But inside that I could only see some folders. So I decided to check for the partitions using the terminal. Below is the screenshot.

enter image description here

I copied the commands from internet and I have no clear idea about what my partitions are. Can someone please help me to identify my partitions?


Here is the output of lsblk as requested

sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0 463.9G  0 part /
├─sda2   8:2    0     1K  0 part 
└─sda5   8:5    0   1.9G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom  


Below is the screenshot of gparted.

enter image description here

hmm.. Seems like I have only 1 big partition. Can some one please help me to "re partition" this to atleast 3 partitions?

  • Please post a screenshot of gparted (sudo gparted /dev/sda) – kos Apr 5 '15 at 19:10
  • @kos: It says gparted: command not found – Lemon Juice Apr 5 '15 at 19:11
  • Instead of posting screenshots of text, please post the actual text. Also, try the command lsblk without any options or sudo, and add that output as well. – muru Apr 5 '15 at 19:12
  • @muru: Please check the updated answer – Lemon Juice Apr 5 '15 at 19:17
  • gparted is a software and you run it with gksudo gparted also sudo parted -l will show you your parted system. – JoKeR Apr 5 '15 at 19:18

In screenshot

Primary partition

Here only one primary partition is available but normal system support max 4 primary partitions but afterward no partition can made thats why we make one partition secondary (extended) 1. Main file system /The first partition / is main partition where the bootloader is installed and this is main file system of linux which is of type fourth extended file system 'ext4'

Extended partition

  1. Swap It is the area where the ram uses it for operations normally our RAM size quite larger and compatible for os operations but the if RAM size is smaller than required then system uses the swap area memory.

  2. Unallocated space Here this partition is not usable due to its small size

| improve this answer | |
  • I am in the process of partitioning., But after creating a new partition I can't see a path or something in gparted like others does. For an example, instead of a path like `/dev/sad" it is showing "New Partition#1". How to rename this? – Lemon Juice Apr 7 '15 at 14:55

From the fdisk and lsblk output we can see that:

The only partition you should expect to see is the root partition, since swap isn't for direct usage. It will look something like this:

enter image description here

As for re-paritioning, note the key icons next to all the partitions - they can't be modified. And that's because they're all in use. To modify them, you'd have to boot to a live CD, so that they're not in use. See Why I'm seeing a lock besides the partition I'm trying to modify with gparted? or How to resize partitions?

| improve this answer | |
  • Thank you for the reply. Please check the updated question. The answer from SO user mchid says I can't re-partition it again without the installation CD, but I can see "Partition" section in gparted window? – Lemon Juice Apr 5 '15 at 19:28
  • Mind providing step by step instructions please? – Lemon Juice Apr 5 '15 at 19:39
  • @JustCause both links provide a few step-by-step instructions. Do you want me to simply copy-paste them here? – muru Apr 5 '15 at 19:39
  • Reading your edited answer and another answer, it sounds like I don't have to create a partition at all, isnt it? – Lemon Juice Apr 6 '15 at 15:12
  • @JustCause I would create one more for /home, so that I can keep media, docs in it - things I wouldn't want to lose when I format for reinstallation. – muru Apr 6 '15 at 23:13

Muru's answer is correct; however, there's another issue implicit in your question: Why do you want to create partitions?

Linux and Windows use partitions in very different ways. Windows users often create separate partitions to hold the OS, user-installed programs, user data files, and perhaps for other reasons. Under Linux, OTOH, separate partitions are often created to hold swap space, kernels, user data files, temporary files, and for other reasons. The list of reasons to create partitions in each OS is not identical, although there is some overlap. If you're coming at Linux from a Windows background and try to apply typical Windows partitioning strategies, you'll end up with something sub-optimal at best, or dig yourself into a hole at worst.

My own recommendation for new Linux users is to keep it simple. Create three partitions for Linux:

  • root (/) -- This partition is required and, in the absence of other partitions, holds everything. An Ubuntu installation can be done in under 10 GiB of space, although to give yourself the room to install lots of stuff, 20-30 GiB might be a good size for this partition.
  • swap -- This partition is used as an adjunct to memory. Make it a little larger than your computer's RAM so that you can use a suspend-to-disk feature if you so desire.
  • /home -- This is where user files go in Linux. Creating a separate /home partition enables you to do a clean re-install without touching your user files. Devote the rest of your disk space to /home so you can store big user files (multimedia files, for instance).

By default, Ubuntu creates the first two of those partitions but does not create a separate /home partition. In some cases, you may need to create other partitions. A separate /boot partition holds kernels and is a practical necessity if you're using LVM or some types of RAID setups, for instance. Advanced users might create partitions for /var, /tmp, /usr, or other purposes. In most cases, though, the three I've outlined in the bulleted list are adequate.

I see a lot of new Linux users recommending the use of a separate data partition (/data or something similar). This is Windows thinking that's re-inventing the wheel -- "the wheel" in this case being the /home partition. There are very few cases where it makes sense to create a separate data partition from /home. The most common of these is when dual-booting -- in that case, a separate partition to hold shared data may make sense. New Linux users also sometimes ask about creating a partition to hold user-installed programs separate from the OS. Given the way Linux stores programs and packages, this makes little sense, unless perhaps you want a separate /usr/local partition to hold locally-compiled programs -- but few users would really use such a partition.

Note also that any Linux partition can be either primary or logical. (Extended partitions are merely placeholders for all your logical partitions. They don't really count, although you have to create one if you want to use logical partitions.)

| improve this answer | |
  • wow, cool answer. I have a question. That means I have to do nothing right? Yeah I thought about the partitions in the exact windows way you explained. – Lemon Juice Apr 6 '15 at 15:10
  • I am in the process of partitioning., But after creating a new partition I can't see a path or something in gparted like others does. For an example, instead of a path like `/dev/sad" it is showing "New Partition#1". How to rename this? – Lemon Juice Apr 7 '15 at 14:27
  • Partitions do not inherently contain paths; those are assigned by the OS. In the case of Ubuntu (and every other Linux of which I'm aware), the path is assigned by the mount command (if it's mounted manually), by the automount utility (typically for external devices and sometimes for partitions shared with other OSes), or in the /etc/fstab file (if it's mounted automatically at boot time, usually as part of the OS). – Rod Smith Apr 7 '15 at 15:59
  1. Boot a live system.
  2. Open GParted.
  3. Delete sda5.
  4. Delete sda2.
  5. Resize sda1 from the right to the left.
  6. Create a new extended partition taking in all of the remaining space.
  7. Create a new swap partition.
  8. Create the other partitions you want.
  9. Boot into your installed system.
  10. Open GParted.
  11. Right-click on your swap partition and choose "swapon".
  12. Right-click it again and choose "Information".
  13. Copy the UUID to the clipboard.
  14. Update the swap line in /etc/fstab.

Notice that you should back up your data since changing something on your partitions comes with a risk of data loss, especially in case of a power failure.

| improve this answer | |
  • Thank you. Can you be more clear about the "swap" section? – Lemon Juice Apr 5 '15 at 19:43
  • Notice that you should back up your data - This is a new installation, No data except the software installed by ubuntu it self. – Lemon Juice Apr 5 '15 at 19:44
  • I don't understand what you mean. If you don't know how to make one: Make a new partition and choose "linux-swap" as the file system like otherwise for example ext4, ext3 or ntfs is chosen. – UTF-8 Apr 5 '15 at 19:47
  • Steps #3, 4, 6, 7, and 11 can be replaced by simply resizing the extended partition after resizing /dev/sda1. Doing it more simply is better because deleting and re-creating swap will require editing /etc/fstab to have the new swap partition recognized. (Your procedure doesn't mention this, so that's a total of six steps replaced by one.) – Rod Smith Apr 5 '15 at 19:59
  • You're right that I forgot about /etc/fstab. I'm sorry I forgot that. However, resizing the extended partition with the swap partition will require the data of /dev/sda5 to be copied which can take a long time for big amounts of data. But for such a small partition either way works about the same. – UTF-8 Apr 5 '15 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.