<-- Back to [Home]
Thanks to the debian-live system, Q4Rescue includes a persistence feature that enables you to save parameters, installed applications, downloaded files, and more across reboots. This document explains how the persistence system works and how to set it up.
Persistence in Q4Rescue is achieved by using a partition or a file with a specific configuration. This allows you to retain data between reboots, making Q4Rescue a more versatile tool for system recovery and maintenance.
The tool "q4rescue usb creator" (linux x64 only) allow you to create a bootable device with Q4Rescue, a persistence partition and a data partition (with the filesystem of your choice). Everything described below will be done automatically by the tool.
To enable persistence using a partition, you need to have an ext4 partition with the label "persistence" on the system. This partition can be on the same media as Q4Rescue (USB, HDD, etc.) or on another storage device present on the system booted with Q4Rescue.
Label the Partition: Label the partition as "persistence". You can use tools like gparted or parted to label the partition.
You can use too this command on linux to achieve this:
sudo e2label /dev/$device "persistence"
(where $device is the name of the partition device, this can be for example sda2 or sdb3 ...)
Create the Configuration File: Create a file named persistence.conf at the root of the partition with the following content:
/ union
You can for example create this file using the following command:
sh
echo '/ union' | sudo tee -a /mnt/persist/persistence.conf
where /mnt/persist/ is the mount point of the persistence partition.
Alternatively, you can use a simple file named persistence.img (an ext4 formatted disk image) that can be placed on any writable filesystem detected on the system (USB key, or another device on the booted system).
dd command. For example:dd if=/dev/zero of=persistence.img bs=1M count=1024
mkfs.ext4 persistence.imgsudo mkdir /mnt/persist
sudo mount -o loop persistence.img /mnt/persistpersistence.conf at the root of the mounted filesystem with the following content:/ unionecho '/ union' | sudo tee -a /mnt/persist/persistence.confsudo umount /mnt/persistpersistence.img file on any writable filesystem detected on the system.In the case you're booting q4rescue with the help of ventoy:
For a persistence partition, when install Ventoy, you can enable and set the reserved space with "Option" ---> "Partition Configuration" (Windows) or "-r" option (Linux). Then, you can create a persistence partition like explained before in this free space.
For a persistence file, you have too the option to set reserved space at installation, format it and put the persistence file in this partition (although this is not really 'efficient', it's better in this case to directly create a persistence partition in this reserved space). If you don't have reserved space, or just want to put the persistence file in the "root" partition (ventoy), you will have to use the persistence plugin configuration for ventoy:
First, you need to download a persistence image, here: https://github.com/ventoy/backend/releases
Second step, create a "persistence" folder on the ventoy partition, and extract an ext4 image found in the downloaded archive with this naming schema:
"persistence_ext4_XXX_persistence.dat.7z" where XXX can be "256MB" / "512MB" / "1GB" etc... depending on your needs. Then, decompress the chosen 7z file in the persistence folder created.
Finally, edit the file /ventoy/ventoy.json and add these lines (for example we're using here a 1GB persistence file)
"persistence": [
{
"image": "/iso/q4rescue-livecd.iso",
"backend": "/persistence/persistence_ext4_1GB_persistence.dat",
"autosel": 1
}
],
Refer to the ventoy persistence plugin documentation if you need more details: https://www.ventoy.net/en/plugin_persistence.html
The size of the persistence partition or file depends on your needs:
By following these steps, you can enable persistence in Q4Rescue, allowing you to retain your settings, installed applications, and downloaded files across reboots. This makes Q4Rescue a powerful and customizable tool for system recovery and maintenance.