copy2ram with base changes
Posted: 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:
(Where sdx is the actual path of your porteus bootable drive.)
2. Reboot. Use the Copy to RAM and add this cheatcode:
(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.
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
2. Reboot. Use the Copy to RAM and add this cheatcode:
Code: Select all
extramod=/dev/sdx1/porteus/optional
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.