From d31e137dc78cb16426a868dac50f7ac6713f5904 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Sun, 11 Aug 2024 19:15:02 +0300 Subject: [PATCH] try using gpt part table --- .github/release-nest-v3-nvidia-iso | 2 +- build.sh | 37 +++++++++++++----------------- info.sh | 2 +- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/release-nest-v3-nvidia-iso b/.github/release-nest-v3-nvidia-iso index 8e2afd3..3c03207 100644 --- a/.github/release-nest-v3-nvidia-iso +++ b/.github/release-nest-v3-nvidia-iso @@ -1 +1 @@ -17 \ No newline at end of file +18 diff --git a/build.sh b/build.sh index c4aeb65..b3db7ea 100755 --- a/build.sh +++ b/build.sh @@ -64,43 +64,38 @@ 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 -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" +EFI_BOOT_IMAGE_SIZE=$(($(du -s -B1048576 ./data/refind | cut -f1) + 10)) +EFI_BOOT_IMAGE="$LIVE_BOOT_PATH/efiboot.img" -# Create Refind Image -dd if=/dev/zero of="$DD_BOOT_IMAGE" bs=1M count=$REFIND_SIZE -mkfs.vfat -F 32 "$DD_BOOT_IMAGE" +# Create Refind Boot Image +dd if=/dev/zero of="$EFI_BOOT_IMAGE" bs=1M count=$EFI_BOOT_IMAGE_SIZE +mkfs.vfat -F 32 "$EFI_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:/*$::')" + echo "creating directory $directory in $EFI_BOOT_IMAGE" + mmd -i "$EFI_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:]')" + echo "copying file $file to $EFI_BOOT_IMAGE" + mcopy -i "$EFI_BOOT_IMAGE" $file ::"$(echo $file | cut -d'/' -f4- | tr '[:lower:]' '[:upper:]')" done -# Create System Image - +# Create ISO Image xorriso \ -as mkisofs \ -iso-level 3 \ -V "PikaOS 4" \ - -isohybrid-gpt-basdat \ - -o $DD_LIVE_IMAGE \ + -partition_offset 16 \ + -appended_part_as_gpt \ + -no-pad \ + -append_partition 2 0xef "$EFI_BOOT_IMAGE" \ + -e --interval:appended_partition_2:all:: \ + -o "./output/$ISO_IMAGE".iso \ "$LIVE_BOOT_DATA_PATH" -# Join the 2 images into one -mkdir -p ./output -echo "joining images" -cat $DD_LIVE_IMAGE $DD_BOOT_IMAGE > "./output/$ISO_IMAGE".iso - # Generate an integrity sum touch "./output/$ISO_IMAGE".md5 md5sum "./output/$ISO_IMAGE".iso > "./output/$ISO_IMAGE".md5 diff --git a/info.sh b/info.sh index 6aac8b9..b0b6cc9 100755 --- a/info.sh +++ b/info.sh @@ -10,6 +10,6 @@ export ISO_KERNEL="6.10.0-pikaos" export ISO_ARCH="#ARCH#" export ISO_RELEASE="4.0" export ISO_DESKTOP="GNOME" -export ISO_PATCH="5" +export ISO_PATCH="6" export ISO_IMAGE="$ISO_DISTNAME-$ISO_DESKTOP-$ISO_RELEASE-$ISO_ARCH-$(date '+%y.%m.%d')-$ISO_PATCH" export LIVE_BOOT_VOLUME_NAME="$ISO_DISTNAME-$ISO_DESKTOP-$ISO_RELEASE-$ISO_ARCH-$ISO_PATCH"