Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Knoppix Help Forum > How do i automount a USB Harddrive

Forgot Password?
 Knoppix Help Forum   For all discussions about Knoppix, the Linux "Live CD" that lets you run Linux without needing to install on your hard drive.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 02-22-2007   #1 (permalink)
Just Joined!
 
Join Date: Feb 2007
Posts: 1
How do i automount a USB Harddrive

Hi there,

I am currently running a Knoppmyth system and am having a slight problem automounting a USB harddrive. I have ammendned the fstab file with a line which supposedly automounts the external drive. However what i want to happen is for me to be able to browse the drive without first having to type 'mount -a' or without first having to double click on the harddrive in Konqueror. My reason for this is that unless i do either of these options MythTv wont find the files on the device.

Where might i go about adding the 'mount -a' command to sort out my problem?

Many thanks

Rob
rflook is offline  


Reply With Quote
Old 05-07-2007   #2 (permalink)
Linux Newbie
 
Join Date: May 2006
Location: Kansas
Posts: 187
I found this from another site a while back:

New user often gets confused with Linux security permissions. Simple mounting of a USB flash drive as a normal user (non-root) can be hard task.

Truth:
The mount command can be issued only as the root user.

Solution:
Give permission to normal user to mount a USB pen or flash drive.

#1: Create a directory
Code:
  mkdir /mnt/usbdrv
#2: Find out USB drive name

Code:
  fdisk –l
Output of fdisk -l command:
Quote:
Disk /dev/hdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 2432 19535008+ 83 Linux
/dev/hdb2 2433 2554 979965 82 Linux swap / Solaris
/dev/hdb3 2555 6202 29302560 83 Linux
/dev/hdb4 6203 9733 28362757+ 5 Extended
/dev/hdb5 6203 9733 28362726 83 Linux

Disk /dev/sda: 256 MB, 256901120 bytes
8 heads, 62 sectors/track, 1011 cylinders
Units = cylinders of 496 * 512 = 253952 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 1011 250697 b W95 FAT32
In the above output, /dev/sda1 is my flash drive.

#3: Open /etc/fstab file
Append following line:
Code:
/dev/sda1      /mnt/usbdrv      auto    noauto,user,rw,exec 0 0

#4: Save the file and login as the normal user:
Code:
mount /mnt/usbdrv

Last edited by devils casper; 05-07-2007 at 08:21 PM.. Reason: added 'code' tags.
kahoona is offline   Reply With Quote
Old 05-07-2007   #3 (permalink)
Linux User
 
IsaacKuo's Avatar
 
Join Date: Feb 2005
Location: Baton Rouge, LA, USA
Posts: 287
Send a message via ICQ to IsaacKuo Send a message via Yahoo to IsaacKuo
Quote:
Originally Posted by rflook View Post
I am currently running a Knoppmyth system and am having a slight problem automounting a USB harddrive. I have ammendned the fstab file with a line which supposedly automounts the external drive.
Could you post your /etc/fstab file?

Is there a line which looks something like this?

Code:
/dev/sda1      /mnt/usbdrv      auto    noauto,user,rw,exec 0 0
If so, then the USB harddrive will NOT automatically mount. The "auto" in the above only means that the file system type will be detected automatically. The "noauto" in the options list means the harddrive will NOT be automatically mounted on boot-up.

You want to change the "noauto" in the options list into "auto" in order to have the drive mount automatically.

(Note, the above advice assumes that you want the exact opposite of what you seem to want. I'm assuming you want the drive to automatically mount on boot-up with no manual intervention. The other guy seems to think you want it to NOT boot up except by manually entering the mount command.)
__________________
Isaac Kuo, ICQ 29055726 or Yahoo mechdan
IsaacKuo is offline   Reply With Quote
Old 05-07-2007   #4 (permalink)
Linux Newbie
 
Join Date: May 2006
Location: Kansas
Posts: 187
IsaacKuo, thanks for pointing that out auto/noauto. I just updated my personal documentation.
kahoona is offline   Reply With Quote
Old 05-08-2007   #5 (permalink)
Just Joined!
 
Join Date: May 2005
Posts: 3
problem with usb detection

HI

I have installed Knoppix 5.1 (knx2hd) on my compaq evo n160 laptop. when i insert a usb drive i can see it via usbview but on doing fdisk -l i donot see any device for that.
How can i mount the usb device.

Thanks
orthanc is offline   Reply With Quote
Old 05-08-2007   #6 (permalink)
Linux Newbie
 
Join Date: May 2006
Location: Kansas
Posts: 187
Try this:

# mkdir /usbdrive
# mount -t auto /dev/sda1 /usbdrive

You can unmount it with

# umount /usbdrive
kahoona is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 04:03 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2