CPY2RAM Ramifications

Post here if you are a new Porteus member and you're looking for some help.
Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

CPY2RAM Ramifications

Post#1 by Bogomips » 06 Jul 2014, 21:50

Copy to RAM

Porteus has a boot option (implemented by a cheatcode) called copy2ram. Selecting this boot option means that all of the files inside your modules will be copied into your system's RAM. This slows down your boot process and uses up more of your RAM, but it also produces an incredibly fast, responsive system because all of the files are already loaded and available for use.
Had 6 modules in base, one in modules, and one on Live System. As a result, now have processes loop0 to loop7.
  1. Does this mean that despite modules being on loops, the base modules have all been copied to ram?
  2. And if this be the case, is my nvidia driver in modules also copied to ram?
  3. And what about optional?
Case Number 1: wrote:Now, let's move our slack package to our workspace and convert it into a module:

mv ~/Downloads/ ~/temp/modwork/
cd ~/temp/modwork/
txz2xzm aterm-1.0.1-i486-6sl.txz aterm-1.0.1-i486-6sl.xzm

Use tab autocompletion for the package name (i.e., enter mv ~/Downloads/aterm, then press TAB and the rest of the filename will autocomplete), and the module name can be anything you want, but it's easier to keep your modules oganized if you use a specific name that includes the version number.

Now, you have an .xzm file next to your .txz file in ~/temp/modwork/. This module is ready to use, as it has no dependencies. You can't activate a module from within your live filesystem --if you try to activate it, the system will relocate it to /mnt/live/memory/modules and then activate it (and it will disappear from your 'modwork' directory). Let's copy this to some place permanent instead:
Now have:

Code: Select all

guest@porteus:~$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/lib/python2.7 /usr/X11R6/bin/python /usr/X11R6/bin/python2.7 /usr/X11R6/bin/python2.7-config /usr/bin/X11/python /usr/bin/X11/python2.7 /usr/bin/X11/python2.7-config /usr/X11/bin/python /usr/X11/bin/python2.7 /usr/X11/bin/python2.7-config /usr/include/python2.7 /usr/man/man1/python.1 /usr/man/man1/python2.1 /usr/X11/man/man1/python.1 /usr/X11/man/man1/python2.1
but activated module has not been moved:

Code: Select all

guest@porteus:~$ ls -lh /tmp/mods
total 12M
-rw-r--r-- 1 guest guest 12M Jul  6 17:13 python-2.7.5-i486-1.xzm
Supplementary Queries
  • Is there somewhere a complete list of useful Porteus CLI statements/scripts, in particular for Porteus Module Tools?
  • Any way of getting sudo?
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: CPY2RAM Ramifications

Post#2 by fanthom » 07 Jul 2014, 20:10

Does this mean that despite modules being on loops, the base modules have all been copied to ram?
And if this be the case, is my nvidia driver in modules also copied to ram?
And what about optional?
modules are copied to RAM only during boot (are activated from there). for a full list of modules which were loaded from RAM check /var/log/porteus-livedbg. modules activated during live session works from the media on which they were placed.
You can't activate a module from within your live filesystem --if you try to activate it, the system will relocate it to /mnt/live/memory/modules and then activate it (and it will disappear from your 'modwork' directory).
this is not true anymore - modules can be activated directly from the live filesystem in Porteus.
Please add [Solved] to your thread title if the solution was found.

Post Reply