mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-08-24 01:03:15 +08:00
enhanced
enhanced
This commit is contained in:
@@ -1,35 +1,35 @@
|
|||||||
#! /usr/bin/bash
|
#! /usr/bin/bash
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
####################################################################################################################################
|
#########################################################################################################################################
|
||||||
# Written by: Antynea #
|
# Written by: Antynea #
|
||||||
# #
|
# #
|
||||||
# Purpose: Include btrfs snapshots at boot options. #
|
# Purpose: Include btrfs snapshots at boot options. #
|
||||||
# #
|
# #
|
||||||
# What this script does: #
|
# What this script does: #
|
||||||
# - List snapshots existing on root partition (btrfs). #
|
# - List snapshots existing on root partition (btrfs). #
|
||||||
# - Create corresponding menuentry in grub.cfg , which ensures a very easy rollback. #
|
# - Create corresponding menuentry in grub.cfg , which ensures a very easy rollback. #
|
||||||
# #
|
# #
|
||||||
# How to use it: #
|
# How to use it: #
|
||||||
# - Add this lines to /etc/default/grub: #
|
# - Add this lines to /etc/default/grub: #
|
||||||
# #
|
# #
|
||||||
# * GRUB_BTRFS_SUBMENUNAME="ArchLinux Snapshots" (Name menu appearing in grub.) #
|
# * GRUB_BTRFS_SUBMENUNAME="ArchLinux Snapshots" (Name menu appearing in grub.) #
|
||||||
# * GRUB_BTRFS_PREFIXENTRY="Snapshot" (Add a name ahead your snapshots entries.) #
|
# * GRUB_BTRFS_PREFIXENTRY="Snapshot" (Add a name ahead your snapshots entries.) #
|
||||||
# * GRUB_BTRFS_NKERNEL=("vmlinuz-linux") (Custom Name kernel you use it.) #
|
# * GRUB_BTRFS_NKERNEL=("vmlinuz-linux") (Custom Name kernel you use it.) #
|
||||||
# * GRUB_BTRFS_NINIT=("initramfs-linux.img" "initramfs-linux-fallback.img") (Custom Name initramfs (ramdisk) you use it.) #
|
# * GRUB_BTRFS_NINIT=("initramfs-linux.img" "initramfs-linux-fallback.img") (Custom Name initramfs (ramdisk) you use it.) #
|
||||||
# * GRUB_BTRFS_INTEL_UCODE=("intel-ucode.img") (Custom Name intel microcode you use it.) #
|
# * GRUB_BTRFS_INTEL_UCODE=("intel-ucode.img") (Custom Name intel microcode you use it.) #
|
||||||
# #
|
# #
|
||||||
# - Generate grub.cfg (on Archlinux use grub-mkconfig -o /boot/grub/grub.cfg ) #
|
# - Generate grub.cfg (on Archlinux use grub-mkconfig -o /boot/grub/grub.cfg ) #
|
||||||
# #
|
# #
|
||||||
# - grub-btrfs automatically generates snapshots entries. #
|
# - grub-btrfs automatically generates snapshots entries. #
|
||||||
# - You will see it appear different entries, e.g : Prefixentry name of snapshot [2013-02-11 04:00:00] #
|
# - You will see it appear different entries, e.g : Prefixentry name of snapshot [2013-02-11 04:00:00] #
|
||||||
# #
|
# #
|
||||||
# Warning: #
|
# Warning: #
|
||||||
# This version detect kernels,initramfs,intel microcode only in boot partition, not in snapshot. #
|
# This version detect kernels,initramfs,intel microcode only in boot partition, not in snapshot. #
|
||||||
# If those that are present in boot partition but not in snapshot, #
|
# If those that are present in boot partition but not in snapshot, #
|
||||||
# entry will be created but not fonctional, you don't boot it. #
|
# entry will be created but not fonctional, you don't boot it. #
|
||||||
# #
|
# #
|
||||||
####################################################################################################################################
|
#########################################################################################################################################
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
. /usr/share/grub/grub-mkconfig_lib
|
. /usr/share/grub/grub-mkconfig_lib
|
||||||
|
|||||||
Reference in New Issue
Block a user