grub2/80_suse_btrfs_snapshot
Michael Chang d108ec594a Accepting request 1196023 from home:michael-chang:test:grub2
- Introduces a new package, grub2-x86_64-efi-bls, which includes a
  straightforward grubbls.efi file. This file can be copied to the EFI System
  Partition (ESP) along with boot fragments in the Boot Loader Specification
  (BLS) format
  * 0001-Streamline-BLS-and-improve-PCR-stability.patch
- Fix crash in bli module (bsc#1226497)
  * 0001-bli-Fix-crash-in-get_part_uuid.patch

- Rework package dependencies: grub2-common now includes common userland
  utilities and is required by grub2 platform packages. grub2 is now a meta
  package that pulls in the default platform package.

OBS-URL: https://build.opensuse.org/request/show/1196023
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=512
2024-08-27 05:46:01 +00:00

29 lines
937 B
Bash

#! /bin/sh
set -e
SNAPSHOTS="/.snapshots"
if [ "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" = "xtrue" ] &&
[ "x${GRUB_FS}" = "xbtrfs" ] &&
[ -d "${SNAPSHOTS}" ]; then
machine=`uname -m`
case "x$machine" in
xs390 | xs390x) : ;;
*)
SNAPSHOT_RID=`btrfs inspect-internal rootid ${SNAPSHOTS}`
ROOT_RID=`btrfs inspect-internal rootid /`
if [ -n "${SNAPSHOT_RID}" -a "${SNAPSHOT_RID}" != "${ROOT_RID}" ]; then
SNAPSHOT_SUBVOL=`btrfs inspect-internal subvolid-resolve ${SNAPSHOT_RID} /`
ROOT_SUBVOL=`btrfs inspect-internal subvolid-resolve ${ROOT_RID} /`
INODE=`stat -c '%i' ${SNAPSHOTS}`
if [ "x${INODE}" = "x256" -a "x${ROOT_SUBVOL}${SNAPSHOTS}" != "x${SNAPSHOT_SUBVOL}" ]; then
echo "btrfs-mount-subvol (\$root) ${SNAPSHOTS} ${SNAPSHOT_SUBVOL}"
fi
fi
;;
esac
cat <<EOF
if [ -f "${SNAPSHOTS}/grub-snapshot.cfg" ]; then
source "${SNAPSHOTS}/grub-snapshot.cfg"
fi
EOF
fi