Page 1 of 1

Suggestions

Posted: 03 Feb 2014, 08:28
by tome
It would be nice if there will be script to free/clear memory that can replace rebooting (partial of course). In always fresh mode after downloading large files, installing packages, using cache in firefox the available amount of ram can be very low.

Second suggestion is to create new folder 'anydata' (or similar name) in Porteus directory next to changes and modules folders and after every boot symlink in root tree to it. It would work similar to changes but doesn't require unix filesystem and you can choose what you want save to disk similar to omitting if EXIT cheatcode is used. For example Desktop and similar folders can be copied and then linked there. How should be modified startup scripts to automatically detect Porteus boot device and create this 'relative' link to correct partition sda, sdb etc?

Re: Suggestions

Posted: 03 Feb 2014, 09:09
by dustbunnies
For cleanup, have you tried using BleachBit?
see: http://forum.porteus.org/viewtopic.php? ... bit#p20341

note: the browser needs to be closed prior to performing cleanup (its indexDB cache files are locked while in use).
doesn't require unix filesystem ...
...Desktop and similar folders can be copied and then linked there
What is the goal? If you dual-boot to windows and want certain files on the Porteus pendrive to be accessible from a windows session, a freeware windows driver/util exists (Paragon ExtFS Mounter) which will enable you to ro mount an ext2/3/4 partition from a windows session. If the goal is something else (selective, non-incremental, backup?) Due to missing attributes, loose files retrieved from a "non-unix" partition would need to be chown()ed each time they are written back to their native location (~Desktop etc) so... unless ability to read 'em from windows is desired, storage of the files within a squashfs written to anyfiles path seems preferable.

Re: Suggestions

Posted: 03 Feb 2014, 22:06
by fanthom
@tome
a) OS will free up the RAM automatically when needed. anyway - if you really want to do this manually then please run:

Code: Select all

echo 3 > /proc/sys/vm/drop_caches
b) not sure if i follow but i have the impression you are really trying hard to break something.
maybe you could link /mnt/live/memory/changes to /porteus/anydata? mind that you would have to remount aufs with 'udba' flag when modifying rw branch directly. please have a look on 'dump-session' script.

Re: Suggestions

Posted: 04 Feb 2014, 00:06
by brokenman
If i understand correctly you just want to save stuff you download, and other files you create, to a drive somewhere on your computer, but you want a symlink in the live system to make it easier.

For example: /home/mystuff ---> /mnt/sdxY/linux/storage/stuff

The easiest thing to do is just put a symlink in your 'rootcopy' folder that points to this destination. There is really no point for modifying boot scripts in this case since the target destination will be different for everybody.

Re: Suggestions

Posted: 04 Feb 2014, 05:26
by dustbunnies
tome, maybe the initramfs approach described in this post will interest you:
http://antix.freeforums.org/programs-st ... t4836.html

Re: Suggestions

Posted: 04 Feb 2014, 17:00
by tome
@dustbunnies,
Due to missing attributes, loose files retrieved from a "non-unix" partition would need to be chown()ed each time they are written back to their native location (~Desktop etc)
Everyone can write to ntfs or fat, so there is no need change owner if I prefer everyone can read, write or execute. In case of unixfs I must set these permissions and on ntfs or fat it is automatically 'native set'. And proposed by me cleanup script concerns only live distros.

@brokenman,
Yes, you understand correctly. I can create symlink

Code: Select all

ln -s ../anydata
in rootcopy folder but it won't work in root tree - must be aboulute link (sdxY) but absolute links are not portable if I connect my pendrive to another computer it can be sdc and on another sdb.

@fanthom,
How to modify dump-session script if I want only Clear tmpfs (RAM) but without copying files to WDIR - is it possible? What else can be done to have similar effects like after reboot?
I don't want link .../memory/changes to /porteus/anydata (interesting idea) because I don't need every session-file - many of them can be easly deleted. I want especialy link

Code: Select all

Desktop, .local/share/notes and parcellite, .bash_history, .local/share/applications/mimeapps.list', .dropbox
and similar, for other files I prefer fresh mode. I have this links now and they works great both for unix and windows filesystems like rootcopy.

Code: Select all

ln -s $PTH/anydata /
in linuxrc should work so I will try copy needed lines to rc.local and link - first my stuff to /anydata and second (automatically) from anydata to /mnt/current_partition/stuff.

Thanks all.

Re: Suggestions

Posted: 05 Feb 2014, 03:29
by fanthom
i think i get you - you want 'always fresh' + save only some data through symlinks.
you could use /mnt/live/porteus/optional as it always points to booting device so it's enough to use rc.local to create your symlinks like:

Code: Select all

ln -sf /mnt/live/porteus/optional /home/guest/Desktop/persistent_changes
i hope this is what you were looking for.

Re: Suggestions

Posted: 05 Feb 2014, 04:38
by tome
@fanthom Yes, I was looking for it and thanks you I can do it without complications.

Re: Suggestions

Posted: 08 Mar 2014, 17:23
by tome
Dementi, I have done it with complications:
"Creating live filesystem and inserting modules" takes ca 15 seconds, see: http://forum.porteus.org/viewtopic.php?f=81&t=2777