Skip to content

Commit

Permalink
Update Ubuntu ISO
Browse files Browse the repository at this point in the history
  • Loading branch information
dappnodedev committed May 24, 2024
1 parent b18efda commit 65338d7
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 40 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Binary file modified iso/boot/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion iso/boot/theme_1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions iso/boot/ubuntu/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added iso/boot/ubuntu/themes/dappnode/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions iso/boot/ubuntu/themes/dappnode/theme.txt
Original file line number Diff line number Diff line change
@@ -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"}
}
}
31 changes: 13 additions & 18 deletions iso/preseeds/ubuntu/autoinstall.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -34,12 +28,13 @@ autoinstall:
# - 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
# - "/target/usr/src/dappnode/scripts/static_ip.sh"
- "/target/usr/src/dappnode/scripts/dappnode_install_pre.sh UPDATE"
52 changes: 35 additions & 17 deletions iso/preseeds/ubuntu/autoinstall_unattended.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
8 changes: 5 additions & 3 deletions iso/scripts/generate_dappnode_iso_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,22 @@ 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

#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..."
Expand Down

0 comments on commit 65338d7

Please sign in to comment.