Starting with Grml release 2009.05 it's possible to use so called root persistency on Grml. This means you can store your settings and reuse them on reboot.
WARNING: Due to changes in upstream live-boot, which is the base for live-boot-grml, the configuration options changed in the 2013.02 release. While most of the old options (parameters, partition and file names) are still recognized, they are considered deprecated and not supported, even when they work just fine most of the time.
The changes sum up as follows:
For a partition to be considered for persistence use, it has to have the filesystem label “persistence”. You can override this with the “persitence-label” bootoption like “persistence-label=something”.
In the root of your persistence parition, you should have a persistence.conf (live-persitence.conf in Grml 2012.05) with 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.
When you want to emulate the old “full-ov” or “live-rw” settings, put ”/ union” into your persistence.conf.
To boot Grml in persistent mode, you have to pass the “persistence” boot option. There are appropriate entries in the default boot menu of the ISO. Alternatively, you can pass `–bootoptions=“pesistence”` to `grml2usb` or `grml2iso` when creating own media.
# 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`:
# grml2usb --bootoptions="persistence" grml64-full_2013.02.iso /dev/sdX1
# Create a persistence.conf on your persistence partition with the following content:
/etc /home/grml/persistent
# Boot and enjoy the new system!
Starting with Grml release 2012.05 (live-boot-grml v3.0~a27…) the “persistent” boot option changed to “persistence”. The labels live-rw and home-rw are deprecated upstream in favor of full-ov and custom-ov. New boot options persistence-subtext and persistence-encryption are provided additionally now. Boot options live-sn and home-sn remain for live-snapshot. The full-ov volume label is used to overlay all of / and can be a squashfs (consider using grml-live to build a custom system though). The custom-ov label is very useful as you can control what directories and files should be persistent. In the following example we are installing the Grml system to a USB media but you can boot the Grml system itself from a CD/ISO instead as well of course.
Use fdisk/parted/gparted/… to create two partitions. The first partition with a fat16 file-system will provide the Grml system. The second partition using an ext2/ext3/ext4 file-system will be used for the persistent data.
To install Grml on the USB stick use grml2usb from your live system, like:
# grml2usb --bootoptions="persistence" /live/image /dev/sdX1
If you don't want to install Grml from the live system replace /live/image with the path to your Grml ISO image, like:
# grml2usb --bootoptions="persistence" grml64-full_2012.05.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.
Then create a new file system with volume label “custom-ov” on the second partition by invoking “mkfs.ext3 -L custom-ov …” (or use tune2fs to assign the “custom-ov” label to the second partition afterwards).
Create a file named live-persistence.conf on the second partition. The file should contain something like those two lines:
/etc /home/grml/persistent
When rebooting with the persistence boot option these directories will be linked into / and all changes in them will be written to USB.
If you are using grml96 and/or need several unique persistent partitions give them labels with a suffix “custom-ov-grml32” or “custom-ov-grml64”. Remember the 16 character limit on volume labels ext(2-4). Rebooting with these labels also requires persistence-subtext=grml##. Each partition needs its own live-persistence.conf.
Encryption may be done with grml-crypt creating the luks USB partition and then creating an ext labeled partition with a label like “custom-ov-grml64”. Using this requires the following options at boot:
persistence persistence-encryption=(luks,none) persistence-subtext=grml64
Please note that live-snapshot might not be supported in future upstream versions: http://lists.debian.org/debian-live/2012/06/msg00039.html
Further resources are: man live-boot, live-persistence.conf, live-snapshot and http://live.debian.net/manual/.
Due to the current implementation in live-boot current Grml versions (starting with 2010.12) generate /etc/network/interfaces in the boot sequence. If you want to preserve your changes in /etc/network/interfaces boot Grml with the “nonetworking” boot options. Have a look at grml-cheatcodes.txt for additional boot options.
Check out live-boot bugs.