Add option to specify filesystem mount options
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 9 Aug 2014 15:30:42 +0000 (11:30 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Mon, 6 Oct 2014 01:48:16 +0000 (21:48 -0400)
config/acer-731/sysinfos
config/amd64/sysinfos
config/sysinfos.default
stage1/create-config-files

index ddc1a59..0f8b2ea 100644 (file)
@@ -16,6 +16,10 @@ LFS_PARTITION="/dev/sda4"
 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"
 
index 3166c60..b20247c 100644 (file)
@@ -13,8 +13,13 @@ MAKEJOBS=2
 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"
 
index 281e3be..1ffd631 100644 (file)
@@ -34,6 +34,10 @@ LFS="/mnt/hvlinux"
 # /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=""
 
index 00a5894..f4c1246 100755 (executable)
@@ -10,12 +10,12 @@ EOF
 
 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