Results 1 to 6 of 6
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-22-2007 #1Just 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
- 05-07-2007 #2Linux 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
#2: Find out USB drive nameCode:mkdir /mnt/usbdrv
Output of fdisk -l command:Code:fdisk –l
In the above output, /dev/sda1 is my flash drive.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
#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 07:21 PM. Reason: added 'code' tags.
- 05-07-2007 #3
Could you post your /etc/fstab file?
Is there a line which looks something like this?
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.Code:/dev/sda1 /mnt/usbdrv auto noauto,user,rw,exec 0 0
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
- 05-07-2007 #4Linux Newbie
- Join Date
- May 2006
- Location
- Kansas
- Posts
- 187
IsaacKuo, thanks for pointing that out auto/noauto. I just updated my personal documentation.
- 05-08-2007 #5Just 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
- 05-08-2007 #6Linux 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


Reply With Quote

