是否可以修改linux掛載預設選項?

是否可以修改linux掛載預設選項?

是否可以修改/重新定義 linux 掛載預設選項?

例如,有一個像這樣的 fstab:

# / was on /dev/sda8 during installation
UUID=669cb10d /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda7 during installation
UUID=43e81f24 /home           ext4    defaults        0       2

是否可以重新定義“預設”選項?

我知道它通常是這樣定義的:

預設值:rw、suid、dev、exec、auto、nouser 和 async。見人坐騎

答案1

似乎有一些支援使用une2fs為ext4設定預設安裝選項。

文法是這樣的tune2fs -E mount_opts=.. device

更多資訊請點這裡http://en.wikipedia.org/wiki/Fstab並在man tune2fs

答案2

您可以在 /etc/fstab 中定義用於安裝區塊裝置的選項。

例如:

# /etc/fstab:靜態檔案系統資訊。
#
# 根檔案系統的pass number應該是0或1。
# 所有其他檔案系統的 pass 數應該為 0 或大於 1。
#

#                           

標籤=geee / ext4 關係 0 1
標籤 = usr /usr ext4 關係式 0 2
標籤=var /var ext4 關係 0 2
標籤=portage /usr/portage reiserfs noatime 0 0
#LABEL=it2901 /it2901 ext4 關係式 0 2
標籤=home /home ext4 關係式 0 2
標籤=啟動 /啟動 ext3 noatime 0 2
/dev/sda1 /mnt/win ntfs-3g uid=1512,umask=0022 0 0
/dev/sda3 /mnt/media ntfs-3g uid=1512,umask=0022 0 0
/mnt/media/media /media 無綁定 0 0
/dev/sda6 無 交換 sw 0 0

#/dev/sda5 /mnt/ubuntu ext3 noatime 0 0
#/mnt/ubuntu/boot /boot 無綁定 0 0
/mnt/media/root-extension/usr/share/doc /usr/share/doc 無綁定 0 0

genja.lan:/R/tmp /R/tmp nfs noauto,nfsvers=3,軟,intr 0 0
#genja.lan:/R/es2 /R/es2 nfs noauto,soft,intr 0 0
#genja.lan:/R/鏡像 /R/鏡像 nfs noauto,soft,intr 0 0
##raptor.lan:/usr/portage /usr/portage nfs noauto,soft,intr 0 0
tryggve.lan:/R/tb /R/tb nfs noauto,nfsvers=3,soft,intr 0 0
#tryggve.lan:/R/音訊 /R/音訊 nfs noauto,軟,intr 0 0

tmpfs /tmp tmpfs 大小=200M,nodev,nosuid,noexec 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

gentoo fstab

相關內容