[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 724
  • Last Modified:

mount a usb HD

Hi Guys,

How do I mount a usb HD in Linux command line???? Red Hat 4
5 Solutions
Maciej SsysadminCommented:
Plugin this drive into your computer.
It will be probably automatically detected. If it doesn't mount automatically, check /var/log/messages for the name of that new device. Probably it will be /dev/sda.
If you have just one partition on that drive, it should be /dev/sda1.
Run commands:
mkdir -p /mnt/my_usb_drive
mount /dev/sda1 /mnt/my_usb_drive
That's all :)

If you don't have any partitions on this drive yet, create some using fdisk (starting with fdisk /dev/sda).
at first find out , which drive is taking your usb hardrive

you can see this

fdisk -l command

mkdir /mnt/usbdrive

mount /dev/sda1 /mnt/usbdrive

here sda1 is your usb hardrive

if you want to do automount
edit /etc/fstab

/dev/sda1     /mnt/usbdrive     ext3     defaults 0   0

have a look more
@Oklit I dnot copy you!!!
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

To mount a USB External Hard Drive to a Linux Box, first make sure the unit is plugged in and powered on. Depending on your linux distribution, the hard drive may automatically mount. If this is not the case, mounting the external hard drive is not a very complicated tasks.

To begin, you will need to know where the hard drive is located. In most cases, the location is /dev/sda1ý(though this is not always the case). However, if this isnt the case, you can run the df command into you console. This will return a list of devices where you will most likely be able to find your drive by means of the hard drive max capacity.

Now, assuming the external hard drive is found at /dev/sda1. A great default place to mount the drive is in the /mnt/usbdrive. You will first need to make sure the folder already exists. If the folder does not exist, it can be created by using the command mkdir /mnt/usbdrive. Then, use the below command into your terminal:

mount /dev/sda1 /mnt/usbdrive ext3 default 0 0

In the above example, mount is the command, /dev/sda1 is where the hard drive is currently located and /mnt/usbdrive is the folder in which you want the mount the hard drive. The next ext3 is the hard drive file system (Click here for information on Linux File Systems). The next input default tells the default settings to be used. The first zero means to back up the file system using the dump utility and the second zero tells the OS whether to process the hard drive if fsck is run.

To have the Linux distribution automatically mount the drive on boot, you will need to add an entry (line) to the /etc/fstab file. In this case, it will be exactly the same as the mount command, except you will not need the mount command:

/dev/sda1ý/mnt/usbdriveýext3 default 0 0

Now you have your external that is mounted when the Linux operating system boots up.

Also it may be worth checking this out....
I found an old readme, it should give you general direction. If you google 'Paragon NTFS-driver suse' I am sure you'll figure it out. I don't see anything about replacing ntfs-driver though. If that is possible it is beyond my expertise. Good luck.

Paragon Software Group: README

Paragon NTFS for Linux gives transparent access to any NTFS partition under Linux operating
system. So you and any application can browse these drives, read and change files, copy and
create new files and folders. Everything absolutely transparently - just like with "native"
Ext2FS, Ext3FS or ReiserFS file system.

This download package is FREE and contains full functional Paragon NTFS for Linux drivers for
the most popular Linux distributions with their default kernels only:
- Red Hat Enterprise 4 (SW);
- Fedora Core 4;
- Mandriva 10.2;
- SUSE 9.3;
If you have any other Linux distribution or have already changed the default kernel,
you will not probably be able to use this driver. If you are interested in buying
or evaluating Paragon NTFS for Linux driver for any Linux distribution you should go
to http://www.ntfs-linux.com.

Note: This package contains Paragon NTFS for Linux demo version as well.
The demo version mounts NTFS partitions in read-only mode only but you can install it to any
Linux distribution.


These Paragon NTFS for Linux drivers, namely ufsd.ko are compatible with the following Linux
distributions with their default kernels:
1. Red Hat Enterprise 4 (SW) with 2.6.9-5.EL and 2.6.9-5.ELsmp kernels;
2. Fedora Core 4 with 2.6.11-1.1369_FC4 and 2.6.11-1.1369_FC4smp kernels;
3. Mandriva 10.2 with 2.6.11-6mdksmp kernel;
4. SUSE 9.3 with kernel.
You can determine the version of your kernel by command "uname -r".

Please follow the instructions to properly use the driver:
1. Go to the "/lib/modules/"your kernel"/kernel/fs" directory and create the "ufsd"
folder - "/lib/modules/"your kernel"/kernel/fs/ufsd";
2. Copy the corresponding "ufsd.ko" file to the "ufsd" folder;
3. Go to the "ufsd" folder - "cd /lib/modules/"your kernel"/kernel/fs/ufsd";
4. Load driver into memory. To load it manually use "insmod" command, for example
"insmode ufsd.o";
5. Check the driver name in the loaded module list. You can do it with "lsmod" command.
The list should contain module name "ufsd";
6. You can determine NTFS partitions with command "fdisk -l". You will see "NTFS" in
the right column against corresponding partition;
7. If selected partition was mounted before, please unmount it with command
"umount /dev/<partition_number>";
8. Create mount point in local file system, for example "mkdir -p /mnt/<mount_point>";
9. Mount partition with command "mount <device_name> <mount point>", where <device_name>
is from first column of the table "fdisk -l" and <mount_point> is any directory from
local filesystem. For example, "mount -t ufsd /dev/<partition_number> /mnt/<mount_point>".

Note: You should indicate the "ufsd" file system type after the "-t" key;
10. If partition to be mounted contains files or directories which names have non-English
characters, please use option "--iocharset": "mount -t ufsd /dev/<partition_number>
/mnt/<mount_point> -o --iocharset=<your_codepage>".
For example, "mount -t ufsd /dev/hda2 /mnt/hda/02 -o --iocharset=iso-8859-2".
TokenHashAuthor Commented:

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Tackle projects and never again get stuck behind a technical roadblock.
Join Now