Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

[SOLVED] automounting usb ntfs in kde with user privileges

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
Matte88
n00b
n00b
User avatar
Posts: 63
Joined: Sat Aug 15, 2009 12:40 pm
Location: VE-NICE

[SOLVED] automounting usb ntfs in kde with user privileges

  • Quote

Post by Matte88 » Sun Jan 06, 2013 1:25 pm

Like title.
The HDD is working fine on Windows and other ditros and lsusb recognize it.

Code: Select all

*  sys-fs/udiskie
      Latest version available: 0.4.1
      Latest version installed: 0.4.1
      Size of files: 10 kB
      Homepage:      http://bitbucket.org/byronclark/udiskie
      Description:   An automatic disk mounting service using udisks
      License:       MIT

*  sys-fs/udisks
      Latest version available: 1.0.4-r2
      Latest version installed: 1.0.4-r2
      Size of files: 703 kB
      Homepage:      http://www.freedesktop.org/wiki/Software/udisks
      Description:   Daemon providing interfaces to work with storage devices
      License:       GPL-2
udisks
Addon software

sys-apps/gnome-disk-utility - GNOME program to partition, configure and monitor storage devices.
sys-fs/udiskie - Automatic mount of drives.
sys-fs/udisks-glue - Run actions on udisks events.
P. S.: why in Fedora everything is automounted goes into /run/media/<user name>/?
Last edited by Matte88 on Sun Jan 13, 2013 1:02 pm, edited 1 time in total.
-Complichiamo le cose per semplificarci la vita-
Top
CrankyPenguin
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Thu Jun 19, 2003 1:37 pm

  • Quote

Post by CrankyPenguin » Mon Jan 07, 2013 4:44 am

Do you want it automounted when it is inserted or automounted on startup? I have not done the former but I believe that you should look to udev rules for that. For the latter you can set auto in fstab and mount it via ntfs-3g. The issue, however, may be timing. I have a usb external disk and it is recognized on startup but the udev rules don't run in time because the device node is created before udev starts. Thus it shows up as /dev/sdb not the /usbdrives/ command.

With respect to your fedora question, while this is a Gentoo board and that is typically out of scope I believe that it is simply a convention. Different distros have different conventions for mounted media. The generall *nix default is under /mnt/ but I know that Redhat and Ubuntu prefer something else. It is no more than that and could likely be changed if you modified the right configuration files.
Linux, the OS for the obsessive-compulsive speed freak in all of us.
Top
Matte88
n00b
n00b
User avatar
Posts: 63
Joined: Sat Aug 15, 2009 12:40 pm
Location: VE-NICE

  • Quote

Post by Matte88 » Mon Jan 07, 2013 1:12 pm

CrankyPenguin wrote:Do you want it automounted when it is inserted or automounted on startup?
Yes, I need automounting on insertion. However, ntfs-3g is installed
-Complichiamo le cose per semplificarci la vita-
Top
CrankyPenguin
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Thu Jun 19, 2003 1:37 pm

  • Quote

Post by CrankyPenguin » Tue Jan 08, 2013 12:42 am

What does your fstab have in it?
Linux, the OS for the obsessive-compulsive speed freak in all of us.
Top
Matte88
n00b
n00b
User avatar
Posts: 63
Joined: Sat Aug 15, 2009 12:40 pm
Location: VE-NICE

  • Quote

Post by Matte88 » Tue Jan 08, 2013 1:04 pm

CrankyPenguin wrote:What does your fstab have in it?

Code: Select all

/dev/sda4               /               ext4            noatime         0 1
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0
-Complichiamo le cose per semplificarci la vita-
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6569
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Tue Jan 08, 2013 2:29 pm

This is a line from my fstab that deals with a microSDHC NTFS filessystem

Code: Select all

/dev/disk/by-label/MSDHC	/mnt/msdhc	auto            noauto,user,exec,nodev,nosuid	0 0
I don't want it automounted at boot up, so I use noauto.

As CrankyPenguin believes, I do also that you would need a udev rule to automount upon insertion.

Good Luck

Note: I had to build fuse into ntfs-3g to get non-root mounting working. You may or may not need to do that.
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
Matte88
n00b
n00b
User avatar
Posts: 63
Joined: Sat Aug 15, 2009 12:40 pm
Location: VE-NICE

  • Quote

Post by Matte88 » Tue Jan 08, 2013 3:27 pm

Anon-E-moose wrote:Note: I had to build fuse into ntfs-3g to get non-root mounting working. You may or may not need to do that.

Code: Select all

[ebuild   R    ] sys-fs/ntfs3g-2012.1.15-r2  USE="acl crypt ntfsprogs xattr -debug -external-fuse -static-libs -suid"
http://wiki.gentoo.org/wiki/NTFS
external-fuse Yes Use external FUSE library instead of internal one. Must be disabled for unprivileged mounting to work.
Any hint or infos/docs about udev rules?
-Complichiamo le cose per semplificarci la vita-
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6569
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Tue Jan 08, 2013 4:20 pm

Matte88 wrote:Any hint or infos/docs about udev rules?
There is info out there, I did a google search with these keywords "udev automount usb devices"

This was one of many returned.
http://ubuntuforums.org/showthread.php?t=168221

Good luck
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
CrankyPenguin
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Thu Jun 19, 2003 1:37 pm

  • Quote

Post by CrankyPenguin » Wed Jan 09, 2013 7:09 am

The link posted by Anon-E-Moose (nice pic by the way!) seems to be a good one for the rules. It is out of date in one respect. In Gentoo the udevinfo command no longer gets built. On more recent systems you now need to use the command udevadm as shown below:

Code: Select all

udevadm info -a -p $(udevadm info -q path -n /dev/sda)
This site: https://wiki.archlinux.org/index.php/Ud ... s_wrappers has a nice discussion of UDisks and other tools that can be used to trigger automount when a given disk shows up.
Linux, the OS for the obsessive-compulsive speed freak in all of us.
Top
Matte88
n00b
n00b
User avatar
Posts: 63
Joined: Sat Aug 15, 2009 12:40 pm
Location: VE-NICE

  • Quote

Post by Matte88 » Sat Jan 12, 2013 11:27 pm

Guys... I'm starting to think that my external HDD isn't recognize properly from my gentoo box... Any advice?
blkid

Code: Select all

/dev/sda1: SEC_TYPE="msdos" UUID="87A8-3BF7" TYPE="vfat" 
/dev/sda2: UUID="aac8d2c3-5f93-48b3-b367-b233cef54d7e" TYPE="ext4" 
/dev/sda3: LABEL="_Fedora-17-x86_6" UUID="5c17179b-bcd1-4e6b-8809-6e9c2f6c1ca0" TYPE="ext4" 
/dev/sda4: LABEL="gentoo" UUID="a1bba32f-d201-4885-a29e-7d6855396ab1" TYPE="ext4" 
/dev/sda5: UUID="186400dd-33a8-47e8-bd90-c036a282912d" TYPE="ext4" 
/dev/sda6: UUID="b9521213-873b-4816-9fbb-1864ab80b394" TYPE="swap" 
fdisk -l

Code: Select all

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 testine, 63 settori/tracce, 38913 cilindri, totale 625142448 settori
Unità = sectors di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Identificativo disco: 0x00000000

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1               1   625142447   312571223+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 testine, 63 settori/tracce, 121601 cilindri, totale 1953525168 settori
Unità = sectors di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x2e216a56

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sdb1              63  1953520064   976760001    7  HPFS/NTFS/exFAT
udisks --show-info /dev/sdb

Code: Select all

Showing information for /org/freedesktop/UDisks/devices/sdb
  native-path:                 /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/host7/target7:0:0/7:0:0:0/block/sdb
  device:                      8:16
  device-file:                 /dev/sdb
    presentation:              /dev/sdb
    by-id:                     /dev/disk/by-id/ata-WDC_WD10EAVS-00D7B1_WD-WCAU44650449
    by-id:                     /dev/disk/by-id/wwn-0x50014ee2578c7fb8
    by-path:                   /dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.2:1.0-scsi-0:0:0:0
  detected at:                 dom 13 gen 2013 00:06:07 CET
  system internal:             0
  removable:                   0
  has media:                   1 (detected at dom 13 gen 2013 00:06:07 CET)
    detects change:            0
    detection by polling:      0
    detection inhibitable:     0
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  automount hint:              
  size:                        1000204886016
  block size:                  512
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  partition table:
    scheme:                    mbr
    count:                     1
  drive:
    vendor:                    WD
    model:                     WDC WD10EAVS-00D7B1
    revision:                  01.01A10
    serial:                    WD-WCAU44650449
    WWN:                       50014ee2578c7fb8
    detachable:                1
    can spindown:              1
    rotational media:          Yes, unknown rate
    write-cache:               enabled
    ejectable:                 0
    adapter:                   Unknown
    ports:
    similar devices:
    media:                     
      compat:                 
    interface:                 usb
    if speed:                  480000000 bits/s
    ATA SMART:                 Updated at dom 13 gen 2013 00:06:07 CET
      overall assessment:      Good
As you can see, KDE recognize only partitions on my internal GPT HDD (/dev/sda)
http://imageshack.us/photo/my-images/198/kdedisks.png/

Also, the system doesn't recognize the partition scheme of the external HDD

Code: Select all

ntfs-3g /dev/sdb /media/1tb/
NTFS signature is missing.
Failed to mount '/dev/sdb': Argomento non valido
The device '/dev/sdb' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
-Complichiamo le cose per semplificarci la vita-
Top
Matte88
n00b
n00b
User avatar
Posts: 63
Joined: Sat Aug 15, 2009 12:40 pm
Location: VE-NICE

  • Quote

Post by Matte88 » Sun Jan 13, 2013 3:13 am

Ehm... So... :oops: First of all I want to ask pardon: I don't know what exactly fixed the problem, but these are the changes I made into the kernel:
  • MSDOS_PARTITION [=y]
    USB_STORAGE [=m]
    MSDOS_FS [=m]
    VFAT_FS [=m]
    NTFS_FS [=m]
I didn't touch udev rules at all, neither my fstab!
Thank CrankyPenguin and Anon-E-moose for you time and support! :wink:
-Complichiamo le cose per semplificarci la vita-
Top
Post Reply

11 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy