Closed birb57 closed 3 months ago
You'll need a recent version of boom (at least 1.6.0, ideally 1.6.1) and systemd (v254 or later, or v252-18 or later on RHEL9).
To create a snapshot boot entry for the system that mounts /boot
and the /var
LV you'd need a commands like this:
(assuming you haven't already created an OsProfile for the running system)
[root@localhost ~]# boom profile create --from-host
Created profile with os_id d5bded8:
OS ID: "d5bded84c4f37fc29568e83ea2cb2b1dfc3d5789",
Name: "Red Hat Enterprise Linux", Short name: "rhel",
Version: "9.4 (Plow)", Version ID: "9.4",
Kernel pattern: "/vmlinuz-%{version}", Initramfs pattern: "/initramfs-%{version}.img",
Root options (LVM2): "rd.lvm.lv=%{lvm_root_lv}",
Root options (BTRFS): "rootflags=%{btrfs_subvolume}",
Options: "root=%{root_device} ro %{root_opts} crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/swap rhgb quiet",
Title: "%{os_name} %{os_version_id} (%{version})",
Optional keys: "grub_users grub_arg grub_class id", UTS release pattern: "el9"
Then create the boot entry using the --mount
and --no-fstab
options (assuming /boot
is on /dev/vda1
and the /var
snapshot is named rhel/var-snap
):
[root@localhost ~]# boom create --title Snapshot --root-lv rhel/root-snap --no-fstab --mount /dev/vda1:/boot:xfs:defaults --mount /dev/rhel/var-snap:/var:xfs:defaults
Created entry with boot_id 4e28cfa:
title Snapshot
machine-id adf850dcb85441779af286c0479c528f
version 5.14.0-427.13.1.el9_4.x86_64
linux /vmlinuz-5.14.0-427.13.1.el9_4.x86_64
initrd /initramfs-5.14.0-427.13.1.el9_4.x86_64.img
options root=/dev/rhel/root-snap ro rd.lvm.lv=rhel/root-snap crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/swap rhgb quiet fstab=no systemd.mount-extra=/dev/vda1:/boot:xfs:defaults systemd.mount-extra=/dev/rhel/var-snap:/var:xfs:defaults
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
You should then see the "Snapshot" entry in the grub menu when you reboot.
Hi
I have dedicated /boot partition and also dedicated /var lvm volume
How can I add them to boom boot manager ?
thanks for your support