[ONE images] refresh ubuntu and devuan images

This commit is contained in:
fnux 2024-03-28 11:28:52 +01:00
parent c080415b9d
commit 41918e1162
No known key found for this signature in database
GPG key ID: 4502C902C00A1E12
2 changed files with 8 additions and 13 deletions

View file

@ -9,16 +9,15 @@ set -e
set -x
# XXX: Handle command-line arguments?
RELEASE=chimaera
RELEASE=daedalus
ARCH=amd64
IMAGE_PATH=devuan-$RELEASE-$(date --iso-8601).img.qcow2
IMAGE_SIZE=10G
NBD_DEVICE=/dev/nbd0
NBD_DEVICE=/dev/nbd4
HOSTNAME=devuan
MIRROR=http://pkgmaster.devuan.org/merged
# TODO: find the package definition and built ourself, publish in some RPM repository.
ONE_CONTEXT_DEB_URL="https://github.com/OpenNebula/addon-context-linux/releases/download/v6.4.0/one-context_6.4.0-1.deb"
ONE_CONTEXT_DEB_URL="https://github.com/OpenNebula/addon-context-linux/releases/download/v6.6.1/one-context_6.6.1-1.deb"
ONE_CONTEXT_DEB_PATH=/root/one-context.deb
cleanup() {

View file

@ -9,14 +9,13 @@ set -e
set -x
# XXX: Handle command-line arguments?
RELEASE=jammy # 22.04 LTS
RELEASE=mantic # 23.10
ARCH=amd64
IMAGE_PATH=ubuntu-$RELEASE-$(date --iso-8601).img.qcow2
IMAGE_SIZE=10G
NBD_DEVICE=/dev/nbd0
NBD_DEVICE=/dev/nbd2
# TODO: find the package definition and built ourself, publish in some RPM repository.
ONE_CONTEXT_DEB_URL="https://github.com/OpenNebula/addon-context-linux/releases/download/v6.4.0/one-context_6.4.0-1.deb"
ONE_CONTEXT_DEB_URL="https://github.com/OpenNebula/one-apps/releases/download/v6.8.1/one-context_6.8.1-1.deb"
ONE_CONTEXT_DEB_PATH=/root/one-context.deb
cleanup() {
@ -70,7 +69,6 @@ mkfs.ext4 "${NBD_DEVICE}p1"
mkfs.ext4 "${NBD_DEVICE}p2"
# Mount partitions, install base OS.
mount "${NBD_DEVICE}p2" /mnt
mkdir /mnt/boot
mount "${NBD_DEVICE}p1" /mnt/boot
@ -89,9 +87,6 @@ mount --bind /sys /mnt/sys
# Guest networking is to be handled by the one-context package.
# See https://github.com/OpenNebula/addon-context-linux for details.
# Required to resolve package mirror in chroot.
cp /etc/resolv.conf /mnt/etc/resolv.conf
# Initialize /etc/hosts.
cat > /mnt/etc/hosts << EOF
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
@ -123,7 +118,7 @@ run_root ln -sf /usr/share/zoneinfo/UTC /etc/localtime
run_root systemctl enable systemd-timesyncd.service
# Install kernel and bootloader. Do not autoconfigure grub.
run_root echo "grub-pc grub-pc/install_devices_empty boolean true" | debconf-set-selections
run_root "echo 'grub-pc grub-pc/install_devices_empty boolean true' | debconf-set-selections"
run_root DEBIAN_FRONTEND=noninteractive apt-get -y install locales linux-base linux-image-generic grub-pc
# Configure grub.
@ -145,6 +140,7 @@ EOF
run_root rm -f /etc/machine-id
run_root touch /etc/machine-id
rm -f /var/lib/systemd/random-seed
run_root hostnamectl set-hostname ubuntu
# Remove temporary files and reclaim freed disk space.
run_root apt-get clean