mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-04 21:15:02 +08:00
Compare commits
4 Commits
v4.11
...
Add-system
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2054eb53d9 | ||
|
|
7ba2c59030 | ||
|
|
208c679ac5 | ||
|
|
b2a3a2343c |
@@ -162,8 +162,16 @@ echo "$@" >> "$grub_directory/grub-btrfs.new"
|
||||
}
|
||||
|
||||
## menu entries
|
||||
old_kernel_parameters=${kernel_parameters}
|
||||
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
|
||||
entry "submenu '${title_menu}' {
|
||||
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.
|
||||
|
||||
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 :
|
||||
* Automatically List snapshots existing on root partition (btrfs).
|
||||
@@ -52,12 +52,13 @@ Now merge grub-btrfs via
|
||||
|
||||
#### Manual
|
||||
* 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:
|
||||
* [btrfs-progs](https://archlinux.org/packages/core/x86_64/btrfs-progs/)
|
||||
* [grub](https://archlinux.org/packages/core/x86_64/grub/)
|
||||
* [bash >4](https://archlinux.org/packages/core/x86_64/bash/)
|
||||
* [gawk ](https://archlinux.org/packages/core/x86_64/gawk/)
|
||||
* [strings](https://archlinux.org/packages/core/x86_64/binutils/)
|
||||
|
||||
#### NOTE: All distros
|
||||
Generate your Grub menu after installation for the changes to take effect.
|
||||
|
||||
10
config
10
config
@@ -54,6 +54,16 @@
|
||||
# Default: ""
|
||||
#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".
|
||||
# Only exact paths are ignored.
|
||||
# e.g : if `specific path` = @, only `@` snapshot will be ignored.
|
||||
|
||||
Reference in New Issue
Block a user