From ee7f521a8464fa15b3ea73908e4a89247e71474e Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Sun, 11 Aug 2024 02:27:13 +0300 Subject: [PATCH] idk --- .github/release-nest-v3-nvidia-iso | 2 +- build.sh | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/release-nest-v3-nvidia-iso b/.github/release-nest-v3-nvidia-iso index 9a03714..9d60796 100644 --- a/.github/release-nest-v3-nvidia-iso +++ b/.github/release-nest-v3-nvidia-iso @@ -1 +1 @@ -10 \ No newline at end of file +11 \ No newline at end of file diff --git a/build.sh b/build.sh index 49860bd..189a37f 100755 --- a/build.sh +++ b/build.sh @@ -64,38 +64,44 @@ mkdir -p ./data/refind/EFI cp -vf "$ROOTFS_PATH/boot"/vmlinuz-"$ISO_KERNEL" "./data/refind/EFI/vmlinuz" cp -vf "$ROOTFS_PATH/boot"/initrd.img-"$ISO_KERNEL" "./data/refind/EFI/initrd" -REFIND_SIZE=$(($(du -s -B1 ./data/refind | cut -f1) + 1024)) -LIVE_SIZE=$(($(du -s -B1 $LIVE_BOOT_LIVE_PATH | cut -f1) + 1024)) +REFIND_SIZE=$(($(du -s -B1048576 ./data/refind | cut -f1) + 10)) +LIVE_SIZE=$(($(du -s -B1048576 $LIVE_BOOT_LIVE_PATH | cut -f1) + 10)) ISO_SIZE=$(($REFIND_SIZE + $LIVE_SIZE)) DD_BOOT_IMAGE="./efiboot.img" DD_LIVE_IMAGE="./live.img" # Create Refind Image -dd if=/dev/zero of="$DD_BOOT_IMAGE" bs=1 count=$REFIND_SIZE +dd if=/dev/zero of="$DD_BOOT_IMAGE" bs=1M count=$REFIND_SIZE mkfs.vfat -F 32 "$DD_BOOT_IMAGE" for directory in $(find ./data/refind/EFI/ -type d | cut -d'/' -f4-) do + echo "creating directory $directory in $DD_BOOT_IMAGE" mmd -i "$DD_BOOT_IMAGE" ::"$(echo $directory | tr '[:lower:]' '[:upper:]' | sed 's:/*$::')" done for file in $(find ./data/refind/EFI/ -type f) do + echo "copying file $file to $DD_BOOT_IMAGE" mcopy -i "$DD_BOOT_IMAGE" $file ::"$(echo $file | cut -d'/' -f4- | tr '[:lower:]' '[:upper:]')" done # Create Live medium image -dd if=/dev/zero of="$DD_LIVE_IMAGE" bs=1 count=$LIVE_SIZE +dd if=/dev/zero of="$DD_LIVE_IMAGE" bs=1M count=$LIVE_SIZE mkfs.ext4 "$DD_LIVE_IMAGE" for directory in $(find $LIVE_BOOT_LIVE_PATH -type d | cut -d'/' -f4-) do + echo "creating directory $directory in $DD_LIVE_IMAGE" mmd -i "$DD_LIVE_IMAGE" ::"$(echo $directory | tr '[:lower:]' '[:upper:]' | sed 's:/*$::')" done for file in $(find $LIVE_BOOT_LIVE_PATH -type f) do + echo "copying file $file to $DD_LIVE_IMAGE" mcopy -i "$DD_LIVE_IMAGE" $file ::"$(echo $file | cut -d'/' -f4- | tr '[:lower:]' '[:upper:]')" done +# Join the 2 images into one +echo "joining images" cat $DD_BOOT_IMAGE $DD_LIVE_IMAGE > "./output/$ISO_IMAGE".iso # Generate an integrity sum