Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
env:
UBUNTU_ISO_URL: https://releases.ubuntu.com/22.04/ubuntu-22.04.5-desktop-amd64.iso
UBUNTU_ISO_FILENAME: ubuntu-22.04.5-desktop-amd64.iso
DELETE_DOWNLOADED_ISO: true # Used by build_os2borgerpc_image.sh

steps:
- name: Checkout repository
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

40 changes: 24 additions & 16 deletions image/build_os2borgerpc_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,25 @@ then
exit 1
fi

mbr="boot_hybrid.img"

efi="ubuntu22-desktop-amd64.efi"

# Extract the MBR template (used for "Make image" below)

dd if="$ISO_PATH" bs=1 count=446 of=$mbr

# Extract EFI partition image (used for "Make image" below)

skip=$(/sbin/fdisk --list "$ISO_PATH" | grep --fixed-strings '.iso2 ' | awk '{print $2}')

size=$(/sbin/fdisk --list "$ISO_PATH" | grep --fixed-strings '.iso2 ' | awk '{print $4}')

dd if="$ISO_PATH" bs=512 skip="$skip" count="$size" of=$efi




BUILD_FILES_COPY_DESTINATION="squashfs-root/mnt"
TMP_MOUNT_POINT="squashfs-root/tmp"

Expand Down Expand Up @@ -75,6 +94,11 @@ fi

build/extract_iso.sh "$ISO_PATH" iso

if [ "$DELETE_DOWNLOADED_ISO" = "true" ] # Useful for CI, that otherwise might run out of space
then
sudo rm -f $ISO_PATH
fi

# Unsquash and customize
sudo unsquashfs -force iso/casper/filesystem.squashfs > /dev/null

Expand Down Expand Up @@ -131,22 +155,6 @@ cd ..
# Cleanup and unmount our tmp from squashfs-root
unmount_cleanup

mbr="boot_hybrid.img"

efi="ubuntu22-desktop-amd64.efi"

# Extract the MBR template

dd if="$ISO_PATH" bs=1 count=446 of=$mbr

# Extract EFI partition image

skip=$(/sbin/fdisk --list "$ISO_PATH" | grep --fixed-strings '.iso2 ' | awk '{print $2}')

size=$(/sbin/fdisk --list "$ISO_PATH" | grep --fixed-strings '.iso2 ' | awk '{print $4}')

dd if="$ISO_PATH" bs=512 skip="$skip" count="$size" of=$efi

# Make image

xorriso -as mkisofs -r -V "$IMAGE_NAME" -o "$IMAGE_NAME".iso -J -joliet-long -l -iso-level 3 -partition_offset 16 --grub2-mbr $mbr --mbr-force-bootable -append_partition 2 0xEF $efi -appended_part_as_gpt -c boot.catalog -b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info -eltorito-alt-boot -e '--interval:appended_partition_2:all::' -no-emul-boot iso