What are the default partition names when installing Linux? Is it the same for Ubuntu?

asked 14 May '10, 21:21

Deano's gravatar image

accept rate: 0%

edited 14 May '10, 22:12

Partitioning Schemas - The basics

The partition schemata is basically the same no matter what Linux Distro you install. After all, it is Linux, NOT the distro, that determines the naming scheme.

for years, the basic schemata was twofold, sort of, depending upon whether you had IDE (which includes MFM or RLL drives) or SCSI.

Nowadays, there is a more, extended naming schema, considering newer hard drive types and buses, or variations of LVM, but I'll cover the original two, which will carry you onward into the others simply by understanding these:

1.) First, the hard drive types were named for IDE HDDs (hd), or SCSI HDDs (sd). From root, since everything is addressed via the filesystem, these block devices were accessable from /dev.

Therefore, and considering that there are two devices addressable on each IDE bus, your primary master would typically be listed as:


The 'third' IDE HDD in your system (which would correlate to Drive zero on Bus 1) would be addressed as the following:


The third SCSI HDD on your first controller (SCSI controller 0), assuming you're not accessing it by LUN (as in the case of a CDROM or Tape Drive tower), would typically be addressed as:


2.) Partitions. Each Hard Drive can have multiple partitions, and each HDD does in fact have at least one, if there is any data present, on that formatted hard drive.

partitions are numbered ordinally with counting numbers, instead of whole numbers (the difference being that as far as integers go, whole numbers start with zero, and counting numbers start with 1).

So the first partition on any hard drive would be numbered 1, the second partition 2, and so forth...

Therefore, your primary boot partition would 'typically' be the first IDE drive, connected via a 40 pin ribbon cable to the first IDE bus's header connector on the motherboard (according to the BIOS, this would be Controller 0, Drive 0, - the primary master).

if you mounted / on the second partition of this primary IDE HDD, and /stuff on the second partition of the second SCSI drive on your system, and /home on the only partition of your first SCSI drive in your system, then your /etc/fstab might look like this:

/dev/hda1    /boot         ext2   defaults          1   2
/dev/hda2    /             xfs    defaults          1   1
/dev/sda1    /home         ext4   defaults          1   2
/dev/sdb2    /stuff        xfs    defaults          1   2
/dev/sdb1    swap          swap   defaults          0   0
/dev/hdc     /cdrom        auto   noauto,owner,ro   0   0
/dev/fd0     /floppy       auto   noauto,owner      0   0
proc         /proc         proc   defaults          0   0
devpts       /dev/pts      devpts gid=5,mode=620    0   0
tmpfs        /dev/shm      tmpfs  defaults          0   0
usbfs        /proc/bus/usb usbfs  devgid=10,devmode=0660   0   0

The /etc/fstab is your 'file system table', which indicates what is mounted where (more specifically, which directories are mounted on what devices and partitions), and is space delimited. the third field in the file indicates the type of file system you have prepared on this partition, and in the example above it shows an extended 2 file system for your /boot, and extended 4 file system for your /home, a swap partition and a couple of SGI XFS file systems too.

As you can probably already extrapolate, the floppy drive is device /dev/fd0 and it is mounted as /floppy, while the cdrom drive is the primary drive located on the second IDE bus at /dev/hdc (PATA is more correct than IDE, but nobody says that. Nevertheless, the correct terminology is PATA and SATA and SCSI).

The fourth field above, can simply be 'defaults', or might have a comma delimited set of mounting options such as 'noauto,owner,ro' for devices like CDROMS - which are 'ro', or Read Only, and even have devmodes such as default masks and group ids such as 'devgid=10,devmode=0660', in our example.

The last two fields, concern dumps and the order in which filesystems are to be checked at boot time, if they are present.

Getting back to what I mentioned above in defining what /etc/fstab is, I think that as a point of extremely important clarification, I should emphasize that there is an enormous difference between partitions and directories.

Partitions are the physical and logical demarcations separating regions of your disk, while directories are simply the logical hierarchy of how your filesystem is laid out.

Directories are NOT Partitions - And Don't Confuse the Difference!

The following are NOT partitions, and to confuse them with such is a huge mistake:


As you can clearly see in the /etc/fstab example above, various disks on our example system have been partitioned and certain directories have been mounted on those partitions.

Logically, everything stems from / (root), but often, people like to mount directory subtrees beginning with /usr, /var, /home, and others on separate partitions to facilitate certain systems administration functions like, being able to replace an operating system without destroying all user data in the /home directory tree, or mounting /var/log on it's own partition or completely separate logging server, for example.

Be careful not to mix apples and oranges. Again, Directories and partitions are two completely different concepts - fruits that are produced from different trees.

Mounting Remote Resources in fstab

A couple of other rather important schema for mounting directories relates to NFS and UNC, which would show up in an /etc/fstab entry such as:




The first example above shows the first fstab entry for an nfs mount on a remote host named 'box' (by its FQDN), and the second example shows how you would mount a resource via, for example, a NetBIOS UNC (which you would normally think of as \\winbox\c$)

Obviously, the actual partitions that these two mount points exist on are physically on other machines, so do view that partition data, you would need to examine fdisk or a similar tool locally on either box, or winbox, respectively.

And the Monkey Wrench - libata

Now that we've covered the standard. I have to throw in a little snafu that is sometimes present with some distros (and even this is different from version to version, sometimes being used in one version of a distro and then perhaps even being discarded in a later version), and that is the subject of libata, which has been available since kernel 2.6.20.

You should note, that the use of libata doesn't change anything that I've stated above, it simply changes how you are going to view and access these devices if libata is used on your particular version of the distro that you've installed (um..., booted into, rather). And it does tend to confuse, or at least obfuscate an elegant and simple schema, IMNSHO.

If you're distro defaults to using libata then most everything is going to be listed as /dev/sdXY, where X = the ordinal device number and is represented as an alphabetic character, and Y = the ordinal partition number represented as a counting number (integer that is >= 1).

This can cause some confusion, however, when, for example, you have a device such as /dev/sdb - is that the second SCSI device? The second SATA or IDE HDD?

Finally, under the libata naming schema, CDROM/DVD devices are going to be referred to as /dev/srX, where X = the ordinal device number and is represented as an alphabetic character.

This too is confusing, and IMO, only serves to obfuscate what kind of device is actually present, since you no longer can tell from just running the mount command or cat'ing /etc/fstab whether your DVD drive is an IDE (PATA) device, or a SCSI device.

For a bit more reading on the subject, you can consult the man pages for fstab (which is likely going to be different depending on whether your distro defaults to using libata or not), or check out the LQ wiki here: http://wiki.linuxquestions.org/wiki/Fstab

Well I hope that helps!

This answer is marked "community wiki".

answered 15 May '10, 00:18

tallship's gravatar image

accept rate: 20%

edited 05 Jul '10, 12:08

guerda's gravatar image


this is my super simple answer

By default, most distributions will have 3 partitions, root or / "swap" and "Home"

some are even more simple but not recommended. Ubuntu used to just create a root partition and a "swap" partition when you went with automatic install erase entire disk. I am not sure if they changed that "not-good" practice. The problem with not creating a home partition is that there is a very high chance that you will loose all your personal files and settings if something happens to the root partition or if you are installing or upgrading to a newer version of your distro.


answered 15 May '10, 04:09

madpuppy's gravatar image

accept rate: 10%


You gave an incorrect answer.

Those aren't partitions and the guy who answered the question before you already made that clear.

swap doesn't have to be a partition either. It can be a swap file in its own directory too. A lot of linux distributions are doing that now so you don't have to make a special partition for swap memory.

You're answer is wroing.


answered 24 May '10, 20:26

Anthony%20Stanton's gravatar image

Anthony Stanton
accept rate: 0%

edited 24 May '10, 20:44

Please use comments for this kind of feedback. Furthermore, keep in mind that the order of answers might change over time.

(24 May '10, 21:49) Jazz ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 14 May '10, 21:21

Seen: 16,266 times

Last updated: 05 Jul '10, 12:08

powered by OSQA