Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
First you plug your USB hard drive in your USB port. Then open a terminal. Type su, to switch to root user. Once you are root, do a fdisk -l to see where the hard drive is. It should produce results in form of /dev/hda1 /dev/hda2 /dev/hda3 (these are the lines of your primary harddisk. The USB harddrive should be /dev/sda1 or seomthing starting with sd. If it's not, just analyse what the harddrives in your computer are.
Like for example. You know you only have one harddisk in your computer. That one is certainly /dev/hdax (where x are the numbers of partitions). IF you have two harddisks in your computer, then the second one is /dev/hdbx and the third one is /dev/hdc..... and so on.
Just eliminate the ones you know are not the USB harddrive. But as I said, the USB harddrive should be like /dev/sda1. Also in the line of that, you see the filesystem type of that drive. In your case it should say FAT something.
SO remember, just switch to root, and "fdisk -l" to see where it is.
Once you know where it is, and what filesystem type it is, you just have to mount it. To do that, you first need to create a directory.
mkdir /myusbdisk (this creates the directory)
and then just mount it there with the command:
mount -t vfat /dev/sda1 /myusbdisk
This is true, if you find it at /dev/sda1 and it is FAT filesystem.
Then just navigate to the directory /myusbdisk and there is your data. If you want to make it auto mount, just edit your /etc/fstab file. Just follow the examples already in it. Copy a line and change it to suit your needs.
I want to thank "marghorp" for the excellent way he/she laid the mounting process out. It now make sense. I have only one problem; My USB Harddrive is NTFS, and I get a error that say my 2.66 kernel donesn't support it:
I think it said this "fs doesn't support NTFS". I am at work so it is hard to remember all of it, I can reproduce it if it is required to fix the problem.
The Fedora kernel doesn't support ntfs. I think you can download the ntfs module as an .rpm, or recompile the kernel to enable support for ntfs (that's what I'd do). But then again, you can't write to an ntfs disk, so maybe it would be better to format it? I formatted mine ext3, but I think I'd do it reiserfs if there wasn't stuff on it now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.