[arch-general] /etc/rc.local: "chown user: /dev/sda10" /etc/fstab: "defaults, owner, noauto"

Joe(theWordy)Philbrook jtwdyp at ttlc.net
Mon Mar 29 23:58:53 CEST 2010


It would appear that on Mar 29, Thomas Bächler did say:

> Am 29.03.2010 15:01, schrieb Joe(theWordy)Philbrook:
> > I was pleased to note that Arch evidently does think a rc.local is an
> > appropriate place for local initialization stuff to happen. However it's
> > come to my attention that about 5 out of the last 25 times I've booted Arch
> > only 2 of the 3 partitions 'chown'ed in my /root/bin/fix_dev script can be
> > mounted by my user account. (unless I use root account to manualy rerun 
> > the /root/bin script...)
> > 
> > On the occasions when a user script's attempt to mount the 3rd such partition
> > fails {with an error message telling me that only root can do that} the other
> > two such partitions mount just fine. 
> 
> USB devices are detected asynchronously (other too, possibly). The
> device node may be (re)created after rc.local has finished.

Yeah USB devices should be... All three of the partitions in question
are on the one and only internal hard drive of my laptop...
the fix_dev script consists of:

chown jtwdyp:  /dev/disk/by-label/jSTUFF_lap-8
chown jtwdyp:  /dev/disk/by-label/Jimages_lap-9
chown jtwdyp:  /dev/disk/by-label/j10_lap-10

which normaly represent  /dev/sda8 /dev/sda9 /dev/sda10
It would make sense to me that the whole device node might get
recreated if I attached or removed a device. But why would it recreate
the device node for /dev/sda10 without also recreating the nodes for
/dev/sda8 & /dev/sda9????

It wouldn't bother me so much if it wasn't for the fact that of all my
user scripts that expect to mount or umount any of these partitions the
one that's been getting these errors is actually my ~/.bash_profile which
mounts all three on user login. Which 99.9% of the time is the first
thing I do after boot up is complete.
 
> > Is there something special I need to do to get Arch to *_consistently_* respect
> > all three chown commands???
> 
> man udev
> 
> I am thinking about something like:
> SUBSYSTEM=="block", ENV{ID_FS_UUID}=="your_uuid", OWNER="your_user"
> in a late udev rule file (say, /etc/udev/rules.d/99-local-disk.rules).

Thank you!

I do wish that the authors of various man and info documentation
believed even half as much as Arch's wiki files in explaining "how to"
to someone who doesn't already know, rather than just reminding some
professor which options are currently compiled in...

I know for certain that "man udev" wouldn't have given me a clue how to
write that example rule template, even if I'd studied it for a year and
a day. 

Thanks again! But: <sigh>
 
I hates UUID (or any other human NON-readable device id, config files,
etc...) considerably more than Yosemite Sam ever hated rabbits. ;-7

Actually I only converted to using /dev/disk/by-label/ when I recently
decided to try Arch and the {much better written than most} Arch wiki
convinced me that I should convert to "Persistent block device naming".
{And which even gave step by step instructions for naming various FS types}

I do hope this is a valid adaption of the above template:

SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="j10_lap-10", OWNER="jtwdyp", GROUP="jtwdyp"

But I wonder if this would be applicable to my other linux as well?

That is maybe I won't need to bother running my fix_dev script anymore...

-- 
|   ~^~   ~^~
|   <*>   <*>       Joe (theWordy) Philbrook
|       ^                J(tWdy)P
|     \___/         <<jtwdyp at ttlc.net>>


More information about the arch-general mailing list