mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-05 13:45:00 +08:00
Compare commits
1 Commits
Add-system
...
v4.11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79ae25ea5d |
@@ -162,16 +162,8 @@ echo "$@" >> "$grub_directory/grub-btrfs.new"
|
|||||||
}
|
}
|
||||||
|
|
||||||
## menu entries
|
## menu entries
|
||||||
old_kernel_parameters=${kernel_parameters}
|
|
||||||
make_menu_entries()
|
make_menu_entries()
|
||||||
{
|
{
|
||||||
kernel_parameters="${old_kernel_parameters}"
|
|
||||||
if [[ "${GRUB_BTRFS_SYSTEMD_VOLATILE}" == true ]] ; then
|
|
||||||
if [[ $(strings -n7 "$grub_btrfs_mount_point/$snap_dir_name_trim/usr/bin/init" | grep -aEiom1 'upstart|systemd|sysvinit') == systemd ]] \
|
|
||||||
|| [[ $(strings -n7 "$grub_btrfs_mount_point/$snap_dir_name_trim/sbin/init" | grep -aEiom1 'upstart|systemd|sysvinit') == systemd ]]; then
|
|
||||||
[[ $(btrfs property get "$grub_btrfs_mount_point/$snap_dir_name_trim" ro) != "ro=false" ]] && kernel_parameters="${kernel_parameters} systemd.volatile=state";
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
## \" required for snap,kernels,init,microcode with space in their name
|
## \" required for snap,kernels,init,microcode with space in their name
|
||||||
entry "submenu '${title_menu}' {
|
entry "submenu '${title_menu}' {
|
||||||
submenu '${title_submenu}' { echo }"
|
submenu '${title_submenu}' { echo }"
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ 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.
|
||||||
|
|
||||||
This project includes its own solution.
|
This project includes its own solution.
|
||||||
* Refer to the [documentation](https://github.com/Antynea/grub-btrfs/blob/master/initramfs/readme.md).
|
Refer to the [documentation](https://github.com/Antynea/grub-btrfs/blob/master/initramfs/readme.md).
|
||||||
* Or used `GRUB_BTRFS_SYSTEMD_VOLATILE=true` in config file. (experimental, See [config file](https://github.com/Antynea/grub-btrfs/blob/master/config) for more information.)
|
|
||||||
- - -
|
- - -
|
||||||
### 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).
|
||||||
@@ -52,13 +52,12 @@ Now merge grub-btrfs via
|
|||||||
|
|
||||||
#### Manual
|
#### Manual
|
||||||
* Run `make install` or look into Makefile for instructions on where to put each file.
|
* Run `make install` or look into Makefile for instructions on where to put each file.
|
||||||
* Run `make help` to check what options are available.
|
* Run `make help` to check what options are available.
|
||||||
* Dependencies:
|
* Dependencies:
|
||||||
* [btrfs-progs](https://archlinux.org/packages/core/x86_64/btrfs-progs/)
|
* [btrfs-progs](https://archlinux.org/packages/core/x86_64/btrfs-progs/)
|
||||||
* [grub](https://archlinux.org/packages/core/x86_64/grub/)
|
* [grub](https://archlinux.org/packages/core/x86_64/grub/)
|
||||||
* [bash >4](https://archlinux.org/packages/core/x86_64/bash/)
|
* [bash >4](https://archlinux.org/packages/core/x86_64/bash/)
|
||||||
* [gawk ](https://archlinux.org/packages/core/x86_64/gawk/)
|
* [gawk ](https://archlinux.org/packages/core/x86_64/gawk/)
|
||||||
* [strings](https://archlinux.org/packages/core/x86_64/binutils/)
|
|
||||||
|
|
||||||
#### NOTE: All distros
|
#### NOTE: All distros
|
||||||
Generate your Grub menu after installation for the changes to take effect.
|
Generate your Grub menu after installation for the changes to take effect.
|
||||||
|
|||||||
10
config
10
config
@@ -54,16 +54,6 @@
|
|||||||
# Default: ""
|
# Default: ""
|
||||||
#GRUB_BTRFS_ROOTFLAGS="space_cache,commit=10,norecovery"
|
#GRUB_BTRFS_ROOTFLAGS="space_cache,commit=10,norecovery"
|
||||||
|
|
||||||
# Booting on read-only snapshots can be tricky. (See https://github.com/Antynea/grub-btrfs#warning-booting-on-read-only-snapshots-can-be-tricky)
|
|
||||||
# Based on several reports, "/var" must be writable to start properly.
|
|
||||||
# Systemd can do this for you. (not compatible with OpenRC)
|
|
||||||
# The snapshot will boot in read-only mode but "/var" will be writable using a "tmpfs" mount point (which means, folder mounted in RAM)
|
|
||||||
# This should make it easier to rollback.
|
|
||||||
# Note to all: Detecting "systemd" as the default init on the snapshot is automatic, if don't, file a bug report at https://github.com/Antynea/grub-btrfs.
|
|
||||||
# Note to Arch Linux users: If you use the "grub-btrfs-overlayfs" option on Arch Linux, "GRUB_BTRFS_SYSTEMD_VOLATILE" will do nothing.
|
|
||||||
# Default: "false"
|
|
||||||
#GRUB_BTRFS_SYSTEMD_VOLATILE=true
|
|
||||||
|
|
||||||
# Ignore specific path during run "grub-mkconfig".
|
# Ignore specific path during run "grub-mkconfig".
|
||||||
# Only exact paths are ignored.
|
# Only exact paths are ignored.
|
||||||
# e.g : if `specific path` = @, only `@` snapshot will be ignored.
|
# e.g : if `specific path` = @, only `@` snapshot will be ignored.
|
||||||
|
|||||||
Reference in New Issue
Block a user