104.1 Create partitions and filesystems Flashcards
What does GPT stand for?
GUID Partition Table
How many partitions does GPT support?
128
What is the largest partition size GPT allows for?
1 ZB (zettabyte)
What does the GPT need to boot?
It needs UEFI to boot
What does this mean? /dev/sda1
This is the first partition of the sda drive.
What does a block device called “vdb” mean?
v: virtual hard disk
d: disk
b: second virtual disk
What is the command to create a legacy type MBR partition?
#fdisk and then follow the wizard Example: #fdisk /dev/sda
What does a block device called “sda” mean?
s: scsi
d: disk
a: first disk of the drive
What do you do after creating a legacy MBR partition?
You have to put a FS on it and then mount it
What commands lets you see the partitions?
fdisk -l
What is the command that creates partitions of MBR or GTP types?
parted and then follow the wizard
What are the partition IDs?
83: Standard Linux FS
82: Linux swap partitions
8e: Linux LVM Volumes
What commands can you use to find out what type of partitioning setup you have?
#lsblk #fdisk #fdisk /dev/sda
What is the command besides #parted is used to create GTP partitions on disks?
Besides #parted, you can use #gdisk and follow the wizard.
What utilities can be used to create swap partitions?
#fdisk > legacy type MBR partition #gdisk > GTP partitions #parted >MBR or GTP types
What are the 2 ways in which swap memory can be created?
Using a swap file within the FS as swap space
What is the downside of using a swap file as swap space?
A swap file represents a performance hit for the system since the kernel has to write the data to a file.
What is the preferred fashion to create swap space?
Use a swap partition dedicated to swap space since it is less taxing in performance on the system.
What are the common options used once inside the #gdisk wizard?
P to see the partitions N to create a new partition 83: Standard Linux FS 82: Linux swap partitions 8e: Linux LVM Volumes W to write the partition
Once a swap partition is created, what has to be done next?
A swap FS has to be put into the partition and then turn on the partition
What command is used to put a swap FS into a swap partition?
#mkswap -L (it formats the partition to be used as swap space) #mkswap -L SWAP /dev/sda2
How do you turn on or enable a swap partition after creating the partition and putting a FS on it?
#swapon -U (UUID) given in the output of the #mkswap command #swapon -L
What command can you use to verify swap space is available?
free -m
What file has to be modified so that a new swap partition can keep on between reboots?
/etc/fstab and add the label of the swap partition