Translate

Search This Blog

using pen drive in linux, mount usb pen drive in linux

Now a days from RHEL 5 linux is able to auto mount the pen drive but if it is not the case then you can follow below steps to mount pen drive in linux.

Back 6 years ago , I had to transfer oracle 11g download to linux machine found ftp services were not installed and no linux cd available. luckily I had 2G pen drive and I was able to move my 2g 11g download from windows to linux.

It was no different than mounting any normal disk.

How I did :

0. created a directory /pendrive

1. When I started linux saw removable devices sercies status [OK]

2. next I gave fdisk -l and noticed the output as below.
[root@lnx2 root]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 172 1277167+ 82 Linux swap
/dev/sda3 173 236 514080 83 Linux
/dev/sda4 237 1305 8586742+ f Win95 Ext'd (LBA)
/dev/sda5 237 1305 8586711 83 Linux


3. now
[root@lnx2 root]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 172 1277167+ 82 Linux swap
/dev/sda3 173 236 514080 83 Linux
/dev/sda4 237 1305 8586742+ f Win95 Ext'd (LBA)
/dev/sda5 237 1305 8586711 83 Linux

Disk /dev/sdb: 1024 MB, 1024966656 bytes
32 heads, 63 sectors/track, 993 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 992 999813+ 6 FAT16

then noticed the difference , I found the pen drive device name

[root@lnx2 root]# mount /dev/sdb1 /pendrive


now pen drive content are loaded in this location /pendriver .

after my read from ths location and wrote all desired stuff to local hard disk but cancelled meanwhile.I tried dismounting pen drive using umount but found

[root@lnx2 root]# umount /dev/sdb1
umount: /pendrive: device is busy

I retried after a minute and got successful
[root@lnx2 root]# umount /dev/sdb1

Follow by Email