[HOWTO] Use the Rootcopy directory
‘rootcopy’ is a folder that is stored inside the /porteus/ directory on your flashdrive (or wherever you have Porteus installed). You can add files to this folder that you want to include in your live filesystem every time you start up. Using rootcopy is easier than building a new module, and the files in rootcopy can be edited directly, without having to extract and rebuild any modules. However, if you are using rootcopy on a FAT or NTFS-formatted device, please note that file permissions will not be saved--all files will be readable, writeable, and executable by all users, and these permissions will be transferred into your live system. FAT partitions also cannot handle symlinks.
Files need to be inserted into directories inside /porteus/rootcopy that mirror the desired path in your live filesystem, with the rootcopy folder acting as the "fake root" directory.
For example: I have a script called resetwifi that I use to reset my wireless connection. I want this script to be available in my live system at /usr/bin/resetwifi. Inside /porteus/rootcopy/, I create a directory ‘usr’ and inside ‘usr’, I create a directory ‘bin’. I put my script inside this folder (which now lives on my usb drive at /porteus/rootcopy/usr/bin/resetwifi). Every time I boot up (unless I use the ‘always fresh’ mode), the script is copied into my live filesystem, and I am able to use it.
Files in rootcopy are inserted into the live filesystem after all of the modules from /porteus/base and /porteus/modules are activated, so any configuration files placed in rootcopy will override the corresponding files inside your modules. This makes rootcopy very useful for customizing your porteus configuration.
Note: If you have accidentally messed up your system's settings with a file in your rootcopy, you can use the cheatcode 'norootcopy' to avoid loading the contents of the rootcopy directory. You can then log in and delete or edit your files. Using the "Always Fresh" boot option runs the 'norootcopy' cheatcode by default.