Mounting a thumbdrive :-

Aruba Employee

Plug in thumbdrive

1 - create directory location - this is directory device will be mounted to
cd /tmp
mkdir flash

lsusb -> this command will help you make sure that your server sees the USB drive
[root@thor ~]# lsusb
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 002 Device 002: ID 0d3d:0040 Tangtop Technology Co., Ltd
Bus 002 Device 001: ID 0000:0000
Bus 005 Device 004: ID 03f0:3207 Hewlett-Packard
Bus 005 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
In this case the HP is my thumbdrive

dmesg | grep -i "SCSI device" -> this step is determining which device the USB drive is being reported as (so you don't have to reboot and look at fstab)
[root@thor tmp]# dmesg | grep -i "SCSI device"
SCSI device sda: 156250000 512-byte hdwr sectors (80000 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 156250000 512-byte hdwr sectors (80000 MB)
SCSI device sda: drive cache: write back
SCSI device sdb: 3915776 512-byte hdwr sectors (2005 MB)
SCSI device sdb: 3915776 512-byte hdwr sectors (2005 MB)
It appears my thumbdrive is device "sdb"

Try to mount the thumbdrive:
mount -t vfat -o uid=root,gid=users /dev/sdb /tmp/flash
if this doesn't work because:
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
this means we have to reformat the thumb drive to linux

Reformat the thumbdrive:
mkfs.vfat -I /dev/sdb


**NOTE** This will delete everything on thumb drive.


[root@thor ~]# mkfs.vfat /dev/sdb
mkfs.vfat 2.11 (12 Mar 2005)
mkfs.vfat: Will not try to make filesystem on full-disk device '/dev/sdb' (use -I if wanted)
[root@thor ~]# mkfs.vfat -I /dev/sdb
mkfs.vfat 2.11 (12 Mar 2005)

After reformat, try mounting again:
mount -t vfat -o uid=root,gid=users /dev/sdb /tmp/flash

once this is done, we can start copying the files we need to the thumbdrive:
cp /root/install.log /tmp/flash/
cp /tmp/amp-install.log /tmp/flash/

we can also output files to the thumbdrive directly:
locale -a >> /tmp/flash/locale.txt
ls -l /usr/lib/locale/en_US /usr/lib/locale/en_US.utf8 >> /tmp/flash/enUS.txt

when you're done and want to take out the thumbdrive, remember to unmount it:
umount /tmp/flash

then go ahead and extract thumbdrive

Version history
Revision #:
1 of 1
Last update:
‎06-26-2014 10:11 AM
Updated by:
 
Labels (1)
Contributors
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: