by
0
4
1,094
0
Top 1% !
Popular
Famous
Specified
Popularity: 24423rd place
Created
Modified Apr 13, 2014
This snippet is Public
No tags for this snippet yet.
LicenseMIT_X11
OSLinux
SourceGithub

bedrock linux flopsie experimental shared subtree for /mnt and /media instructions

bedrock linux flopsie experimental shared subtree for /mnt and /media instructions: 
gistfile1.txt
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/46632/bedrock-linux-flopsie-experimental-share?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
Purpose: In Bedrock Linux, as of flopsie, mounts in one client do not appear in others. This is particularly annoying for things like usb drives which are mounted by a mount command in one client, but then cannot have their contents used by programs from other clients. Solution: Linux supports the ability to automatically propogate mount points in mount trees when set up properly. Utilize that. Hacky solution for flopsie: 1. Note: This requires testing/experimentation. Could go horribly wrong. 2. Ensure /mnt and /media exist as directories in the core. mkdir -p /bedrock/clients/bedrock/mnt mkdir -p /bedrock/clients/bedrock/media 3. Open up /bedrock/clients/bedrock/etc/fstab and add the following: /mnt /mnt bind defaults,bind 0 0 0 /media /media bind defaults,bind 0 0 0 4. Open up /bedrock/clients/bedrock/etc/init.d/rcS and just *before* the line which announces "Setting up client shared items" (around line 230) add: announce "Sharing subtrees" mount --make-shared /mnt mount --make-shared /media 5. Add the following to /bedrock/etc/frameworks.d/default (or some other framework/client.conf) bind = /mnt, /media Thoughts/notes on solution for Hawkey: - Have brs recognize a new key ("shared") which will check if the core has the given directory as a shared mount point and, if not, mount that, then continue as though it was a bind setting. - Do not create a new setting, but rather have all bind items act as described above. This is conceptually simpler, but but will result in more mount points / overhead. - Both of above solutions "leak" mount points when clients are taken down without additional work. Perhaps have brs check if a shared subtree in the core is being used by any other clients when disabling a client and, if not, unmount it from the core as well. - Might be able to just make the root of the filesystem ("/") shared - then everything will propogate. Experimentation seems to indicate this will not cause an infinite loop. Haven't thought through possible downsides. - Taking down one client might have the side-effect of removing mount points which were accessible in other clients. Whether this happens should be confirmed and, if so, something should be done about it. If possible, taking down one client should have minimal effect on other clients.
If you want to be updated about similar snippets, Sign in and follow our Channels