Ubuntu
我無法通過 /etc/fstab 掛載分區,出現錯誤
我試圖通過編輯 /etc/fstab 來掛載我的新分區,但出現錯誤。當我嘗試通過mount命令執行此操作時,一切正常,我可以安裝它們。怎麼了?
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation /dev/disk/by-id/dm-uuid-LVM-XVpMjvfuIwUMG9eeZN2E09sODMkxF3I8j6u3WkZegGllXAx08ZPZROjo66HKfnG8 / ext4 defaults 0 1 # /boot was on /dev/sda2 during curtin installation /dev/disk/by-uuid/2d747eec-1c31-4c12-849c-efe362e3245e /boot ext4 defaults 0 1 /swap.img none swap sw 0 0 UUID=a6c59d0e-37a7-4532-b843-6025dabef69f /mnt/sdb1 ext4 default 0 2 UUID=b12d193a-6d04-4cbb-a8da-d8405b38dae0 /mnt/sdb2 btrfs default 0 2 UUID=55165d2b-f3b5-46b2-af04-7366861c82b6 /mnt/sdb3 xfs default 0 2 UUID=1B74-0C7D /mnt/sdb4 vfat default 0 2 user@ubuntu2:~$ sudo mount -a mount: /mnt/sdb1: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error. mount: /mnt/sdb2: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error. mount: /mnt/sdb3: wrong fs type, bad option, bad superblock on /dev/sdb3, missing codepage or helper program, or other error. mount: /mnt/sdb4: wrong fs type, bad option, bad superblock on /dev/sdb4, missing codepage or helper program, or other error. user@ubuntu2:~$ sudo lsblk -f sdb ├─sdb1 ext4 a6c59d0e-37a7-4532-b843-6025dabef69f ├─sdb2 btrfs b12d193a-6d04-4cbb-a8da-d8405b38dae0 ├─sdb3 xfs 55165d2b-f3b5-46b2-af04-7366861c82b6 └─sdb4 vfat 1B74-0C7D
您在選項中有拼寫錯誤,這
defaults
是預設的安裝選項集,而不是default
. 沒有這樣的選項default
,因此掛載失敗。注意,如果你以後從 mount 中看到類似的錯誤,你應該經常檢查日誌,核心會列印額外的資訊,在這種情況下你應該看到類似的內容:
xfs:未知參數“預設”