From b8832b75cfa394f344ab15b420a88551b9815770 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Thu, 23 May 2024 10:56:03 +0200 Subject: [PATCH 01/44] First approach --- docker-compose.yml | 5 +- iso/scripts/generate_ISO.sh | 6 +- iso/scripts/generate_dappnode_iso_debian.sh | 9 +- iso/scripts/generate_dappnode_iso_ubuntu.sh | 108 ++++++++++++++++++++ 4 files changed, 121 insertions(+), 7 deletions(-) create mode 100755 iso/scripts/generate_dappnode_iso_ubuntu.sh diff --git a/docker-compose.yml b/docker-compose.yml index 7eddc984..90d69a50 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,9 @@ services: privileged: true environment: - BUILD=false # In case you want to re-generate a all the images, not recommended - - CLEAN=true # it remove the images directory - - UNATTENDED=false # UNATTENDED version + - CLEAN=false # it remove the images directory + - UNATTENDED=true # UNATTENDED version + - BASE_OS=debian # Base OS version (debian or ubuntu) volumes: - ./images:/images - "/var/run/docker.sock:/var/run/docker.sock" diff --git a/iso/scripts/generate_ISO.sh b/iso/scripts/generate_ISO.sh index 024e5397..bf241775 100755 --- a/iso/scripts/generate_ISO.sh +++ b/iso/scripts/generate_ISO.sh @@ -22,4 +22,8 @@ fi mkdir -p /usr/src/app/dappnode touch /usr/src/app/dappnode/iso_install.log -/usr/src/app/iso/scripts/generate_dappnode_iso_debian.sh +if [ "$BASE_OS" = "ubuntu" ]; then + /usr/src/app/iso/scripts/generate_dappnode_iso_ubuntu.sh +else + /usr/src/app/iso/scripts/generate_dappnode_iso_debian.sh +fi diff --git a/iso/scripts/generate_dappnode_iso_debian.sh b/iso/scripts/generate_dappnode_iso_debian.sh index 3f02fb73..3b655176 100755 --- a/iso/scripts/generate_dappnode_iso_debian.sh +++ b/iso/scripts/generate_dappnode_iso_debian.sh @@ -25,12 +25,13 @@ rm -rf dappnode-isoº rm -rf DappNode-debian-* echo "Extracting the iso..." -xorriso -osirrox on -indev /images/${ISO_NAME} \ - -extract / dappnode-iso +osirrox -indev /images/${ISO_NAME} -extract / dappnode-iso +# Using a 512-byte block size to ensure the entire Master Boot Record (MBR) is captured. +# The MBR contains boot code, the partition table, and a boot signature, all essential for creating bootable media. +# This ensures that the new ISO being created is bootable under different system setups echo "Obtaining the isohdpfx.bin for hybrid ISO..." -dd if=/images/${ISO_NAME} bs=432 count=1 \ - of=dappnode-iso/isolinux/isohdpfx.bin +dd if=/images/${ISO_NAME} bs=512 count=1 of=dappnode-iso/isolinux/isohdpfx.bin cd /usr/src/app/dappnode-iso # /usr/src/app/dappnode-iso diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh new file mode 100755 index 00000000..86778346 --- /dev/null +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -0,0 +1,108 @@ +#!/bin/bash +set -e + +ISO_BUILD_PATH="/usr/src/app/dappnode-iso" +DAPPNODE_SCRIPTS_PATH="/usr/src/app/scripts" +VARS_FILE="/tmp/vars.sh" +TMP_INITRD="/tmp/makeinitrd" + +# Source = https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso +BASE_ISO_NAME=ubuntu-24.04-live-server-amd64.iso +BASE_ISO_PATH="/images/${BASE_ISO_NAME}" +DAPPNODE_ISO_PATH="/images/DAppNode-${BASE_ISO_NAME}" +ISO_URL=https://labs.eif.urjc.es/mirror/ubuntu-releases/24.04/ +SHASUM="8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3 ${BASE_ISO_PATH}" + +echo "Downloading Ubuntu ISO image: ${BASE_ISO_NAME}..." +if [ ! -f ${BASE_ISO_PATH} ]; then + wget ${ISO_URL}/${BASE_ISO_NAME} \ + -O ${BASE_ISO_PATH} +fi +echo "Done!" + +echo "Verifying download..." +[[ "$(shasum -a 256 ${BASE_ISO_PATH})" != "$SHASUM" ]] && { + echo "ERROR: wrong shasum" + exit 1 +} + +echo "Clean old files..." +rm -rf dappnode-isoº +rm -rf DappNode-ubuntu-* + +echo "Extracting the iso..." +osirrox -indev ${BASE_ISO_PATH} -extract / dappnode-iso + +# Using a 512-byte block size to ensure the entire Master Boot Record (MBR) is captured. +# The MBR contains boot code, the partition table, and a boot signature, all essential for creating bootable media. +echo "Obtaining the isohdpfx.bin for hybrid ISO..." +dd if=/images/${BASE_ISO_NAME} bs=512 count=1 of=${ISO_BUILD_PATH}/boot/grub/isohdpfx.bin + +echo "Creating the new Ubuntu ISO..." +mkisofs -isohybrid-mbr ${ISO_BUILD_PATH}/boot/grub/isohdpfx.bin \ + -eltorito-catalog ${ISO_BUILD_PATH}/boot.catalog \ + -eltorito-boot ${ISO_BUILD_PATH}/boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 \ + -boot-info-table -eltorito-alt-boot --efi-boot ${ISO_BUILD_PATH}/EFI/boot/bootx64.efi -no-emul-boot \ + -isohybrid-gpt-basdat -o ${DAPPNODE_ISO_NAME} . + +exit 0 + +echo "Downloading third-party packages..." +sed '1,/^\#\!ISOBUILD/!d' ${DAPPNODE_SCRIPTS_PATH}/dappnode_install_pre.sh >${VARS_FILE} +# shellcheck disable=SC1091 +source ${VARS_FILE} + +echo "Creating necessary directories and copying files..." +mkdir -p ${ISO_BUILD_PATH}/dappnode +cp -r ${DAPPNODE_SCRIPTS_PATH} ${ISO_BUILD_PATH}/dappnode +cp -r /usr/src/app/dappnode/* ${ISO_BUILD_PATH}/dappnode + +echo "Customizing preseed..." +mkdir -p ${TMP_INITRD} +cp ${ISO_BUILD_PATH}/casper/initrd ${TMP_INITRD}/ +if [[ $UNATTENDED == *"true"* ]]; then + # TODO: Check if this is the correct preseed file for Ubuntu + cp /usr/src/app/iso/preseeds/preseed_unattended.cfg ${TMP_INITRD}/preseed.cfg +else + cp /usr/src/app/iso/preseeds/preseed.cfg ${TMP_INITRD}/preseed.cfg +fi + +cpio -id -H newc <${TMP_INITRD}/initrd +# shellcheck disable=SC2002 +cat ${TMP_INITRD}/initrd | cpio -t >/tmp/list +echo "preseed.cfg" >>/tmp/list +rm ${TMP_INITRD}/initrd +cpio -o -H newc initrd +#gzip initrd +cd - +mv ${TMP_INITRD}/initrd ${ISO_BUILD_PATH}/casper/initrd +cd .. + +#mkdir -p boot/grub/theme + +echo "Configuring the boot menu for DappNode..." +cp /usr/src/app/iso/boot/grub.cfg boot/grub/grub.cfg +#cp /usr/src/app/iso/boot/theme_1 boot/grub/theme/1 +#cp /usr/src/app/iso/boot/isolinux.cfg isolinux/isolinux.cfg +#cp /usr/src/app/iso/boot/menu.cfg isolinux/menu.cfg +#cp /usr/src/app/iso/boot/txt.cfg isolinux/txt.cfg +#cp /usr/src/app/iso/boot/splash.png isolinux/splash.png + +echo "Fix md5 sum..." +# shellcheck disable=SC2046 +md5sum $(find . ! -name "md5sum.txt" -type f) >md5sum.txt + +echo "Generating new iso..." +# Adjust paths as necessary based on actual directory contents +xorriso -as mkisofs \ + -isohybrid-mbr boot/grub/isohdpfx.bin \ + -b EFI/boot/grubx64.efi \ + -no-emul-boot \ + -boot-load-size 4 \ + -boot-info-table \ + -eltorito-alt-boot \ + -e boot/grub/i386-pc/eltorito.img \ + -no-emul-boot \ + -isohybrid-gpt-basdat \ + -o /images/DAppNode-${ISO_NAME} \ + . # -c boot/grub/boot.cat \ From d01fa42f926691b6207a00a916f8ba3be6b428f4 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Thu, 23 May 2024 12:59:15 +0200 Subject: [PATCH 02/44] Created bootable Ubuntu ISO --- iso/scripts/generate_dappnode_iso_ubuntu.sh | 27 +++++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh index 86778346..6be861e5 100755 --- a/iso/scripts/generate_dappnode_iso_ubuntu.sh +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -35,16 +35,27 @@ osirrox -indev ${BASE_ISO_PATH} -extract / dappnode-iso # Using a 512-byte block size to ensure the entire Master Boot Record (MBR) is captured. # The MBR contains boot code, the partition table, and a boot signature, all essential for creating bootable media. -echo "Obtaining the isohdpfx.bin for hybrid ISO..." -dd if=/images/${BASE_ISO_NAME} bs=512 count=1 of=${ISO_BUILD_PATH}/boot/grub/isohdpfx.bin +echo "Obtaining the MBR for hybrid ISO..." +dd if=${BASE_ISO_PATH} bs=512 count=1 of=${ISO_BUILD_PATH}/mbr -echo "Creating the new Ubuntu ISO..." -mkisofs -isohybrid-mbr ${ISO_BUILD_PATH}/boot/grub/isohdpfx.bin \ - -eltorito-catalog ${ISO_BUILD_PATH}/boot.catalog \ - -eltorito-boot ${ISO_BUILD_PATH}/boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 \ - -boot-info-table -eltorito-alt-boot --efi-boot ${ISO_BUILD_PATH}/EFI/boot/bootx64.efi -no-emul-boot \ - -isohybrid-gpt-basdat -o ${DAPPNODE_ISO_NAME} . +fdisk -l ${BASE_ISO_PATH} + +efi_start=$(fdisk -l ${BASE_ISO_PATH} | grep 'Appended2' | awk '{print $2}') +efi_end=$(fdisk -l ${BASE_ISO_PATH} | grep 'Appended2' | awk '{print $3}') +efi_size=$(expr ${efi_end} - ${efi_start} + 1) +echo "Obtaining the EFI partition image from ${efi_start} with size ${efi_size}..." +dd if=${BASE_ISO_PATH} bs=512 skip="$efi_start" count="$efi_size" of=${ISO_BUILD_PATH}/efi +echo "Creating the new Ubuntu ISO..." +mkisofs \ + -rational-rock -joliet -joliet-long -full-iso9660-filenames \ + -iso-level 3 -partition_offset 16 --grub2-mbr ${ISO_BUILD_PATH}/mbr \ + --mbr-force-bootable -append_partition 2 0xEF ${ISO_BUILD_PATH}/efi \ + -appended_part_as_gpt \ + -eltorito-catalog /boot.catalog \ + -eltorito-boot /boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 \ + -boot-info-table --grub2-boot-info -eltorito-alt-boot --efi-boot '--interval:appended_partition_2:all::' -no-emul-boot \ + -o ${DAPPNODE_ISO_PATH} ${ISO_BUILD_PATH} exit 0 echo "Downloading third-party packages..." From a346978cfc4d33d53971b46a3cb664620586b677 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Thu, 23 May 2024 17:51:31 +0200 Subject: [PATCH 03/44] Add grub config for Ubuntu --- iso/boot/ubuntu/grub.cfg | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 iso/boot/ubuntu/grub.cfg diff --git a/iso/boot/ubuntu/grub.cfg b/iso/boot/ubuntu/grub.cfg new file mode 100644 index 00000000..bc7952df --- /dev/null +++ b/iso/boot/ubuntu/grub.cfg @@ -0,0 +1,25 @@ +set timeout=30 + +loadfont unicode + +set menu_color_normal=white/black +set menu_color_highlight=black/light-gray + +menuentry "Install Dappnode (over Ubuntu Server)" { + set gfxpayload=keep + linux /casper/vmlinuz autoinstall --- # Added autoinstall to make it unattended + initrd /casper/initrd +} +grub_platform +if [ "$grub_platform" = "efi" ]; then +menuentry 'Boot from next volume' { + exit 1 +} +menuentry 'UEFI Firmware Settings' { + fwsetup +} +else +menuentry 'Test memory' { + linux16 /boot/memtest86+x64.bin +} +fi \ No newline at end of file From ea450644143095db372cb4fa21e63a528963dc50 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Thu, 23 May 2024 17:51:46 +0200 Subject: [PATCH 04/44] Add autoinstall files --- iso/preseeds/ubuntu/autoinstall.yaml | 45 ++++++++++++++++ .../ubuntu/autoinstall_unattended.yaml | 54 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 iso/preseeds/ubuntu/autoinstall.yaml create mode 100644 iso/preseeds/ubuntu/autoinstall_unattended.yaml diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml new file mode 100644 index 00000000..7c637171 --- /dev/null +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -0,0 +1,45 @@ +#cloud-config +autoinstall: + version: 1 + identity: + realname: "DAppNode User" + username: dappnode + hostname: dappnode + password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0" + keyboard: + layout: "us" + locale: "en_US.UTF-8" + network: + network: + version: 2 + ethernets: + eth0: + dhcp4: true + ssh: + install-server: true + allow-pw: true + authorized-keys: [] + packages: + - openssh-server + - vim + - sudo +# - iw # TODO: FIX +# - iwd + - wpasupplicant + - intel-microcode +# - build-essential # TODO: FIX + - linux-generic +# - firmware-iwlwifi +# - avahi-utils # TODO: Fix +# - iptables # TODO: Try + apt: + fallback: continue-anyway + late-commands: + - "mkdir -p /target/usr/src/dappnode" + - "cp -ar /cdrom/dappnode/* /target/usr/src/dappnode/" + - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" + - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" + - "chmod +x /target/usr/src/dappnode/scripts/static_ip.sh" + - "sh -c 'gpasswd -a $(getent passwd 1000 | cut -d: -f1) sudo' " + - "/target/usr/src/dappnode/scripts/static_ip.sh" +# - "in-target /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" # TODO: Fix diff --git a/iso/preseeds/ubuntu/autoinstall_unattended.yaml b/iso/preseeds/ubuntu/autoinstall_unattended.yaml new file mode 100644 index 00000000..d10bff9e --- /dev/null +++ b/iso/preseeds/ubuntu/autoinstall_unattended.yaml @@ -0,0 +1,54 @@ +#cloud-config +autoinstall: + version: 1 + locale: en_US.UTF-8 + keyboard: + layout: us + network: + network: + version: 2 + ethernets: + eth0: + dhcp4: true + storage: + layout: + name: lvm + config: + - {ptable: gpt, path: sda, preserve: false, name: '', grub_device: true} + - {volume_group: rootvg, devices: [sda1]} + - {name: root, volgroup: rootvg, size: 100%FREE, format: {type: ext4}, mount: {path: /}} + identity: + hostname: dappnode + username: dappnode + password: "$6$insecur3$rnEv9Amdjn3ctXxPYOlzj/cwvLT43GjWzkPECIHNqd8Vvza5bMG8QqMwEIBKYqnj609D.4ngi4qlmt29dLE.71" + ssh: + install-server: true + allow-pw: true + authorized-keys: [] + user-data: + disable_root: false + packages: + - openssh-server + - vim + - sudo +# - build-essential # TODO: FIX + - linux-generic +# - iw # TODO: FIX +# - iwd + - wpasupplicant + - intel-microcode + - iucode-tool +# - firmware-misc-nonfree # TODO: Remove? +# - firmware-iwlwifi # TODO: Remove? +# - avahi-utils # TODO: Fix +# - iptables # TODO: Try + timezone: UTC + ntp: + enabled: true + late-commands: + - "mkdir -p /target/usr/src/dappnode" + - "cp -ar /cdrom/dappnode/* /target/usr/src/dappnode/" + - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" + - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" + - "echo 'touch /usr/src/dappnode/.firstboot' | in-target" +# - "in-target /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" # TODO: Fix From b18efdac13a2883ccd293b1d6ff039054b7bcbc0 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Thu, 23 May 2024 17:52:04 +0200 Subject: [PATCH 05/44] Improve Ubuntu ISO generation --- iso/scripts/generate_dappnode_iso_ubuntu.sh | 61 +++++---------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh index 6be861e5..ba291c46 100755 --- a/iso/scripts/generate_dappnode_iso_ubuntu.sh +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -38,26 +38,12 @@ osirrox -indev ${BASE_ISO_PATH} -extract / dappnode-iso echo "Obtaining the MBR for hybrid ISO..." dd if=${BASE_ISO_PATH} bs=512 count=1 of=${ISO_BUILD_PATH}/mbr -fdisk -l ${BASE_ISO_PATH} - efi_start=$(fdisk -l ${BASE_ISO_PATH} | grep 'Appended2' | awk '{print $2}') efi_end=$(fdisk -l ${BASE_ISO_PATH} | grep 'Appended2' | awk '{print $3}') efi_size=$(expr ${efi_end} - ${efi_start} + 1) echo "Obtaining the EFI partition image from ${efi_start} with size ${efi_size}..." dd if=${BASE_ISO_PATH} bs=512 skip="$efi_start" count="$efi_size" of=${ISO_BUILD_PATH}/efi -echo "Creating the new Ubuntu ISO..." -mkisofs \ - -rational-rock -joliet -joliet-long -full-iso9660-filenames \ - -iso-level 3 -partition_offset 16 --grub2-mbr ${ISO_BUILD_PATH}/mbr \ - --mbr-force-bootable -append_partition 2 0xEF ${ISO_BUILD_PATH}/efi \ - -appended_part_as_gpt \ - -eltorito-catalog /boot.catalog \ - -eltorito-boot /boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 \ - -boot-info-table --grub2-boot-info -eltorito-alt-boot --efi-boot '--interval:appended_partition_2:all::' -no-emul-boot \ - -o ${DAPPNODE_ISO_PATH} ${ISO_BUILD_PATH} -exit 0 - echo "Downloading third-party packages..." sed '1,/^\#\!ISOBUILD/!d' ${DAPPNODE_SCRIPTS_PATH}/dappnode_install_pre.sh >${VARS_FILE} # shellcheck disable=SC1091 @@ -68,52 +54,35 @@ mkdir -p ${ISO_BUILD_PATH}/dappnode cp -r ${DAPPNODE_SCRIPTS_PATH} ${ISO_BUILD_PATH}/dappnode cp -r /usr/src/app/dappnode/* ${ISO_BUILD_PATH}/dappnode -echo "Customizing preseed..." -mkdir -p ${TMP_INITRD} -cp ${ISO_BUILD_PATH}/casper/initrd ${TMP_INITRD}/ +echo "Adding preseed..." if [[ $UNATTENDED == *"true"* ]]; then - # TODO: Check if this is the correct preseed file for Ubuntu - cp /usr/src/app/iso/preseeds/preseed_unattended.cfg ${TMP_INITRD}/preseed.cfg + cp /usr/src/app/iso/preseeds//ubuntu/autoinstall_unattended.yaml ${ISO_BUILD_PATH}/autoinstall.yaml else - cp /usr/src/app/iso/preseeds/preseed.cfg ${TMP_INITRD}/preseed.cfg + cp /usr/src/app/iso/preseeds/ubuntu/autoinstall.yaml ${ISO_BUILD_PATH}/autoinstall.yaml fi -cpio -id -H newc <${TMP_INITRD}/initrd -# shellcheck disable=SC2002 -cat ${TMP_INITRD}/initrd | cpio -t >/tmp/list -echo "preseed.cfg" >>/tmp/list -rm ${TMP_INITRD}/initrd -cpio -o -H newc initrd -#gzip initrd -cd - -mv ${TMP_INITRD}/initrd ${ISO_BUILD_PATH}/casper/initrd -cd .. - #mkdir -p boot/grub/theme echo "Configuring the boot menu for DappNode..." -cp /usr/src/app/iso/boot/grub.cfg boot/grub/grub.cfg +cp /usr/src/app/iso/boot/ubuntu/grub.cfg ${ISO_BUILD_PATH}/boot/grub/grub.cfg #cp /usr/src/app/iso/boot/theme_1 boot/grub/theme/1 #cp /usr/src/app/iso/boot/isolinux.cfg isolinux/isolinux.cfg #cp /usr/src/app/iso/boot/menu.cfg isolinux/menu.cfg #cp /usr/src/app/iso/boot/txt.cfg isolinux/txt.cfg #cp /usr/src/app/iso/boot/splash.png isolinux/splash.png +# TODO: Is this necessary? How to do it? echo "Fix md5 sum..." # shellcheck disable=SC2046 md5sum $(find . ! -name "md5sum.txt" -type f) >md5sum.txt -echo "Generating new iso..." -# Adjust paths as necessary based on actual directory contents -xorriso -as mkisofs \ - -isohybrid-mbr boot/grub/isohdpfx.bin \ - -b EFI/boot/grubx64.efi \ - -no-emul-boot \ - -boot-load-size 4 \ - -boot-info-table \ - -eltorito-alt-boot \ - -e boot/grub/i386-pc/eltorito.img \ - -no-emul-boot \ - -isohybrid-gpt-basdat \ - -o /images/DAppNode-${ISO_NAME} \ - . # -c boot/grub/boot.cat \ +echo "Creating the new Ubuntu ISO..." +mkisofs \ + -rational-rock -joliet -joliet-long -full-iso9660-filenames \ + -iso-level 3 -partition_offset 16 --grub2-mbr ${ISO_BUILD_PATH}/mbr \ + --mbr-force-bootable -append_partition 2 0xEF ${ISO_BUILD_PATH}/efi \ + -appended_part_as_gpt \ + -eltorito-catalog /boot.catalog \ + -eltorito-boot /boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 \ + -boot-info-table --grub2-boot-info -eltorito-alt-boot --efi-boot '--interval:appended_partition_2:all::' -no-emul-boot \ + -o ${DAPPNODE_ISO_PATH} ${ISO_BUILD_PATH} From 65338d7df649089512383c6625d82dff0c9b8014 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 24 May 2024 15:46:20 +0200 Subject: [PATCH 06/44] Update Ubuntu ISO --- docker-compose.yml | 2 +- iso/boot/splash.png | Bin 4101 -> 12614 bytes iso/boot/theme_1 | 2 +- iso/boot/ubuntu/grub.cfg | 2 + iso/boot/ubuntu/themes/dappnode/splash.png | Bin 0 -> 12614 bytes iso/boot/ubuntu/themes/dappnode/theme.txt | 41 ++++++++++++++ iso/preseeds/ubuntu/autoinstall.yaml | 31 +++++------ .../ubuntu/autoinstall_unattended.yaml | 52 ++++++++++++------ iso/scripts/generate_dappnode_iso_ubuntu.sh | 8 ++- 9 files changed, 98 insertions(+), 40 deletions(-) create mode 100644 iso/boot/ubuntu/themes/dappnode/splash.png create mode 100644 iso/boot/ubuntu/themes/dappnode/theme.txt diff --git a/docker-compose.yml b/docker-compose.yml index 90d69a50..f8f22108 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: - BUILD=false # In case you want to re-generate a all the images, not recommended - CLEAN=false # it remove the images directory - UNATTENDED=true # UNATTENDED version - - BASE_OS=debian # Base OS version (debian or ubuntu) + - BASE_OS=ubuntu # Base OS version (debian or ubuntu) volumes: - ./images:/images - "/var/run/docker.sock:/var/run/docker.sock" diff --git a/iso/boot/splash.png b/iso/boot/splash.png index 835dc493b3b82cf1c97fcf904f3f9d5ead4f2f71..a6f4196e77e581d4910a2dc2de08b7293301def2 100644 GIT binary patch literal 12614 zcmeHuXIE3*7H;TB5q)V&6%`Q>L8($jq)9t;q=h0<0)*ZnAS%*TL=Xg&-a=>zozPLF z2oVB-gc1QM2_Pl3BscH9zu|s3W1J6r?6KF_W9_+SS?ih4oICkHruv+00&D;PfYZ?6 zu>}A?9}fV~EwM7wMie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Oo>}w zG4<~~Qn$L_T%N98a$p__**Ei@jC(9r%FAt>K2bxh<8LAyF@`2&*SXK;nBDx90Zqi;&;qfn(GEp zOhS!m#Lv#Zz8K4vbDqAzrYR4u0i>tGErKgEy9pH7lW>!Mq;Qf@wUUH%8UufH+ v0Rkt%nEdzjPy8Y9hrk~Ke+c|90?y|E!xU2WC-o=q-=*p*+K4hGtI+=fc7lZ? diff --git a/iso/boot/theme_1 b/iso/boot/theme_1 index aa9ae5e4..5edcb52a 100644 --- a/iso/boot/theme_1 +++ b/iso/boot/theme_1 @@ -2,7 +2,7 @@ title-color: "white" title-text: "DAppNode Installer" title-font: "Sans Regular 16" desktop-color: "black" -desktop-image: "/isolinux/splash.png" +desktop-image: "/boot/grub/splash.png" message-color: "white" message-bg-color: "black" terminal-font: "Sans Regular 12" diff --git a/iso/boot/ubuntu/grub.cfg b/iso/boot/ubuntu/grub.cfg index bc7952df..8f5d56d8 100644 --- a/iso/boot/ubuntu/grub.cfg +++ b/iso/boot/ubuntu/grub.cfg @@ -2,6 +2,8 @@ set timeout=30 loadfont unicode +set theme=/boot/grub/themes/dappnode + set menu_color_normal=white/black set menu_color_highlight=black/light-gray diff --git a/iso/boot/ubuntu/themes/dappnode/splash.png b/iso/boot/ubuntu/themes/dappnode/splash.png new file mode 100644 index 0000000000000000000000000000000000000000..a6f4196e77e581d4910a2dc2de08b7293301def2 GIT binary patch literal 12614 zcmeHuXIE3*7H;TB5q)V&6%`Q>L8($jq)9t;q=h0<0)*ZnAS%*TL=Xg&-a=>zozPLF z2oVB-gc1QM2_Pl3BscH9zu|s3W1J6r?6KF_W9_+SS?ih4oICkHruv+00&D;PfYZ?6 zu>}A?9}fV~EwM7wMieI(e$#Fj0t}u80|4yY|6X)}yw6u?gLJ_b`i}s0<3by>2S!hA z6Kw#XA(Q>wl?ecln>T!{Z52UBz_PbK^N5r<4JUN}v@PxZX_7b+%J`Tr`7*baeegdI z+OC=1^fb5`-zMxi6#pr0$XI>FS>pkKPyY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l(?8hgB;f<6t&O z_=J-%tyRpFe)*OA_o+9^1-yHk%EK2=j*xl_yU6P{i@a+6D`CfKAhOwznO3lmP^X7C zvXNGM*7aa56*;Irqm&g@$j8ZIcVt&)BGuMo>E6oHz2z_DVa$y5Q)U$jIrf?`%pQPH zhQo|bW(xSu^Y~i$22wnMf)(Hh%g*O`X(`Z2`x(HL<0|u0TweSi98*jF literal 0 HcmV?d00001 diff --git a/iso/boot/ubuntu/themes/dappnode/theme.txt b/iso/boot/ubuntu/themes/dappnode/theme.txt new file mode 100644 index 00000000..91da608c --- /dev/null +++ b/iso/boot/ubuntu/themes/dappnode/theme.txt @@ -0,0 +1,41 @@ +title-color: "white" +title-text: "Dappnode Installer" +title-font: "Sans Regular 16" +desktop-color: "black" +desktop-image: "/boot/grub/splash.png" +message-color: "white" +message-bg-color: "black" +terminal-font: "Sans Regular 12" + ++ boot_menu { + left = 18% + width = 50% + top = 200 + height = 200 + item_font = "Sans Regular 12" + item_color = #d3d3d3 + selected_item_color = "white" + item_height = 20 + item_padding = 15 + item_spacing = 5 +} + ++ vbox { + top = 100%-60 + left = 10% + + hbox { + top = 0 + left = 20% + + label {text = "Enter: " font = "Sans 10" color = "white" align = "left"} + + label {text = "Select " font = "Sans 10" color = "#d3d3d3" align = "left"} + } + + hbox { + top = 0 + left = 20% + + label {text = "E: " font = "Sans 10" color = "white" align = "left"} + + label {text = "Edit Selection " font = "Sans 10" color = "#d3d3d3" align = "left"} + + label {text = " " font = "Sans 10" color = "white" align = "left"} + + label {text = "C: " font = "Sans 10" color = "white" align = "left"} + + label {text = "GRUB Command line" font = "Sans 10" color = "#d3d3d3" align = "left"} + } +} diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml index 7c637171..047f250f 100644 --- a/iso/preseeds/ubuntu/autoinstall.yaml +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -1,25 +1,19 @@ #cloud-config autoinstall: version: 1 - identity: - realname: "DAppNode User" - username: dappnode - hostname: dappnode - password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0" - keyboard: - layout: "us" - locale: "en_US.UTF-8" - network: - network: - version: 2 - ethernets: - eth0: - dhcp4: true + interactive-sections: + - identity + - keyboard + - locale + - network + - storage + - timezone + ssh: install-server: true - allow-pw: true - authorized-keys: [] + packages: +# - chrony - openssh-server - vim - sudo @@ -34,6 +28,7 @@ autoinstall: # - iptables # TODO: Try apt: fallback: continue-anyway + late-commands: - "mkdir -p /target/usr/src/dappnode" - "cp -ar /cdrom/dappnode/* /target/usr/src/dappnode/" @@ -41,5 +36,5 @@ autoinstall: - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "chmod +x /target/usr/src/dappnode/scripts/static_ip.sh" - "sh -c 'gpasswd -a $(getent passwd 1000 | cut -d: -f1) sudo' " - - "/target/usr/src/dappnode/scripts/static_ip.sh" -# - "in-target /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" # TODO: Fix +# - "/target/usr/src/dappnode/scripts/static_ip.sh" + - "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" diff --git a/iso/preseeds/ubuntu/autoinstall_unattended.yaml b/iso/preseeds/ubuntu/autoinstall_unattended.yaml index d10bff9e..2c83f7d5 100644 --- a/iso/preseeds/ubuntu/autoinstall_unattended.yaml +++ b/iso/preseeds/ubuntu/autoinstall_unattended.yaml @@ -1,33 +1,52 @@ #cloud-config autoinstall: version: 1 + locale: en_US.UTF-8 + keyboard: layout: us - network: - network: - version: 2 - ethernets: - eth0: - dhcp4: true + + # network left as default (DHCP in interfaces named en* or eth*) + storage: layout: name: lvm config: - - {ptable: gpt, path: sda, preserve: false, name: '', grub_device: true} - - {volume_group: rootvg, devices: [sda1]} - - {name: root, volgroup: rootvg, size: 100%FREE, format: {type: ext4}, mount: {path: /}} + - { + ptable: gpt, + path: sda, + preserve: false, + name: '', + grub_device: true + } + - { + volume_group: rootvg, + devices: [sda1] + } + - { + name: root, + volgroup: rootvg, + size: 100%FREE, + format: { + type: ext4 + }, + mount: { + path: / + } + } + identity: hostname: dappnode username: dappnode password: "$6$insecur3$rnEv9Amdjn3ctXxPYOlzj/cwvLT43GjWzkPECIHNqd8Vvza5bMG8QqMwEIBKYqnj609D.4ngi4qlmt29dLE.71" + ssh: install-server: true - allow-pw: true - authorized-keys: [] - user-data: - disable_root: false + # By default, the password is allowed if no authorized keys are provided + packages: +# - chrony - openssh-server - vim - sudo @@ -43,12 +62,11 @@ autoinstall: # - avahi-utils # TODO: Fix # - iptables # TODO: Try timezone: UTC - ntp: - enabled: true + late-commands: - "mkdir -p /target/usr/src/dappnode" - "cp -ar /cdrom/dappnode/* /target/usr/src/dappnode/" - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - - "echo 'touch /usr/src/dappnode/.firstboot' | in-target" -# - "in-target /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" # TODO: Fix + - "echo 'touch /target/usr/src/dappnode/.firstboot'" + - "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE || true" diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh index ba291c46..fc0f35af 100755 --- a/iso/scripts/generate_dappnode_iso_ubuntu.sh +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -56,7 +56,7 @@ cp -r /usr/src/app/dappnode/* ${ISO_BUILD_PATH}/dappnode echo "Adding preseed..." if [[ $UNATTENDED == *"true"* ]]; then - cp /usr/src/app/iso/preseeds//ubuntu/autoinstall_unattended.yaml ${ISO_BUILD_PATH}/autoinstall.yaml + cp /usr/src/app/iso/preseeds/ubuntu/autoinstall_unattended.yaml ${ISO_BUILD_PATH}/autoinstall.yaml else cp /usr/src/app/iso/preseeds/ubuntu/autoinstall.yaml ${ISO_BUILD_PATH}/autoinstall.yaml fi @@ -64,12 +64,14 @@ fi #mkdir -p boot/grub/theme echo "Configuring the boot menu for DappNode..." -cp /usr/src/app/iso/boot/ubuntu/grub.cfg ${ISO_BUILD_PATH}/boot/grub/grub.cfg +cp /usr/src/app/iso/boot/ubuntu/* ${ISO_BUILD_PATH}/boot/grub/ +#cp /usr/src/app/iso/boot/ubuntu/grub.cfg ${ISO_BUILD_PATH}/boot/grub/grub.cfg +#cp /usr/src/app/iso/boot/splash.png ${ISO_BUILD_PATH}/boot/grub/splash.png #cp /usr/src/app/iso/boot/theme_1 boot/grub/theme/1 + #cp /usr/src/app/iso/boot/isolinux.cfg isolinux/isolinux.cfg #cp /usr/src/app/iso/boot/menu.cfg isolinux/menu.cfg #cp /usr/src/app/iso/boot/txt.cfg isolinux/txt.cfg -#cp /usr/src/app/iso/boot/splash.png isolinux/splash.png # TODO: Is this necessary? How to do it? echo "Fix md5 sum..." From c932c1d6b0cb684f088367e875fae8a544df4383 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 24 May 2024 17:09:33 +0200 Subject: [PATCH 07/44] Fix grub theme --- iso/boot/ubuntu/grub.cfg | 46 +++++++++++---------- iso/boot/ubuntu/themes/dappnode/splash.png | Bin 12614 -> 12557 bytes 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/iso/boot/ubuntu/grub.cfg b/iso/boot/ubuntu/grub.cfg index 8f5d56d8..d218af50 100644 --- a/iso/boot/ubuntu/grub.cfg +++ b/iso/boot/ubuntu/grub.cfg @@ -1,27 +1,31 @@ -set timeout=30 +if loadfont unicode ; then + set gfxmode=800x600 + insmod efi_gop + insmod efi_uga + insmod video_bochs + insmod video_cirrus + insmod gfxterm + insmod png + terminal_output gfxterm +fi -loadfont unicode +set timeout=6 -set theme=/boot/grub/themes/dappnode +if background_image /boot/grub/themes/dappnode/splash.png; then + set color_normal=light-gray/black + set color_highlight=white/black +else + set menu_color_normal=cyan/blue + set menu_color_highlight=white/blue +fi -set menu_color_normal=white/black -set menu_color_highlight=black/light-gray +insmod play +play 960 440 1 0 4 440 1 # Plays sound +set theme=/boot/grub/themes/dappnode menuentry "Install Dappnode (over Ubuntu Server)" { - set gfxpayload=keep - linux /casper/vmlinuz autoinstall --- # Added autoinstall to make it unattended + set background_color=black + set gfxpayload=keep # Maintain the graphical resolution through the booting + linux /casper/vmlinuz autoinstall vga=788 FRONTEND_BACKGROUND=dark --- # Added autoinstall to make it unattended initrd /casper/initrd -} -grub_platform -if [ "$grub_platform" = "efi" ]; then -menuentry 'Boot from next volume' { - exit 1 -} -menuentry 'UEFI Firmware Settings' { - fwsetup -} -else -menuentry 'Test memory' { - linux16 /boot/memtest86+x64.bin -} -fi \ No newline at end of file +} \ No newline at end of file diff --git a/iso/boot/ubuntu/themes/dappnode/splash.png b/iso/boot/ubuntu/themes/dappnode/splash.png index a6f4196e77e581d4910a2dc2de08b7293301def2..236fa0346a2345bb7f717229b3df289bbd4f944b 100644 GIT binary patch literal 12557 zcmeHu_ghm-*LFY@Jr+&`rGpY1AOg|}<>*mBnh&CYbU{Q2RZ6HqM5QL!C{k5Q6ifi= zgb+H46d^)rNq|TRkc1FQAnoIM|BUZ?e%P~T&vi{%Gi%LS_dT;y|6^-@{4bfm006-8 zTNXF&006>I0RW-d!-w`ubVg?W?7xnLSlkZ-0FH|P_Ynf*6-ezD3WeP56%9U{BI8arw9K(o57>1r@l2WP(3x;h_nM<_Xpt7HMjSc*JSg(yp4dF-7Qht z3Td2qeiJydjJFhsz-J2VT0NP)`rM~*;xN9iM0Pt(M~op0QJB;V!UWs7ChYKq0N^~p zpZgbYl3$~8Bqw(^oF?wep)CF-qUgmaTfuP05|)8d_0qUG3!PtVs;Uq3(l|(pHr)zl zPL(LY?b9+t-F8t)Es8nB*2@4-^T$0*RYRd+;iGBmu@S2oPAAPH3A&}-R-uxGQr)C8 z+(X5Evzjyq#;{^I9g#mR_7*M z)Y($GYjLft5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=J-%tyRpFe)*OA_o+9^1-yHk%EK2=j*xl_yU6P{i@a+6D`CfKAhOwznO3lmP^X7C zvXNGM*7aa56*;Irqm&g@$j8ZIcVt&)BGuMo>E6oHz2z_DVa$y5Q)U$jIrf?`%pQPH zhQo|bW(xSu^Y~i$22wnMf)(Hh%g*O`X(`Z2`x(HL<0|u0TweSi98*jF From 3fccd344898cf7aee801bb74a3e41cddeb736664 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 24 May 2024 17:22:02 +0200 Subject: [PATCH 08/44] Copy grub theme files to ISO --- iso/scripts/generate_dappnode_iso_ubuntu.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh index fc0f35af..9511d9b2 100755 --- a/iso/scripts/generate_dappnode_iso_ubuntu.sh +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -61,17 +61,8 @@ else cp /usr/src/app/iso/preseeds/ubuntu/autoinstall.yaml ${ISO_BUILD_PATH}/autoinstall.yaml fi -#mkdir -p boot/grub/theme - echo "Configuring the boot menu for DappNode..." -cp /usr/src/app/iso/boot/ubuntu/* ${ISO_BUILD_PATH}/boot/grub/ -#cp /usr/src/app/iso/boot/ubuntu/grub.cfg ${ISO_BUILD_PATH}/boot/grub/grub.cfg -#cp /usr/src/app/iso/boot/splash.png ${ISO_BUILD_PATH}/boot/grub/splash.png -#cp /usr/src/app/iso/boot/theme_1 boot/grub/theme/1 - -#cp /usr/src/app/iso/boot/isolinux.cfg isolinux/isolinux.cfg -#cp /usr/src/app/iso/boot/menu.cfg isolinux/menu.cfg -#cp /usr/src/app/iso/boot/txt.cfg isolinux/txt.cfg +cp -r /usr/src/app/iso/boot/ubuntu/* ${ISO_BUILD_PATH}/boot/grub/ # TODO: Is this necessary? How to do it? echo "Fix md5 sum..." From cd1771b599ce4c124b5e6e7bf3b6218e858e6b88 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 24 May 2024 17:22:14 +0200 Subject: [PATCH 09/44] Fix pkg installation --- iso/preseeds/ubuntu/autoinstall_unattended.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iso/preseeds/ubuntu/autoinstall_unattended.yaml b/iso/preseeds/ubuntu/autoinstall_unattended.yaml index 2c83f7d5..151cb392 100644 --- a/iso/preseeds/ubuntu/autoinstall_unattended.yaml +++ b/iso/preseeds/ubuntu/autoinstall_unattended.yaml @@ -60,13 +60,14 @@ autoinstall: # - firmware-misc-nonfree # TODO: Remove? # - firmware-iwlwifi # TODO: Remove? # - avahi-utils # TODO: Fix -# - iptables # TODO: Try + - iptables # TODO: Try timezone: UTC late-commands: + - "apt update && apt install -y chrony build-essential iw iwd avahi-utils || true" - "mkdir -p /target/usr/src/dappnode" - "cp -ar /cdrom/dappnode/* /target/usr/src/dappnode/" - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "echo 'touch /target/usr/src/dappnode/.firstboot'" - - "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE || true" + - "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE > /target/usr/src/dappnode/scripts/dappnode_install_pre.log || true" From 61bef35cfd4681f9591bd8b9657c2242e201df99 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 27 May 2024 17:24:27 +0200 Subject: [PATCH 10/44] Fix splash image path --- iso/boot/ubuntu/themes/dappnode/theme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iso/boot/ubuntu/themes/dappnode/theme.txt b/iso/boot/ubuntu/themes/dappnode/theme.txt index 91da608c..f096526d 100644 --- a/iso/boot/ubuntu/themes/dappnode/theme.txt +++ b/iso/boot/ubuntu/themes/dappnode/theme.txt @@ -2,7 +2,7 @@ title-color: "white" title-text: "Dappnode Installer" title-font: "Sans Regular 16" desktop-color: "black" -desktop-image: "/boot/grub/splash.png" +desktop-image: "/boot/grub/themes/dappnode/splash.png" message-color: "white" message-bg-color: "black" terminal-font: "Sans Regular 12" From a32852f30a11ebffe4b79ab6afef3ea97bf51184 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 27 May 2024 17:25:13 +0200 Subject: [PATCH 11/44] Remove unnecessary lines in grub conf --- iso/boot/ubuntu/grub.cfg | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/iso/boot/ubuntu/grub.cfg b/iso/boot/ubuntu/grub.cfg index d218af50..88c8305b 100644 --- a/iso/boot/ubuntu/grub.cfg +++ b/iso/boot/ubuntu/grub.cfg @@ -11,21 +11,11 @@ fi set timeout=6 -if background_image /boot/grub/themes/dappnode/splash.png; then - set color_normal=light-gray/black - set color_highlight=white/black -else - set menu_color_normal=cyan/blue - set menu_color_highlight=white/blue -fi - -insmod play -play 960 440 1 0 4 440 1 # Plays sound -set theme=/boot/grub/themes/dappnode +set theme=/boot/grub/themes/dappnode/theme.txt menuentry "Install Dappnode (over Ubuntu Server)" { - set background_color=black - set gfxpayload=keep # Maintain the graphical resolution through the booting - linux /casper/vmlinuz autoinstall vga=788 FRONTEND_BACKGROUND=dark --- # Added autoinstall to make it unattended - initrd /casper/initrd + set background_color=black + set gfxpayload=keep # Maintain the graphical resolution through the booting + linux /casper/vmlinuz autoinstall vga=788 FRONTEND_BACKGROUND=dark --- # Added autoinstall to make it unattended + initrd /casper/initrd } \ No newline at end of file From 0260762f3d9f562e903e1aa201b329b1ef45027f Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 27 May 2024 17:25:31 +0200 Subject: [PATCH 12/44] Updated unattended autoinstall --- .../ubuntu/autoinstall_unattended.yaml | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/iso/preseeds/ubuntu/autoinstall_unattended.yaml b/iso/preseeds/ubuntu/autoinstall_unattended.yaml index 151cb392..8878db0e 100644 --- a/iso/preseeds/ubuntu/autoinstall_unattended.yaml +++ b/iso/preseeds/ubuntu/autoinstall_unattended.yaml @@ -46,28 +46,22 @@ autoinstall: # By default, the password is allowed if no authorized keys are provided packages: -# - chrony - - openssh-server - - vim - - sudo -# - build-essential # TODO: FIX + - openssh-server # TODO: Remove? + - vim # TODO: Remove? + - sudo # TODO: Remove? - linux-generic -# - iw # TODO: FIX -# - iwd - wpasupplicant - intel-microcode - iucode-tool -# - firmware-misc-nonfree # TODO: Remove? -# - firmware-iwlwifi # TODO: Remove? -# - avahi-utils # TODO: Fix - - iptables # TODO: Try + - iptables timezone: UTC late-commands: - - "apt update && apt install -y chrony build-essential iw iwd avahi-utils || true" + - "curtin in-target --target=/target -- apt update && apt install -y chrony build-essential iw iwd avahi-utils" - "mkdir -p /target/usr/src/dappnode" - "cp -ar /cdrom/dappnode/* /target/usr/src/dappnode/" - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - - "echo 'touch /target/usr/src/dappnode/.firstboot'" - - "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE > /target/usr/src/dappnode/scripts/dappnode_install_pre.log || true" + - "touch /target/usr/src/dappnode/.firstboot" + - "curtin in-target --target=/target -- /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" +# TODO: Handle /etc/network/interfaces and /etc/network/devhotplug \ No newline at end of file From c1df29de5876fb5b7fb1c89e8577737fbe31f48b Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 27 May 2024 17:25:52 +0200 Subject: [PATCH 13/44] Fix prerequisites for Ubuntu --- scripts/dappnode_install_pre.sh | 77 ++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 29 deletions(-) diff --git a/scripts/dappnode_install_pre.sh b/scripts/dappnode_install_pre.sh index 2966bb1b..781ea0ff 100755 --- a/scripts/dappnode_install_pre.sh +++ b/scripts/dappnode_install_pre.sh @@ -6,7 +6,6 @@ DAPPNODE_DIR="/usr/src/dappnode" LOGS_DIR="$DAPPNODE_DIR/logs" lsb_dist="$(. /etc/os-release && echo "$ID")" - #!ISOBUILD Do not modify, variables above imported for ISO build detect_installation_type() { @@ -20,7 +19,6 @@ detect_installation_type() { fi } - add_docker_repo() { apt-get update -y apt-get remove -y docker docker-engine docker.io containerd runc | tee -a $LOG_FILE @@ -28,7 +26,7 @@ add_docker_repo() { mkdir -p /etc/apt/keyrings && chmod -R 0755 /etc/apt/keyrings curl -fsSL "https://download.docker.com/linux/${lsb_dist}/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg chmod a+r /etc/apt/keyrings/docker.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$lsb_dist $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$lsb_dist $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list >/dev/null } # DOCKER INSTALLATION @@ -37,10 +35,10 @@ install_docker() { apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin | tee -a $LOG_FILE # Ensure xz is installed - [ -f "/usr/bin/xz" ] || ( apt-get install -y xz-utils) + [ -f "/usr/bin/xz" ] || (apt-get install -y xz-utils) - USER=$(grep 1000 "/etc/passwd" | cut -f 1 -d:) - [ -z "$USER" ] || usermod -aG docker "$USER" + CURRENT_USER=$(grep 1000 "/etc/passwd" | cut -f 1 -d:) + [ -z "$CURRENT_USER" ] || usermod -aG docker "$CURRENT_USER" # Disable check if ISO installation since it is not possible to check in this way if [ "$ISO_INSTALLATION" = "false" ]; then @@ -56,31 +54,31 @@ install_docker() { # DOCKER-COMPOSE FOR LEGACY SCRIPTS, SHOULD BE REMOVED EVENTUALLY alias_docker_compose() { - cat > /usr/local/bin/docker-compose</usr/local/bin/docker-compose </dev/null 2>&1 ; then + if modprobe wireguard >/dev/null 2>&1; then echo -e "\e[32m \n\n Verified wiregurd-dkms installation \n\n \e[0m" 2>&1 | tee -a $LOG_FILE else echo -e "\e[31m \n\n WARNING: wireguard kernel module is not installed, Wireguard DAppNode package might not work! \n\n \e[0m" 2>&1 | tee -a $LOG_FILE fi } -# LSOF INSTALLATION: used to scan host port 80 in use, https package installation will deppend on it +# LSOF INSTALLATION: used to scan host port 80 in use, https package installation will deppend on it install_lsof() { apt-get update -y apt-get install lsof -y | tee -a $LOG_FILE - if lsof -v >/dev/null 2>&1 ; then + if lsof -v >/dev/null 2>&1; then echo -e "\e[32m \n\n Verified lsof installation \n\n \e[0m" 2>&1 | tee -a $LOG_FILE else echo -e "\e[31m \n\n WARNING: lsof not installed, HTTPS DAppNode package might not be installed! \n\n \e[0m" 2>&1 | tee -a $LOG_FILE @@ -88,10 +86,10 @@ install_lsof() { } # IPTABLES INSTALLATION: mandatory for docker, on bullseye is not installed by default -install_iptables () { +install_iptables() { apt-get update -y apt-get install iptables -y | tee -a $LOG_FILE - if iptables -v >/dev/null 2>&1 ; then + if iptables -v >/dev/null 2>&1; then echo -e "\e[32m \n\n Verified iptables installation \n\n \e[0m" 2>&1 | tee -a $LOG_FILE else echo -e "\e[31m \n\n WARNING: iptables not installed, Docker may not work! \n\n \e[0m" 2>&1 | tee -a $LOG_FILE @@ -99,11 +97,39 @@ install_iptables () { } # HOST UPDATE -host_update () { +host_update() { apt-get update 2>&1 | tee -a $LOG_FILE apt-get -y upgrade 2>&1 | tee -a $LOG_FILE } +check_ubuntu_connectivity() { + { netplan get | grep "dhcp4: true" &>/dev/null; } || { + echo "Interfaces not found" + exit 1 + } +} + +check_debian_connectivity() { + { [ -f /etc/network/interfaces ] && grep "iface en.* inet dhcp" /etc/network/interfaces &>/dev/null; } || { + echo "Interfaces not found" + exit 1 + } +} + +add_debian_missing_interfaces() { + # shellcheck disable=SC2013 + for IFACE in $(grep "en.*" /usr/src/dappnode/hotplug); do + # shellcheck disable=SC2143 + if [[ $(grep -L "$IFACE" /etc/network/interfaces) ]]; then + { + echo "# $IFACE" + echo "allow-hotplug $IFACE" + echo "iface $IFACE inet dhcp" + } >>/etc/network/interfaces + fi + done +} + ############################################## #### SCRIPT START #### ############################################## @@ -122,8 +148,7 @@ if [ "$1" == "UPDATE" ]; then host_update 2>&1 | tee -a $LOG_FILE fi - -if find /etc/apt/ -name "*.list" -print0 | xargs --null cat | grep -q "https://download.docker.com/linux/$lsb_dist" ; then +if find /etc/apt/ -name "*.list" -print0 | xargs --null cat | grep -q "https://download.docker.com/linux/$lsb_dist"; then echo -e "\e[32m \n\n docker repo is already added \n\n \e[0m" 2>&1 | tee -a $LOG_FILE else add_docker_repo | tee -a $LOG_FILE @@ -144,7 +169,7 @@ else fi # Only install wireguard-dkms if needed -if modprobe wireguard >/dev/null 2>&1 ; then +if modprobe wireguard >/dev/null 2>&1; then echo -e "\e[32m \n\n wireguard-dkms is already installed \n\n \e[0m" 2>&1 | tee -a $LOG_FILE else install_wireguard_dkms 2>&1 | tee -a $LOG_FILE @@ -157,16 +182,10 @@ else install_lsof 2>&1 | tee -a $LOG_FILE fi -#Check connectivity -{ [ -f /etc/network/interfaces ] && grep "iface en.* inet dhcp" /etc/network/interfaces &>/dev/null; } || { echo "Interfaces not found"; exit 1; } - -## Add missing interfaces -if [ -f /usr/src/dappnode/hotplug ]; then - # shellcheck disable=SC2013 - for IFACE in $(grep "en.*" /usr/src/dappnode/hotplug); do - # shellcheck disable=SC2143 - if [[ $(grep -L "$IFACE" /etc/network/interfaces) ]]; then - { echo "# $IFACE"; echo "allow-hotplug $IFACE"; echo "iface $IFACE inet dhcp"; } >> /etc/network/interfaces - fi - done +## Add or Update Network Configuration Based on OS +if [ "$lsb_dist" = "ubuntu" ]; then + check_ubuntu_connectivity +else + check_debian_connectivity + add_debian_missing_interfaces fi From c01145eaf6d2e50f8dd544b79dd6e762a0ea8f50 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 28 May 2024 10:14:37 +0200 Subject: [PATCH 14/44] Update docker install based on docs --- scripts/dappnode_install_pre.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/dappnode_install_pre.sh b/scripts/dappnode_install_pre.sh index 781ea0ff..be116225 100755 --- a/scripts/dappnode_install_pre.sh +++ b/scripts/dappnode_install_pre.sh @@ -22,11 +22,19 @@ detect_installation_type() { add_docker_repo() { apt-get update -y apt-get remove -y docker docker-engine docker.io containerd runc | tee -a $LOG_FILE - apt-get install -y ca-certificates curl gnupg lsb-release | tee -a $LOG_FILE - mkdir -p /etc/apt/keyrings && chmod -R 0755 /etc/apt/keyrings - curl -fsSL "https://download.docker.com/linux/${lsb_dist}/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg + + # Add Docker GPG key + apt-get install -y ca-certificates curl lsb-release | tee -a $LOG_FILE + install -m 0755 -d /etc/apt/keyrings + curl -fsSL "https://download.docker.com/linux/${lsb_dist}/gpg" -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$lsb_dist $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list >/dev/null + + # Add the repository to APT sources + echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/$lsb_dist $(lsb_release -cs) stable" | + tee /etc/apt/sources.list.d/docker.list >/dev/null + + apt-get update -y } # DOCKER INSTALLATION From e22c0b2c81451809fa3d9d10ad0ef9929ccc1cab Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 28 May 2024 17:10:39 +0200 Subject: [PATCH 15/44] Remove unnecessary packages --- iso/preseeds/ubuntu/autoinstall_unattended.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/iso/preseeds/ubuntu/autoinstall_unattended.yaml b/iso/preseeds/ubuntu/autoinstall_unattended.yaml index 8878db0e..a630fd30 100644 --- a/iso/preseeds/ubuntu/autoinstall_unattended.yaml +++ b/iso/preseeds/ubuntu/autoinstall_unattended.yaml @@ -46,9 +46,6 @@ autoinstall: # By default, the password is allowed if no authorized keys are provided packages: - - openssh-server # TODO: Remove? - - vim # TODO: Remove? - - sudo # TODO: Remove? - linux-generic - wpasupplicant - intel-microcode @@ -63,5 +60,6 @@ autoinstall: - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "touch /target/usr/src/dappnode/.firstboot" + - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites - "curtin in-target --target=/target -- /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" # TODO: Handle /etc/network/interfaces and /etc/network/devhotplug \ No newline at end of file From 55b72a722adb429f3ce4490b151a29201d6edbeb Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 28 May 2024 17:14:21 +0200 Subject: [PATCH 16/44] Update autoinstall attended --- iso/preseeds/ubuntu/autoinstall.yaml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml index 047f250f..b91f4602 100644 --- a/iso/preseeds/ubuntu/autoinstall.yaml +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -13,28 +13,21 @@ autoinstall: install-server: true packages: -# - chrony - - openssh-server - - vim - - sudo -# - iw # TODO: FIX -# - iwd + - linux-generic - wpasupplicant - intel-microcode -# - build-essential # TODO: FIX - - linux-generic -# - firmware-iwlwifi -# - avahi-utils # TODO: Fix -# - iptables # TODO: Try - apt: - fallback: continue-anyway + - iucode-tool + - iptables late-commands: + - "curtin in-target --target=/target -- apt update && apt install -y chrony build-essential iw iwd avahi-utils" - "mkdir -p /target/usr/src/dappnode" - "cp -ar /cdrom/dappnode/* /target/usr/src/dappnode/" - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - - "chmod +x /target/usr/src/dappnode/scripts/static_ip.sh" - - "sh -c 'gpasswd -a $(getent passwd 1000 | cut -d: -f1) sudo' " + - "touch /target/usr/src/dappnode/.firstboot" +# - "cp -ar /etc/netplan/* /target/etc/netplan/" # TODO: Is this necessary? +# - "chmod +x /target/usr/src/dappnode/scripts/static_ip.sh" # TODO: Remove if not necessary to validate IP +# - "sh -c 'gpasswd -a $(getent passwd 1000 | cut -d: -f1) sudo' " # TODO: Check if dappnode user needs to be manually added to sudoers # - "/target/usr/src/dappnode/scripts/static_ip.sh" - "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" From df4605b5e4049592815b121562421603554efc91 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 28 May 2024 17:14:39 +0200 Subject: [PATCH 17/44] Install buildx --- scripts/dappnode_install_pre.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/dappnode_install_pre.sh b/scripts/dappnode_install_pre.sh index be116225..307c2f61 100755 --- a/scripts/dappnode_install_pre.sh +++ b/scripts/dappnode_install_pre.sh @@ -40,13 +40,14 @@ add_docker_repo() { # DOCKER INSTALLATION install_docker() { apt-get update -y - apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin | tee -a $LOG_FILE + apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | tee -a $LOG_FILE # Ensure xz is installed [ -f "/usr/bin/xz" ] || (apt-get install -y xz-utils) - CURRENT_USER=$(grep 1000 "/etc/passwd" | cut -f 1 -d:) - [ -z "$CURRENT_USER" ] || usermod -aG docker "$CURRENT_USER" + # Not working in Ubuntu ISO because the user is not created before executing late-commands + USER=$(grep 1000 "/etc/passwd" | cut -f 1 -d:) + [ -z "$USER" ] || usermod -aG docker "$USER" # Disable check if ISO installation since it is not possible to check in this way if [ "$ISO_INSTALLATION" = "false" ]; then From c3aa01c403f0bf7da2ad23a1ddc437acb6272026 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 28 May 2024 17:15:11 +0200 Subject: [PATCH 18/44] Handle dappnode install for Ubuntu --- scripts/dappnode_install.sh | 89 +++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 9 deletions(-) diff --git a/scripts/dappnode_install.sh b/scripts/dappnode_install.sh index 331a252f..11a95194 100755 --- a/scripts/dappnode_install.sh +++ b/scripts/dappnode_install.sh @@ -11,6 +11,7 @@ LOGS_DIR="$DAPPNODE_DIR/logs" CONTENT_HASH_FILE="${DAPPNODE_CORE_DIR}/packages-content-hash.csv" LOGFILE="${LOGS_DIR}/dappnode_install.log" MOTD_FILE="/etc/motd" +UPDATE_MOTD_DIR="/etc/update-motd.d" DAPPNODE_PROFILE="${DAPPNODE_CORE_DIR}/.dappnode_profile" # Get URLs PROFILE_BRANCH=${PROFILE_BRANCH:-"master"} @@ -186,16 +187,59 @@ dappnode_core_load() { } customMotd() { - if [ -f ${MOTD_FILE} ]; then - cat <${MOTD_FILE} - ___ _ _ _ _ -| \ /_\ _ __ _ __| \| |___ __| |___ -| |) / _ \| '_ \ '_ \ . / _ \/ _ / -_) -|___/_/ \_\ .__/ .__/_|\_\___/\__,_\___| - |_| |_| + + generateMotdText + + if [ -d "${UPDATE_MOTD_DIR}" ]; then + # Ubuntu configuration + generateMotdScript + fi +} + +# Debian distros use /etc/motd plain text file +generateMotdText() { + # Check and create the MOTD file if it does not exist + if [ ! -f "${MOTD_FILE}" ]; then + touch "${MOTD_FILE}" + fi + + # Write the ASCII art and welcome message as plain text + cat <<'EOF' >"${MOTD_FILE}" + ___ _ + | \ __ _ _ __ _ __ _ _ ___ __| |___ + | |) / _` | '_ \ '_ \ ' \/ _ \/ _` / -_) + |___/\__,_| .__/ .__/_||_\___/\__,_\___| + |_| |_| EOF - echo -e "$WELCOME_MESSAGE" >>"$MOTD_FILE" + echo -e "$WELCOME_MESSAGE" >>"${MOTD_FILE}" +} + +# Ubuntu distros use /etc/update-motd.d/ to generate the motd +generateMotdScript() { + + motd_script_file="${UPDATE_MOTD_DIR}/60-dappnode-info" + disabled_motd_dir="/etc/update-motd.d/disabled" + + mkdir -p "${disabled_motd_dir}" + + # Move all the files in /etc/update-motd.d/ to /etc/update-motd.d/disabled/ + # Except for the files listed in "files_to_keep" + files_to_keep="00-header 50-landscape-sysinfo 90-updates-available 98-reboot-required" + for file in ${UPDATE_MOTD_DIR}/*; do + base_file=$(basename "${file}") + if [ -f "${file}" ] && ! echo "${files_to_keep}" | grep -qw "${base_file}"; then + mv "${file}" "${disabled_motd_dir}/" + fi + done + + if [ ! -f "${motd_script_file}" ]; then + touch "${motd_script_file}" fi + + chmod +x "${motd_script_file}" + + sh -c 'echo "#!/bin/sh" > ${motd_script_file}' + echo "cat ${MOTD_FILE}" >>"${motd_script_file}" } addSwap() { @@ -290,6 +334,30 @@ installExtraDpkg() { fi } +# The main user needs to be added to the docker group to be able to run docker commands without sudo +# Explained in: https://docs.docker.com/engine/install/linux-postinstall/ +addUserToDockerGroup() { + # UID is provided to the first regular user created in the system + USER=$(grep 1000 "/etc/passwd" | cut -f 1 -d:) + + # If USER is not found, warn the user and return + if [ -z "$USER" ]; then + echo -e "\e[33mWARN: Default user not found. Could not add it to the docker group.\e[0m" 2>&1 | tee -a $LOGFILE + return + fi + + if groups "$USER" | grep &>/dev/null '\bdocker\b'; then + echo -e "\e[32mUser $USER is already in the docker group\e[0m" 2>&1 | tee -a $LOGFILE + return + fi + + # This step is already done in the dappnode_install_pre.sh script, + # but it's not working in the Ubuntu ISO because the late-commands in the autoinstall.yaml + # file are executed before the user is created. + usermod -aG docker "$USER" + echo -e "\e[32mUser $USER added to the docker group\e[0m" 2>&1 | tee -a $LOGFILE +} + ############################################## #### SCRIPT START #### ############################################## @@ -315,9 +383,12 @@ if [ "$ARCH" == "amd64" ]; then installSgx echo -e "\e[32mInstalling extra packages...\e[0m" 2>&1 | tee -a $LOGFILE - installExtraDpkg + installExtraDpkg # TODO: Why is this being called twice? fi +echo -e "\e[32mAdding user to docker group...\e[0m" 2>&1 | tee -a $LOGFILE +addUserToDockerGroup + echo -e "\e[32mCreating dncore_network if needed...\e[0m" 2>&1 | tee -a $LOGFILE docker network create --driver bridge --subnet 172.33.0.0/16 dncore_network 2>&1 | tee -a $LOGFILE From 0cc43a340250f3b4226bee18cfd5e11480d40086 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Wed, 29 May 2024 10:00:51 +0200 Subject: [PATCH 19/44] Fix motd generator script --- scripts/dappnode_install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/dappnode_install.sh b/scripts/dappnode_install.sh index 11a95194..afb72fba 100755 --- a/scripts/dappnode_install.sh +++ b/scripts/dappnode_install.sh @@ -218,13 +218,13 @@ EOF generateMotdScript() { motd_script_file="${UPDATE_MOTD_DIR}/60-dappnode-info" - disabled_motd_dir="/etc/update-motd.d/disabled" + disabled_motd_dir="${UPDATE_MOTD_DIR}/disabled" mkdir -p "${disabled_motd_dir}" # Move all the files in /etc/update-motd.d/ to /etc/update-motd.d/disabled/ # Except for the files listed in "files_to_keep" - files_to_keep="00-header 50-landscape-sysinfo 90-updates-available 98-reboot-required" + files_to_keep="00-header 50-landscape-sysinfo 98-reboot-required" for file in ${UPDATE_MOTD_DIR}/*; do base_file=$(basename "${file}") if [ -f "${file}" ] && ! echo "${files_to_keep}" | grep -qw "${base_file}"; then @@ -238,8 +238,8 @@ generateMotdScript() { chmod +x "${motd_script_file}" - sh -c 'echo "#!/bin/sh" > ${motd_script_file}' - echo "cat ${MOTD_FILE}" >>"${motd_script_file}" + echo "#!/bin/sh" >${motd_script_file} + echo "cat ${MOTD_FILE}" >>${motd_script_file} } addSwap() { From c4a02031f06a19b2fd6f540fabebfae42fec0be4 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Wed, 29 May 2024 10:02:43 +0200 Subject: [PATCH 20/44] Keep debian grub theme --- iso/boot/theme_1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iso/boot/theme_1 b/iso/boot/theme_1 index 5edcb52a..aa9ae5e4 100644 --- a/iso/boot/theme_1 +++ b/iso/boot/theme_1 @@ -2,7 +2,7 @@ title-color: "white" title-text: "DAppNode Installer" title-font: "Sans Regular 16" desktop-color: "black" -desktop-image: "/boot/grub/splash.png" +desktop-image: "/isolinux/splash.png" message-color: "white" message-bg-color: "black" terminal-font: "Sans Regular 12" From ff6c65008fbe4ca75fce1925f121113d6499f056 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Wed, 29 May 2024 10:17:58 +0200 Subject: [PATCH 21/44] Set default values --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f8f22108..ed9ebe02 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,9 +6,9 @@ services: privileged: true environment: - BUILD=false # In case you want to re-generate a all the images, not recommended - - CLEAN=false # it remove the images directory - - UNATTENDED=true # UNATTENDED version - - BASE_OS=ubuntu # Base OS version (debian or ubuntu) + - CLEAN=true # it remove the images directory + - UNATTENDED=false # UNATTENDED version + - BASE_OS=debian # Base OS version (debian or ubuntu) volumes: - ./images:/images - "/var/run/docker.sock:/var/run/docker.sock" From ca0d9fd9497de1a4ac8edb653a327512b0879192 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Wed, 29 May 2024 11:56:37 +0200 Subject: [PATCH 22/44] Remove motd script creation --- scripts/dappnode_install.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/scripts/dappnode_install.sh b/scripts/dappnode_install.sh index afb72fba..b25c7bf5 100755 --- a/scripts/dappnode_install.sh +++ b/scripts/dappnode_install.sh @@ -192,7 +192,7 @@ customMotd() { if [ -d "${UPDATE_MOTD_DIR}" ]; then # Ubuntu configuration - generateMotdScript + modifyMotdGeneration fi } @@ -215,9 +215,7 @@ EOF } # Ubuntu distros use /etc/update-motd.d/ to generate the motd -generateMotdScript() { - - motd_script_file="${UPDATE_MOTD_DIR}/60-dappnode-info" +modifyMotdGeneration() { disabled_motd_dir="${UPDATE_MOTD_DIR}/disabled" mkdir -p "${disabled_motd_dir}" @@ -231,15 +229,6 @@ generateMotdScript() { mv "${file}" "${disabled_motd_dir}/" fi done - - if [ ! -f "${motd_script_file}" ]; then - touch "${motd_script_file}" - fi - - chmod +x "${motd_script_file}" - - echo "#!/bin/sh" >${motd_script_file} - echo "cat ${MOTD_FILE}" >>${motd_script_file} } addSwap() { From 45014a78479d336db3f71478ef4cff78b810c221 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Thu, 30 May 2024 17:48:59 +0200 Subject: [PATCH 23/44] Use common functions for Debian ISO generation --- iso/scripts/common_functions.sh | 61 +++++++ iso/scripts/generate_dappnode_iso_debian.sh | 178 +++++++++++--------- 2 files changed, 159 insertions(+), 80 deletions(-) create mode 100644 iso/scripts/common_functions.sh diff --git a/iso/scripts/common_functions.sh b/iso/scripts/common_functions.sh new file mode 100644 index 00000000..8b79324b --- /dev/null +++ b/iso/scripts/common_functions.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +download_iso() { + local iso_path=$1 + local iso_name=$2 + local iso_url=$3 + + echo "[INFO] Downloading ISO image: ${iso_name}..." + if [ ! -f "${iso_path}" ]; then + wget "${iso_url}" -O "${iso_path}" + fi + echo "[INFO] Download complete!" +} + +verify_download() { + local iso_path=$1 + local expected_shasum=$2 + + echo "[INFO] Verifying download..." + local calculated_shasum=$(shasum -a 256 "${iso_path}" | awk '{ print $1 }') + if [ "${calculated_shasum}" != "${expected_shasum}" ]; then + echo "[ERROR] Wrong shasum" + exit 1 + fi + echo "[INFO] Verification complete!" +} + +clean_old_files() { + local iso_extraction_dir=$1 + local base_iso_prefix=$2 + + echo "[INFO] Cleaning old files..." + rm -rf "${iso_extraction_dir}º" + rm -rf "${base_iso_prefix}*" +} + +extract_iso() { + local iso_path=$1 + local extraction_target_dir=$2 + + echo "[INFO] Extracting the ISO..." + osirrox -indev "${iso_path}" -extract / "${extraction_target_dir}" +} + +# Using a 512-byte block size to ensure the entire Master Boot Record (MBR) is captured. +# The MBR contains boot code, the partition table, and a boot signature, all essential for creating bootable media. +# This ensures that the new ISO being created is bootable under different system setups +prepare_boot_process() { + local iso_path=$1 + local mbr_output_path=$2 + local block_size=512 + + echo "[INFO] Obtaining the MBR for hybrid ISO..." + dd if="${iso_path}" bs=${block_size} count=1 of="${mbr_output_path}" +} + +handle_checksums() { + echo "Fix md5 sum..." + # shellcheck disable=SC2046 + md5sum $(find ! -name "md5sum.txt" ! -path "./isolinux/*" -type f) >md5sum.txt +} diff --git a/iso/scripts/generate_dappnode_iso_debian.sh b/iso/scripts/generate_dappnode_iso_debian.sh index 3b655176..109cd359 100755 --- a/iso/scripts/generate_dappnode_iso_debian.sh +++ b/iso/scripts/generate_dappnode_iso_debian.sh @@ -1,86 +1,104 @@ #!/bin/bash set -e +source /usr/src/app/iso/scripts/common_functions.sh + # Source = https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso -ISO_NAME=debian-12.5.0-amd64-netinst.iso -ISO_PATH="/images/${ISO_NAME}" -ISO_URL=https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/ -SHASUM="013f5b44670d81280b5b1bc02455842b250df2f0c6763398feb69af1a805a14f ${ISO_PATH}" - -echo "Downloading debian ISO image: ${ISO_NAME}..." -if [ ! -f ${ISO_PATH} ]; then - wget ${ISO_URL}/${ISO_NAME} \ - -O ${ISO_PATH} -fi -echo "Done!" - -echo "Verifying download..." -[[ "$(shasum -a 256 ${ISO_PATH})" != "$SHASUM" ]] && { - echo "ERROR: wrong shasum" - exit 1 +BASE_ISO_NAME="debian-12.5.0-amd64-netinst.iso" +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" + +WORKDIR="/usr/src/app" +ISO_BUILD_PATH="${WORKDIR}/dappnode-iso" +DAPPNODE_ISO_PREFIX="Dappnode-" +DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}" + +download_third_party_packages() { + echo "[INFO] Downloading third-party packages..." + sed '1,/^\#\!ISOBUILD/!d' ${WORKDIR}/scripts/dappnode_install_pre.sh >/tmp/vars.sh + # shellcheck disable=SC1091 + source /tmp/vars.sh +} + +add_dappnode_files() { + echo "[INFO] Creating necessary directories and copying files..." + mkdir -p ${ISO_BUILD_PATH}/dappnode + cp -r ${WORKDIR}/scripts ${ISO_BUILD_PATH}/dappnode + cp -r ${WORKDIR}/dappnode/* ${ISO_BUILD_PATH}/dappnode +} + +customize_debian_preseed() { + echo "[INFO] Customizing preseed..." + + local tmp_initrd="/tmp/makeinitrd" + local install_dir="${ISO_BUILD_PATH}/install.amd" + local preseeds_dir="${WORKDIR}/iso/preseeds" + + rm -rf "${tmp_initrd}" + mkdir -p "${tmp_initrd}" + + local preseed_name="preseed.cfg" + [[ $UNATTENDED == *"true"* ]] && preseed_name="preseed_unattended.cfg" + + local preseed_file="${preseeds_dir}/${preseed_name}" + + if [ ! -f "${preseed_file}" ]; then + echo "[ERROR] Preseed file not found: ${preseed_file}" + exit 1 + fi + + # Extract the initrd into a temporary directory + gunzip -c "${install_dir}/initrd.gz" | cpio -idum -D "${tmp_initrd}" || { + echo "[ERROR] Could not decompress and extract initrd" + exit 1 + } + + # Add the preseed file to the initrd + cp "${preseed_file}" "${tmp_initrd}/preseed.cfg" || { + echo "[ERROR] Could not copy preseed file" + exit 1 + } + + # Recreate (and recompress) the initrd + (cd "${tmp_initrd}" && find . -print0 | cpio -0 -ov -H newc | gzip >"${install_dir}/initrd.gz") || { + echo "[ERROR] Could not create new initrd" + exit 1 + } + + echo "[INFO] Preseed customization complete." +} + +configure_boot_menu() { + local boot_dir="${WORKDIR}/iso/boot" + + echo "[INFO] Configuring the boot menu for Dappnode..." + cp ${boot_dir}/grub.cfg ${ISO_BUILD_PATH}/boot/grub/grub.cfg + cp ${boot_dir}/theme_1 ${ISO_BUILD_PATH}/boot/grub/theme/1 + cp ${boot_dir}/isolinux.cfg ${ISO_BUILD_PATH}/isolinux/isolinux.cfg + cp ${boot_dir}/menu.cfg ${ISO_BUILD_PATH}/isolinux/menu.cfg + cp ${boot_dir}/txt.cfg ${ISO_BUILD_PATH}/isolinux/txt.cfg + cp ${boot_dir}/splash.png ${ISO_BUILD_PATH}/isolinux/splash.png +} + +generate_debian_iso() { + + echo "[INFO] Generating new ISO..." + + xorriso -as mkisofs -isohybrid-mbr ${ISO_BUILD_PATH}/isolinux/isohdpfx.bin \ + -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} } -echo "Clean old files..." -rm -rf dappnode-isoº -rm -rf DappNode-debian-* - -echo "Extracting the iso..." -osirrox -indev /images/${ISO_NAME} -extract / dappnode-iso - -# Using a 512-byte block size to ensure the entire Master Boot Record (MBR) is captured. -# The MBR contains boot code, the partition table, and a boot signature, all essential for creating bootable media. -# This ensures that the new ISO being created is bootable under different system setups -echo "Obtaining the isohdpfx.bin for hybrid ISO..." -dd if=/images/${ISO_NAME} bs=512 count=1 of=dappnode-iso/isolinux/isohdpfx.bin - -cd /usr/src/app/dappnode-iso # /usr/src/app/dappnode-iso - -echo "Downloading third-party packages..." -sed '1,/^\#\!ISOBUILD/!d' /usr/src/app/scripts/dappnode_install_pre.sh >/tmp/vars.sh -# shellcheck disable=SC1091 -source /tmp/vars.sh - -echo "Creating necessary directories and copying files..." -mkdir -p /usr/src/app/dappnode-iso/dappnode -cp -r /usr/src/app/scripts /usr/src/app/dappnode-iso/dappnode -cp -r /usr/src/app/dappnode/* /usr/src/app/dappnode-iso/dappnode - -echo "Customizing preseed..." -mkdir -p /tmp/makeinitrd -cd install.amd -cp initrd.gz /tmp/makeinitrd/ -if [[ $UNATTENDED == *"true"* ]]; then - cp /usr/src/app/iso/preseeds/preseed_unattended.cfg /tmp/makeinitrd/preseed.cfg -else - cp /usr/src/app/iso/preseeds/preseed.cfg /tmp/makeinitrd/preseed.cfg -fi -cd /tmp/makeinitrd -gunzip initrd.gz -cpio -id -H newc /tmp/list -echo "preseed.cfg" >>/tmp/list -rm initrd -cpio -o -H newc initrd -gzip initrd -cd - -mv /tmp/makeinitrd/initrd.gz ./initrd.gz -cd .. - -echo "Configuring the boot menu for DappNode..." -cp /usr/src/app/iso/boot/grub.cfg boot/grub/grub.cfg -cp /usr/src/app/iso/boot/theme_1 boot/grub/theme/1 -cp /usr/src/app/iso/boot/isolinux.cfg isolinux/isolinux.cfg -cp /usr/src/app/iso/boot/menu.cfg isolinux/menu.cfg -cp /usr/src/app/iso/boot/txt.cfg isolinux/txt.cfg -cp /usr/src/app/iso/boot/splash.png isolinux/splash.png - -echo "Fix md5 sum..." -# shellcheck disable=SC2046 -md5sum $(find ! -name "md5sum.txt" ! -path "./isolinux/*" -type f) >md5sum.txt - -echo "Generating new iso..." -xorriso -as mkisofs -isohybrid-mbr isolinux/isohdpfx.bin \ - -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-debian-bookworm-amd64.iso . +download_iso "${BASE_ISO_PATH}" "${BASE_ISO_NAME}" "${BASE_ISO_URL}" +verify_download "${BASE_ISO_PATH}" "${BASE_ISO_SHASUM}" +clean_old_files "${ISO_BUILD_PATH}" "${DAPPNODE_ISO_PREFIX}" +extract_iso "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}" +prepare_boot_process "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}/isolinux/isohdpfx.bin" +download_third_party_packages +add_dappnode_files +customize_debian_preseed +configure_boot_menu +handle_checksums # TODO: Check if it fits both ubuntu and debian +generate_debian_iso From 7a6a07b501dbea20f8a61fbccbd58e68c21d76b9 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 31 May 2024 13:38:21 +0200 Subject: [PATCH 24/44] Fix common generation --- ..._functions.sh => common_iso_generation.sh} | 32 ++++- iso/scripts/generate_dappnode_iso_debian.sh | 58 ++++----- iso/scripts/generate_dappnode_iso_ubuntu.sh | 118 +++++++++--------- 3 files changed, 107 insertions(+), 101 deletions(-) rename iso/scripts/{common_functions.sh => common_iso_generation.sh} (61%) diff --git a/iso/scripts/common_functions.sh b/iso/scripts/common_iso_generation.sh similarity index 61% rename from iso/scripts/common_functions.sh rename to iso/scripts/common_iso_generation.sh index 8b79324b..501e563c 100644 --- a/iso/scripts/common_functions.sh +++ b/iso/scripts/common_iso_generation.sh @@ -1,11 +1,26 @@ #!/bin/bash +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 + local workdir=$2 + + echo "[INFO] Creating necessary directories and copying files..." + mkdir -p ${iso_build_path}/dappnode + cp -r ${workdir}/scripts ${iso_build_path}/dappnode + cp -r ${workdir}/dappnode/* ${iso_build_path}/dappnode +} + download_iso() { local iso_path=$1 local iso_name=$2 local iso_url=$3 - echo "[INFO] Downloading ISO image: ${iso_name}..." + echo "[INFO] Downloading base ISO image: ${iso_name}..." if [ ! -f "${iso_path}" ]; then wget "${iso_url}" -O "${iso_path}" fi @@ -17,11 +32,10 @@ verify_download() { local expected_shasum=$2 echo "[INFO] Verifying download..." - local calculated_shasum=$(shasum -a 256 "${iso_path}" | awk '{ print $1 }') - if [ "${calculated_shasum}" != "${expected_shasum}" ]; then - echo "[ERROR] Wrong shasum" + [[ "$(shasum -a 256 ${iso_path})" != "$expected_shasum" ]] && { + echo "[ERROR] Wrong shasum for ${iso_path}" exit 1 - fi + } echo "[INFO] Verification complete!" } @@ -54,6 +68,14 @@ prepare_boot_process() { dd if="${iso_path}" bs=${block_size} count=1 of="${mbr_output_path}" } +download_third_party_packages() { + echo "[INFO] Downloading third-party packages..." + sed '1,/^\#\!ISOBUILD/!d' ${WORKDIR}/scripts/dappnode_install_pre.sh >/tmp/vars.sh + # shellcheck disable=SC1091 + source /tmp/vars.sh +} + +# TODO: Is this ok for Ubuntu? handle_checksums() { echo "Fix md5 sum..." # shellcheck disable=SC2046 diff --git a/iso/scripts/generate_dappnode_iso_debian.sh b/iso/scripts/generate_dappnode_iso_debian.sh index 109cd359..03ef8b5a 100755 --- a/iso/scripts/generate_dappnode_iso_debian.sh +++ b/iso/scripts/generate_dappnode_iso_debian.sh @@ -1,39 +1,23 @@ #!/bin/bash set -e -source /usr/src/app/iso/scripts/common_functions.sh +source /usr/src/app/iso/scripts/common_iso_generation.sh # Source = https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso BASE_ISO_NAME="debian-12.5.0-amd64-netinst.iso" 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" - -WORKDIR="/usr/src/app" -ISO_BUILD_PATH="${WORKDIR}/dappnode-iso" -DAPPNODE_ISO_PREFIX="Dappnode-" -DAPPNODE_ISO_NAME="${DAPPNODE_ISO_PREFIX}${BASE_ISO_NAME}" - -download_third_party_packages() { - echo "[INFO] Downloading third-party packages..." - sed '1,/^\#\!ISOBUILD/!d' ${WORKDIR}/scripts/dappnode_install_pre.sh >/tmp/vars.sh - # shellcheck disable=SC1091 - source /tmp/vars.sh -} - -add_dappnode_files() { - echo "[INFO] Creating necessary directories and copying files..." - mkdir -p ${ISO_BUILD_PATH}/dappnode - cp -r ${WORKDIR}/scripts ${ISO_BUILD_PATH}/dappnode - cp -r ${WORKDIR}/dappnode/* ${ISO_BUILD_PATH}/dappnode -} +BASE_ISO_SHASUM="013f5b44670d81280b5b1bc02455842b250df2f0c6763398feb69af1a805a14f ${BASE_ISO_PATH}" customize_debian_preseed() { + local iso_build_path=$1 + local workdir=$2 + echo "[INFO] Customizing preseed..." local tmp_initrd="/tmp/makeinitrd" - local install_dir="${ISO_BUILD_PATH}/install.amd" - local preseeds_dir="${WORKDIR}/iso/preseeds" + local install_dir="${iso_build_path}/install.amd" + local preseeds_dir="${workdir}/iso/preseeds" rm -rf "${tmp_initrd}" mkdir -p "${tmp_initrd}" @@ -70,18 +54,24 @@ customize_debian_preseed() { } configure_boot_menu() { - local boot_dir="${WORKDIR}/iso/boot" + local iso_build_path=$1 + local workdir=$2 + + local boot_dir="${workdir}/iso/boot" echo "[INFO] Configuring the boot menu for Dappnode..." - cp ${boot_dir}/grub.cfg ${ISO_BUILD_PATH}/boot/grub/grub.cfg - cp ${boot_dir}/theme_1 ${ISO_BUILD_PATH}/boot/grub/theme/1 - cp ${boot_dir}/isolinux.cfg ${ISO_BUILD_PATH}/isolinux/isolinux.cfg - cp ${boot_dir}/menu.cfg ${ISO_BUILD_PATH}/isolinux/menu.cfg - cp ${boot_dir}/txt.cfg ${ISO_BUILD_PATH}/isolinux/txt.cfg - cp ${boot_dir}/splash.png ${ISO_BUILD_PATH}/isolinux/splash.png + cp ${boot_dir}/grub.cfg ${iso_build_path}/boot/grub/grub.cfg + cp ${boot_dir}/theme_1 ${iso_build_path}/boot/grub/theme/1 + cp ${boot_dir}/isolinux.cfg ${iso_build_path}/isolinux/isolinux.cfg + cp ${boot_dir}/menu.cfg ${iso_build_path}/isolinux/menu.cfg + cp ${boot_dir}/txt.cfg ${iso_build_path}/isolinux/txt.cfg + cp ${boot_dir}/splash.png ${iso_build_path}/isolinux/splash.png } generate_debian_iso() { + local mbr_path=$1 + local iso_output_path=$2 + local iso_build_path=$3 echo "[INFO] Generating new ISO..." @@ -97,8 +87,8 @@ clean_old_files "${ISO_BUILD_PATH}" "${DAPPNODE_ISO_PREFIX}" extract_iso "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}" prepare_boot_process "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}/isolinux/isohdpfx.bin" download_third_party_packages -add_dappnode_files -customize_debian_preseed -configure_boot_menu +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 +generate_debian_iso "${ISO_BUILD_PATH}/isolinux/isohdpfx.bin" "${DAPPNODE_ISO_NAME}" "${ISO_BUILD_PATH}" diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh index 9511d9b2..ce64937f 100755 --- a/iso/scripts/generate_dappnode_iso_ubuntu.sh +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -1,81 +1,75 @@ #!/bin/bash set -e -ISO_BUILD_PATH="/usr/src/app/dappnode-iso" +source /usr/src/app/iso/scripts/common_iso_generation.sh + DAPPNODE_SCRIPTS_PATH="/usr/src/app/scripts" VARS_FILE="/tmp/vars.sh" TMP_INITRD="/tmp/makeinitrd" -# Source = https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso 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}" -ISO_URL=https://labs.eif.urjc.es/mirror/ubuntu-releases/24.04/ -SHASUM="8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3 ${BASE_ISO_PATH}" - -echo "Downloading Ubuntu ISO image: ${BASE_ISO_NAME}..." -if [ ! -f ${BASE_ISO_PATH} ]; then - wget ${ISO_URL}/${BASE_ISO_NAME} \ - -O ${BASE_ISO_PATH} -fi -echo "Done!" - -echo "Verifying download..." -[[ "$(shasum -a 256 ${BASE_ISO_PATH})" != "$SHASUM" ]] && { - echo "ERROR: wrong shasum" - exit 1 -} - -echo "Clean old files..." -rm -rf dappnode-isoº -rm -rf DappNode-ubuntu-* +BASE_ISO_SHASUM="8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3 ${BASE_ISO_PATH}" -echo "Extracting the iso..." -osirrox -indev ${BASE_ISO_PATH} -extract / dappnode-iso +get_efi_partition() { + local base_iso_path=$1 + local dest_efi_path=$2 + local block_size=512 -# Using a 512-byte block size to ensure the entire Master Boot Record (MBR) is captured. -# The MBR contains boot code, the partition table, and a boot signature, all essential for creating bootable media. -echo "Obtaining the MBR for hybrid ISO..." -dd if=${BASE_ISO_PATH} bs=512 count=1 of=${ISO_BUILD_PATH}/mbr + local efi_start=$(fdisk -l ${base_iso_path} | grep 'Appended2' | awk '{print $2}') + local efi_end=$(fdisk -l ${base_iso_path} | grep 'Appended2' | awk '{print $3}') + local efi_size=$(expr ${efi_end} - ${efi_start} + 1) -efi_start=$(fdisk -l ${BASE_ISO_PATH} | grep 'Appended2' | awk '{print $2}') -efi_end=$(fdisk -l ${BASE_ISO_PATH} | grep 'Appended2' | awk '{print $3}') -efi_size=$(expr ${efi_end} - ${efi_start} + 1) -echo "Obtaining the EFI partition image from ${efi_start} with size ${efi_size}..." -dd if=${BASE_ISO_PATH} bs=512 skip="$efi_start" count="$efi_size" of=${ISO_BUILD_PATH}/efi + echo "[INFO] Obtaining the EFI partition image from ${efi_start} with size ${efi_size}..." + dd if=${base_iso_path} bs=${block_size} skip="$efi_start" count="$efi_size" of=${dest_efi_path} +} -echo "Downloading third-party packages..." -sed '1,/^\#\!ISOBUILD/!d' ${DAPPNODE_SCRIPTS_PATH}/dappnode_install_pre.sh >${VARS_FILE} -# shellcheck disable=SC1091 -source ${VARS_FILE} +add_ubuntu_autoinstall() { + local preseeds_dir=$1 + local iso_build_path=$2 -echo "Creating necessary directories and copying files..." -mkdir -p ${ISO_BUILD_PATH}/dappnode -cp -r ${DAPPNODE_SCRIPTS_PATH} ${ISO_BUILD_PATH}/dappnode -cp -r /usr/src/app/dappnode/* ${ISO_BUILD_PATH}/dappnode + echo "[INFO] Adding preseed..." + if [[ $UNATTENDED == *"true"* ]]; then + cp ${preseeds_dir}/autoinstall_unattended.yaml ${iso_build_path}/autoinstall.yaml + else + cp ${preseeds_dir}/autoinstall.yaml ${iso_build_path}/autoinstall.yaml + fi +} -echo "Adding preseed..." -if [[ $UNATTENDED == *"true"* ]]; then - cp /usr/src/app/iso/preseeds/ubuntu/autoinstall_unattended.yaml ${ISO_BUILD_PATH}/autoinstall.yaml -else - cp /usr/src/app/iso/preseeds/ubuntu/autoinstall.yaml ${ISO_BUILD_PATH}/autoinstall.yaml -fi +configure_boot_menu() { + echo "[INFO] Configuring the boot menu for Dappnode..." + cp -r /usr/src/app/iso/boot/ubuntu/* ${ISO_BUILD_PATH}/boot/grub/ +} -echo "Configuring the boot menu for DappNode..." -cp -r /usr/src/app/iso/boot/ubuntu/* ${ISO_BUILD_PATH}/boot/grub/ +generate_ubuntu_iso() { + local mbr_path=$1 + local efi_path=$2 + local iso_output_path=$3 + local iso_build_path=$4 -# TODO: Is this necessary? How to do it? -echo "Fix md5 sum..." -# shellcheck disable=SC2046 -md5sum $(find . ! -name "md5sum.txt" -type f) >md5sum.txt + echo "[INFO] Creating the new Ubuntu ISO..." + mkisofs \ + -rational-rock -joliet -joliet-long -full-iso9660-filenames \ + -iso-level 3 -partition_offset 16 --grub2-mbr ${mbr_path} \ + --mbr-force-bootable -append_partition 2 0xEF ${efi_path} \ + -appended_part_as_gpt \ + -eltorito-catalog /boot.catalog \ + -eltorito-boot /boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 \ + -boot-info-table --grub2-boot-info -eltorito-alt-boot --efi-boot '--interval:appended_partition_2:all::' -no-emul-boot \ + -o ${iso_output_path} ${iso_build_path} +} -echo "Creating the new Ubuntu ISO..." -mkisofs \ - -rational-rock -joliet -joliet-long -full-iso9660-filenames \ - -iso-level 3 -partition_offset 16 --grub2-mbr ${ISO_BUILD_PATH}/mbr \ - --mbr-force-bootable -append_partition 2 0xEF ${ISO_BUILD_PATH}/efi \ - -appended_part_as_gpt \ - -eltorito-catalog /boot.catalog \ - -eltorito-boot /boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 \ - -boot-info-table --grub2-boot-info -eltorito-alt-boot --efi-boot '--interval:appended_partition_2:all::' -no-emul-boot \ - -o ${DAPPNODE_ISO_PATH} ${ISO_BUILD_PATH} +download_iso "${BASE_ISO_PATH}" "${BASE_ISO_NAME}" "${BASE_ISO_URL}" +verify_download "${BASE_ISO_PATH}" "${BASE_ISO_SHASUM}" +clean_old_files "${ISO_BUILD_PATH}" "${DAPPNODE_ISO_PREFIX}" +extract_iso "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}" +prepare_boot_process "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}/mbr" +get_efi_partition "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}/efi" +download_third_party_packages +add_dappnode_files "${ISO_BUILD_PATH}" "${WORKDIR}" +add_ubuntu_autoinstall "/usr/src/app/iso/preseeds/ubuntu" "${ISO_BUILD_PATH}" +configure_boot_menu +handle_checksums +generate_ubuntu_iso "${ISO_BUILD_PATH}/mbr" "${ISO_BUILD_PATH}/efi" "${DAPPNODE_ISO_PATH}" "${ISO_BUILD_PATH}" From 9a85a5c6722e4000bb73f518777fb71627bd6864 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 31 May 2024 13:58:44 +0200 Subject: [PATCH 25/44] Add netplan copy to autoinstall --- iso/preseeds/ubuntu/autoinstall.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml index b91f4602..43f5f7e7 100644 --- a/iso/preseeds/ubuntu/autoinstall.yaml +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -26,7 +26,7 @@ autoinstall: - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "touch /target/usr/src/dappnode/.firstboot" -# - "cp -ar /etc/netplan/* /target/etc/netplan/" # TODO: Is this necessary? + - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites # - "chmod +x /target/usr/src/dappnode/scripts/static_ip.sh" # TODO: Remove if not necessary to validate IP # - "sh -c 'gpasswd -a $(getent passwd 1000 | cut -d: -f1) sudo' " # TODO: Check if dappnode user needs to be manually added to sudoers # - "/target/usr/src/dappnode/scripts/static_ip.sh" From e86dfeadf73ab207e12d8543449028e1888b5f1e Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 31 May 2024 16:31:32 +0200 Subject: [PATCH 26/44] Remove unneeded late commands --- iso/preseeds/ubuntu/autoinstall.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml index 43f5f7e7..8614d471 100644 --- a/iso/preseeds/ubuntu/autoinstall.yaml +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -27,7 +27,4 @@ autoinstall: - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "touch /target/usr/src/dappnode/.firstboot" - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites -# - "chmod +x /target/usr/src/dappnode/scripts/static_ip.sh" # TODO: Remove if not necessary to validate IP -# - "sh -c 'gpasswd -a $(getent passwd 1000 | cut -d: -f1) sudo' " # TODO: Check if dappnode user needs to be manually added to sudoers -# - "/target/usr/src/dappnode/scripts/static_ip.sh" - "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" From cf4ab17a54a2fb8126da2468cce99c68da92c909 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 31 May 2024 17:53:25 +0200 Subject: [PATCH 27/44] Fix common vars --- iso/scripts/common_iso_generation.sh | 1 - iso/scripts/generate_dappnode_iso_debian.sh | 9 ++++++--- iso/scripts/generate_dappnode_iso_ubuntu.sh | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/iso/scripts/common_iso_generation.sh b/iso/scripts/common_iso_generation.sh index 501e563c..d520753c 100644 --- a/iso/scripts/common_iso_generation.sh +++ b/iso/scripts/common_iso_generation.sh @@ -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 diff --git a/iso/scripts/generate_dappnode_iso_debian.sh b/iso/scripts/generate_dappnode_iso_debian.sh index 03ef8b5a..645755ca 100755 --- a/iso/scripts/generate_dappnode_iso_debian.sh +++ b/iso/scripts/generate_dappnode_iso_debian.sh @@ -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 @@ -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}" @@ -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}" diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh index ce64937f..3246ec85 100755 --- a/iso/scripts/generate_dappnode_iso_ubuntu.sh +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -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 From 7a3f5842704546cf29981c11ad04f0b0d9c284da Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 31 May 2024 17:53:37 +0200 Subject: [PATCH 28/44] Fix artifact generation --- .github/workflows/artifacts.yml | 77 +++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 19 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 015f2205..b8f183ae 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -68,39 +68,78 @@ jobs: sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${HTTPS_VERSION}"/" .dappnode_profile cat .dappnode_profile - # ISO ATTENDED - - name: Build attended + # Debian ISO ATTENDED + - name: Build Debian attended run: | + sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml - docker-compose build - docker-compose up + docker-compose up --build - # Verify ISO attended created - - name: Check iso attended + - name: Check Debian ISO attended run: | - ls -lrt images/DAppNode-debian-bookworm-amd64.iso + ls -lrt images/Dappnode-debian-*.iso - # Set new name for the release asset - - name: Set DAppNode attended ISO name + - name: Set Debian Dappnode attended ISO name run: | - cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso + file=$(ls images/Dappnode-debian-*.iso) + attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" + mv "$file" "$attended_filename" - # ISO UNATTENDED - - name: Build unattended + # Debian ISO UNATTENDED + - name: Build Debian unattended run: | + sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml - docker-compose build - docker-compose up + docker-compose up --build - # Verify ISO unattended was created - - name: Check iso unattended + - name: Check Debian ISO unattended run: | - ls -lrt images/DAppNode-debian-bookworm-amd64.iso + ls -lrt images/Dappnode-debian-*.iso # Set new name for the release asset - - name: Set DAppNode unttended ISO name + - name: Set Dappnode unttended ISO name + run: | + file=$(ls images/Dappnode-debian-*.iso) + + core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" + unattended_filename="${core_filename/%.iso/-unattended.iso}" + + mv "$file" "$unattended_filename" + + # Ubuntu ISO ATTENDED + - name: Build Ubuntu attended + run: | + sed -i -e "/BASE_OS/s/debian/ubuntu/" docker-compose.yml + sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml + docker-compose up --build + + - name: Check Ubuntu ISO attended + run: | + ls -lrt images/Dappnode-ubuntu-*.iso + + - name: Set Ubuntu Dappnode attended ISO name + run: | + file=$(ls images/Dappnode-ubuntu-*.iso) + attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" + mv "$file" "$attended_filename" + + # Ubuntu ISO UNATTENDED + - name: Build Ubuntu unattended + run: | + sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml + sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml + docker-compose up --build + + - name: Check Ubuntu ISO unattended + run: | + ls -lrt images/Dappnode-ubuntu-*.iso + + - name: Set Ubuntu Dappnode unattended ISO name run: | - cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso + file=$(ls images/Dappnode-ubuntu-*.iso) + core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" + unattended_filename="${core_filename/%.iso/-unattended.iso}" + mv "$file" "$unattended_filename" - name: Create dappnode_profile.sh run: | From 9a1a28c81c42b4db04f2f8edd4747659ebad801c Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 3 Jun 2024 19:21:14 +0200 Subject: [PATCH 29/44] Add ubuntu artifacts to workflows --- .github/workflows/artifacts.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index b8f183ae..aea39c50 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -151,8 +151,10 @@ jobs: with: name: test-artifact path: | - ./DAppNode-*-amd64.iso - ./DAppNode-*-amd64-unattended.iso + ./Dappnode-debian-*.iso + ./Dappnode-debian-*-unattended.iso + ./Dappnode-ubuntu-*.iso + ./Dappnode-ubuntu-*-unattended.iso ./scripts/dappnode_install.sh ./scripts/dappnode_install_pre.sh ./scripts/dappnode_uninstall.sh From 9f4020120a4ba446a02f7af4dd3cf68cce5ef7e1 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 4 Jun 2024 15:20:33 +0200 Subject: [PATCH 30/44] Add Ubuntu to release action --- .github/workflows/release.yml | 129 +++++++++++++++++++++------------- 1 file changed, 81 insertions(+), 48 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48b32d87..7cdaeba5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,14 +39,13 @@ env: jobs: pre-release: - name: create pre release + name: Create pre-release artifacts runs-on: ubuntu-latest defaults: run: shell: bash steps: - # Regex for versions introduced - name: Check versions regex run: | [[ $BIND_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $IPFS_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $DAPPMANAGER_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \ @@ -56,7 +55,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # Edit the profile with the new versions introduced - name: Set new versions run: | sed -i -e "/BIND_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${BIND_VERSION}"/" .dappnode_profile @@ -68,82 +66,117 @@ jobs: sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${HTTPS_VERSION}"/" .dappnode_profile cat .dappnode_profile - # ISO ATTENDED - - name: Build attended + - name: Build Debian attended run: | + sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml - docker-compose build - docker-compose up + docker-compose up --build - # Verify ISO attended created - - name: Check iso attended + - name: Check Debian ISO attended run: | - ls -lrt images/DAppNode-debian-bookworm-amd64.iso + ls -lrt images/Dappnode-debian-*.iso - # Set new name for the release asset - - name: Set DAppNode attended ISO name + - name: Set Debian Dappnode attended ISO name run: | - cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso + file=$(ls images/Dappnode-debian-*.iso) + attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" + mv "$file" "$attended_filename" - # ISO UNATTENDED - - name: Build unattended + - name: Build Debian unattended run: | sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml - docker-compose build - docker-compose up + docker-compose up --build - # Verify ISO unattended was created - - name: Check iso unattended + - name: Check Debian ISO unattended run: | - ls -lrt images/DAppNode-debian-bookworm-amd64.iso + ls -lrt images/Dappnode-debian-*.iso - # Set new name for the release asset - - name: Set DAppNode unttended ISO name + - name: Set Dappnode unattended ISO name run: | - cp ./images/DAppNode-debian-bookworm-amd64.iso DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso + file=$(ls images/Dappnode-debian-*.iso) + core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" + unattended_filename="${core_filename/%.iso/-unattended.iso}" + mv "$file" "$unattended_filename" + + - name: Build Ubuntu attended + run: | + sed -i -e "/BASE_OS/s/debian/ubuntu/" docker-compose.yml + sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml + docker-compose up --build + + - name: Check Ubuntu ISO attended + run: | + ls -lrt images/Dappnode-ubuntu-*.iso + + - name: Set Ubuntu Dappnode attended ISO name + run: | + file=$(ls images/Dappnode-ubuntu-*.iso) + attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" + mv "$file" "$attended_filename" + + - name: Build Ubuntu unattended + run: | + sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml + sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml + docker-compose up --build + + - name: Check Ubuntu ISO unattended + run: | + ls -lrt images/Dappnode-ubuntu-*.iso + + - name: Set Ubuntu Dappnode unattended ISO name + run: | + file=$(ls images/Dappnode-ubuntu-*.iso) + core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" + unattended_filename="${core_filename/%.iso/-unattended.iso}" + mv "$file" "$unattended_filename" - # Create profile.sh script (not able to set dot (.) before the name in the gh release asset) - name: Create dappnode_profile.sh run: | cp .dappnode_profile dappnode_profile.sh # SHASUMs - - name: Get SHA-256 attended - id: shasum-attended + - name: Get SHA-256 Debian attended + id: shasum-debian-attended run: | - SHASUM_ATTENDED=$(shasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso) - echo "::set-output name=SHASUM_ATTENDED::$SHASUM_ATTENDED" + file=$(find . -type f -name 'Dappnode-debian-*.iso' ! -name '*unattended*') + SHASUM_DEBIAN_ATTENDED=$(shasum -a 256 $file) + echo "::set-output name=SHASUM_DEBIAN_ATTENDED::$SHASUM_DEBIAN_ATTENDED" - - name: Get SHA-256 unattended - id: shasum-unattended + - name: Get SHA-256 Debian unattended + id: shasum-debian-unattended run: | - SHASUM_UNATTENDED=$(shasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso) - echo "::set-output name=SHASUM_UNATTENDED::$SHASUM_UNATTENDED" + file=$(find . -type f -name 'Dappnode-debian-*unattended.iso') + SHASUM_DEBIAN_UNATTENDED=$(shasum -a 256 $file) + echo "::set-output name=SHASUM_DEBIAN_UNATTENDED::$SHASUM_DEBIAN_UNATTENDED" - # Release body - - name: Write release content + - name: Get SHA-256 Debian attended + id: shasum-ubuntu-attended run: | - echo -en "# Versions\n| Package | Version |\n|---|---|\nbind.dnp.dappnode.eth|${BIND_VERSION}|\n|ipfs.dnp.dappnode.eth|${IPFS_VERSION}|\n|vpn.dnp.dappnode.eth |${VPN_VERSION}|\n|dappmanager.dnp.dappnode.eth|${DAPPMANAGER_VERSION}|\n|wifi.dnp.dappnode.eth|${WIFI_VERSION}|\n|https.dnp.dappnode.eth|${HTTPS_VERSION}|\n|wireguard.dnp.dappnode.eth|${WIREGUARD_VERSION}|\n# Changes\nChanges implemented in release ${CORE_VERSION}\n# Attended version\nInstall and customize DAppNode using the attended ISO: **DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso**\n\n## ISO SHA-256 Checksum\n\`\`\`\nshasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64.iso\n${SHASUM_ATTENDED}\n\`\`\`\n# Unattended version\nInstall DAppNode easily using the unattended ISO: **DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso**\nDo a reboot right after the installation\n:warning: **Warning**: This ISO will install Dappnode automatically, deleting all existing partitions on the disk\n\ndefault login data:\n - **__user__**: dappnode\n - **__password__**: dappnode.s0\n## ISO SHA-256 Checksum\n\`\`\`\nshasum -a 256 DAppNode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso\n${SHASUM_UNATTENDED}\n\`\`\`\n# DAppNode for Raspberry Pi 4 64bit\n[Instructions](https://github.com/dappnode/DAppNode/wiki/DAppNodeARM-Installation-Guide)\n\ndefault login data:\n - **__user__**: dappnode\n - **__password__**: dappnodepi" > CHANGELOG.md - cat CHANGELOG.md - env: - SHASUM_ATTENDED: ${{ steps.shasum-attended.outputs.SHASUM_ATTENDED }} - SHASUM_UNATTENDED: ${{ steps.shasum-unattended.outputs.SHASUM_UNATTENDED }} + file=$(find . -type f -name 'Dappnode-ubuntu-*.iso' ! -name '*unattended*') + SHASUM_UBUNTU_ATTENDED=$(shasum -a 256 $file)s + echo "::set-output name=SHASUM_UBUNTU_ATTENDED::$SHASUM_UBUNTU_ATTENDED" + + - name: Get SHA-256 Debian unattended + id: shasum-ubuntu-unattended + run: | + file=$(find . -type f -name 'Dappnode-ubuntu-*unattended.iso') + SHASUM_UBUNTU_UNATTENDED=$(shasum -a 256 $file) + echo "::set-output name=SHASUM_UBUNTU_UNATTENDED::$SHASUM_UBUNTU_UNATTENDED" - # PRE-RELEASE ASSETS - - name: Pre release - uses: softprops/action-gh-release@v1 + # ARTIFACTS ASSETS + - name: Artifact + uses: actions/upload-artifact@v3 with: - tag_name: ${{ github.event.inputs.core }} - prerelease: true - files: | - ./DAppNode-*-amd64.iso - ./DAppNode-*-amd64-unattended.iso + name: test-artifact + path: | + ./Dappnode-debian-*.iso + ./Dappnode-ubuntu-*-unattended.iso ./scripts/dappnode_install.sh ./scripts/dappnode_install_pre.sh ./scripts/dappnode_uninstall.sh ./scripts/dappnode_access_credentials.sh dappnode_profile.sh - body_path: CHANGELOG.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 03567f78c285cf3af12bc34bbc9f346967bde7a9 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 4 Jun 2024 15:24:37 +0200 Subject: [PATCH 31/44] Update test workflow --- .github/workflows/test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d9a2322..75d214c2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,9 +40,7 @@ jobs: uses: actions/checkout@v4 - name: create iso run: | - docker-compose build - docker-compose up - ls images/ + docker-compose up --build - name: verify image run: | - ls -lrt images/DAppNode-debian-bookworm-amd64.iso + ls -lrt images/Dappnode-*.iso From 06c3aebfcc33a921ac84a723c9bee8439fe4bad9 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 10 Jun 2024 14:41:35 +0200 Subject: [PATCH 32/44] Run pre requisites in target for attended --- iso/preseeds/ubuntu/autoinstall.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml index 8614d471..0e7bbd69 100644 --- a/iso/preseeds/ubuntu/autoinstall.yaml +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -27,4 +27,4 @@ autoinstall: - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "touch /target/usr/src/dappnode/.firstboot" - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites - - "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" + - "curtin in-target --target=/target -- /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" From dcbe076b306d4e6729fe3a8590b3fc246ba0c722 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 10 Jun 2024 16:07:12 +0200 Subject: [PATCH 33/44] Upload all Ubuntu ISOs --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7cdaeba5..4e828987 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -171,7 +171,7 @@ jobs: name: test-artifact path: | ./Dappnode-debian-*.iso - ./Dappnode-ubuntu-*-unattended.iso + ./Dappnode-ubuntu-*.iso ./scripts/dappnode_install.sh ./scripts/dappnode_install_pre.sh ./scripts/dappnode_uninstall.sh From 329e0dc06d65f9e5e0e65c1fd73cd014c7bc3a38 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 10 Jun 2024 16:11:13 +0200 Subject: [PATCH 34/44] Upload all ubuntu ISOs in artifcats --- .github/workflows/artifacts.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index aea39c50..2d3d2154 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -152,9 +152,7 @@ jobs: name: test-artifact path: | ./Dappnode-debian-*.iso - ./Dappnode-debian-*-unattended.iso ./Dappnode-ubuntu-*.iso - ./Dappnode-ubuntu-*-unattended.iso ./scripts/dappnode_install.sh ./scripts/dappnode_install_pre.sh ./scripts/dappnode_uninstall.sh From e05ee000dd8bf83a8f73dcfc86572a79883d62db Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 11 Jun 2024 17:22:52 +0200 Subject: [PATCH 35/44] Use all storage --- .../ubuntu/autoinstall_unattended.yaml | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/iso/preseeds/ubuntu/autoinstall_unattended.yaml b/iso/preseeds/ubuntu/autoinstall_unattended.yaml index a630fd30..71a2ce78 100644 --- a/iso/preseeds/ubuntu/autoinstall_unattended.yaml +++ b/iso/preseeds/ubuntu/autoinstall_unattended.yaml @@ -8,33 +8,10 @@ autoinstall: layout: us # network left as default (DHCP in interfaces named en* or eth*) - storage: layout: name: lvm - config: - - { - ptable: gpt, - path: sda, - preserve: false, - name: '', - grub_device: true - } - - { - volume_group: rootvg, - devices: [sda1] - } - - { - name: root, - volgroup: rootvg, - size: 100%FREE, - format: { - type: ext4 - }, - mount: { - path: / - } - } + sizing-policy: all identity: hostname: dappnode From d79378e9c8bf7c6f2a3458aa0221d3f34641197d Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 14 Jun 2024 17:28:00 +0200 Subject: [PATCH 36/44] Add autoinstall validation file --- .github/workflows/validate_autoinstall.yml | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/validate_autoinstall.yml diff --git a/.github/workflows/validate_autoinstall.yml b/.github/workflows/validate_autoinstall.yml new file mode 100644 index 00000000..a10a1165 --- /dev/null +++ b/.github/workflows/validate_autoinstall.yml @@ -0,0 +1,47 @@ +name: Validate Ubuntu autoinstall YAML Files + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install check-jsonschema yamllint + apt-get install -y yq + + - name: Lint attended autoinstall.yaml + run: yamllint iso/preseeds/ubuntu/autoinstall.yaml + + - name: Lint unattended autoinstall.yaml + run: yamllint iso/preseeds/ubuntu/autoinstall_unattended.yaml + + - name: Download JSON schema + run: curl -o schema.json https://raw.githubusercontent.com/canonical/subiquity/main/autoinstall-schema.json + + - name: Extract autoinstall properties from YAML files + run: | + yq eval '.autoinstall' iso/preseeds/ubuntu/autoinstall.yaml > attended.yaml + yq eval '.autoinstall' iso/preseeds/ubuntu/autoinstall_unattended.yaml > unattended.yaml + + - name: Validate attended autoinstall.yaml + run: | + check-jsonschema --schemafile schema.json attended.yaml + + - name: Validate unattended autoinstall.yaml + run: | + check-jsonschema --schemafile schema.json unattended.yaml From f91bfe8e4f112af5f043b3eff59f572f8b10f4ca Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 14 Jun 2024 17:29:12 +0200 Subject: [PATCH 37/44] Run autoinstall validation on any PR or push --- .github/workflows/validate_autoinstall.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/validate_autoinstall.yml b/.github/workflows/validate_autoinstall.yml index a10a1165..e7fb9c9e 100644 --- a/.github/workflows/validate_autoinstall.yml +++ b/.github/workflows/validate_autoinstall.yml @@ -2,11 +2,7 @@ name: Validate Ubuntu autoinstall YAML Files on: push: - branches: - - main pull_request: - branches: - - main jobs: validate: From d463bcddca36a08ee6683b2b981c41f339c0f0c6 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 14 Jun 2024 17:31:27 +0200 Subject: [PATCH 38/44] Fix permission error on yaml validation --- .github/workflows/validate_autoinstall.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validate_autoinstall.yml b/.github/workflows/validate_autoinstall.yml index e7fb9c9e..f4c7c47c 100644 --- a/.github/workflows/validate_autoinstall.yml +++ b/.github/workflows/validate_autoinstall.yml @@ -18,10 +18,10 @@ jobs: run: | python -m pip install --upgrade pip pip install check-jsonschema yamllint - apt-get install -y yq + sudo apt-get update && sudo apt-get install -y yq - - name: Lint attended autoinstall.yaml - run: yamllint iso/preseeds/ubuntu/autoinstall.yaml + - name: Lint attended autoinstall.yaml + run: yamllint iso/preseeds/ubuntu/autoinstall.yaml - name: Lint unattended autoinstall.yaml run: yamllint iso/preseeds/ubuntu/autoinstall_unattended.yaml From abe10d08e6ac5d301c6913be964dba5d7fcb0313 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 14 Jun 2024 17:33:36 +0200 Subject: [PATCH 39/44] Install yq using pip --- .github/workflows/validate_autoinstall.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/validate_autoinstall.yml b/.github/workflows/validate_autoinstall.yml index f4c7c47c..5fadb0f9 100644 --- a/.github/workflows/validate_autoinstall.yml +++ b/.github/workflows/validate_autoinstall.yml @@ -17,8 +17,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install check-jsonschema yamllint - sudo apt-get update && sudo apt-get install -y yq + pip install check-jsonschema yamllint yq - name: Lint attended autoinstall.yaml run: yamllint iso/preseeds/ubuntu/autoinstall.yaml From ee4c9fe127db8090b4ef89eb87da9e05583bfbb8 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 14 Jun 2024 17:44:33 +0200 Subject: [PATCH 40/44] Update autoinstall format to --- .github/workflows/validate_autoinstall.yml | 4 ++-- .yamllint | 6 ++++++ iso/preseeds/ubuntu/autoinstall.yaml | 5 +++-- iso/preseeds/ubuntu/autoinstall_unattended.yaml | 8 +++++--- 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .yamllint diff --git a/.github/workflows/validate_autoinstall.yml b/.github/workflows/validate_autoinstall.yml index 5fadb0f9..fbdda32a 100644 --- a/.github/workflows/validate_autoinstall.yml +++ b/.github/workflows/validate_autoinstall.yml @@ -20,10 +20,10 @@ jobs: pip install check-jsonschema yamllint yq - name: Lint attended autoinstall.yaml - run: yamllint iso/preseeds/ubuntu/autoinstall.yaml + run: yamllint -c .yamllint iso/preseeds/ubuntu/autoinstall.yaml - name: Lint unattended autoinstall.yaml - run: yamllint iso/preseeds/ubuntu/autoinstall_unattended.yaml + run: yamllint -c .yamllint iso/preseeds/ubuntu/autoinstall_unattended.yaml - name: Download JSON schema run: curl -o schema.json https://raw.githubusercontent.com/canonical/subiquity/main/autoinstall-schema.json diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..c9b624e1 --- /dev/null +++ b/.yamllint @@ -0,0 +1,6 @@ +# .yamllint +extends: default + +rules: + line-length: + max: 150 \ No newline at end of file diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml index 0e7bbd69..658698dc 100644 --- a/iso/preseeds/ubuntu/autoinstall.yaml +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -1,4 +1,5 @@ -#cloud-config +# cloud-config +--- autoinstall: version: 1 interactive-sections: @@ -26,5 +27,5 @@ autoinstall: - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "touch /target/usr/src/dappnode/.firstboot" - - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites + - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites - "curtin in-target --target=/target -- /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" diff --git a/iso/preseeds/ubuntu/autoinstall_unattended.yaml b/iso/preseeds/ubuntu/autoinstall_unattended.yaml index 71a2ce78..bb43891a 100644 --- a/iso/preseeds/ubuntu/autoinstall_unattended.yaml +++ b/iso/preseeds/ubuntu/autoinstall_unattended.yaml @@ -1,4 +1,5 @@ -#cloud-config +# cloud-config +--- autoinstall: version: 1 @@ -28,6 +29,7 @@ autoinstall: - intel-microcode - iucode-tool - iptables + timezone: UTC late-commands: @@ -37,6 +39,6 @@ autoinstall: - "cp -a /cdrom/dappnode/scripts/rc.local /target/etc/rc.local" - "chmod +x /target/usr/src/dappnode/scripts/dappnode_install_pre.sh" - "touch /target/usr/src/dappnode/.firstboot" - - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites + - "cp -ar /etc/netplan/* /target/etc/netplan/" # Necessary for prerequisites - "curtin in-target --target=/target -- /usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE" -# TODO: Handle /etc/network/interfaces and /etc/network/devhotplug \ No newline at end of file + # TODO: Handle /etc/network/interfaces and /etc/network/devhotplug From d6d453ff7d29d85b2fcdbf4ac1716765b49cef0f Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Fri, 14 Jun 2024 17:48:54 +0200 Subject: [PATCH 41/44] Fix yq command --- .github/workflows/validate_autoinstall.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate_autoinstall.yml b/.github/workflows/validate_autoinstall.yml index fbdda32a..45b71ac0 100644 --- a/.github/workflows/validate_autoinstall.yml +++ b/.github/workflows/validate_autoinstall.yml @@ -30,8 +30,8 @@ jobs: - name: Extract autoinstall properties from YAML files run: | - yq eval '.autoinstall' iso/preseeds/ubuntu/autoinstall.yaml > attended.yaml - yq eval '.autoinstall' iso/preseeds/ubuntu/autoinstall_unattended.yaml > unattended.yaml + yq '.autoinstall' iso/preseeds/ubuntu/autoinstall.yaml > attended.yaml + yq '.autoinstall' iso/preseeds/ubuntu/autoinstall_unattended.yaml > unattended.yaml - name: Validate attended autoinstall.yaml run: | From 0da661ce92e4a578d962ececd2cb526b9bc96478 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 18 Jun 2024 11:45:40 +0200 Subject: [PATCH 42/44] Make ssh interactive in attended --- iso/preseeds/ubuntu/autoinstall.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/iso/preseeds/ubuntu/autoinstall.yaml b/iso/preseeds/ubuntu/autoinstall.yaml index 658698dc..1957f019 100644 --- a/iso/preseeds/ubuntu/autoinstall.yaml +++ b/iso/preseeds/ubuntu/autoinstall.yaml @@ -9,9 +9,7 @@ autoinstall: - network - storage - timezone - - ssh: - install-server: true + - ssh packages: - linux-generic From 33c9702d469848e19c1bfb82160eb77a7de5d775 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 18 Jun 2024 11:50:20 +0200 Subject: [PATCH 43/44] Fix path for common ISO generation script --- iso/scripts/common_iso_generation.sh | 25 ++++++++------------- iso/scripts/generate_dappnode_iso_debian.sh | 7 +++--- iso/scripts/generate_dappnode_iso_ubuntu.sh | 9 +++----- 3 files changed, 16 insertions(+), 25 deletions(-) diff --git a/iso/scripts/common_iso_generation.sh b/iso/scripts/common_iso_generation.sh index d520753c..1cd65a0c 100644 --- a/iso/scripts/common_iso_generation.sh +++ b/iso/scripts/common_iso_generation.sh @@ -4,16 +4,6 @@ WORKDIR="/usr/src/app" ISO_BUILD_PATH="${WORKDIR}/dappnode-iso" DAPPNODE_ISO_PREFIX="Dappnode-" -add_dappnode_files() { - local iso_build_path=$1 - local workdir=$2 - - echo "[INFO] Creating necessary directories and copying files..." - mkdir -p ${iso_build_path}/dappnode - cp -r ${workdir}/scripts ${iso_build_path}/dappnode - cp -r ${workdir}/dappnode/* ${iso_build_path}/dappnode -} - download_iso() { local iso_path=$1 local iso_name=$2 @@ -67,14 +57,17 @@ prepare_boot_process() { dd if="${iso_path}" bs=${block_size} count=1 of="${mbr_output_path}" } -download_third_party_packages() { - echo "[INFO] Downloading third-party packages..." - sed '1,/^\#\!ISOBUILD/!d' ${WORKDIR}/scripts/dappnode_install_pre.sh >/tmp/vars.sh - # shellcheck disable=SC1091 - source /tmp/vars.sh +add_dappnode_files_to_iso_build() { + local iso_build_path=$1 + local workdir=$2 + + echo "[INFO] Creating necessary directories and copying files..." + mkdir -p ${iso_build_path}/dappnode + cp -r ${workdir}/scripts ${iso_build_path}/dappnode + cp -r ${workdir}/dappnode/* ${iso_build_path}/dappnode } -# TODO: Is this ok for Ubuntu? +# TODO: Is this ok for Ubuntu? Check what this is for handle_checksums() { echo "Fix md5 sum..." # shellcheck disable=SC2046 diff --git a/iso/scripts/generate_dappnode_iso_debian.sh b/iso/scripts/generate_dappnode_iso_debian.sh index 645755ca..c50072a2 100755 --- a/iso/scripts/generate_dappnode_iso_debian.sh +++ b/iso/scripts/generate_dappnode_iso_debian.sh @@ -1,7 +1,9 @@ #!/bin/bash set -e -source /usr/src/app/iso/scripts/common_iso_generation.sh +SCRIPTS_DIR=$(dirname "${BASH_SOURCE[0]}") + +source ${SCRIPTS_DIR}/common_iso_generation.sh # Source = https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso BASE_ISO_NAME="debian-12.5.0-amd64-netinst.iso" @@ -89,8 +91,7 @@ verify_download "${BASE_ISO_PATH}" "${BASE_ISO_SHASUM}" clean_old_files "${ISO_BUILD_PATH}" "${DAPPNODE_ISO_PREFIX}" extract_iso "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}" prepare_boot_process "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}/isolinux/isohdpfx.bin" -download_third_party_packages -add_dappnode_files "${ISO_BUILD_PATH}" "${WORKDIR}" +add_dappnode_files_to_iso_build "${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 diff --git a/iso/scripts/generate_dappnode_iso_ubuntu.sh b/iso/scripts/generate_dappnode_iso_ubuntu.sh index 3246ec85..574432b6 100755 --- a/iso/scripts/generate_dappnode_iso_ubuntu.sh +++ b/iso/scripts/generate_dappnode_iso_ubuntu.sh @@ -1,11 +1,9 @@ #!/bin/bash set -e -source /usr/src/app/iso/scripts/common_iso_generation.sh +SCRIPTS_DIR=$(dirname "${BASH_SOURCE[0]}") -DAPPNODE_SCRIPTS_PATH="/usr/src/app/scripts" -VARS_FILE="/tmp/vars.sh" -TMP_INITRD="/tmp/makeinitrd" +source ${SCRIPTS_DIR}/common_iso_generation.sh BASE_ISO_NAME=ubuntu-24.04-live-server-amd64.iso BASE_ISO_PATH="/images/${BASE_ISO_NAME}" @@ -69,8 +67,7 @@ clean_old_files "${ISO_BUILD_PATH}" "${DAPPNODE_ISO_PREFIX}" extract_iso "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}" prepare_boot_process "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}/mbr" get_efi_partition "${BASE_ISO_PATH}" "${ISO_BUILD_PATH}/efi" -download_third_party_packages -add_dappnode_files "${ISO_BUILD_PATH}" "${WORKDIR}" +add_dappnode_files_to_iso_build "${ISO_BUILD_PATH}" "${WORKDIR}" add_ubuntu_autoinstall "/usr/src/app/iso/preseeds/ubuntu" "${ISO_BUILD_PATH}" configure_boot_menu handle_checksums From 5e3de9a6c41d36e96d06b987cc6d8078b91714c4 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 18 Jun 2024 12:38:19 +0200 Subject: [PATCH 44/44] Removed ISOBUILD from prerequisites --- scripts/dappnode_install_pre.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/dappnode_install_pre.sh b/scripts/dappnode_install_pre.sh index 307c2f61..2e7da74b 100755 --- a/scripts/dappnode_install_pre.sh +++ b/scripts/dappnode_install_pre.sh @@ -6,8 +6,6 @@ DAPPNODE_DIR="/usr/src/dappnode" LOGS_DIR="$DAPPNODE_DIR/logs" lsb_dist="$(. /etc/os-release && echo "$ID")" -#!ISOBUILD Do not modify, variables above imported for ISO build - detect_installation_type() { if [ -f "${DAPPNODE_DIR}/iso_install.log" ]; then LOG_FILE="${LOGS_DIR}/iso_install.log"