0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Linux(RaspberryPiOS)でUSBメモリをマウントする

Posted at

やりたいこと

RaspberryPi4(RaspberryPiOS)でUSBメモリをマウントします。

手順

1.まずはマウントポイントとなるディレクトリを作ります

sudo mkdir /data
sudo mkdir /data/homepi

2.デバイスファイルのパスを確認します

ls -l /dev/disk/by-label/

USBメモリに名前を設定してればそれっぽいのが出てくるはず。

3.マウントします

sudo mount -t vfat -o defaults,noatime,uid=root,gid=pi,umask=0002/dev/disk/by-label/HOMEPI/ /data/homepi/

vfatの場合、Linuxのアクセス制御に対応してないので、uid/gid/umaskなどをマウントオプションで指定してあげる必要があります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?