Which partition is my OS installed on?

I want to know which partition OS installed on my server.
Below is the fdisk and df command outputs from my server.

[root@ ~]# fdisk -l
Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1058     8393962+  82  Linux swap / Solaris
/dev/sda3            1059        7457    51399967+  83  Linux

[root@ ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              48G   12G   34G  26% /
/dev/sda1              99M   12M   82M  13% /boot
tmpfs                 7.9G     0  7.9G   0% /dev/shm

I noticed that sda1 has an asterisk on the Boot field. Does it signify that the OS is installed in that partition?

I also came upon this article, but I just want to confirm if the OS is installed on sda1.

Is there any linux command to run or files to open to see which partition the OS is installed on?


Well technically speaking, in your case, it's installed on two partitions - sda1 and sda3. sda1 is mounted as /boot. This is where the kernel is held. sda3 is the root partition, where the rest of the OS is installed.


As an alternate (lower level) way of looking at things from EEAA's answer, your OS is installed on /dev/sda -- all three partitions you've listed are required for proper functioning of your system.

  • /dev/sda3 is / - the root filesystem.
    All the stuff you deal with when using your system is located on this partition.
  • /dev/sda1 is /boot - as the name implies this is where Linux puts "bootup stuff"
    This includes GRUB configurations, kernel modules, etc.
  • /dev/sda2 is your [SWAP] partition.
    Linux uses this as a place to shove program data if you use up all your RAM.
    As your system is apparently configured to expect a swap partition you need this to boot, otherwise when Linux tries to activate swap it will throw an error and ask you to fix it on the console.

NOT SHOWN: The boot block (the really tiny bit of code that gets things going after BIOS is done with its power-on tasks).
The boot block get put in the first disk block of the boot drive (almost certainly /dev/sda in your case), and is really "outside" of the partition layout that you see with df or fdisk.


Regarding the link you posted, for more information on partitioning, see this question and its related answers, you may find it interesting.


From what i understand - Your OS is installed on /dev/sda3 as you can see it is mounted on /

The system will boot from sda1