Partition Types

Partitions-Mass-Storage-Definitions-Naming-HOWTO
Prev |  | Next

# 8. Partition Types

## 8.1. Linux Partition Types

A partition is labeled to host a certain kind of file system (not to be confused with a volume label. Such a file system could be the linux standard ext3 file system or linux swap space, or even foreign file systems like (Microsoft) NTFS or (Sun) UFS. There is a numerical code associated with each partition type. For example, the code for ext2 is 0x83and linux swap is 0x82(0x mean hexadecimal).

## 8.2. Foreign Partition Types

The partition type codes have been arbitrarily chosen (you can't figure out what they should be) and they are particular to a given operating system. Therefore, it is theoretically possible that if you use two operating systems with the same hard drive, the same code might be used to designate two different partition types. OS/2 marks its partitions with a 0x07 type and so does Windows NT's NTFS. MS-DOS allocates several type codes for its various flavors of FAT file systems: 0x01, 0x04 and 0x06 are known. DR-DOS used 0x81 to indicate protected FAT partitions, creating a type clash with Linux/Minix at that time, but neither Linux/Minix nor DR-DOS are widely used any more.

## 8.3. Swap Partitions

Every process running on your computer is allocated a number of blocks of RAM. These blocks are called pages. The set of in-memory pages which will be referenced by the processor in the very near future is called a "working set." Linux tries to predict these memory accesses (assuming that recently used pages will be used again in the near future) and keeps these pages in RAM if possible.

If you have too many processes running on a machine, the kernel will try to free up RAM by writing pages to disk. This is what swap space is for. It effectively increases the amount of memory you have available. However, disk I/O is about a hundred times slower than reading from and writing to RAM. Consider this emergency memory and not extra memory.

If memory becomes so scarce that the kernel pages out from the working set of one process in order to page in for another, the machine is said to be thrashing. Some readers might have inadvertenly experienced this: the hard drive is grinding away like crazy, but the computer is slow to the point of being unusable. Swap space is something you need to have, but it is no substitute for sufficient RAM.

## 8.4. Complete List

From the fdisk help:

             0  Vide            1e  Hidden W95 FAT1 80  Old Minix       bf  Solaris
     1  FAT12           24  NEC DOS         81  Minix / old Lin c1  DRDOS/sec (FAT-
     2  XENIX root      39  Plan 9          82  Linux swap / So c4  DRDOS/sec (FAT-
     3  XENIX usr       3c  PartitionMagic  83  Linux           c6  DRDOS/sec (FAT-
     4  FAT16 <32M      40  Venix 80286     84  OS/2 hidden C:  c7  Syrinx
     5  Extended        41  PPC PReP Boot   85  Linux extended  da  Non-FS data
     6  FAT16           42  SFS             86  NTFS volume set db  CP/M / CTOS / .
     7  HPFS/NTFS       4d  QNX4.x          87  NTFS volume set de  Dell Utility
     8  AIX             4e  QNX4.x 2nd part 88  Linux plein tex df  BootIt
     9  AIX bootable    4f  QNX4.x 3rd part 8e  Linux LVM       e1  DOS access
     a  OS/2 Boot Manag 50  OnTrack DM      93  Amoeba          e3  DOS R/O
     b  W95 FAT32       51  OnTrack DM6 Aux 94  Amoeba BBT      e4  SpeedStor
     c  W95 FAT32 (LBA) 52  CP/M            9f  BSD/OS          eb  BeOS fs
     e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi ee  GPT
     f  W95 Etendu (LBA 54  OnTrackDM6      a5  FreeBSD         ef  EFI (FAT-12/16/
    10  OPUS            55  EZ-Drive        a6  OpenBSD         f0  Linux/PA-RISC b
    11  Hidden FAT12    56  Golden Bow      a7  NeXTSTEP        f1  SpeedStor
    12  Compaq diagnost 5c  Priam Edisk     a8  UFS Darwin      f4  SpeedStor
    14  Hidden FAT16 <3 61  SpeedStor       a9  NetBSD          f2  DOS secondary
    16  Hidden FAT16    63  GNU HURD or Sys ab  Amorce Darwin   fb  VMware VMFS
    17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
    18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
    1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep
    1c  Hidden W95 FAT3 75  PC/IX           be  Amorce Solaris  ff  BBT

Prev | Home | Next
Device Major and Minor Numbers |  | How Many Partitions