LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 10-01-2012, 01:22 AM   #1
donmaz
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Rep: Reputation: Disabled
Auto mount external USB hard drive


My main hard drive has Win7 installed but has a partition for VirtualBox within which I have Ubuntu 12.4 installed. I have an external USB hard drive which I need to access from either Win7 or Ubuntu. It is identified as sdb5 in Ubuntu.

In an old setup I had a few years ago the USB drive mounted automatically but with the current setup I have to mount it manually. My /etc/fstab file looks like this:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=3283e77f-ee9c-4b88-b6a0-d34da1de1a5b / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=053d29cf-dde7-4835-a9de-9a520543df67 none swap sw 0 0
/dev/sdb5 /media/sdb5 ntfs nls=iso8859-1,umask=000 0 0
# UUID=01CCDCCBAE468230 /mount/sdb5 ntfs-3g defaults 0 0

I can mount the drive manually with "sudo mount -a" but would like to have the drive mounted automatically the way it used to in my old setup.

I've tried changes to the bottom line with "auto" and with "force" but nothing seems to achieve what I want.

Any advice would be appreciated.

donmaz
 
Old 10-01-2012, 04:37 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 717

Rep: Reputation: 102Reputation: 102
https://help.ubuntu.com/community/Mount/USB

Quote:
To control which programs automatically start when you plug in a device, go to System-Settings - Details - Removable Media.
 
Old 10-01-2012, 04:11 PM   #3
donmaz
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks jv2112 for your reply. I had seen the content of my conf-editor previously and couldn't work out what needed to be changed if anything. The details are as follows:

file:///home/don/Pictures/Screenshot%20from%202012-10-02%2006:39:47.png

(I don't know if this will open but automount and automount-open are both ticked, autorun-never is unticked, and of the autorun-x-content boxes the only one with content is the bottom one which has "x-content/software" in the box. If any need to be changed I can't see how to change them.)

I read the article "UsbDriveDoSomethingHowTo" and it is too complex for me.

donmaz
 
Old 10-02-2012, 04:22 AM   #4
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 717

Rep: Reputation: 102Reputation: 102
You never uploaded the image.
 
Old 10-02-2012, 04:31 PM   #5
donmaz
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks jv2112 I was afraid of that so I tried to give a description. I think I've got it right this time with file "Screenshot-Configuration Editor.png".

donmaz
Attached Images
File Type: png Screenshot-Configuration Editor.png (49.7 KB, 7 views)
 
Old 10-03-2012, 04:27 AM   #6
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 717

Rep: Reputation: 102Reputation: 102
Question

That is strange. It should work. Please post the output of the command below just after inserting the USB drive.

Code:
sudo tail -n 15 /var/log/messages.log
 
Old 10-03-2012, 04:08 PM   #7
donmaz
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
The output from that command is:

don@don-VirtualBox:~$ sudo mount /dev/sdb5 /media/sdb5
[sudo] password for don:
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.
don@don-VirtualBox:~$ sudo tail -n 15 /var/log/messages.log
tail: cannot open `/var/log/messages.log' for reading: No such file or directory
don@don-VirtualBox:~$

I then had a look for a file which had recently been written to and which might be of help to you and found "syslog" might be helpful so I ran the same command for it:

don@don-VirtualBox:~$ sudo mount /dev/sdb5 /media/sdb5
[sudo] password for don:
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.
don@don-VirtualBox:~$ sudo tail -n 15 /var/log/syslog
Oct 4 06:57:12 don-VirtualBox kernel: [ 189.295748] sd 3:0:0:0: [sdb] Mode Sense: 23 00 00 00
Oct 4 06:57:12 don-VirtualBox kernel: [ 189.304920] sd 3:0:0:0: [sdb] No Caching mode page present
Oct 4 06:57:12 don-VirtualBox kernel: [ 189.304927] sd 3:0:0:0: [sdb] Assuming drive cache: write through
Oct 4 06:57:12 don-VirtualBox kernel: [ 189.338025] sd 3:0:0:0: [sdb] No Caching mode page present
Oct 4 06:57:12 don-VirtualBox kernel: [ 189.338032] sd 3:0:0:0: [sdb] Assuming drive cache: write through
Oct 4 06:57:12 don-VirtualBox kernel: [ 189.411503] sdb: sdb1 < sdb5 >
Oct 4 06:57:13 don-VirtualBox ata_id[2069]: HDIO_GET_IDENTITY failed for '/dev/sdb': Invalid argument
Oct 4 06:57:13 don-VirtualBox kernel: [ 189.479565] sd 3:0:0:0: [sdb] No Caching mode page present
Oct 4 06:57:13 don-VirtualBox kernel: [ 189.479569] sd 3:0:0:0: [sdb] Assuming drive cache: write through
Oct 4 06:57:13 don-VirtualBox kernel: [ 189.479571] sd 3:0:0:0: [sdb] Attached SCSI disk
Oct 4 06:58:06 don-VirtualBox ntfs-3g[2151]: Version 2012.1.15AR.1 external FUSE 28
Oct 4 06:58:06 don-VirtualBox ntfs-3g[2151]: Mounted /dev/sdb5 (Read-Write, label "ExtHDD", NTFS 3.1)
Oct 4 06:58:06 don-VirtualBox ntfs-3g[2151]: Cmdline options: rw
Oct 4 06:58:06 don-VirtualBox ntfs-3g[2151]: Mount options: rw,allow_other,nonempty,relatime,fsname=/dev/sdb5,blkdev,blksize=4096
Oct 4 06:58:06 don-VirtualBox ntfs-3g[2151]: Ownership and permissions disabled, configuration type 7
don@don-VirtualBox:~$

I don't know if this is of any use to you or not.

donmaz
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-mounting external NTFS USB hard drive. Cotobear Slackware 5 02-07-2010 02:46 AM
External USB hard drive auto-mounting error (dbus) digimaus Slackware 1 11-29-2009 02:49 PM
After upgrading to Ubuntu 9.10 external USB drive won't auto mount sombs Linux - Newbie 2 11-15-2009 07:50 AM
how to auto mount ext4 external hard drive (ubuntu jaunty) pexctt Linux - Hardware 1 01-15-2009 11:58 PM
External USB hard drive not auto-mounting - broken HAL? dewert Slackware 6 07-08-2008 12:41 AM


All times are GMT -5. The time now is 03:16 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration