Wednesday, December 29, 2004

Mounting a USB Drive / Thumbdrive on Linux

First of all, I am working with Mandrake 9.1, Kernel 2.4.21. this may be a lot easier under 2.6. Who knows. Also, I am using a Sony Microvault USB Thumbdrive. This should probably work with any other thumbdrive. But once again, no guarantees.

  1. Turn on computer.

  2. Log in.

  3. su to root. (I have not tried doing this without su-ing to root, although it may work.)

  4. Go to /mnt (is: "cd /mnt").

  5. Create a directory called "usb" ("mkdir /usb").

  6. Change the directory mode to be 777. ("chmod 777 usb")

  7. Go to /etc. ("cd /etc")

  8. Open up the file "fstab". ("vi fstab"). I am going to do this using vi. You are welcome to use any program that you wish. Also, be really careful with the fstab file. It is the file that tells your computer how to connect to different file systems, such as your hard drives, and your cd drive. fstab is pretty forgiving of any new stuff that you may add, but don't mess with any text that is already there.

  9. Go to the end of the file. (Press the down button until you are on the bottom line. Then press the "End" button on your keyboard.)

  10. Tell vi that you want to insert text. (Press the letter "i")

  11. Press the "End" button on your keyboard again. You should now be at the end of the last line of the fstab file.

  12. Create a new line by pressing the "enter" button on your keyboard.

  13. Type in the following, verbatim (leave out the quotation marks):

    "/dev/sda mnt/usb ext3,vfat defaults,noauto,users 0 0"

    (Make sure that you left out the quotation marks.)

  14. Hit the escape button on your keyboard. ("Esc").

  15. Press the colon button on your keyboard. (":")

  16. Type the following: "sav fstab".

    (Leave out the quotation marks.)

  17. Tell vi that you want to quit the program. (":q")

  18. Type in the following: "mount /mnt/usb".

    (Once again, leave out the quotation marks.)

  19. Your Sony Microvault is now mounted! If you are using Mandrake 9.1, there is now a picture of a hard drive on your desktop. You can access the microvault thru this icon.

This same procedure should work with other USB Mass Storage drives (not just the Sony Microvault.)

No comments: