Confused...
This commit is contained in:
@@ -11,6 +11,11 @@ ISO_TEMP_DIR="${STAGE_WORK_DIR}/iso_temp"
|
||||
# Step 1: Generate initramfs.
|
||||
# Because live-boot-initramfs-tools is installed, the generated initrd will
|
||||
# include live-boot hooks that can find and mount the squashfs from the ISO.
|
||||
|
||||
# Replace fstab placeholders so initramfs-tools doesn't warn about unknown fs type.
|
||||
sed -i 's/ROOTDEV/LABEL=live-rootfs/g; s/BOOTDEV/LABEL=live-boot/g; s/EFIDEV/LABEL=live-efi/g' \
|
||||
"${ROOTFS_DIR}/etc/fstab"
|
||||
|
||||
on_chroot << EOF
|
||||
update-initramfs -k all -c
|
||||
if [ -x /etc/init.d/fake-hwclock ]; then
|
||||
@@ -42,9 +47,9 @@ mkdir -p "${ISO_TEMP_DIR}/boot/grub"
|
||||
mkdir -p "${ISO_TEMP_DIR}/live"
|
||||
mkdir -p "${ISO_TEMP_DIR}/EFI/boot"
|
||||
|
||||
# Copy kernel and initrd — prefer the vmlinuz symlink, fall back to the versioned file
|
||||
VMLINUZ=$(readlink -f "${ROOTFS_DIR}/boot/vmlinuz" 2>/dev/null || ls "${ROOTFS_DIR}/boot/vmlinuz-"* 2>/dev/null | sort -V | tail -1)
|
||||
INITRD=$(readlink -f "${ROOTFS_DIR}/boot/initrd.img" 2>/dev/null || ls "${ROOTFS_DIR}/boot/initrd.img-"* 2>/dev/null | sort -V | tail -1)
|
||||
# Copy kernel and initrd — find the latest versioned files in /boot
|
||||
VMLINUZ=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "vmlinuz-*" -type f | sort -V | tail -1)
|
||||
INITRD=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "initrd.img-*" -type f | sort -V | tail -1)
|
||||
|
||||
if [ -z "${VMLINUZ}" ] || [ ! -f "${VMLINUZ}" ]; then
|
||||
echo "ERROR: Could not find kernel in ${ROOTFS_DIR}/boot/"
|
||||
|
||||
Reference in New Issue
Block a user