Redesign readme (#109)

* Add more information

Add more information.
Due to the redesign of the "Customization" section of the readme file.

* Redesign  customization section

Move information of customization section to config file
This commit is contained in:
Antynea
2020-09-29 13:39:20 +02:00
committed by GitHub
parent 7e922abefb
commit c9b605153b
2 changed files with 54 additions and 137 deletions
+3 -100
View File
@@ -21,6 +21,7 @@ Otherwise, make sure your snapshots are writeable.
See [this ticket](https://github.com/Antynea/grub-btrfs/issues/92) for more info. See [this ticket](https://github.com/Antynea/grub-btrfs/issues/92) for more info.
##
### What does grub-btrfs v4.xx do : ### What does grub-btrfs v4.xx do :
* Automatically List snapshots existing on root partition (btrfs). * Automatically List snapshots existing on root partition (btrfs).
* Automatically Detect if "/boot" is in separate partition. * Automatically Detect if "/boot" is in separate partition.
@@ -28,6 +29,7 @@ See [this ticket](https://github.com/Antynea/grub-btrfs/issues/92) for more info
* Automatically Create corresponding "menuentry" in `grub.cfg` * Automatically Create corresponding "menuentry" in `grub.cfg`
* Automatically detect snapper and use snapper's snapshot description if available. * Automatically detect snapper and use snapper's snapshot description if available.
* Automatically generate `grub.cfg` if you use the provided systemd service. * Automatically generate `grub.cfg` if you use the provided systemd service.
## ##
### Installation : ### Installation :
#### Arch Linux #### Arch Linux
@@ -49,106 +51,7 @@ On Arch Linux use `grub-mkconfig -o /boot/grub/grub.cfg`.
You have the possibility to modify many parameters in `/etc/default/grub-btrfs/config`. You have the possibility to modify many parameters in `/etc/default/grub-btrfs/config`.
* GRUB_BTRFS_SUBMENUNAME="Arch Linux Snapshots" See [config file](https://github.com/Antynea/grub-btrfs/blob/master/config) for more information.
Name appearing in the Grub menu. Use distribution information from /etc/os-release by default.
* GRUB_BTRFS_PREFIXENTRY="Snapshot:"
Add a name ahead your snapshots entries in the Grub menu.
* GRUB_BTRFS_DISPLAY_PATH_SNAPSHOT="true"
Show full path snapshot or only name in the Grub menu, weird reaction with snapper.
* GRUB_BTRFS_TITLE_FORMAT="p/d/n"
Custom title, shows/hides p"prefix" d"date" n"name" in the Grub menu, separator "/", custom order available.
* GRUB_BTRFS_LIMIT="50"
Limit the number of snapshots populated in the GRUB menu.
* GRUB_BTRFS_SUBVOLUME_SORT="+ogen,-gen,path,rootid"
Sort the found subvolumes by "ogeneration" or "generation" or "path" or "rootid".
Default: "-rootid" means list snapshot by new ones first
See [Sorting section](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-subvolume#SUBCOMMAND)
* GRUB_BTRFS_SHOW_SNAPSHOTS_FOUND="true"
Show snapshots found during run "grub-mkconfig".
* GRUB_BTRFS_SHOW_TOTAL_SNAPSHOTS_FOUND="true"
Show Total number of snapshots found during run "grub-mkconfig".
* GRUB_BTRFS_NKERNEL=("kernel-custom")
Use it only if you have a custom kernel name
* GRUB_BTRFS_NINIT=("initramfs-custom.img" "initrd.img-custom")
Use it only if you have a custom initramfs name.
* GRUB_BTRFS_CUSTOM_MICROCODE=("intel-ucode.img")
Use it only if you have custom microcode.
* GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("var/lib/docker")
Ignore specific path during run "grub-mkconfig".
For example:
If path is a directory `# Found Snapshot: 2016-03-31 10:24:41` **var/lib/docker/btrfs/subvolumes/...**
use : `GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("var/lib/docker")`
If path is a subvolume : `# Found Snapshot: 2016-03-31 10:24:41` **@var/lib/docker/btrfs/subvolumes/...**
use : `GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("@var/lib/docker")`
You can combine them
use : `GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("@var/lib/docker" "var/lib/docker")`
* GRUB_BTRFS_SNAPPER_CONFIG="root"
Snapper's config name to use.
* GRUB_BTRFS_DISABLE="false"
Disable grub-btrfs.
* GRUB_BTRFS_DIRNAME="grub"
Name of the grub folder in `/boot/`, might be grub2 on some distributions.
* GRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION="false"
Change to "true" if you have a boot partition in a different subvolume.
* GRUB_BTRFS_MKCONFIG=grub-mkconfig
Name or path of the 'grub-mkconfig' executable; might be 'grub2-mkconfig' on some distributions.
- Password protection management for submenu (refer to the [Grub documentation](https://www.gnu.org/software/grub/manual/grub/grub.html#Authentication-and-authorisation))
- GRUB_BTRFS_PROTECTION_AUTHORIZED_USERS=""
Add authorized usernames separate by comma (foo,bar)
When Grub's password protection is enabled, the superuser is authorized by default, it isn't necessary to add it
- GRUB_BTRFS_DISABLE_PROTECTION_SUBMENU="false"
Disable authentication support for submenu of Grub-btrfs only (--unrestricted)
doesn't work if `GRUB_BTRFS_PROTECTION_AUTHORIZED_USERS` isn't empty
## ##
### Automatically update grub ### Automatically update grub
+51 -37
View File
@@ -1,50 +1,58 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Name appearing in the Grub menu # Disable grub-btrfs.
# Default: Use distribution information from /etc/os-release # Default: "false"
#GRUB_BTRFS_DISABLE="true"
# Name appearing in the Grub menu.
# Default: "Use distribution information from /etc/os-release."
#GRUB_BTRFS_SUBMENUNAME="Arch Linux snapshots" #GRUB_BTRFS_SUBMENUNAME="Arch Linux snapshots"
# Add a name ahead your snapshots entries in the Grub menu # Add a name ahead your snapshots entries in the Grub menu.
# Default: "Snapshot:" # Default: "Snapshot:"
#GRUB_BTRFS_PREFIXENTRY="Snapshot:" #GRUB_BTRFS_PREFIXENTRY="Snapshot:"
# Show full path snapshot or only name in the Grub menu # Show full path snapshot or only name in the Grub menu, weird reaction with snapper.
# Default: "true" # Default: "true"
#GRUB_BTRFS_DISPLAY_PATH_SNAPSHOT="true" #GRUB_BTRFS_DISPLAY_PATH_SNAPSHOT="false"
# Custom title # Custom title.
# shows/hides p"prefix" d"date" n"name" in the Grub menu, separator "/", custom order available # shows/hides p"prefix" d"date" n"name" in the Grub menu, separator "/", custom order available.
# Default: "p/d/n" # Default: "p/d/n"
#GRUB_BTRFS_TITLE_FORMAT="p/d/n" #GRUB_BTRFS_TITLE_FORMAT="p/d/n"
# Limit the number of snapshots populated in the GRUB menu # Limit the number of snapshots populated in the GRUB menu.
# Default: "50" # Default: "50"
#GRUB_BTRFS_LIMIT="50" #GRUB_BTRFS_LIMIT="50"
# Sort the found subvolumes by "ogeneration" or "generation" or "path" or "rootid" # Sort the found subvolumes by "ogeneration" or "generation" or "path" or "rootid".
# # See Sorting section to https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-subvolume#SUBCOMMAND
# "-rootid" means list snapshot by new ones first.
# Default: "-rootid" # Default: "-rootid"
# See Sorting section to https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-subvolume#SUBCOMMAND
#GRUB_BTRFS_SUBVOLUME_SORT="+ogen,-gen,path,rootid" #GRUB_BTRFS_SUBVOLUME_SORT="+ogen,-gen,path,rootid"
# Show snapshots found during run "grub-mkconfig" # Show snapshots found during run "grub-mkconfig"
# Default: "true" # Default: "true"
#GRUB_BTRFS_SHOW_SNAPSHOTS_FOUND="true" #GRUB_BTRFS_SHOW_SNAPSHOTS_FOUND="false"
# Show Total of snapshots found during run "grub-mkconfig" # Show Total of snapshots found during run "grub-mkconfig"
# Default: "true" # Default: "true"
#GRUB_BTRFS_SHOW_TOTAL_SNAPSHOTS_FOUND="true" #GRUB_BTRFS_SHOW_TOTAL_SNAPSHOTS_FOUND="true"
# Use only if you have custom kernel name # By default, "grub-btrfs" automatically detects most existing kernels.
# Default: # If you have one or more custom kernels, you can add them here.
#GRUB_BTRFS_NKERNEL=("vmlinuz-linux") # Default: ("")
#GRUB_BTRFS_NKERNEL=("kernel-custom" "vmlinux-custom")
# Use only if you have custom initramfs name # By default, "grub-btrfs" automatically detects most existing initramfs.
# Default: # If you have one or more custom initramfs, you can add them here.
#GRUB_BTRFS_NINIT=("initramfs-linux.img" "initramfs-linux-fallback.img") # Default: ("")
#GRUB_BTRFS_NINIT=("initramfs-custom.img" "initrd-custom.img" "otherinit-custom.gz")
# Use only if you have custom microcode # By default, "grub-btrfs" automatically detects most existing microcodes.
# Default: # If you have one or more custom microcodes, you can add them here.
#GRUB_BTRFS_CUSTOM_MICROCODE=("intel-ucode.img") # Default: ("")
#GRUB_BTRFS_CUSTOM_MICROCODE=("custom-ucode.img" "custom-uc.img "custom_ucode.cpio")
# Ignore specific path during run "grub-mkconfig". # Ignore specific path during run "grub-mkconfig".
# If path is a directory, # Found Snapshot: 2016-03-31 10:24:41 var/lib/docker/btrfs/subvolumes/... # If path is a directory, # Found Snapshot: 2016-03-31 10:24:41 var/lib/docker/btrfs/subvolumes/...
@@ -53,36 +61,42 @@
# use : GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("@var/lib/docker"); # use : GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("@var/lib/docker");
# You can combine them # You can combine them
# use : GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("@var/lib/docker" "var/lib/docker") # use : GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("@var/lib/docker" "var/lib/docker")
# Default: # Default: ("var/lib/docker" "@var/lib/docker") and "@" subvolume is hardcode.
GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("var/lib/docker" "@var/lib/docker") GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("var/lib/docker" "@var/lib/docker")
# Snapper's config name to use # By default "grub-btrfs" automatically detects your boot partition,
# Default: "root" # either located at the system root or on a separate partition,
#GRUB_BTRFS_SNAPPER_CONFIG="root" # but cannot detect if it is in a subvolume.
# Change to "true" if you have a boot partition in a different subvolume.
# Disable Grub-btrfs
# Default: "false" # Default: "false"
#GRUB_BTRFS_DISABLE="false" #GRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION="true"
# Change to "true" if you have a boot partition in a different subvolume
# Default: "false"
#GRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION="false"
# GRUB folder location, by default "/boot/" is hardcode.
# Might be grub2 on some systems ex. /boot/grub2/... # Might be grub2 on some systems ex. /boot/grub2/...
# "grub" means "/boot/grub/"
# Default: "grub" # Default: "grub"
#GRUB_BTRFS_DIRNAME="grub" #GRUB_BTRFS_DIRNAME="grub2"
# Name/path of grub-mkconfig, use by "grub-btrfs.service"
# Might be 'grub2-mkconfig' on some systems # Might be 'grub2-mkconfig' on some systems
# Default: /usr/bin/grub-mkconfig # Default: /usr/bin/grub-mkconfig
#GRUB_BTRFS_MKCONFIG=/usr/bin/grub2-mkconfig #GRUB_BTRFS_MKCONFIG=/usr/bin/grub2-mkconfig
## Password protection management for submenu,snapshots # Snapper
# Snapper's config name to use
# Default: "root"
#GRUB_BTRFS_SNAPPER_CONFIG="root"
# Password protection management for submenu,snapshots
# Refer to the Grub documentation https://www.gnu.org/software/grub/manual/grub/grub.html#Authentication-and-authorisation
# and this comment https://github.com/Antynea/grub-btrfs/issues/95#issuecomment-682295660
#
# Add authorized usernames separate by comma (foo,bar) # Add authorized usernames separate by comma (foo,bar)
# When Grub's password protection is enabled, the superuser is authorized by default, it isn't necessary to add it # When Grub's password protection is enabled, the superuser is authorized by default, it isn't necessary to add it
# Default: # Default: ""
# GRUB_BTRFS_PROTECTION_AUTHORIZED_USERS="" #GRUB_BTRFS_PROTECTION_AUTHORIZED_USERS="foo,bar"
# #
# Disable authentication support for submenu of Grub-btrfs only (--unrestricted) # Disable authentication support for submenu of Grub-btrfs only (--unrestricted)
# doesn't work if GRUB_BTRFS_PROTECTION_AUTHORIZED_USERS isn't empty # doesn't work if GRUB_BTRFS_PROTECTION_AUTHORIZED_USERS isn't empty
# Default: false # Default: "false"
# GRUB_BTRFS_DISABLE_PROTECTION_SUBMENU="false" #GRUB_BTRFS_DISABLE_PROTECTION_SUBMENU="true"