View previous topic :: View next topic |
Author |
Message |
Matte88 n00b
Joined: 15 Aug 2009 Posts: 55 Location: VE-NICE
|
Posted: Sun Jan 06, 2013 1:25 pm Post subject: [SOLVED] automounting usb ntfs in kde with user privileges |
|
|
Like title.
The HDD is working fine on Windows and other ditros and lsusb recognize it.
Code: | * 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
Quote: | 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>/? _________________ -Complichiamo le cose per semplificarci la vita-
Last edited by Matte88 on Sun Jan 13, 2013 1:02 pm; edited 1 time in total |
|
Back to top |
|
|
CrankyPenguin Apprentice
Joined: 19 Jun 2003 Posts: 283
|
Posted: Mon Jan 07, 2013 4:44 am Post subject: |
|
|
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. |
|
Back to top |
|
|
Matte88 n00b
Joined: 15 Aug 2009 Posts: 55 Location: VE-NICE
|
Posted: Mon Jan 07, 2013 1:12 pm Post subject: |
|
|
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- |
|
Back to top |
|
|
CrankyPenguin Apprentice
Joined: 19 Jun 2003 Posts: 283
|
Posted: Tue Jan 08, 2013 12:42 am Post subject: |
|
|
What does your fstab have in it? _________________ Linux, the OS for the obsessive-compulsive speed freak in all of us. |
|
Back to top |
|
|
Matte88 n00b
Joined: 15 Aug 2009 Posts: 55 Location: VE-NICE
|
Posted: Tue Jan 08, 2013 1:04 pm Post subject: |
|
|
CrankyPenguin wrote: | What does your fstab have in it? |
Code: | /dev/sda4 / ext4 noatime 0 1
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 |
_________________ -Complichiamo le cose per semplificarci la vita- |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Tue Jan 08, 2013 2:29 pm Post subject: |
|
|
This is a line from my fstab that deals with a microSDHC NTFS filessystem
Code: | /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. _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Matte88 n00b
Joined: 15 Aug 2009 Posts: 55 Location: VE-NICE
|
Posted: Tue Jan 08, 2013 3:27 pm Post subject: |
|
|
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: | [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
Quote: | 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- |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Tue Jan 08, 2013 4:20 pm Post subject: |
|
|
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 _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
CrankyPenguin Apprentice
Joined: 19 Jun 2003 Posts: 283
|
Posted: Wed Jan 09, 2013 7:09 am Post subject: |
|
|
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: | udevadm info -a -p $(udevadm info -q path -n /dev/sda) |
This site: https://wiki.archlinux.org/index.php/Udev#Automounting_udisks_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. |
|
Back to top |
|
|
Matte88 n00b
Joined: 15 Aug 2009 Posts: 55 Location: VE-NICE
|
Posted: Sat Jan 12, 2013 11:27 pm Post subject: |
|
|
Guys... I'm starting to think that my external HDD isn't recognize properly from my gentoo box... Any advice?
blkid Code: | /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: | 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: | 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: | 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- |
|
Back to top |
|
|
Matte88 n00b
Joined: 15 Aug 2009 Posts: 55 Location: VE-NICE
|
Posted: Sun Jan 13, 2013 3:13 am Post subject: |
|
|
Ehm... So... 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! _________________ -Complichiamo le cose per semplificarci la vita- |
|
Back to top |
|
|
|