Skip to navigation

How to make permanent changes to Slax on a usb drive

There are several ways to do this, see the Slax documentation.

Here is an example; I wanted to make the symlink mentioned in the last post permanent (linking a directory slax_webfiles from the larger data partition to the webroot directory).

  1. Don’t boot off the USB drive, just mount it on a running system.
  2. Navigate to the Slax drive and create whatever you want to create in the folder rootcopy:
    cd rootcopy
    mkdir -p home/user
  3. I created a shell script that contains:
    #!/bin/bash
    
    # link to dir "slax_files" on second partition to be available here:
    ln -s /mnt/sdb2_removable/slax_files
    
    # link to dir "slax_webfiles" from htdocs:
    ln -s /mnt/sdb2_removable/slax_webfiles /opt/lampp/htdocs/

Now, when I boot Slax off the USB drive, I have a directory /home/user, and if I cd there,

./linkdirs

will set up the a symbolic link.

Comments are closed.