Lesson 2

Date: 1/29/2014
Linux installation and upgrade
Linux for Engineering and IT Applications


Disk partitions in Linux
  • In x86 architecture, there are maximum 4 primary partitions on a hard drive.
  • /dev/sda1
    /dev/sda2
    /dev/sda3
    /dev/sda4
    
    One of them can be of "extended" type and doesn't contain a file system, but can contain logical partitions. Say,
    /dev/sda1 - primary
    /dev/sda2 - extended
    /dev/sda5 - logical
    /dev/sda6 - logical
    /dev/sda7 - logical
    
    Max number of logical partitions is 12. Their sequence number can not be skipped, unlike that for the primary partitions.
  • fdisk, cfdisk, and parted can be used for partitioning a drive,
  • Each partition type is assigned a unique code, for example
  • 0x06 - FAT
    0x82 - Linux swap
    ox83 - Linux filesystem
    
  • File systems can be created with mkfs command
  • mkfs -t ext3 /dev/sda1
    
  • To create a swap partition, use mkswap
  • mkswap /dev/sda5
    



Take me to the Course Website