limine-snapper-sync.conf
This commit is contained in:
parent
68abc122d4
commit
747f21fc29
2 changed files with 262 additions and 1 deletions
|
|
@ -38,8 +38,9 @@ Configuration des snapshots Btrfs.
|
|||
### Limine
|
||||
|
||||
* `rootfs/boot/limine.conf`
|
||||
* `rootfs/etc/limine-snapper-sync.conf`
|
||||
|
||||
Configuration du chargeur de démarrage.
|
||||
Configuration du chargeur de démarrage (+ entrée des snapshots dans le bootloader).
|
||||
|
||||
### Systemd
|
||||
|
||||
|
|
|
|||
260
rootfs/etc/limine-snapper-sync.conf
Normal file
260
rootfs/etc/limine-snapper-sync.conf
Normal file
|
|
@ -0,0 +1,260 @@
|
|||
### OS Entry Targeting
|
||||
### This tool does not automatically know the custom OS name used in $ESP_PATH/limine.conf.
|
||||
### Set the OS name here to match the entry name in $ESP_PATH/limine.conf.
|
||||
###
|
||||
### Tips:
|
||||
### * Alternatively, add "comment: machine-id=<machine-id>" to your OS entry in $ESP_PATH/limine.conf.
|
||||
### The machine-id allows the tool to automatically target the correct entry. Changing the OS name does not matter.
|
||||
### * If unset, it reads PRETTY_NAME or NAME from /etc/os-release, with a fallback to /etc/lsb-release.
|
||||
###
|
||||
TARGET_OS_NAME="Arch Linux"
|
||||
|
||||
|
||||
### Boot Partition Path
|
||||
### Specify the mount path of your boot partition if you are running on legacy BIOS, ARM, or RISC-V.
|
||||
### Note:
|
||||
### If you are using systemd and UEFI, the path is detected automatically via 'bootctl --print-esp-path'.
|
||||
### However, specifying the ESP path manually can improve performance and reliability.
|
||||
#ESP_PATH="/boot"
|
||||
|
||||
|
||||
### Boot Partition Usage Limit
|
||||
### Sets the maximum usage (in percent) for your FAT32 boot partition. Value must be between 1 and 99. Default: 85.
|
||||
### No new snapshot entries will be added to Limine if this limit is reached.
|
||||
### A larger FAT32 boot partition allows for more snapshot entries.
|
||||
###
|
||||
### Tips:
|
||||
### * You will be alerted when ENABLE_NOTIFICATION is set to "yes" and the limit is reached during snapshot creation.
|
||||
### * Do not increase the limit to 95% or higher on a small boot partition, as restoration will be blocked due to insufficient free space.
|
||||
###
|
||||
LIMIT_USAGE_PERCENT=85
|
||||
|
||||
|
||||
### Max Snapshot Entries
|
||||
### Limits how many snapshot entries appear in the "Snapshots" boot menu.
|
||||
### This depends on the size of your FAT32 boot partition and how many different kernel and module versions you want to keep.
|
||||
### A larger FAT32 boot partition allows more snapshot entries.
|
||||
###
|
||||
### Value: Number or "auto"
|
||||
###
|
||||
### What is "auto":
|
||||
### It is flexible and automatically removes older snapshot boot entries based on LIMIT_USAGE_PERCENT without warning.
|
||||
### A warning is only triggered if no snapshot boot entries are left and usage still exceeds LIMIT_USAGE_PERCENT.
|
||||
###
|
||||
### WARNING:
|
||||
### If LIMIT_USAGE_PERCENT is set very low (e.g. 1%) and the boot partition still has no free space,
|
||||
### "auto" will delete all snapshot boot entries, including all kernel versions.
|
||||
###
|
||||
### MAX_SNAPSHOT_ENTRIES=auto
|
||||
MAX_SNAPSHOT_ENTRIES=20
|
||||
|
||||
|
||||
### Exclude Snapshot Types
|
||||
### If a snapshot has a matching type, it will not be added into Limine.
|
||||
###
|
||||
### Example:
|
||||
### EXCLUDE_SNAPSHOT_TYPES="pre, post"
|
||||
###
|
||||
#EXCLUDE_SNAPSHOT_TYPES=""
|
||||
|
||||
|
||||
### Exclude Entries from Snapshots
|
||||
### Matching kernels or entries are excluded from Limine snapshots. This helps reduce boot partition space usage.
|
||||
###
|
||||
### WARNING:
|
||||
### - Restoring an old snapshot may use outdated config and exclude unintended entries from the current "backup" snapshot.
|
||||
### - Excluded entries are preserved after restore, but may not match an old system version. They should be removed or updated manually.
|
||||
###
|
||||
### Note:
|
||||
### - "backup*" and "*snapshot*" entries are always excluded by default, regardless of any configuration.
|
||||
###
|
||||
### Wildcards:
|
||||
### "*" matches any sequence of characters
|
||||
###
|
||||
### Example: excluding all fallback kernel entries
|
||||
#EXCLUDE_SNAPSHOT_ENTRIES="*fallback"
|
||||
|
||||
|
||||
### Snapshot Kernel Parameters
|
||||
### Add or remove kernel parameters for new snapshot boot entries.
|
||||
###
|
||||
### - SNAPSHOT_KERNEL_PARAMETERS+ : Add extra kernel parameters
|
||||
### - SNAPSHOT_KERNEL_PARAMETERS- : Remove specific kernel parameters
|
||||
### - SNAPSHOT_KERNEL_PARAMETERS= : Replace the entire kernel command line (note: for multiple-profile UKIs only)
|
||||
###
|
||||
### Tips:
|
||||
### - No quotes are needed at the start or end of command lines, since quotes inside are not escaped.
|
||||
### - Do not add `#` as a comment at the end of command lines.
|
||||
###
|
||||
### Examples:
|
||||
#SNAPSHOT_KERNEL_PARAMETERS-=quiet splash
|
||||
#SNAPSHOT_KERNEL_PARAMETERS+=systemd.volatile=overlay
|
||||
|
||||
|
||||
### Make Snapshots Writable
|
||||
### Set to 'yes' to make created snapshots writable. (yes|no)
|
||||
### This may be required by some programs or display managers (e.g. GDM) that need write access at boot when overlayfs is not used.
|
||||
###
|
||||
### WARNING:
|
||||
### Writable snapshots can be modified and will no longer reflect the original 1:1 state.
|
||||
### Enable only if absolutely necessary.
|
||||
###
|
||||
### IMPORTANT:
|
||||
### If you boot into a writable snapshot, you should immediately click "Restore now" to avoid making unintended changes.
|
||||
#SNAPSHOT_WRITABLE=no
|
||||
|
||||
|
||||
### Snapper Configuration Name
|
||||
### Specify the Snapper configuration name. If not set, the tool will automatically detect it from "snapper list-configs".
|
||||
### Specifying it manually improves performance by avoiding automatic detection overhead.
|
||||
SNAPPER_CONFIG_NAME="root"
|
||||
|
||||
|
||||
### Root Subvolume Path
|
||||
### Set the path to your root subvolume. The default value for some distros is "/@".
|
||||
ROOT_SUBVOLUME_PATH="/@"
|
||||
|
||||
|
||||
### Root Snapshot Path
|
||||
### Specify the path to your root snapshots. The default is "/@/.snapshots", which is used for the default Snapper layout.
|
||||
### Note: The tool supports Snapper with any custom layout within the same filesystem, but not random Btrfs layouts without Snapper.
|
||||
ROOT_SNAPSHOTS_PATH="/@/.snapshots"
|
||||
|
||||
|
||||
### Restore Method Selection
|
||||
### Choose a restore method depending on your Btrfs layout and boot configuration.
|
||||
### Indicators: (+) Advantage, (-) Disadvantage, (o) Neutral/Special note
|
||||
###
|
||||
### rsync:
|
||||
### + Works on a system running on a root partition without a root subvolume.
|
||||
### + Supports multiple Linux installations on the same Btrfs filesystem.
|
||||
### + No issues with overlayfs used as a temporary writable layer on top of a read-only snapshot.
|
||||
### o Keeps the original subvolume ID after restore.
|
||||
### - Slower because all data is copied 1:1 from a selected snapshot to the root subvolume.
|
||||
### - Does not track which snapshot the restored data originally came from.
|
||||
###
|
||||
### replace:
|
||||
### + Very fast, creates a new subvolume from a selected snapshot and replaces the old one.
|
||||
### + Supports multiple root subvolumes (e.g., multiple distros) on the same Btrfs filesystem.
|
||||
### + No issues with overlayfs used as a temporary writable layer on top of a read-only snapshot.
|
||||
### o Changes the subvolume ID after restore.
|
||||
### - Restored subvolumes lose tracking of their relationship to older snapshots in the Snapper list.
|
||||
### - Cannot restore when system runs on a root partition without a root subvolume.
|
||||
###
|
||||
### opensuse (alias of "snapper"):
|
||||
### + Supports native snapper rollback.
|
||||
### + Fast (slightly slower than "replace" because 'snapper rollback' creates two snapshots).
|
||||
### + Tracks snapshot relationships in the Snapper list, unlike "rsync" and "replace".
|
||||
### o Requires an OpenSUSE-style layout compatible with snapper rollback.
|
||||
### o Keeps the original main subvolume unchanged as the oldest base.
|
||||
### - Does not support multiple Linux distros on the same Btrfs (only one default subvolume for booting).
|
||||
### - Refuses to work when overlayfs is used as a temporary writable layer for testing changes on an immutable system.
|
||||
### - Some init programs (e.g., display managers) require write access and may fail when booting into a read-only snapshot.
|
||||
### (Info: In major version 2, new 4th restore method would remove these last two disadvantages of "opensuse")
|
||||
###
|
||||
### Tip: Recommendation for a safe choice if unsure:
|
||||
### - If your system normally runs on a root subvolume, use "replace" or "rsync". (typical for most Arch-based installations)
|
||||
### - If your system normally runs on a root Btrfs partition without a root subvolume, use "rsync".
|
||||
### - If your system normally runs on a writable snapshot, use "opensuse". (For OpenSUSE or an OpenSUSE-like layout).
|
||||
###
|
||||
### Available restore methods: "replace", "rsync" or "opensuse" ("snapper")
|
||||
RESTORE_METHOD=replace
|
||||
|
||||
|
||||
### Set Snapshot as Default
|
||||
### After restoring a snapshot, you can choose whether its new subvolume should automatically become the default (yes|no).
|
||||
###
|
||||
### What is a "default subvolume"?
|
||||
### It is the subvolume your system boots into if no subvolume is specified in the kernel command line.
|
||||
### On OpenSUSE, it is also required for 'snapper rollback'.
|
||||
###
|
||||
### yes: A newly created snapshot will automatically become the default subvolume after restoration.
|
||||
### WARNING: This may cause problems or conflicts if multiple Linux distributions (e.g. OpenSUSE) share the same Btrfs partition.
|
||||
### Recommendation: Set to yes only if your distro is the only one on the Btrfs partition.
|
||||
###
|
||||
### no: The original subvolume remains the default.
|
||||
### Note: If it is listed as the "backup" subvolume in Snapper, it cannot be deleted.
|
||||
###
|
||||
### Note:
|
||||
### This option is not needed for rsync-based restoration, which always preserves the original subvolume.
|
||||
###
|
||||
SET_SNAPSHOT_AS_DEFAULT=no
|
||||
|
||||
|
||||
### Btrfs UUID
|
||||
### Specify the UUID of your Btrfs filesystem, used only during the restore process.
|
||||
### If not set, the tool automatically determines the UUID during initialization and saves it in 'snapshots.json'.
|
||||
### If the saved UUID becomes outdated, set it manually.
|
||||
#FS_UUID=
|
||||
|
||||
|
||||
### Authentication Method
|
||||
### Specify an authentication method: "sudo", "doas", "run0 --background=" or another method of your choice.
|
||||
### If not set, the default is "sudo".
|
||||
#AUTH_METHOD="run0 --background="
|
||||
|
||||
|
||||
### Terminal Application
|
||||
### Specify a terminal app and its argument to open the console UI for running the restore process with details.
|
||||
### For example, "konsole -e" for KDE or "gnome-terminal -- bash -c" for GNOME.
|
||||
#TERMINAL=konsole
|
||||
#TERMINAL_ARG="-e"
|
||||
|
||||
|
||||
### Snapshot Entry Formatting
|
||||
### Set the number of spaces to indent each line in all snapshot entries within $ESP_PATH/limine.conf.
|
||||
### If not set, the default is 5.
|
||||
#SPACE_NUMBER=5
|
||||
|
||||
|
||||
### Snapshot Name Format
|
||||
### Choose a format for how snapshot entries look in the Limine bootloader:
|
||||
### 0. ID=111 2023-12-20 10:59:59 (default)
|
||||
### 1. 111│2023-12-20 10:59:59
|
||||
### 2. 111 │ 2023-12-20 10:59:59
|
||||
### 3. 2023-12-20 10:59:59│111
|
||||
### 4. 2023-12-20 10:59:59 │ 111
|
||||
### 5. 2023-12-20 10:59:59
|
||||
### 6. 111
|
||||
### 7. 111│snapshot description
|
||||
### 8. 2023-12-20 10:59:59│snapshot description
|
||||
### 9. │snapshot description
|
||||
SNAPSHOT_FORMAT_CHOICE=2
|
||||
|
||||
|
||||
### Desktop Notifications
|
||||
### Enable desktop notifications for warnings and errors in limine-snapper-sync, e.g., hardware issues or boot partition usage limits.
|
||||
### Default: yes
|
||||
#ENABLE_NOTIFICATION=yes
|
||||
|
||||
|
||||
### Hash Function for Deduplication and Checksum
|
||||
### Choose a hash function to detect duplicates and avoid extra copies.
|
||||
### Options: "blake3", "xxhash", "sha1", or "sha256".
|
||||
###
|
||||
### WARNING:
|
||||
### Changing the hash function does not re-hash existing files, which may result in duplicates.
|
||||
###
|
||||
### Note:
|
||||
### If you choose "blake3" or "xxhash", you must manually install the matching utility:
|
||||
### - Install 'b3sum' package for blake3
|
||||
### - Install 'xxhash' package for xxhash
|
||||
#HASH_FUNCTION=xxhash
|
||||
|
||||
|
||||
### Notification Icon
|
||||
### Set a custom icon to display in notifications when booting into a read-only snapshot and prompting for restoration.
|
||||
NOTIFICATION_ICON="/usr/share/icons/hicolor/128x128/apps/LimineSnapperSync.png"
|
||||
|
||||
|
||||
### Automatic Config Backup
|
||||
### Automatically create a backup of 'limine.conf' and 'snapshots.json' before saving any changes
|
||||
### but only if their existing backups ('*.old') are older than the specified time (in hours).
|
||||
### This setting is unrelated to snapshot creation.
|
||||
### Default: 6 hours if unset.
|
||||
#CONFIG_BACKUP_THRESHOLD=6
|
||||
|
||||
|
||||
### Quiet Mode
|
||||
### Set to "yes" to hide all success messages and avoid log spam. (yes|no)
|
||||
#QUIET_MODE=no
|
||||
Loading…
Reference in a new issue