SWAP_PARTITION="/dev/sda8"
TMP_PARTITION_SIZE="10G"
+# Default options when mounting partitions
+# For SSD and ext4, use relatime,discard
+PARTITION_MOUNT_OPTS="relatime,discard"
+
# New user to create
REGUSER="hugo"
LFS="/mnt/hvlinux2"
LFS_PARTITION="/dev/sda5"
#BOOT_PARTITION="/dev/sda1"
+
SWAP_PARTITION="/dev/sda3"
+# Default options when mounting partitions
+# For SSD and ext4, use relatime,discard
+PARTITION_MOUNT_OPTS="relatime,discard"
+
# New user to create
REGUSER="hugo"
# /tmp is now mounted with tmpfs.
TMP_PARTITION_SIZE="8G"
+# Default options when mounting partitions
+# For SSD and ext4, use relatime,discard
+PARTITION_MOUNT_OPTS="defaults,noatime"
+
# New user to create
REGUSER=""
if [ -n "${BOOT_PARTITION}" ]; then
install -v -m755 -d ${LFS}/mnt/boot
- echo "${BOOT_PARTITION} /mnt/boot auto defaults,noatime 0 0" >> ${LFS}/etc/fstab
+ echo "${BOOT_PARTITION} /mnt/boot auto ${PARTITION_MOUNT_OPTS} 0 0" >> ${LFS}/etc/fstab
fi
if [ -n "${SWAP_PARTITION}" ]; then
echo "${SWAP_PARTITION} none swap sw 0 0" >> ${LFS}/etc/fstab
fi
-echo "${LFS_PARTITION} / auto defaults,noatime 0 0" >> ${LFS}/etc/fstab
+echo "${LFS_PARTITION} / auto ${PARTITION_MOUNT_OPTS} 0 0" >> ${LFS}/etc/fstab
cat >> ${LFS}/etc/fstab << "EOF"
proc /proc proc defaults 0 0