Wednesday, November 26, 2008

USB storage on Gentoo

USB Storage device on Gentoo:

1. Sebelum mem-plug usb device, sebaiknya cek dulu keberadaan device yg sudah ada di PC kita:
# cat /proc/partitions

   major minor   blocks  name
8 0 78150744 sda
8 1 104391 sda1
8 2 996030 sda2
8 3 52998435 sda3

2. Kemudian pasang usb device-nya, lalu cek dengan command 'dmesg' untuk memastikan bahwa device yang kita pasang sudah terdeteksi:
# dmesg | grep -i usb atau # dmesg

   scsi 2:0:0:0: Direct-Access     Kingston DT Elite HS 2.0  5.02 PQ: 0 ANSI: 0 CCS
SCSI device sdb: 2052607 512-byte hdwr sectors (1051 MB)
sdb: Write Protect is off
sdb: Mode Sense: 45 00 00 08
sdb: assuming drive cache: write through
SCSI device sdb: 2052607 512-byte hdwr sectors (1051 MB)
sdb: Write Protect is off
sdb: Mode Sense: 45 00 00 08
sdb: assuming drive cache: write through
sdb: sdb1 => menunjukkan partisi device ada di /dev/sdb1
sd 2:0:0:0: Attached scsi removable disk sdb => device baru terdeteksi sebagai /dev/sdb
sd 2:0:0:0: Attached scsi generic sg1 type 0
usb-storage: device scan complete

3. cek ulang dengan perintah berikut:
# cat /proc/partitions

   major minor   blocks  name
8 0 78150744 sda
8 1 104391 sda1
8 2 996030 sda2
8 3 52998435 sda3
8 16 1026303 sdb => sesuai dengan hasil dmesg
8 17 1025593 sdb1 => sesuai dengan hasil dmesg

6. membuat directory untuk mount device tsb:
# mkdir /mnt/usbdrive

7. mount device baru ke directory yang baru dibuat:
# mount /dev/sdb1 /mnt/usbdrive

8. setelah itu anda bisa mengakses isi dari usb device tersebut (read, write, execute) via directory /mnt/usbdrive

No comments:

Post a Comment

Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)