Fstab

我應該如何修復我的 fstab

  • January 10, 2013

我有 2 個要掛載的分區

sdb1 which uses ext2 file system
sdc1 which uses ext4 file system

我在 fstab 上添加了這 2 行

/dev/sdb1 /home2 auto auto,noatime,default 0 0
/dev/sdc1 /home3 auto auto,noatime,noload,data=ordered,commit=10,default 0 0

看起來不正確,因為我無法安裝。如何糾正它?

但是由於某些錯誤,我無法安裝它們。

這是我的 fstab 和一些命令來顯示

root@host [/etc]# cat fstab
#
# /etc/fstab
# Created by anaconda on Tue Jan 8 10:16:53 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=eb3b9431-7964-47fd-a497-e4ddcd3f9d05 / ext4 defaults 1 1
UUID=ed11681c-9343-41ac-ac8b-a29bf4d13fbd /boot ext4 defaults 1 2
#UUID=191a3af4-c48a-4779-974a-c55dc290543d /home1 ext4 defaults 1 2
#UUID=eca46a9a-6666-40d0-bbe5-e35b54295264 /home2 ext4 defaults 1 2
UUID=475f3ba3-6459-42ac-b441-1daa95acb2b3 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/usr/tmpDSK /tmp ext3 defaults,noauto 0 0
/dev/sdb1 /home2 auto auto,noatime,default 0 0
/dev/sdc1 /home3 auto auto,noatime,noload,data=ordered,commit=10,default 0 0
root@host [/etc]# parted -l
Model: ATA WDC WD15EADS-00R (scsi)
Disk /dev/sda: 1500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 525MB 524MB primary ext4 boot
2 525MB 34.4GB 33.8GB primary linux-swap(v1)
3 34.4GB 1500GB 1466GB primary ext4


Model: ATA SAMSUNG SSD 830 (scsi)
Disk /dev/sdb: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 256GB 256GB primary ext2


Model: ATA M4-CT256M4SSD2 (scsi)
Disk /dev/sdc: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 256GB 256GB primary ext4


root@host [/etc]# mount /home2
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

root@host [/etc]# mount /home3
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

root@host [/etc]#

我想知道我是否應該刪除這個問題。問題是我default在應該寫的時候使用defaults. 我猜它太本地化了。

嘗試這個:

/dev/sdb1 /home2 ext2 auto,noatime,defaults 0 0
/dev/sdc1 /home3 ext4 auto,noatime,noload,data=ordered,commit=10,defaults 0 0

‘auto’(正如您最初在 /etc/fstab 條目中所擁有的那樣)不是有效的文件系統類型。

引用自:https://unix.stackexchange.com/questions/60764