Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 563
  • Last Modified:

external ntfs drive cannot be mounted automatically in OpenSuse


When I boot up opensuse 11.4 with my externall NTFS drive already plugged into the USB slot, opensuse detects it and mounts it automatically. And I can access its files. But when I plugged in the drive at any other time, the device is detected, but cannot be mounted. I can see the external drive in the Dolphin file explorer, but when I click the device, it displays the error:

Error opening /dev/sdc1: Permission denied
Failed to mount /dev/sdc1: Permission denied
Please check /dev/sdc1 and the ntfs-3g binary permissions
and the mounting user ID.

I searched the internet for advise, but all fails. What do I do next?

Thanks in advance for the help.
0
JeanLeFrancais
Asked:
JeanLeFrancais
  • 5
  • 3
  • 2
  • +2
1 Solution
 
PapertripCommented:
Sounds like you are trying to mount it as a non-root user.

Try this:
su or sudo to root,
mount -t ntfs /dev/sdc1 /mntpoint

Open in new window

0
 
JeanLeFrancaisAuthor Commented:
Papertrip,

That command worked beautifully. Isn't there a way to automate this so that when I plug the external drive in, the command will be triggered without me having to issue it?

0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
themrrobertCommented:
Were you able to get it working using the fix i sent you?

From the sound of it, I believe you have enough linux experience to make it work for you.

Best of luck :D
0
 
JeanLeFrancaisAuthor Commented:
Themrrobert:

No, I couldn't get the info from that link to work. I noticed that the device name changes, if seems, everytime that I plug the USB external HD. It was /dev/sdc1 yesterday. Today, it maps to /dev/sdd1. So it is impossible to hard-code the mapping into that auto.misc file when it changes all the time. For now, I will accept Paperclip's solution:

mount -t ntfs /dev/sdc1 /mntpoint

unless you have some other automount trick in mind. It would be great to make that automount to work.
0
 
bz43Commented:
Just curious.  Would you mind running
$ cat /etc/fstab 

Open in new window


I want to see if you are using UUID's
If you're using UUID's we can use that in fstab to automount.

Here is one of my fstabs,
$ cat /etc/fstab 
# /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    defaults        0       0
# / was on /dev/sda2 during installation
UUID=f13fe524-b8ae-4f35-8831-9ba9e9db2dfa /               ext4    errors=remount-ro 0       1
# /home was on /dev/sdb1 during installation
UUID=0f24fae1-135c-4750-9928-4632e2f04f45 /home           ext4    defaults        0       2
# /wd500 was on /dev/sdc1 during installation
UUID=1fba7d0c-e82c-4837-b1bd-6192d7dd3f88 /wd500          ext4    rw,user,exec        0       2
# /wdgiga was on /dev/sdc3 during installation
UUID=3baa432d-3480-402d-8df3-1b90dbc5f655 /wdgiga         ext4    rw,user,exec        0       2
# /wdtera was on /dev/sdc2 during installation
UUID=9a762875-5e0d-4edf-8bdd-8aaaea6403d5 /wdtera         ext4    rw,user,exec        0       2
# /xtraSpace was on /dev/sda3 during installation
UUID=654d5c57-129b-4e06-92f1-673a8b4bcf56 /xtraSpace      ext4    defaults        0       2
# swap was on /dev/sda1 during installation
UUID=f7fc69af-d475-44f1-87dd-63eb8ca0b7ed none            swap    sw              0       0
/dev/scd1       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/scd0       /media/cdrom1   udf,iso9660 user,noauto     0       0
#/dev/sdc1       /media/usb0     auto    rw,user,noauto  0       0
#/dev/sdc2       /media/usb1     auto    rw,user,noauto  0       0
#/dev/sdc3       /media/usb2     auto    rw,user,noauto  0       0

Open in new window

0
 
JeanLeFrancaisAuthor Commented:
bz43:

Here's my fstab file:
 fstab
0
 
bz43Commented:
I don't have access to opensuse 11.4 at the moment so not sure if this will work.  

I'm not sure why your system doesn't automatically remount the WD My Book with your current fstab using the disk’s ID (symlinks in /dev/disk/by-id/).  Maybe it will work if you leave the device plugged in all the time.  And, maybe it doesn't work when you unplug the device and plug it in using the same or different USB port.  Not sure.

So, maybe try using the filesystem’s UUID (/dev/disk/by-uuid/)?

Can you run the blkid command?
$ /sbin/blkid 

Open in new window


You'll see several lines but I'm interested in the one for your My Book. Unfortunately I don't have an opensuse 11.4 with a setup so I can't give you exact code.  You might see something like:
/dev/sda1: UUID="A248A12348A0F6E7" LABEL="System" TYPE="ntfs" 

Open in new window


If possible, edit your fstab using the UUID for your USB WD My Book external ntfs hard disk.  The "#" should remark out that line.  Substitute your Western Digital My Book UUID for "A248A12348A0F6E7":
  
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part6 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part7 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part2 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part3 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
#/dev/disk/by-id/usb-WD_My_Book_1140_574341563555313335393232-0:0-part1 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
#/dev/disk/by-id/usb-WD_My_Book_1140_574341563555313335393232-0:0-part1 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
/dev/disk/by-uuid/A248A12348A0F6E7 /windows/E	ntfs-3g	users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0           

Open in new window



0
 
bz43Commented:
Sorry the last code should be:
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part6 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part7 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part2 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part3 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
#/dev/disk/by-id/usb-WD_My_Book_1140_574341563555313335393232-0:0-part1 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
/dev/disk/by-uuid/A248A12348A0F6E7 /windows/E	ntfs-3g	users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Open in new window


0
 
KishorDasCommented:
rather use the command ntfs-3g to mount the ntfs file system.

Thanks
Kishor Kumar Das
0
 
JeanLeFrancaisAuthor Commented:
Folks,

Thanks for all the advises, but all seem to fail. I decided to accept Paperclip's solution:
mount -t ntfs /dev/sdc1 /mntpoint

because it works, although it doesn't solve the automount solution I sought.
0
 
JeanLeFrancaisAuthor Commented:
The command works, although it doesn't solve the automount of the external hard drive. Thanks for the help.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 5
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now