LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Arch (https://www.linuxquestions.org/questions/arch-29/)
-   -   how to find out mp3 player creative zen stone uuid? (https://www.linuxquestions.org/questions/arch-29/how-to-find-out-mp3-player-creative-zen-stone-uuid-938613/)

raleeha 04-07-2012 09:09 AM

how to find out mp3 player creative zen stone uuid?
 
Hello,

I'm trying to find out what's the uuid my creative zen stone mp3 player is. But i got no luck to do this right now. Maybe there are some devices without an uuid?

when i type into a console >>sudo blkid /dev/sdd1<<, i get following ..

Code:

/dev/sdd1: LABEL="ZEN Stone" TYPE="vfat"
Any suggestions?

thanks to all

raleeha

lukkon 04-08-2012 02:00 AM

Try this:
Code:

ls -l /dev/disk/by-uuid/

syg00 04-08-2012 03:09 AM

Quote:

Originally Posted by raleeha (Post 4647096)
Maybe there are some devices without an uuid?

Certainly.
Strictly speaking it's the filesystem that lacks UUID support.

With gpt, UUID is a property of the partition, as well as (in the case of Linux filesystems) the filesystem.

Babertje 04-19-2012 03:25 AM

Or you can write an Udev rule for it, see the ArchWiki tag: Udev how to write your own rule for the label method.
A good example script by label is shown there

raleeha 04-26-2012 05:58 PM

udev rules: /etc/udev/rules.d/11-mnt-auto-mount.rules
 
Code:

KERNEL!="sd[a-z][0-9]", GOTO="mnt_auto_mount_end"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N"
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount under /mnt and create the symbolic link in /media
ACTION=="add", RUN+="/bin/mkdir -p /mnt/usbhd-%k", RUN+="/bin/mount -o $env{mount_options} /dev/%k /mnt/usbhd-%k", RUN+="/bin/ln -s /mnt/usbhd-%k /media/usbhd-%k"

# Clean up after removal
ACTION=="remove", RUN+="/bin/rm -f /media/usbhd-%k", RUN+="/bin/umount -l /mnt/usbhd-%k", RUN+="/bin/rmdir /mnt/usbhd-%k"

# Exit
LABEL="mnt_auto_mount_end"

something like this?

Babertje 04-27-2012 01:38 AM

Yes this creates a mountpoint in /mnt and symbolicly links it to /media.
Some desktops may need that you make a policy rule to like this

Code:

/etc/polkit-1/localauthority/50-local.d/50-filesystem-mount-system-internal.pkla
[Mount a system-internal device]
Identity=*
Action=org.freedesktop.udisks.filesystem-mount-system-internal
ResultActive=yes

this results that you not need to type the SU passwrd.
Tip if you use dolphin put /media in the location-bar the zen appears automaticly in locations

You might need to replace 'udisks' with 'udisks2' in case the newer version is used!!!

raleeha 04-29-2012 04:32 AM

entry in /etc/fstab ?
 
ty Babertje =)

I copied this content into a new file called "11-mnt-auto.rules" in the /etc/udev/rules.d directory. The device "Creative Zen Stone 1 GB" will be now mounted in /mnt/usbhd-sdc1 and a symlink will be created in /media/usbhd-sdc1. For now its only possible for the root account to mount or umount this device. I'm not sure, if it make a sense to put this device in /etc/fstab to make it possible mount as normal user account.

I would describe this device in /etc/fstab like the following
"/dev/sdc1 /mnt/usbhd-sdc1 auto fmask=133,dmask=022,noauto,user 1 0"

ty for any comments

raleeha 05-13-2012 10:42 PM

normally i should umount the device before unplug but as normal user it gives there s no entry in /etc/fstab so only root can umount the device. So my question do i really need to umount as root to unplug or its possible to umount as normal user ?


All times are GMT -5. The time now is 10:44 PM.