OS 운영체제/Linux

[Raspberry Pi] USB드라이버 마운트 경로 변경 시

쉬고싶은 거북이 2023. 3. 17. 14:38

라즈베리파이에 USB 연결 시 기본 /media/pi/[UUID 이름] 경로로 인식이 되는 상황 발생

USB드라이버는 바뀌는 상황에 0000-0000 로 지정된 폴더명을 바꾸고 싶을때

 

처음에 드라이버 인식됬는지 확인하는 명령어

1) df -h

2) sudo blkid

3) sudo fdisk -l

 

 

 

기존에 UUID로 자동 마운트 되어서 안될 경우 /dev/sda 부분을 언마운트 시켜야함 // 참조사이트 1)

sudo umount /dev/sda1
sudo mount -t exfat -o uid=1000,gid=1000 /dev/sda1 /media/pi/USB\ 드라이브/

 

uid, gid 참고

 

 

 

이슈주의)

1. /etc/fstab 잘못수정했다가 부팅 시 못읽어들이면서 에러문만 커널에 뜨면서 부팅안되는 상황 발생

            => 해결 못해서 롤백함.

2. File '/etc/fstab' is unwritable 에러 발생시 // 참조사이트 2)

sudo mount -o remount,rw /dev/sdb6 /

 

 

참조)

1) 참조사이트

https://forums.raspberrypi.com/viewtopic.php?t=112850 

 

[SOLVED] Change the UUID name of my USB-hdd to decimal? - Raspberry Pi Forums

Joe: Read the post carefully. The question asked is incorrect (although you answered it correctly). That was my intent. To just answer the question as posed, without regard as to whether that was what the OP really needed. I don't know anything about this

forums.raspberrypi.com

 

2) 참조사이트

https://unix.stackexchange.com/questions/185026/how-to-edit-etc-fstab-when-system-boots-to-read-only-file-system