Browse Source

Build initial initramfs with 'most' modules, then change the setting to 'dep'

pull/813/head
Serge Schneider 2 months ago
parent
commit
fba95332df
  1. 7
      export-image/05-finalise/01-run.sh

7
export-image/05-finalise/01-run.sh

@ -4,8 +4,6 @@ IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
SBOM_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.sbom"
sed -i 's/^update_initramfs=.*/update_initramfs=all/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf"
on_chroot << EOF
update-initramfs -k all -c
if [ -x /etc/init.d/fake-hwclock ]; then
@ -16,6 +14,11 @@ if hash hardlink 2>/dev/null; then
fi
EOF
if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then
sed -i 's/^update_initramfs=.*/update_initramfs=yes/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf"
sed -i 's/^MODULES=.*/MODULES=dep/' "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf"
fi
if [ -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" ]; then
chmod 700 "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config"
fi

Loading…
Cancel
Save