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の2行目には以下が含まれます/mnt/g /code。なぜ?

/mnt/gたぶんからのシンボリックリンクを作成したいですか/code

その場合は、次のようにしてください。ln -s /mnt/g /code

おすすめ記事