aboutsummaryrefslogtreecommitdiffstats
path: root/stage2
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-07-18 06:45:46 +0200
committerSven Gothel <[email protected]>2021-07-18 06:45:46 +0200
commit0c8fdfd4b1fbe491aa191d939b58f830cf9b3fbb (patch)
tree0fc5eb0557a7ff9f77edb428f0cb606dd36467a1 /stage2
parent8194ac6d514f360b7cca5ea453fe147968e81b52 (diff)
stage2: Make GRUB boot-code images relocatable (clone)
- don't use UUIDs but file-id - preload modules via core.img (within MBR-gap) - Don't use installation specific load.cfg, remove it.
Diffstat (limited to 'stage2')
-rwxr-xr-xstage2/01-sys-tweaks/01-run.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh
index caecb15..32d3241 100755
--- a/stage2/01-sys-tweaks/01-run.sh
+++ b/stage2/01-sys-tweaks/01-run.sh
@@ -158,8 +158,7 @@ if [ "${ROOTFS_RO}" = "1" ] ; then
install -m 644 files/grub/custom.cfg "${ROOTFS_DIR}/boot/grub/custom.cfg"
sed -i 's/sys_arm64_000/sys_${TARGET_ARCH}_000/g' "${ROOTFS_DIR}/boot/grub/custom.cfg"
cp "${ROOTFS_DIR}/boot/grub/custom.cfg" "${ROOTFS_DIR}/boot/sys_${TARGET_ARCH}_000/"
- sed -i 's/GRUB_DEFAULT=.*$/GRUB_DEFAULT=loop_rootfs/g;s/GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=0/g;s/#GRUB_TERMINAL=.*$/GRUB_TERMINAL=console/g;s/#GRUB_DISABLE_LINUX_UUID=.*$/GRUB_DISABLE_LINUX_UUID=true/g' \
- "${ROOTFS_DIR}/etc/default/grub"
+ sed -i 's/GRUB_DEFAULT=.*$/GRUB_DEFAULT=loop_rootfs/g;s/GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=0/g;s/#GRUB_TERMINAL=.*$/GRUB_TERMINAL=console/g;s/#GRUB_DISABLE_LINUX_UUID=.*$/GRUB_DISABLE_LINUX_UUID=true/g' "${ROOTFS_DIR}/etc/default/grub"
echo "GRUB_DISABLE_LINUX_PARTUUID=true" >> "${ROOTFS_DIR}/etc/default/grub"
echo "GRUB_DISABLE_RECOVERY=true" >> "${ROOTFS_DIR}/etc/default/grub"
rm -f "${ROOTFS_DIR}/etc/grub.d/05_debian_theme"
@@ -230,7 +229,10 @@ on_chroot <<EOF
fi
if [ "${TARGET_RASPI}" != "1" ]; then
update-grub
- grub-install /dev/${NBD_DEV}
+ grub-install --force-file-id --modules="gzio part_msdos fat" /dev/${NBD_DEV}
+
+ # Remove storage device related 'search.fs_uuid' and allow multi homing
+ rm -f /boot/grub/i386-pc/load.cfg
fi
EOF