LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-13-2005, 08:01 AM   #1
cn_chopsticks
LQ Newbie
 
Registered: May 2005
Location: Nanjing, China
Posts: 17

Rep: Reputation: 0
How to mount USB hardisk?


Hello, this is the first time i come here.
i just want to mount portable USB hardisk in RedHat Linux 9.0,
but i don't know how to accomplish this, i know how to mount a flashdisk
using "mount -t vfat -o iocharset=gb2312 /dev/sda1 /mnt/usb", but when i
apply that command on a USB hardisk, it doesn't work.
Could someone give me some advice? Linux is a whole new world to me...
Forgive me if i thank you some hours or some days later because my access to the internet is limited by time.
Thanks!!

大家好,这是我第一次来到这个著名的Linux论坛,谢谢!!
 
Old 05-13-2005, 08:26 AM   #2
rpb
Member
 
Registered: Mar 2005
Location: the thrid rock from the sun
Distribution: Red Hat 8, FC 3
Posts: 31

Rep: Reputation: 15
hi,

are you sure that your hard drive is a vfat device? what error does it give when you try the command you mentioned? may be if you try ext2 it might work, if the problem is to so with the file system. also, i think the follwoing link could be helpful..

http://www.tldp.org/HOWTO/Flash-Memory-HOWTO/index.html

-rpb
 
Old 05-13-2005, 09:26 AM   #3
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,144

Rep: Reputation: 56
Refer to this thread.

you can then use the mount command like this

mount -t filesystem-name /dev/device-partition /mnt/directory-of-your-choice
 
Old 05-13-2005, 09:37 AM   #4
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Some distros come with USB hdd support compiled in. In Slackware, for example, you only have to do the following:

mkdir /usb (so you can mount it)
mount /dev/sda1 /usb
 
Old 05-15-2005, 01:15 AM   #5
cn_chopsticks
LQ Newbie
 
Registered: May 2005
Location: Nanjing, China
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks,rpb, tuxrules and Poetics!
when i use "mount -t vfat /dev/sda /mnt/usb", the error message is
"/dev/sda is not a valid block device"
so i tried "mount -t auto /dev/sda1 /mnt/usb", but the same error message
appeared.
so, rpb, tuxrules and Poetics, what is the device name for a external USB
hdd?
my USB hdd was partitioned with several partitions, and all the partitions were formated with fat32.
Best reguards!!

Last edited by cn_chopsticks; 05-15-2005 at 01:16 AM.
 
Old 05-15-2005, 08:07 AM   #6
siyeclover
Member
 
Registered: Jan 2003
Location: RaMetal
Distribution: Solaris,FC2,FreeBSD
Posts: 41

Rep: Reputation: 15
You should run command
fdisk -l
to verify your usb harddisk's devicename and filesystem.


siyeclover

Last edited by siyeclover; 05-15-2005 at 08:08 AM.
 
Old 05-15-2005, 08:24 AM   #7
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
When I mounted my USB drive (or tried to), using /dev/sda it gave me that same problem, but hitting /sda1 instead fixed it.

Try it without the "-t auto" and see what happens.
 
Old 05-22-2005, 02:52 AM   #8
cn_chopsticks
LQ Newbie
 
Registered: May 2005
Location: Nanjing, China
Posts: 17

Original Poster
Rep: Reputation: 0
i solved the problem!!
in redhat 9 with the kernel 2.4.20-8, you have to compile the kernel if you want to use the usb-storage
the following is how i did:


First, edit the file /usr/src/linux-2.4.20-8/Makefie, from the beginning, you will see the value like this "EXTRAVERSION =XXXX", replace it with "EXTRAVERSION =-8", this step is very important!!
you may have the question, "why should the value be -8?", sorry, i don't konw why, but remember, it depends on the kernel you are using. For example, if you are use the kernel 2.4.20-8, you must replace "EXTRAVERSION =XXXX" with "EXTRAVERSION =-8"

Second, modify the header file /usr/src/linux-2.4.20-8/drivers/usb/storage/unusual_devs.h
in the file, find the sections like the following:
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x0001,
"EagleTec",
"External Hard Disk",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY ),

if you find that, modify it with following:
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x9999,
"EagleTec",
"External Hard Disk",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY | US_FL_MODE_XLATE | US_FL_START_STOP ),

Ok, after that do the following:
#cp /boot/config-2.4.20-8 /usr/src/linux-2.4.20-8/.config
then, change your directory to /usr/src/linux-2.4.20-8/
and go on:
#make mrproper(if you have compiled the kernel, add this command)
#make oldconfig
#make dep
#make modules (this step will expend considerable time)

All right!! everything is almost ready!!
just a few steps:
#cp /usr/src/linux-2.4.20-8/drivers/usb/storage/usb-storage.o /lib/modules/2.4.20-8/kernel/drivers/usb/storage/
after that step, you can plug your USB hdd.

then:
#modprobe -r usb-storage
#modprobe usb-storage(if you compile the kernel correctly, no error message will appear)

after that, try this command:
fdisk -l
did you see the info about you USB hdd?

everything is ready, just mount!!
#mount -t vfat /dev/sda1(the number may be different) /mnt/your directory

Maybe it's helpful, thanks all the friends above!!
 
Old 05-22-2005, 07:29 AM   #9
tassitano
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
automatically mount a harddisk and how to make it writable

Anyone know how to automatically mount a harddisk and how to make it writable ?

My harddrive is netdisk (ximeta)
and my partition is ntfs

I use debian
Here is my command line to mount my drive :

mount /dev/uba1 /mnt/disk
/etc/init.d/autofs restart



Here is what I have done to mount automatically my harddrive :
============================================
/etc/auto.master
/mnt/removable /etc/auto.removable --timeout=10
/mnt/disk /etc/auto.win --timeout=60


/etc/auto.removable
usbdrive -fstype=vfat,uid=diwaker,gid=users,rw,umask=002 :/dev/uba1


/etc/init.d/autofs restart


But...I can't see my harddrive in /mnt/disk
============================================


I found a script (USBMOUNT) that could do that thing for me but when I try to dpkg -i the .deb, the system throw me an error. Here is the script : http://usbmount.alioth.debian.org/


root@mythtv:~# dpkg -i usbmount_0.0.11_all.deb
Selecting previously deselected package usbmount.
(Reading database ... 54575 files and directories currently installed.)
Unpacking usbmount (from usbmount_0.0.11_all.deb) ...
dpkg: dependency problems prevent configuration of usbmount:
usbmount depends on udev (>= 0.053-1); however:
Package udev is not installed.
dpkg: error processing usbmount (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
usbmount
 
Old 05-22-2005, 04:49 PM   #10
brianez21
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Rep: Reputation: 0
Quote:
usbmount depends on udev (>= 0.053-1); however:
Package udev is not installed.
dpkg: error processing usbmount (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
usbmount
That package needs you to have udev installed.
Try running:
# apt-get update
# apt-get install udev
and then install the package
 
Old 05-22-2005, 05:03 PM   #11
brianez21
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Rep: Reputation: 0
I'm having a problem, I just recently bought a Maxtor OneTouch II external harddisk for my laptop.
Under Windows, it works fine with both USB and FireWire, however on Ubuntu I can only open it (/dev/sda1) with USB, not FireWire.
However, I know my card is being detected.
Quote:
0000:03:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)
Any ideas?

Note: It is detected fine in FC3.

Last edited by brianez21; 05-22-2005 at 06:06 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
about installing linux on a usb hardisk samgu3990 Linux - Hardware 12 11-28-2005 04:59 PM
Upper and lower case problem when mount hardisk UltraSoul Linux - Newbie 1 10-28-2005 09:50 AM
umount the usb hardisk bxr1981 Red Hat 1 08-17-2005 05:11 AM
How to mount USB hardisk? cn_chopsticks Linux - Software 5 05-22-2005 02:55 AM
How to mount HFS+ (journaled) hardisk? carboncopy Slackware 12 12-01-2004 11:14 AM


All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration