v4.10
Improvement:
-
Script:
- Add filter to ignore snapper's snapshot "type or description" during run "grub-mkconfig" (#158) ...
- Add possibility to boot without init(rd,ramfs) (#164) :
- For a snapshot to be valid, it must contain a boot folder and a kernel from the official list
(or have been added to the custom kernel list) - if a snapshot doesn't contain an init(rd,ramfs), it will be detected as valid.
- Suppress script stop when an init is not found
- For a snapshot to be valid, it must contain a boot folder and a kernel from the official list
- Adds trap command on EXIT signal:
- Now umount command will launch on EXIT signal.
- Adds a function called by the trap on EXIT signal to unmount and delete the temporary folder.
(That should be the end of multiple tmp.xxxxxxxxxx in /tmp)- If the command fails, retry every 2 seconds. After 10 attempts, it will stop and display a warning.
- If the command is successful, "Succes" will be displayed.
- Adds "grub-btrfs" as a prefix to the temporarie mount folder.
(before = tmp.xxxxxxxxx , now = grub-btrfs.xxxxxxxxxx)
- Rework the creation of the "grub-btrfs.cfg" file:
- Before, the "grub-btrfs.cfg" file was deleted and then the new configuration was written.
No backup was made. - Now, the new configuration will be written in a temporary file "grub-btrfs.new" and then analysed with the "grub_script_check" command before being finally written in the "grub-btrfs.cfg" file.
If an error is detected, the "grub-btrfs.new" file will coexist with the old "grub-btrfs.cfg" file, if it exists.
- Before, the "grub-btrfs.cfg" file was deleted and then the new configuration was written.
-
Config file:
- Add Two new variables:
-
"GRUB_BTRFS_IGNORE_SNAPPER_TYPE"
Ignore specific type of snapper's snapshot during run "grub-mkconfig".
Type = single, pre or post. -
"GRUB_BTRFS_IGNORE_SNAPPER_DESCRIPTION"
Ignore specific description of snapper's snapshot during run "grub-mkconfig".
See Config file
-
- Add Two new variables:
Miscellaneous:
-
Script:
- Removes double negation in file test operators
- Remove redundant check
- Deactivate the script as soon as possible …
With these changes, the script will be disabled as soon as possible, if :- "GRUB_BTRFS_DISABLE" If this variable is set to "true"
- "btrfs-progs isn't installed" This package is required to retrieve information from the btrfs filesystem.
- "grub-mkconfig_lib couldn't be found" This library is required because the script depends on it.
- "Root filesystem isn't btrfs" grub-btrfs currently checks only the btrfs snapshots present on the root partition.
- Corrects printf format string
- Update header installation section:
- Remove instructions
(Refer to the project website, installation section)
- Remove instructions
- Deletes unused code:
- Limit generation of menuentries if exceeds 250 has never been used.
Uses "GRUB_BTRFS_LIMIT" (default 50) instead.
- Limit generation of menuentries if exceeds 250 has never been used.
- Write-protect user data
- The script does not need write access to the data.
Adds "ro" flags to provide protection against accidental writing.
- The script does not need write access to the data.
-
Readme:
- Update "Installation section":
- Adds required dependencies
- Indicates that the command "update-grub", is an alias to "grub-mkconfig" on Debian-like distributions.
- Update "Installation section":