Lesson 15

Date: 7/5/2017
Encrypted file systems
Linux System Administration

Exercise: partition a drive
  • Run command fdisk on /dev/sdb:
    fdisk /dev/sdb
    At the prompt, type ? to see the partitioning commands.
    Type d and select all the patitions, one after another.
    Type n, choose primary, 1. Accept the lower boundary, then put 250 GB for the upper partition boundary. Toggle the partition type to "Linux filesystem".
    Similarly, create the second partition with the boundaries between 250 GB and 500 GB
    Type w to write the partition table and exit the fdisk.

    There are about 15 different file systems supported on Linux. The most common one is ext4.
  • Create ext4 file system:
    mkfs.ext4 /dev/sdb1
    Create a mounting point, then mount the file system:
    mkdir /driveb1
    mount /dev/sdb1 /driveb1
    Make sure /driveb1 is mounted:
    df -h
  • Unmount the drive, then mount it again:
    umount /driveb1
    mount /dev/sdb1 /driveb1

  • The drive is ready to host data. Keep in mind that it can be removed from the system, then installed on the other computer and mounted. Data can be stolen along with the drive.

  • Take me to the Course Website