This is an old revision of the document!
Linux Block Device Notes
Linux Disk Partition and Format Notes
Some basic tools
lsblk to list partitions (or list block devices)
lsblk -f or blkid to list the UUIDs
parted
There would seem to be a number of partition tools for Linux CLI.
sudo parted -l- to see all available partition informationsudo parted /dev/sda- to partition the specific drive
When in parted:
printto see current partition informationmkpart helpto list optionmklabel gptto give drive label gptmkpart help mkpartto list specific help items on mkpartmkpart primary ext4 0% 100%to make a partition that take the full optimised drive arearm 1to remove partition 1
Format
sudo mkfs.ext4 /dev/sda1 - to format the drive
Fstab
sudo vim /etc/fstab -to edit the boot disk mount table, remember to make matching mount point directories
mount
mount -t ext2 /dev/sdb1 /mnt
unmount
umount /mnt