Adding Persistence to a Gnoppix Live USB Drive
Gnoppix “Live” has two options in the default boot menu which enable persistence — the preservation of data on the “Gnoppix Live” USB drive — across reboots. You can choose between:
- USB Persistence (this guide)
- USB Encrypted Persistence (LUKS-encrypted)
This is an extremely useful enhancement, enabling you to retain documents, collected results, configurations, and more when running Gnoppix “Live” from the USB drive, even across different systems. The persistent data is stored in its own partition on the USB drive, which can also be optionally LUKS-encrypted.
To use the USB persistence options at boot time, you need to do some additional setup on your Gnoppix “Live” USB drive. This guide walks you through the process.
This guide assumes you have already created a Gnoppix “Live” USB drive. For the purposes of this article, we assume you are working on a Linux-based system.
You will need root privileges to do this procedure, or the ability to escalate with sudo.
In this example, we assume:
- Your USB drive is
/dev/sdX(the last letter will probably be different). Check connected USB drives withlsblkand adjust the device name in theusbvariable before running commands. - Your USB drive has a capacity of at least 8 GB — the Gnoppix image takes over 4 GB, and we will create a new partition to store persistent data.
We will create a new partition starting right above the second Gnoppix Live partition, format it with ext4, and create a persistence.conf file.
- First, begin by imaging the latest Gnoppix live ISO to your USB drive.
While /dev/sdX is used throughout this page, replace it with the proper device label for your system. Use lsblk to verify.
We assume the two partitions created by the imaging process are /dev/sdX1 and /dev/sdX2:
user@gnoppix:~$ lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTSsda 8:16 0 2.7T 0 disk├─sda1 8:17 0 512M 0 part /boot/efi├─sda2 8:18 0 2.7T 0 part /└─sda3 8:19 0 977M 0 part [SWAP]sdX 8:32 1 58.4G 0 disk├─sdX1 8:33 1 4.6G 0 part└─sdX2 8:34 1 4M 0 partuser@gnoppix:~$user@gnoppix:~$ usb=/dev/sdX- Create and format an additional partition on the USB drive.
Create the new partition in the empty space above the Gnoppix Live partitions:
user@gnoppix:~$ usb=/dev/sdXuser@gnoppix:~$user@gnoppix:~$ sudo fdisk $usb <<< $(printf "p\nn\np\n\n\n\np\nw")[...]user@gnoppix:~$When fdisk completes, the new partition should be created at /dev/sdX3. Verify with lsblk:
user@gnoppix:~$ lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS[...]sdb 8:48 1 58.4G 0 disk├─sdb1 8:49 1 4.6G 0 part├─sdb2 8:50 1 4M 0 part└─sdb3 8:51 1 53.8G 0 partuser@gnoppix:~$- Next, create an ext4 file system on the partition and label it
persistence:
user@gnoppix:~$ usb=/dev/sdXuser@gnoppix:~$user@gnoppix:~$ sudo mkfs.ext4 -L persistence ${usb}3mke2fs 1.47.2 (1-Jan-2025)Creating filesystem with 14114816 4k blocks and 3530752 inodesFilesystem UUID: ccb5cd13-3675-40ac-8b81-a684802a8dd0Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424
Allocating group tables: doneWriting inode tables: doneCreating journal (65536 blocks): doneWriting superblocks and filesystem accounting information: done
user@gnoppix:~$- Create a mount point, mount the new partition there, create the configuration file to enable persistence, then unmount:
user@gnoppix:~$ usb=/dev/sdXuser@gnoppix:~$user@gnoppix:~$ sudo mkdir -pv /mnt/my_usbmkdir: created directory '/mnt/my_usb'user@gnoppix:~$user@gnoppix:~$ sudo mount -v ${usb}3 /mnt/my_usbmount: /dev/sdX3 mounted on /mnt/my_usb.user@gnoppix:~$user@gnoppix:~$ echo "/ union" | sudo tee /mnt/my_usb/persistence.conf/ unionuser@gnoppix:~$ sudo umount -v ${usb}3umount: /mnt/my_usb (/dev/sdX3) unmounteduser@gnoppix:~$Reboot, select to boot from USB, and choose “Live USB Persistence” in the boot menu. You will need to select this option every time you want your persistent data to be loaded.
user@gnoppix:~$ rebootMultiple Persistence Stores
Section titled “Multiple Persistence Stores”You can have multiple persistence stores on the USB drive, both encrypted or not, and choose which one to load at boot time.
Delete the previous large partition and create two separate stores. We will label one work and the other ctf.
0x00 — Manage partitions
Section titled “0x00 — Manage partitions”user@gnoppix:~$ sudo parted /dev/sdXGNU Parted 3.6Using /dev/sdXWelcome to GNU Parted! Type 'help' to view a list of commands.(parted)(parted) unit MiB(parted)(parted) printModel: SanDisk Extreme (scsi)Disk /dev/sdX: 59840MiBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:
Number Start End Size Type File system Flags 1 0.03MiB 4699MiB 4699MiB primary boot, hidden 2 4699MiB 4703MiB 4.00MiB primary 3 4704MiB 59840MiB 55136MiB primary
(parted)(parted) rm 3(parted)0x01 — Create additional partitions
Section titled “0x01 — Create additional partitions”Create two 5 GB partitions:
- Partition 3:
4704 MiBto9704 MiB(will holdworkdata) - Partition 4:
9704 MiBto14704 MiB(will holdctfdata)
(parted) mkpart primary ext4 4704MiB 9704MiB(parted)(parted) mkpart primary ext4 9704MiB 14704MiB(parted)(parted) printModel: SanDisk Extreme (scsi)Disk /dev/sdX: 59840MiBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags:
Number Start End Size Type File system Flags 1 0.03MiB 4699MiB 4699MiB primary boot, hidden 2 4699MiB 4703MiB 4.00MiB primary 3 4704MiB 9704MiB 5000MiB primary ext4 4 9704MiB 14704MiB 5000MiB primary ext4
(parted) quitInformation: You may need to update /etc/fstab.
user@gnoppix:~$0x02 — Format and label partitions
Section titled “0x02 — Format and label partitions”user@gnoppix:~$ sudo mkfs.ext4 /dev/sdX3mke2fs 1.47.2 (1-Jan-2025)[...]user@gnoppix:~$user@gnoppix:~$ sudo e2label /dev/sdX3 workuser@gnoppix:~$
user@gnoppix:~$ sudo mkfs.ext4 -L ctf /dev/sdX4mke2fs 1.47.2 (1-Jan-2025)[...]user@gnoppix:~$0x03 — Mount and create persistence.conf
Section titled “0x03 — Mount and create persistence.conf”user@gnoppix:~$ sudo mkdir -pv /mnt/my_usb{3,4}mkdir: created directory '/mnt/my_usb3'mkdir: created directory '/mnt/my_usb4'user@gnoppix:~$user@gnoppix:~$ sudo mount -v /dev/sdX3 /mnt/my_usb3mount: /dev/sdX3 mounted on /mnt/my_usb3.user@gnoppix:~$user@gnoppix:~$ sudo mount -v /dev/sdX4 /mnt/my_usb4mount: /dev/sdX4 mounted on /mnt/my_usb4.user@gnoppix:~$user@gnoppix:~$ echo "/ union" | sudo tee /mnt/my_usb{3,4}/persistence.conf/ unionuser@gnoppix:~$ sudo umount -v /mnt/my_usb3 /mnt/my_usb4umount: /mnt/my_usb3 unmountedumount: /mnt/my_usb4 unmounteduser@gnoppix:~$Now boot from USB. When the boot menu appears, press Tab to edit the persistence-label parameter to point to your preferred persistence store. For example, to use the work partition:
user@gnoppix:~$ reboot