Persistency on Grml

It's possible to use so called (root) persistency on Grml.

This means you can store (all) your settings and reuse them on reboot, without having to remaster/re-generate the ISO by storing all the changes on an external media (like a USB device).

This has been tried last with grml 2017.05

Partition layout

For a partition to be considered for persistence use, it has to have the filesystem label “persistence”.

You can override this with the “persistence-label” boot-option like “persistence-label=something” (remember the 16 character limit on volume labels ext2/3/4), which might be handy if you want to use the same device with different Grml versions.

In the root of your persistence parition, you should have a persistence.conf with for example the following content:

/etc
/home/grml/persistent

When booting with the persistence boot-option these directories will be linked into / and all changes in them will be written to your persistence partition.

If you want to use root persistency (so all your changes on the live system are stored for re-usage) use the following persistence.conf:

/ union

Booting

To boot Grml in persistence mode you have to use the “persistence” boot option.

There is an appropriate entry in the default boot menu of the ISO.

Alternatively, you can pass `–bootoptions=“persistence”` to `grml2usb` or `grml2iso` when creating your own media.

Step by step example for a single USB stick

Create two partitions on your medium, one vfat (about the size of the ISO(s) you want to boot) and one ext2/3/4 for your persistent data. Give the later the label “persistence” (either by passing ”-L persistence” to mkfs.ext3 or tune2fs).

Deploy the ISO(s) to the vfat partition with `grml2usb` to use persistence mode by default:

# grml2usb --bootoptions="persistence" grml64-full_2013.09.iso /dev/sdX1

For further information regarding grml2usb have a look at the grml2usb manpage and our documentation about installing Grml onto a USB stick.

Create a persistence.conf on your persistence partition with the following content:

/ union

Boot and enjoy your new system!

The same will work with a CD and an arbitrary additional writeable block device.

Encryption

Encryption may be done with grml-crypt creating the LUKS partition and then creating an ext2/3/4 labeled partition with a label like “persistence”, as in the unencrypted case. Using this requires the following options at boot:

persistence persistence-encryption=luks

If you happen to know how grml chooses the LUKS device to unlock or whether it blindly unlocks any LUKS devices it happens to find at boot, please insert this information here. In practice, the code works as advertised, but it is not clear to the writer of this paragraph how it works.

Persistent /etc/network/interfaces

Grml generates /etc/network/interfaces in the boot sequence.

If you want to preserve your changes in the /etc/network/interfaces in persistence mode then boot Grml with the “nonetworking” boot-option.

Have a look at grml-cheatcodes.txt for additional boot-options.

Bugs

Check out live-boot bugs and Grml's BTS.

Further Resources

 
persistency.txt · Last modified: 2017/10/03 20:12 by zugschlus
 
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Grml homepage Driven by DokuWiki