Fixed missing @ in path to kernel and initrd, added output of the new grub.cfg entries.
This commit is contained in:
parent
a0ab011100
commit
64eafcb816
|
|
@ -136,16 +136,12 @@ sudo bash -c "
|
||||||
|
|
||||||
# --- 7. GRUB Integration ---
|
# --- 7. GRUB Integration ---
|
||||||
ZBM_POOL=$(findmnt -n -o SOURCE -T "$ZBM_DIR" | cut -d'/' -f1)
|
ZBM_POOL=$(findmnt -n -o SOURCE -T "$ZBM_DIR" | cut -d'/' -f1)
|
||||||
ZBM_SOURCE=$(findmnt -n -o SOURCE -T "$ZBM_DIR") # e.g. rpool/ROOT/devuan-1@
|
ZBM_SOURCE=$(findmnt -n -o SOURCE -T "$ZBM_DIR") # rpool/ROOT/devuan-1
|
||||||
ZBM_DATASET="${ZBM_SOURCE#*/}" # -> ROOT/devuan-1@
|
ZBM_DATASET="${ZBM_SOURCE#*/}" # ROOT/devuan-1
|
||||||
ZBM_DATASET_PATH="/${ZBM_DATASET}"
|
ZBM_DATASET_PATH="/${ZBM_DATASET}@/" # /ROOT/devuan-1@/
|
||||||
|
|
||||||
# Combine dataset location with the ZBM storage path
|
# Combine dataset location with the ZBM storage path
|
||||||
REL_PATH="${ZBM_DATASET_PATH}${ZBM_DIR}"
|
REL_PATH="${ZBM_DATASET_PATH}${ZBM_DIR#/}" # /ROOT/devuan-1@/boot/zfsbootmenu
|
||||||
|
|
||||||
# Normalize: collapse any duplicate slashes and tidy snapshot notation
|
|
||||||
REL_PATH="${REL_PATH//|\/|@|/}" # ensure `/` before `@` isn’t broken
|
|
||||||
REL_PATH="${REL_PATH//|//|/|}" # reduce any '//' to '/'
|
|
||||||
|
|
||||||
echo "[*] Generating GRUB configuration for pool: $ZBM_POOL..."
|
echo "[*] Generating GRUB configuration for pool: $ZBM_POOL..."
|
||||||
|
|
||||||
|
|
@ -168,6 +164,12 @@ echo "[*] Generating GRUB configuration for pool: $ZBM_POOL..."
|
||||||
# The scripts is separated from the settings. Maybe something I would do if I were packaging zbm.
|
# The scripts is separated from the settings. Maybe something I would do if I were packaging zbm.
|
||||||
GRUB_DEFAULTS='loglevel=4 zbm.import_delay=5 video=vesafb:1920x1200-32@60 rd.vconsole.keymap=uk'
|
GRUB_DEFAULTS='loglevel=4 zbm.import_delay=5 video=vesafb:1920x1200-32@60 rd.vconsole.keymap=uk'
|
||||||
|
|
||||||
|
echo "DEBUG: ZBM_SOURCE='$ZBM_SOURCE'"
|
||||||
|
echo "DEBUG: ZBM_DATASET='$ZBM_DATASET'"
|
||||||
|
echo "DEBUG: ZBM_DATASET_PATH='$ZBM_DATASET_PATH'"
|
||||||
|
echo "DEBUG: REL_PATH='$REL_PATH'"
|
||||||
|
echo "DEBUG: ZBM_DIR='$ZBM_DIR'"
|
||||||
|
|
||||||
conf_print_grub_menu_zbm() {
|
conf_print_grub_menu_zbm() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
@ -218,4 +220,5 @@ else
|
||||||
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
sudo grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "✔ Deployment complete and verified."
|
echo "✔ Deployment complete, verify your grub.cfg entries below: "
|
||||||
|
grep -A5 'ZFSBootMenu' /boot/grub/grub.cfg
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue