Ubuntu

ubuntu fstab automount

Naan 2013. 11. 19. 18:05
320x100
ubuntu auto mount 방법이다.
우선 uuid를 알아야 한다.

# blkid

/dev/sda1: UUID="91df4635-54fe-425f-b2a5-57473f0d0456" TYPE="ext4"

/dev/sda4: UUID="c3cf8be5-30c3-4675-bc94-8b2a69ee0454" TYPE="ext4"

/dev/sda5: UUID="d1257dcb-6dd8-4f43-89d0-388be7b2e2a0" TYPE="ext4"

/dev/sda6: UUID="8f93aadd-f8c3-49e2-9d3a-25350a3d14b1" TYPE="ext4"

/dev/sda7: UUID="79fead6e-f87f-480c-84a8-0579c95e8923" TYPE="ext4"

/dev/sda8: UUID="9491f106-c1e7-4e97-bd03-384e6c11ec57" TYPE="swap"



sda4를 추가한 hdd라 생각하자

fstab 을 수정하자
# vi /etc/fstab
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda5 during installation
UUID=d1257dcb-6dd8-4f43-89d0-388be7b2e2a0 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=91df4635-54fe-425f-b2a5-57473f0d0456 /boot           ext4    defaults        0       2
# /tmp was on /dev/sda6 during installation
UUID=8f93aadd-f8c3-49e2-9d3a-25350a3d14b1 /tmp            ext4    defaults        0       2
# /user was on /dev/sda7 during installation
UUID=79fead6e-f87f-480c-84a8-0579c95e8923 /user           ext4    defaults        0       2
UUID=c3cf8be5-30c3-4675-bc94-8b2a69ee0454 /data           ext4    defaults        0       2
# swap was on /dev/sda8 during installation
UUID=9491f106-c1e7-4e97-bd03-384e6c11ec57 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

위 내용처럼 uuid 를 넣고 자신이 원하는 폴더에 mount 를 하도록 하자

이제 재부팅 하면


/dev/sda1: UUID="91df4635-54fe-425f-b2a5-57473f0d0456" TYPE="ext4"

/dev/sda4: LABEL="data" UUID="c3cf8be5-30c3-4675-bc94-8b2a69ee0454" TYPE="ext4"

/dev/sda5: UUID="d1257dcb-6dd8-4f43-89d0-388be7b2e2a0" TYPE="ext4"

/dev/sda6: UUID="8f93aadd-f8c3-49e2-9d3a-25350a3d14b1" TYPE="ext4"

/dev/sda7: UUID="79fead6e-f87f-480c-84a8-0579c95e8923" TYPE="ext4"

/dev/sda8: UUID="9491f106-c1e7-4e97-bd03-384e6c11ec57" TYPE="swap"


로 등록되어 있는 것을 확인 할수 있다.

320x100