無法使用 fstab 進行資料夾掛載

無法使用 fstab 進行資料夾掛載

我正在嘗試將我的 G 驅動器(在 WSL 中)安裝在/code.但是,它失敗並顯示以下配置和訊息:

LABEL=cloudimg-rootfs   /         ext4  defaults        0 0

/mnt/g                /code   none  defaults,bind 0 0
[ 5159.133867] init: (1) ERROR: UtilCreateProcessAndWait:655: /bin/mount failed with status 0x
[ 5159.133870] 2000
[ 5159.133876] init: (1) ERROR: ConfigMountFsTab:2152: Processing fstab with mount -a failed.
[ 5159.143122] FS-Cache: Duplicate cookie detected
[ 5159.143124] FS-Cache: O-cookie c=0000000092644cce [p=000000007ba11936 fl=222 nc=0 na=1]
[ 5159.143125] FS-Cache: O-cookie d=00000000f69d3d22 n=000000004319b7e9
[ 5159.143125] FS-Cache: O-key=[10] '34323935343533313833'
[ 5159.143128] FS-Cache: N-cookie c=000000000be0e99c [p=000000007ba11936 fl=2 nc=0 na=1]
[ 5159.143129] FS-Cache: N-cookie d=00000000f69d3d22 n=000000005622393b
[ 5159.143129] FS-Cache: N-key=[10] '34323935343533313833'
[ 5159.146589] FS-Cache: Duplicate cookie detected
[ 5159.146592] FS-Cache: O-cookie c=0000000092644cce [p=000000007ba11936 fl=222 nc=0 na=1]
[ 5159.146592] FS-Cache: O-cookie d=00000000f69d3d22 n=000000004319b7e9
[ 5159.146593] FS-Cache: O-key=[10] '34323935343533313833'
[ 5159.146595] FS-Cache: N-cookie c=0000000095f81e84 [p=000000007ba11936 fl=2 nc=0 na=1]
[ 5159.146595] FS-Cache: N-cookie d=00000000f69d3d22 n=0000000024b2120e
[ 5159.146596] FS-Cache: N-key=[10] '34323935343533313833'

安裝是在/mnt其他地方完成的嗎?

答案1

基本上,您只能將磁碟機分割區安裝到目錄中。分區在目錄
中可用。/dev/您可以使用命令列出所有它們lsblk

fstab 中的第二行包含:/mnt/g /code。為什麼?

也許您只想創建一個從/mnt/g到 的符號連結/code

如果是這樣的話,那就是:ln -s /mnt/g /code

相關內容