Skip to content

Commit

Permalink
Fix common vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dappnodedev committed May 31, 2024
1 parent e86dfea commit cf4ab17
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion iso/scripts/common_iso_generation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
WORKDIR="/usr/src/app"
ISO_BUILD_PATH="${WORKDIR}/dappnode-iso"
DAPPNODE_ISO_PREFIX="Dappnode-"
DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}"

add_dappnode_files() {
local iso_build_path=$1
Expand Down
9 changes: 6 additions & 3 deletions iso/scripts/generate_dappnode_iso_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ BASE_ISO_PATH="/images/${BASE_ISO_NAME}"
BASE_ISO_URL="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/${BASE_ISO_NAME}"
BASE_ISO_SHASUM="013f5b44670d81280b5b1bc02455842b250df2f0c6763398feb69af1a805a14f ${BASE_ISO_PATH}"

DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}"
DAPPNODE_ISO_PATH="/images/${DAPPNODE_ISO_NAME}"

customize_debian_preseed() {
local iso_build_path=$1
local workdir=$2
Expand Down Expand Up @@ -75,10 +78,10 @@ generate_debian_iso() {

echo "[INFO] Generating new ISO..."

xorriso -as mkisofs -isohybrid-mbr ${ISO_BUILD_PATH}/isolinux/isohdpfx.bin \
xorriso -as mkisofs -isohybrid-mbr ${mbr_path} \
-c /isolinux/boot.cat -b /isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \
-boot-info-table -eltorito-alt-boot -e /boot/grub/efi.img -no-emul-boot \
-isohybrid-gpt-basdat -o "/images/${DAPPNODE_ISO_NAME}" ${ISO_BUILD_PATH}
-isohybrid-gpt-basdat -o "${iso_output_path}" ${iso_build_path}
}

download_iso "${BASE_ISO_PATH}" "${BASE_ISO_NAME}" "${BASE_ISO_URL}"
Expand All @@ -91,4 +94,4 @@ add_dappnode_files "${ISO_BUILD_PATH}" "${WORKDIR}"
customize_debian_preseed "${ISO_BUILD_PATH}" "${WORKDIR}"
configure_boot_menu "${ISO_BUILD_PATH}" "${WORKDIR}"
handle_checksums # TODO: Check if it fits both ubuntu and debian
generate_debian_iso "${ISO_BUILD_PATH}/isolinux/isohdpfx.bin" "${DAPPNODE_ISO_NAME}" "${ISO_BUILD_PATH}"
generate_debian_iso "${ISO_BUILD_PATH}/isolinux/isohdpfx.bin" "${DAPPNODE_ISO_PATH}" "${ISO_BUILD_PATH}"
4 changes: 3 additions & 1 deletion iso/scripts/generate_dappnode_iso_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ TMP_INITRD="/tmp/makeinitrd"
BASE_ISO_NAME=ubuntu-24.04-live-server-amd64.iso
BASE_ISO_PATH="/images/${BASE_ISO_NAME}"
BASE_ISO_URL="https://labs.eif.urjc.es/mirror/ubuntu-releases/24.04/${BASE_ISO_NAME}"
DAPPNODE_ISO_PATH="/images/DAppNode-${BASE_ISO_NAME}"
BASE_ISO_SHASUM="8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3 ${BASE_ISO_PATH}"

DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}"
DAPPNODE_ISO_PATH="/images/${DAPPNODE_ISO_NAME}"

get_efi_partition() {
local base_iso_path=$1
local dest_efi_path=$2
Expand Down

0 comments on commit cf4ab17

Please sign in to comment.