Automatically mount drives on boot
Configuring fstab entry for disks to mount automatically on boot
Table of Contents
Terms and Utilities
- blkid
- Check LABEL, UUID, PARTUUID from device
- Create Mount Point
mkdir /mnt/mpDisk Partition tools
lsblkblkidfdisk
Fstab entry
UUID=<PartitionUUID> /mnt/mp ext4 0 2
To create a mount point using fstab, follow these steps:
1. Create the Mount Point:
mkdir /mnt/mp
2. Identify the Partition:
- Use
lsblkto list all partitions on your device:lsblk - Check the block ID for the partition you want to use:
Replace
blkid /dev/sdxN<partition_id>with the unique identifier from the partition of which you're willing to set up a mount point
3. Set Up Fstab Entry:
- Create a Fstab entry for your mount point:
Where:
UID=<PartitionUUID> /mnt/mp ext4 0 2UIDis the unique identifier for the partition./mnt/mpspecifies the mount point name and directory structure.ext4indicates an ext4 partition, which is efficient for performance.0sets root as empty, requiring expansion if necessary.2expands the root parent if needed.