hello
I installed ubuntu 12.04 armhf precise in emmc, becuase of sdio interface for another device.
and I need more memory space in beagle bone so I want to use usb stck memey as spare memory.
I wrote udev rule file for mounting usb in /etc/rules.d as below
it didn’t work well.
it made directory /media/usbhd-sda1. but I cannot find files.
log:
213.194637] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 213.222809] sd 2:0:0:0: [sda] No Caching mode page present
[ 213.228759] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 213.288317] sd 2:0:0:0: [sda] No Caching mode page present
[ 213.294330] sd 2:0:0:0: [sda] Assuming drive cache: write through
ubuntu@ubuntu-armhf:/media$
ubuntu@ubuntu-armhf:/media$ dmesg | tail
[ 213.184549] sd 2:0:0:0: [sda] Write Protect is off
[ 213.184607] sd 2:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 213.188718] sd 2:0:0:0: [sda] No Caching mode page present
[ 213.194637] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 213.222809] sd 2:0:0:0: [sda] No Caching mode page present
[ 213.228759] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 213.273099] sda: sda1
[ 213.288317] sd 2:0:0:0: [sda] No Caching mode page present
[ 213.294330] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 213.300852] sd 2:0:0:0: [sda] Attached SCSI removable disk
How can I mount usb disk in beagle bone black?
#Start at sdb to avoid system harddrive.
KERNEL!=“sd[a-z][0-9]”, GOTO=“media_by_label_auto_mount_end”
#Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
Create a label
ENV{dir_name}=“usbhd-%k”
#Global mount options
ACTION==“add”, ENV{mount_option}=“defaults, relatime”
#Filesystem-specific mount options
ACTION=“add”, ENV{ID_FS_TYPE}==“vfat|ntfs”, ENV{mount_option}=="$env{mount_option},utf8,gid=100,umask=002"
#Mount the device
ACTION==“add”, RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"
Clean up after removal
ACTION==“remove”, ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"
Exit
LABEL=“media_by_label_auto_mount_end”
Thank you