30 lines
984 B
Bash
30 lines
984 B
Bash
dd if=/dev/zero of="$LIVE_BOOT_PATH/efiboot.img" bs=1 count=$(du -s -B1 ./data/refind | cut -f1)
|
|
mkfs.vfat -F 32 "$LIVE_BOOT_PATH/efiboot.img"
|
|
for directory in $(find ./data/refind/EFI/ -type d | cut -d'/' -f4-)
|
|
do
|
|
mmd -i "$LIVE_BOOT_PATH/efiboot.img" ::"$(echo $directory | tr '[:lower:]' '[:upper:]' | sed 's:/*$::')"
|
|
done
|
|
|
|
for file in $(find ./data/refind/EFI/ -type f)
|
|
do
|
|
mcopy -i "$LIVE_BOOT_PATH/efiboot.img" $file ::"$(echo $file | cut -d'/' -f4- | tr '[:lower:]' '[:upper:]')"
|
|
done
|
|
|
|
# Create Bootable UEFI Full Image
|
|
mkdir -p ./output
|
|
|
|
xorriso \
|
|
-as mkisofs \
|
|
-iso-level 3 \
|
|
-V "PikaOS 4" \
|
|
-e --interval:appended_partition_2:all:: \
|
|
-append_partition 2 0xef "$LIVE_BOOT_PATH/efiboot.img" \
|
|
-J -joliet-long \
|
|
-no-emul-boot \
|
|
-isohybrid-gpt-basdat \
|
|
-o "./output/$ISO_IMAGE".iso \
|
|
"$LIVE_BOOT_DATA_PATH"
|
|
|
|
# Generate an integrity sum
|
|
touch "./output/$ISO_IMAGE".md5
|
|
md5sum "./output/$ISO_IMAGE".iso > "./output/$ISO_IMAGE".md5 |