From: Paul Hänsch Date: Wed, 27 Nov 2019 02:53:33 +0000 (+0100) Subject: merge multiboot iso generator X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=0ed3987b03f2612d22b869d75f52694ed842f862;p=blast merge multiboot iso generator --- diff --git a/Makefile b/Makefile index b683f13..326d2b8 100644 --- a/Makefile +++ b/Makefile @@ -255,7 +255,7 @@ _config: ${CFGROOT} >"$${CFGROOT}/etc/fstab" chroot "$${CFGROOT}" update-initramfs -u -${SQUASH}: ${CFGROOT} .FORCE +${SQUASH}: ${CFGROOT} -rm "$${SQUASH}" mksquashfs "$${CFGROOT}" "$${SQUASH}" -comp xz @@ -267,7 +267,8 @@ _squash: ${SQUASH} _squash_modules _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 @@ -305,11 +306,8 @@ _format_boot: ${PBOOT} _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 @@ -363,17 +361,16 @@ _bootloader_pc: ${CFGROOT} _grub_efi32 _grub_efi64 _syslinux_bios #_syslinux_efi "$$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/" @@ -383,9 +380,6 @@ _efi_mount: ${PBOOT} _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}