From 14e127c567da3297301aab8ce4684e12944a5eef Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sat, 9 Aug 2014 11:30:42 -0400 Subject: [PATCH] Add option to specify filesystem mount options --- config/acer-731/sysinfos | 4 ++++ config/amd64/sysinfos | 5 +++++ config/sysinfos.default | 4 ++++ stage1/create-config-files | 4 ++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/config/acer-731/sysinfos b/config/acer-731/sysinfos index ddc1a59..0f8b2ea 100644 --- a/config/acer-731/sysinfos +++ b/config/acer-731/sysinfos @@ -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" diff --git a/config/amd64/sysinfos b/config/amd64/sysinfos index 3166c60..b20247c 100644 --- a/config/amd64/sysinfos +++ b/config/amd64/sysinfos @@ -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" diff --git a/config/sysinfos.default b/config/sysinfos.default index 281e3be..1ffd631 100644 --- a/config/sysinfos.default +++ b/config/sysinfos.default @@ -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="" diff --git a/stage1/create-config-files b/stage1/create-config-files index 00a5894..f4c1246 100755 --- a/stage1/create-config-files +++ b/stage1/create-config-files @@ -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 -- 2.20.1