>"$${CFGROOT}/etc/fstab"
chroot "$${CFGROOT}" update-initramfs -u
-${SQUASH}: ${CFGROOT} .FORCE
+${SQUASH}: ${CFGROOT}
-rm "$${SQUASH}"
mksquashfs "$${CFGROOT}" "$${SQUASH}" -comp xz
_isosquash: ${ISOROOT}/live/live.squashfs
${ISOROOT}/live/live.squashfs: ${CFGROOT} ${ISOROOT} .FORCE
-rm "$@"
- printf '%s\n' boot |mksquashfs "$${CFGROOT}" "$@" -comp xz -ef /dev/stdin
+ { cd "$${CFGROOT}"; printf '%s\n' boot/*; } \
+ | mksquashfs "$${CFGROOT}" "$@" -comp xz -ef /dev/stdin
${VOLUME}: .FORCE
! printf '%s\n' "$${VOLUME}" |grep -q '^/dev/' # abort if volume should be real device
_format: _format_root _format_boot
-_iso_image: ${ISOROOT} # _efi_iso _efi_umount
- xorriso -as mkisofs -o "$${ISO}" -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
- -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \
- "$${ISOROOT}"
- # -eltorito-alt-boot -e efi.img -no-emul-boot -isohybrid-gpt-basdat \
+_iso_image: ${ISOROOT}
+ grub-mkrescue -o "$${ISO}" "$${ISOROOT}"
.PHONY: _syslinux_efi32 _syslinux_efi64 _syslinux_bios
.PHONY: _grub_efi32 _grub_efi64
"$$k" "$$i" >>"$${CFGROOT}/boot/grub.cfg"
_bootloader_iso: ${CFGROOT} ${ISOROOT}
- # grub-mkimage -p / -O i386-pc-eltorito biosdisk iso9660 normal linux all_video >"$${ISOROOT}/grub.bin"
+ mkdir -p "$${ISOROOT}/boot/grub/"
cp -L "$${CFGROOT}/vmlinuz" "$${CFGROOT}/initrd.img" "$${ISOROOT}"
- cp /usr/lib/ISOLINUX/isolinux.bin $(addprefix /usr/lib/syslinux/modules/bios/, ldlinux.c32 menu.c32 libutil.c32) "$${ISOROOT}"
- # printf '%s\n' "set timeout=10" "default=buster" \
- # "menuentry 'Debian Buster' --id 'buster' {" \
- # "linux '/vmlinuz' boot=live" "initrd '/initrd.img'" "}" \
- # >"$${ISOROOT}/grub.cfg"
- printf '%s\n' "UI menu.c32" "DEFAULT buster" "TIMEOUT 100" \
- "LABEL buster" " MENU LABEL Debian Buster 64bit" \
- " KERNEL /vmlinuz" " APPEND initrd=/initrd.img boot=live" \
- >"$${ISOROOT}/syslinux.cfg"
+ printf '%s\n' "set timeout=10" "default=buster" \
+ "menuentry 'Debian Buster' --id 'buster' {" \
+ "linux '/vmlinuz' boot=live" "initrd '/initrd.img'" "}" \
+ >"$${ISOROOT}/boot/grub/grub.cfg"
+ -[ -f "$${ISOROOT}/install/initrd.gz" -a -f "$${ISOROOT}/install/linux" ] && \
+ printf '%s\n' "menuentry 'Install Debian' --id 'install' {" \
+ "linux '/install/linux'" "initrd '/install/initrd.gz'" "}" \
+ >>"$${ISOROOT}/boot/grub/grub.cfg"
_efi_mount: ${PBOOT}
-umount "efi/"
_efi_umount: _efi_mount
umount efi/ && rmdir efi/
-_efi_iso: _efi_mount _grub_efi32 _grub_efi64
- cp -r "$${CFGROOT}/boot/EFI/." "efi/EFI/"
-
.PHONY: _syslinux_mbr _grub_mbr
_syslinux_mbr: ${VOLUME}