From 44364c01c3173388a1dd0617a08839fb9c2a9b78 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Fri, 23 Jun 2023 10:57:05 +1000 Subject: [PATCH 1/1] some polishing --- packiso.sh | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/packiso.sh b/packiso.sh index aed2a7e..ce72a68 100755 --- a/packiso.sh +++ b/packiso.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Run xorriso to make a bootable ISO of bootimage.raw; a hybrid, nulti +# Run xorriso to make a bootable ISO of bootimage.raw; a hybrid, multi # mode bootable ISO. set -e @@ -9,11 +9,10 @@ ISOTREE=isotree ISO=tiniest.iso P1=part1.raw # $ISOTREE/part1.raw -echo "# Prepare ISO content tree" - +echo "# Prepare ISO content tree unless it's already set up" if [ ! -d $ISOTREE ] ; then mkdir $ISOTREE - #touch $ISOTREE/catalog # Boot catalog + # Determine start and size of first parition X=( $(sfdisk -l -ostart,sectors bootimage.raw | tail -n 2) ) dd if=bootimage.raw of=$P1 skip=${X[0]} count=${X[1]} @@ -25,18 +24,10 @@ if [ ! -d $ISOTREE ] ; then cp kernel/usr/lib/ISOLINUX/isolinux.bin $ISOTREE/boot/isolinux cp syslinux-iso.cfg $ISOTREE/boot/isolinux/syslinux.cfg mcopy -i $P1 ::/splash.png ::/vmlinuz $ISOTREE/ - - #mkdir -p $ISOTREE/EFI/BOOT - #cp kernel/usr/lib/SYSLINUX.EFI/efi64/syslinux.efi \ - # $ISOTREE/EFI/BOOT/bootia64.efi - #cp $ISOTREE/boot/isolinux/*.* $ISOTREE/EFI/boot/ - - #mcopy -i $P1 ::/ldlinux.sys ::/ldlinux.c32 $ISOTREE/ - #mcopy -i $P1 ::/initrd.gz $ISOTREE/ - #cp devuan/initrd.gz $ISOTREE/ fi -[ ! -r $ISO ] || rm $ISO +[ -r $ISO ] && rm $ISO + PREPID="'$(id -un), $(getent passwd $(id -un)|awk -F: '{print $5}')'" XORRISO=( -- 2.39.2