Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 20 Aug 2018, 09:25
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
External drives get 're-mounted' on wake-up from 'sleep'...
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [17 Posts]   Goto page: Previous 1, 2
Author Message
jafadmin

Joined: 19 Mar 2009
Posts: 833

PostPosted: Sat 20 Jan 2018, 10:18    Post subject:  

Mike, the kernel controls the "sd?" device descriptors however it wants. The user has no control over it, and assignments by the kernel are always arbitrary.

What udev does is make sure that regardless of what descriptor the kernel is using for your device, the udev rule will create your persistent descriptor in addition to the kernel descriptor. If you go look in /dev you will find the device descriptors MyUSB1, MyUSB2, etc, created by the udev rule.

At that point you can ignore the system descriptors and just use your own, since they will remain constant regardless.

FYI, I tested this on a Xenial ISO session, and it worked flawlessly.

Puppy is the only Linux I've found that uses the system kernel descriptors directly for USB. Most other Linux's create "friendly name" links to them.


Better yet ..
Below is an improvement in the form of a wizard. It is for folks that are juggling several USB disks and want each to mount by a "friendly" name.

In this implementation you put the wizard files in "/root/udev" which you will need to create.

Now just open a console in /root/udev and run: "./mkrule /dev/sd? FriendlyName"
where "FriendlyName" is frequently the model name, i.e.: "WD-Mybook"

That's all you do. Now you can run it for each USB disk and you will have mountpoints for them in "/", i.e.: /WD-Mybook, etc ..
udev-wizard.tar.gz
Description 
gz

 Download 
Filename  udev-wizard.tar.gz 
Filesize  1.79 KB 
Downloaded  53 Time(s) 
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4026
Location: King's Lynn, UK.

PostPosted: Mon 22 Jan 2018, 11:04    Post subject:  

From what I can see of it, the 'suspend/resume-remount' script as thrashed out above only seems to work correctly for the Slackware-based Pups. Using it in the 'buntu-based Pups always results in the 'step-climbing' of the mount-points.....plus a distinct build-up of old & now un-used drive icons that have to be manually cleared out of the way.

This leads me to believe that Canonical & Slackware must be treating the power 'states' in a distinctly different way. jafadmin's suggestion to use the 'udev-rules' does work (after a fashion); extraneous mount-points still get created, but after a manual re-scan of '/root/Startup/trigger-udev'', the mount-points are back at 'MyUSB1/MyUSB2' (as labelled in the script provided.)

So the conclusion I bring away from these 'experiments' is this; that there cannot be one 'universal' suspend script for all Puppies running on a desktop, because of the way the power states are treated in different Pups. Well; there probably could be......but not with my terrible scripting skills. Rolling Eyes Embarassed

The actual suspend/resume works flawlessly (at least with my hardware it does). It's what the different Pups do with mount-points after resuming from 'sleep' that seems to be the sticking-point.....

I'll get there eventually..!


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 2 [17 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0422s ][ Queries: 15 (0.0083s) ][ GZIP on ]