Special Sponsor

Monday, February 4, 2008

Mount USB device in Linux/Unix

Today, as the growing of portable disk USB many of us carry a data in it. I found out a little trouble to using it in older Linux/unix operating system that have USB port but when i plug the usb, the OS cannot detect the disk. The using 'pakcik Google', I found a solution in My digital life blog.

To manually mount a USB disk or USB drive or USB device in Linux or UNIX:

1. Login as root. You can use the su command to switch to root user.
2. Create a folder /mnt/USB with the command: mkdir /mnt/USB
3. Add the following line in the file /etc/fstab (fstab is the file that tells Linux where to mount the various devices,

and thus simplying the mount command):

/dev/sda1 /mnt/USB auto noauto,owner,kuzu 0 0

Note: The “auto” on the above line means auto detection of filesystem. If your system unable to determine the

filesystem type, change it accordingly to the USB drive’s filesystem (e.g. vfat or ntfs or ext2 or ext3).
4. Mount the USB storage device with the following command: mount /dev/sda1

Without the need modifying fstab (step 3), you can also straight away issue the mount command (step 4) with the following


mount /dev/sda1 /mnt/USB

If you know the filesystem of the USB drive or the system unable to determine the correct filesystem, the -t option can be

used to the filesystem type of the USB device:

mount -t vfat /dev/sda1 /mnt/usb (for vFAT filesystem)
mount -t ntfs /dev/sda1 /mnt/usb (for NTFS filesystem)

Sometimes, the USB drive or USB storage device is detected by the system but been assigned a different device name from sda1.

If so, the correct device name need to be determined by viewing and OS log file. Usually the Linux and UNIX boot and log

message is stored in /var/log/messages, and you can view the log messages with the following commands:

tail -f /var/log/messages



Check for the name of the device that appears after operating system detects the USB devices.

After using the USB disk, remember to unmount the USB drive with the following command to avoid any possible loss to the data

or changes and risk messing up your partition.

umount /mnt/USB


Anonymous said...

Thanks - worked a treat. particularly the auto file format

Anonymous said...

Nice post as for me. I'd like to read something more concerning this matter. The only thing it would also be great to see here is a few photos of some gizmos.
David Stepman
Cell phone jammer

Mattie said...

I am very impress on your information , Its a really very impressive blog. I really got some another very nice information , so thanks for sharing these tips,USB Boot Drive .

LokIT said...

Really useful blog.Good work keeping this updated! usb protection Thanks a lot!

rax said...

hi,You have a very good blog that the main thing a lot of interesting and useful! thanx. usb protection

generic cialis 20mg said...

I, of course, a newcomer to this blog, but the author does not agree