copy2ram with base changes

Post tutorials, HOWTO's and other useful resources here.
Post Reply
klaatu
Ronin
Ronin
Posts: 2
Joined: 20 Oct 2018, 14:31
Distribution: Slackware

copy2ram with base changes

Post#1 by klaatu » 20 Oct 2018, 17:09

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.

User avatar
Ed_P
Contributor
Contributor
Posts: 5138
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

copy2ram with base changes

Post#2 by Ed_P » 21 Oct 2018, 03:40

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.
Ed

klaatu
Ronin
Ronin
Posts: 2
Joined: 20 Oct 2018, 14:31
Distribution: Slackware

copy2ram with base changes

Post#3 by klaatu » 21 Oct 2018, 12:01

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'.

User avatar
Ed_P
Contributor
Contributor
Posts: 5138
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

copy2ram with base changes

Post#4 by Ed_P » 21 Oct 2018, 13:27

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
Ed

donald
Full of knowledge
Full of knowledge
Posts: 1546
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

copy2ram with base changes

Post#5 by donald » 21 Oct 2018, 21:07

@ klaatu
# /opt/porteus-scripts/tgz2xzm home.tgz
[...]
# mv home.tgz /mnt/sdx1/porteus/optional
wouldn't that be mv home.xzm?

Post Reply