Page 1 of 1

copy2ram with base changes

Posted: 20 Oct 2018, 17:09
by klaatu
If you want to customize the 'base' image of Porteus so you can run your personal version of Porteus from RAM, here's how I do that. There may be better ways, but this is the method I arrived at and it works well.

This emulates the old Slax version of running from RAM, in which the home directory always reflected the state of ~ as of the last time you didn't run it from RAM.

0. First, configure your base environment. For me, this meant customizing my .bashrc, coping over my .emacs and .emacs.d files, customizing the desktop wallpaper, changing the keyboard to Dvorak, running Xmodmap for some keyboard adjustments, choosing the Firefox browser, and a whole host of other minor adjustments.

1. Once your home directory contains all of your customizations, tar it:

Code: Select all

$ su -
# tar cvf home.tar /home/guest
[...]
# gzip home.tar
# mv home.tar.gz home.tgz
# /opt/porteus-scripts/tgz2xzm home.tgz
[...]
# mv home.tgz /mnt/sdx1/porteus/optional
(Where sdx is the actual path of your porteus bootable drive.)

2. Reboot. Use the Copy to RAM and add this cheatcode:

Code: Select all

extramod=/dev/sdx1/porteus/optional
(Where sdx is the actual path of your porteus bootable drive.)

A 'fresh' copy of Porteus is loaded, but with all changes from your /home/guest dir loaded, including your browser. All modules in your /mnt/sdx1/porteus/modules directory are also loaded.

WARNING: Your changes are not saved in this configuration. If you want your changes to be saved, you must use a separate thumbdrive as your changes folder (available with cheat codes). I personally work off of a separate drive anyway, so I never or rarely need changes to be perserved in Porteus once I've adjusted the initial configuration.

copy2ram with base changes

Posted: 21 Oct 2018, 03:40
by Ed_P
I like the concept klaatu but not the implication. If you put the changes module into the Porteus system's /porteus/modules folder there is no need for the extramod cheat code.

copy2ram with base changes

Posted: 21 Oct 2018, 12:01
by klaatu
Agreed, but sometimes I have the need to boot in 'Copy to RAM' mode without bringing in my custom home module, so I put it in optional to have the choice between an Always Fresh 'Copy to RAM' and a customized 'Copy to RAM'.

copy2ram with base changes

Posted: 21 Oct 2018, 13:27
by Ed_P
Okay, but that means you have to change the boot parms to switch between the two modes. Wouldn't it be easier to just move the changes module from the optional folder to the modules folder?

If the boot system is on the same drive as the optional folder I don't think you need the /dev/sdx1/ path in the extramod cheatcode. I don't use it with my cheatcode. extramod=/porteus4.0/Modules

copy2ram with base changes

Posted: 21 Oct 2018, 21:07
by donald
@ klaatu
# /opt/porteus-scripts/tgz2xzm home.tgz
[...]
# mv home.tgz /mnt/sdx1/porteus/optional
wouldn't that be mv home.xzm?