Friday, June 10, 2005

How to mount a USB drive in RedHat Linux 9.0 and its derivatives

If you are not using a nice distro like SimplyMepis (SimplyMEPIS/ubuntu) which does a windows style autodetect of USB drives you may have encountered issues mounting in other distros. There is supposed to be an auto detect feature in redhat that seemingly is hidden as far as I am concerned.

Thus, let me write out how I mount flash drives in linux:

Execute the following:
cat /proc/partitions

This will give you the sd+* location where the usb is mounted
Note: + is an alphabet, and * a number where the usb is mounted


Follow this by executing (as root)
cd /mnt
mkdir usb

mount /dev/sd+* /mnt/usb

Presto! You will have your usb flash drive mounted! Just do a
cd /mnt/usb

and you should be able to view all your files.


What do you do if you have two usb drives attached?

Simple:
Do the cat /proc/partitions to identify the locations where the usb drives are mounted

Follow this by (as root)
cd /mnt
mkdir usb1
mkdir usb2
mount /dev/sdab /mnt/usb1
mount /dev/sdxy /mnt/usb2

(ab and xy correspond to +* on sd+*)

(nothing prevents you from using directories already existent under /mnt. For example if you created a /mnt/usb directory earlier, you could use that)

You should be all set now! Hope this helps.

Other useful commands:
/sbin/fdisk -l [Execute as root]
dmesg grep -i "SCSI device"
lsusb

An Intro - A Little About Everything

Well, today the sky seems blue here in Atlanta, the Sun is shining , and I am a grad student. Think its a pretty good day to start off my blog. I hope to put in some useful info. here regarding technical issues with linux, computers and the like and also add my opinions on other subjects.

I am a jack of all trades, so I chose the title as such.

But, then I found out there were atleast 5 other blogs with the same name. So, I had to change it to something not so cool :(