2

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?

UPDATE

Here is the output of lsblk as requested

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
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  

UPDATE

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?

PeakGen
  • 300
  • 2
  • 5
  • 13

4 Answers4

7

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?

muru
  • 207,228
3

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.)

Rod Smith
  • 45,120
  • 7
  • 66
  • 108
0
  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.

UTF-8
  • 5,910
  • 10
  • 34
  • 68
0

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