Compare commits

...

28 Commits

Author SHA1 Message Date
Michael Hudson-Doyle
47c1a539d6 releasing package livecd-rootfs version 24.04.76 2024-08-21 16:14:10 +12:00
Michael Hudson-Doyle
9441bbdfb5 Force latest/stable/ubuntu-24.10 subiquity onto the ubuntu-core-installer ISO for now. 2024-08-21 15:58:08 +12:00
Michael Hudson-Doyle
5a4991ade3 add reference to SRU bug to changelog 2024-08-08 16:50:13 +12:00
Michael Hudson-Doyle
a99b788ebc releasing package livecd-rootfs version 24.04.75 2024-07-30 16:35:50 +12:00
Michael Hudson-Doyle
0df4234c28 Add 'ubuntu-core-installer' project.
The ubuntu-core-installer image is an installer that installs ubuntu
core. The environment the installer runs in is similar to the server
installer but it has a source catalog entry that points to the model
created in ubuntu-core-installer/hooks/05-prepare-image.binary, which
subiquity knows how to install.
2024-07-25 17:26:22 +12:00
Łukasz 'sil2100' Zemczak
2215660a7d releasing package livecd-rootfs version 24.04.74 2024-07-24 16:17:29 +01:00
Heinrich Schuchardt
1da6867784 riscv64: preinstalled server image for Microchip PIC64GX Curiosity Kit
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-07-24 11:26:05 +02:00
Łukasz 'sil2100' Zemczak
69b47ce2fe releasing package livecd-rootfs version 24.04.73 2024-07-11 13:17:09 +02:00
Łukasz 'sil2100' Zemczak
bb44f093c9 Backport the qcow2 ubuntu-core image generation for LXD support. 2024-07-11 13:16:40 +02:00
Philip Roche
a0dea8f6e2
d/ch change to upload 24.04.72 noble 2024-06-25 12:23:43 +01:00
Philip Roche
d9e444988d
Merge bugfix/LP-2069828-restore-unminimize-during-server-build-noble into ubuntu/noble [a=philroche] [r=gjolly,utkarsh]
fix: Revert removal of unminimize call in server builds (LP: #2069828)

There was a change made by me in https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466388
as part of LP: #2066905 to remove references to LXD in the unminimize scripts
but I also removed the calls to `unminimize` in error.

This still needs to run but without any references to LXD which no longer
needs to be `unminimized` via snap installation.

(cherry picked from commit f574fc8200d8a4c7837288c5d2aa1e515137bb55)

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/468088
2024-06-25 12:19:00 +01:00
Philip Roche
62a80ac00a
fix: Revert removal of unminimize call in server builds (LP: #2069828)
There was a change made by me in https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466388
as part of LP: #2066905 to remove references to LXD in the unminimize scripts
but I also removed the calls to `unminimize` in error.

This still needs to run but without any references to LXD which no longer
needs to be `unminimized` via snap installation.

(cherry picked from commit f574fc8200d8a4c7837288c5d2aa1e515137bb55)
2024-06-24 17:26:07 +01:00
Heinrich Schuchardt
05933ff83f riscv64: use earlycon=sbi on command line
With current kernel we need to specify the SBI driver
for the early console to work.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-06-07 16:21:32 +02:00
Philip Roche
10d4a04d14
Merge bugfix/noble-remove-files-added-during-incorect-merge-conflict-resolution into ubuntu/noble [a=philroche] [r=brian-murray]
fix: Remove .patch files and livecd-rootfs symlink committed in error as part of merge commit.

Apologies. Trying to do too many things at once

This reverts changes added in error in commit 639f04b7

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466885
2024-06-04 18:42:12 +01:00
Philip Roche
d72ae0de70
fix: Remove .patch files and livecd-rootfs symlink committed in error as part of merge commit.
Apologies. Trying to do too many things at once

This reverts changes added in error in commit 639f04b7
2024-06-04 18:33:45 +01:00
Philip Roche
bfb829c64d fix: Remove .idea pycharm directories and files committed in error as part of merge commit.
Apologies. Trying to do too many things at once
2024-05-27 12:40:56 +01:00
Philip Roche
13ec478feb d/ch change to upload 24.04.71 noble 2024-05-27 12:06:44 +01:00
Philip Roche
639f04b7b9 Merge feature/re-enable-noble-hyperv-desktop-builds-noble into ubuntu/noble [a=philroche] [r=mwhudson,utkarsh]
feat: Re-enable ability to build HyperV desktop images (LP: #2064280)

We have not built Hyperv desktop images since Jammy and with the re-introduction of
HyperV for Noble we have encountered build issues caused by refactoring and removals
of code assumed to be redundant but the HyperV desktop images were actually using
these code paths.

This is a backport/SRU from oracular.

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466385

# Conflicts:
#	debian/changelog
2024-05-27 12:06:31 +01:00
Philip Roche
073d7e0404 d/ch change to upload 24.04.70 noble 2024-05-27 11:11:12 +01:00
Philip Roche
1f40b60606 Merge bugfix/lxd-no-longer-seeded-unminimize-noble into ubuntu/noble [a=philroche] [r=sdeziel,utkarsh,vorlon]
fix: No longer install LXD snap in unminimize script (LP: #2066905)

The LXD snap is no longer seeded in any images since Noble+ so the LXD related unminimize logic in
./live-build/auto/build?h=ubuntu/noble and ./live-build/ubuntu-server/hooks/01-unminimize.chroot_early
 is no longer required.

lxd-installer can remain installed.

This is a backport/SRU from oracular

(cherry picked from commit 46c19dfa913c133042d62e0caa2d2d526cd9bb7f)

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466388
2024-05-27 11:10:05 +01:00
Philip Roche
5507ca8d83 fix: No longer install LXD snap in unminimize script (LP: #2066905)
The LXD snap is no longer seeded in any images since Noble+ so the LXD related unminimize logic in
./live-build/auto/build?h=ubuntu/noble and ./live-build/ubuntu-server/hooks/01-unminimize.chroot_early
 is no longer required.

lxd-installer can remain installed.

(cherry picked from commit 46c19dfa913c133042d62e0caa2d2d526cd9bb7f)
2024-05-24 15:48:21 +01:00
Philip Roche
49a14274d1 d/ch update for 24.04.70 to re-enable ability to build HyperV desktop images (LP: #2064280) 2024-05-24 15:34:40 +01:00
Philip Roche
5f59eec085 fix(Hyperv Desktop): remove redundant case statement match ubuntu
`ubuntu` will never match `${PROJECT:-}:${SUBPROJECT:-}` cases statement and can be safely removed.

(cherry picked from commit 0945c40fb2bb067d86d496b7b40bdae89123124c)
2024-05-24 15:31:21 +01:00
Philip Roche
8cc079fe50 fix(Hyperv Desktop): as we are using oem-config we do not need ubiquity-slideshow-ubuntu
As we are only using oem-config, oem-config-slideshow-ubuntu will suffice

(cherry picked from commit 8fe26586cc1b65621e74121b03c912dcee0e6cf8)
2024-05-24 15:31:16 +01:00
Philip Roche
34edbb9a1c fix(Hyperv Desktop): ubiquity-frontend-gtk is a dependency of the oem-config-gtk package so does not need to be added explicitly
(cherry picked from commit dc2d1318d2d2183f6d80673a1daf5dc8794cd3ed)
2024-05-24 15:31:11 +01:00
Philip Roche
40c7eac14d feat(Hyperv Desktop): Disable cloud-init for Hyperv Desktop images (LP: #2064280)
For Ubuntu 24.04 and later cloud-init is included in desktop images. This is not applicable for Hyperv images so
we can disable cloud-init. This leaves the cloud-init package installed but disabled so users can still
use it if they want.

This is a documented way to disable cloud-init. See https://cloudinit.readthedocs.io/en/latest/howto/disable_cloud_init.html

(cherry picked from commit ff47664d8c646ebae72c40145ee1fd8098185de6)
2024-05-24 15:30:50 +01:00
Phil Roche
b12e271417 fix(HyperV desktop): Ensure removed hyperv dependencies are present in HyperV builds (LP: #2064280)
A change in 8fb21808 also removed many of the dependencies that the hyperv images require.
This removal has been restored in this commit by adding them expliciltly in the hyperv hook.

(cherry picked from commit c459e5e5af0371c0228bd4e5ddec57b8954d39df)
2024-05-24 15:30:45 +01:00
Phil Roche
fa351ac77b fix(HyperV desktop): Re-enable ability to build HyperV desktop images (LP: #2064280)
We have not built Hyperv desktop images since Jammy and with the re-introduction of HyperV for Noble we have encountered build issues caused by refactoring and removals of code assumed to be redundant but the HyperV desktop images were actually using these code paths.

In bbedffe6 we split the building of cloud images and non cloud to using an ddisk-image-uefi.binary and disk-image-uefi-non-cloud.binary respectively. In e38264ca there was a change which meant that any attempt to build hyperv images would result in incorrect disk size and incorrect disk label.

This has been fixed by ensuring that the ubuntu:desktop-preinstalled $PROJECT:$SUBPROJECT matches and sets the correct disk size and correct disk label.

A change in 76d79466 changed the logic of how the image size for amd64 images were being set. This overrode the sizes set for the desktop images incorrectly.

This commit ensures that any desktop image being created uses the correct image size.

(cherry picked from commit 48aed401949637ac314e59de996ccab19d5eefcd)
2024-05-24 15:30:38 +01:00
34 changed files with 409 additions and 84 deletions

50
debian/changelog vendored
View File

@ -1,9 +1,55 @@
livecd-rootfs (24.04.70) UNRELEASED; urgency=medium
livecd-rootfs (24.04.76) noble; urgency=medium
* Force latest/stable/ubuntu-24.10 subiquity onto the ubuntu-core-installer
ISO for now. (LP: #2077495)
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 21 Aug 2024 16:13:58 +1200
livecd-rootfs (24.04.75) noble; urgency=medium
* Add 'ubuntu-core-installer' project. (LP: #2076307)
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Tue, 30 Jul 2024 16:35:31 +1200
livecd-rootfs (24.04.74) noble; urgency=medium
* riscv64: preinstalled server image for Microchip PIC64GX Curiosity Kit
(LP: #2072956)
-- Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Mon, 08 Jul 2024 17:51:25 +0200
livecd-rootfs (24.04.73) noble; urgency=medium
* Build qcow2 images for ubuntu-core LXD support (LP: #2072759).
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Thu, 11 Jul 2024 13:15:43 +0200
livecd-rootfs (24.04.72) noble; urgency=medium
[ Heinrich Schuchardt ]
* riscv64: use earlycon=sbi on command line (LP: #2068739)
[ Philip Roche ]
* Revert removal of unminimize call in server builds (LP: #2069828)
-- Philip Roche <phil.roche@canonical.com> Mon, 24 Jun 2024 14:24:52 +0100
livecd-rootfs (24.04.71) noble; urgency=medium
* Re-enable ability to build HyperV desktop images (LP: #2064280)
-- Philip Roche <phil.roche@canonical.com> Mon, 27 May 2024 12:05:33 +0100
livecd-rootfs (24.04.70) noble; urgency=medium
[ Łukasz 'sil2100' Zemczak ]
* Add experimental support for building ubuntu-core-desktop installer images
(LP: #2063203)
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Wed, 24 Apr 2024 10:53:27 +0100
[ Philip Roche ]
* No longer install LXD snap in unminimize script (LP: #2066905)
-- Philip Roche <phil.roche@canonical.com> Fri, 24 May 2024 15:47:48 +0100
livecd-rootfs (24.04.69) noble; urgency=medium

View File

@ -37,6 +37,11 @@ if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ] \
# we should be supporting more than one for models that
# define those.
mv output/*.img "$PREFIX".img
# For standard, non-platform-specific core images, prepare a
# qcow2 image as well for LXD consumption.
if [ -z "${SUBARCH:-}" ]; then
convert_to_qcow2 "$PREFIX".img "$PREFIX".qcow2
fi
xz -0 -T4 "$PREFIX".img
mv output/seed.manifest "$PREFIX".manifest
@ -284,18 +289,6 @@ fi
EOF
fi
if [ "$PROJECT" = "ubuntu-cpc" ] || [ "$PROJECT" = "ubuntu-server" ]; then
cat >> chroot/usr/local/sbin/unminimize <<'EOF'
# installing LXD using the lxd-installer by simply invoking it
echo "Invoking LXD so that it can be installed by the lxd-installer's script.."
lxd --version
echo "Removing lxd installer package..."
apt-get purge -y lxd-installer
EOF
fi
cat >> chroot/usr/local/sbin/unminimize <<'EOF'
# unminimization succeeded, there is no need to mention it in motd

View File

@ -9,8 +9,8 @@ case $ARCH:$SUBARCH in
i386:|\
ppc64el:|\
riscv64:|riscv64:generic|riscv64:icicle|riscv64:licheerv|\
riscv64:milkvmars|riscv64:nezha|riscv64:unmatched|riscv64:visionfive|\
riscv64:visionfive2|\
riscv64:milkvmars|riscv64:nezha|riscv64:pic64gx|riscv64:unmatched|\
riscv64:visionfive|riscv64:visionfive2|\
s390x:|\
*appliance*)
;;
@ -382,7 +382,7 @@ if [ -z "${IMAGEFORMAT:-}" ]; then
;;
esac
;;
ubuntu-server:live|ubuntu-mini-iso:)
ubuntu-server:live|ubuntu-mini-iso:|ubuntu-core-installer:)
IMAGEFORMAT=plain
;;
esac
@ -396,6 +396,7 @@ if [ "$IMAGEFORMAT" = "ext4" ] && [ "$PROJECT" = "ubuntu-cpc" ]; then
riscv64:licheerv | \
riscv64:milkvmars | \
riscv64:nezha | \
riscv64:pic64gx | \
riscv64:unmatched | \
riscv64:visionfive | \
riscv64:visionfive2 | \
@ -421,7 +422,7 @@ case $IMAGEFORMAT in
;;
plain)
case $PROJECT:${SUBPROJECT:-} in
ubuntu-server:live)
ubuntu-server:live|ubuntu-core-installer:)
touch config/universe-enabled
;;
ubuntu-mini-iso:)
@ -1046,6 +1047,22 @@ case $PROJECT in
PREINSTALL_POOL_SEEDS='server-ship'
;;
ubuntu-core-installer)
# The ubuntu-core-installer image is an installer that installs ubuntu
# core. The environment the installer runs in is similar to the server
# installer but it has a source catalog entry that points to the model
# created in ubuntu-core-installer/hooks/05-prepare-image.binary, which
# subiquity knows how to install.
OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
PASSES_TO_LAYERS=true
add_task base server-minimal server
add_task base.live server-live
add_package base.live linux-image-generic
/usr/share/livecd-rootfs/checkout-translations-branch \
https://git.launchpad.net/subiquity po config/catalog-translations
;;
ubuntu-mini-iso)
OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
@ -1241,7 +1258,7 @@ case "$ARCH${SUBARCH:++$SUBARCH}" in
esac
case $PROJECT:${SUBPROJECT:-} in
ubuntu-server:*|ubuntu-base:*|ubuntu-oci:*)
ubuntu-server:*|ubuntu-base:*|ubuntu-oci:*|ubuntu-core-installer:*)
OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
KERNEL_FLAVOURS=none
BINARY_REMOVE_LINUX=false
@ -1438,7 +1455,7 @@ case $PROJECT:${SUBPROJECT:-} in
ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled| \
ubuntu-wsl:*|ubuntu-mini-iso:*|ubuntu:|ubuntu-oem:*| \
ubuntustudio-dvd:*|edubuntu:*|ubuntu-budgie:*|ubuntucinnamon:*|xubuntu:*| \
ubuntukylin:*|ubuntu-mate:*|ubuntu-core-desktop:*)
ubuntukylin:*|ubuntu-mate:*|ubuntu-core-desktop:*|ubuntu-core-installer:*)
# Ensure that most things e.g. includes.chroot are copied as is
for entry in /usr/share/livecd-rootfs/live-build/${PROJECT}/*; do
case $entry in

View File

@ -778,6 +778,12 @@ snap_preseed() {
exit 1
fi
if [ $PROJECT = ubuntu-core-installer ] && [ $SNAP_NAME = subiquity ]; then
# The ubuntu-core-installer project requires features not yet
# present in the latest/ubuntu/stable-24.04 or stable branches.
CHANNEL=latest/ubuntu/stable-24.10
fi
_snap_preseed $CHROOT_ROOT $SNAP $CHANNEL
# Mark this image as having snapd installed explicitly.

View File

@ -0,0 +1,5 @@
#!/bin/sh -x
set -e
mkdir -p /lib/modules

View File

@ -0,0 +1,17 @@
#!/bin/bash -ex
# vi: ts=4 noexpandtab
if [ "${PASS}" != "base.live" ]; then
exit 0
fi
# Make sure NoCloud is last
values=$(echo get cloud-init/datasources | debconf-communicate | sed 's/^0 //;s/NoCloud, //;s/None/NoCloud, None/')
printf "%s\t%s\t%s\t%s\n" \
cloud-init cloud-init/datasources multiselect "$values" | debconf-set-selections
dpkg-reconfigure --frontend=noninteractive cloud-init
if [ `dpkg --print-architecture` = s390x ]; then
# because z/VM x3270 is just ttyS0
cp -r /usr/lib/systemd/system/serial-getty@sclp_line0.service.d /usr/lib/systemd/system/serial-getty@ttyS0.service.d
fi

View File

@ -0,0 +1,19 @@
#!/bin/bash -ex
# vi: ts=4 noexpandtab
case $PASS in
base.live)
;;
*)
exit 0
;;
esac
cat <<EOF > /etc/initramfs-tools/conf.d/casperize.conf
export CASPER_GENERATE_UUID=1
EOF
cat <<EOF > /etc/initramfs-tools/conf.d/default-layer.conf
LAYERFS_PATH=${PASS}.squashfs
EOF

View File

@ -0,0 +1,17 @@
#!/bin/bash -eux
# vi: ts=4 noexpandtab
case $PASS in
base.live)
;;
*)
exit 0
;;
esac
PROJECT=$PROJECT${SUBARCH:+-$SUBARCH}
# Fish out generated kernel image and initrd
mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-generic
mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-generic
chmod a+r ${PWD}/livecd.${PROJECT}.initrd-generic ${PWD}/livecd.${PROJECT}.kernel-generic

View File

@ -0,0 +1,38 @@
#!/bin/bash
set -eux
case ${PASS:-} in
base.live)
;;
*)
exit 0
;;
esac
. config/binary
. config/functions
env SNAPPY_STORE_NO_CDN=1 snap known --remote model series=16 brand-id=canonical model=ubuntu-core-24-amd64 > config/ubuntu-core-24-amd64.model
env SNAPPY_STORE_NO_CDN=1 snap prepare-image \
config/ubuntu-core-24-amd64.model --snap console-conf chroot
mv chroot/system-seed/systems/* chroot/system-seed/systems/ubuntu-core-24-amd64
rsync -av chroot/system-seed/{systems,snaps} chroot/var/lib/snapd/seed
rm -rf chroot/system-seed
cat <<-EOF > config/edge.catalog-in.yaml
name: "Ubuntu Core 24"
description: >-
Ubuntu Core.
id: ubuntu-core
type: null
variant: core
locale_support: none
snapd_system_label: ubuntu-core-24-amd64
EOF
PROJECT_FULL=$PROJECT${SUBARCH:+-$SUBARCH}
usc_opts="--output livecd.${PROJECT_FULL}.install-sources.yaml \
--template config/edge.catalog-in.yaml \
--size 0"
/usr/share/livecd-rootfs/update-source-catalog $usc_opts

View File

@ -0,0 +1,117 @@
# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
- default
# If this is set, 'root' will not be able to ssh in and they
# will get a message to login instead as the default $user
disable_root: true
# This will cause the set+update hostname module to not operate (if true)
preserve_hostname: true
ssh_pwauth: yes
chpasswd:
expire: false
# This is the initial network config.
# It can be overwritten by cloud-init or subiquity.
network:
version: 2
ethernets:
zz-all-en:
match:
name: "en*"
dhcp4: true
zz-all-eth:
match:
name: "eth*"
dhcp4: true
# We used to have a custom final_message here. Just use the default instead.
# Example datasource config
# datasource:
# Ec2:
# metadata_urls: [ 'blah.com' ]
# timeout: 5 # (defaults to 50 seconds)
# max_wait: 10 # (defaults to 120 seconds)
# The modules that run in the 'init' stage
cloud_init_modules:
- bootcmd
- write-files
- ca-certs
- rsyslog
- users-groups
- ssh
# The modules that run in the 'config' stage
cloud_config_modules:
# Emit the cloud config ready event
# this can be used by upstart jobs for 'start on cloud-config'.
- ssh-import-id
- set-passwords
- timezone
- disable-ec2-metadata
- runcmd
# The modules that run in the 'final' stage
cloud_final_modules:
- scripts-per-once
- scripts-user
- ssh-authkey-fingerprints
- keys-to-console
- phone-home
- final-message
# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
distro: ubuntu
# Default user name + that default users groups (if added/used)
default_user:
name: installer
lock_passwd: false
gecos: Ubuntu
groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /usr/bin/subiquity-shell
# Automatically discover the best ntp_client
ntp_client: auto
# Other config here will be given to the distro class and/or path classes
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/
package_mirrors:
- arches: [i386, amd64]
failsafe:
primary: http://archive.ubuntu.com/ubuntu
security: http://security.ubuntu.com/ubuntu
search:
primary:
- http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
- http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
- http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
security: []
- arches: [arm64, armel, armhf]
failsafe:
primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports
search:
primary:
- http://%(ec2_region)s.ec2.ports.ubuntu.com/ubuntu-ports/
- http://%(availability_zone)s.clouds.ports.ubuntu.com/ubuntu-ports/
- http://%(region)s.clouds.ports.ubuntu.com/ubuntu-ports/
security: []
- arches: [default]
failsafe:
primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports
ssh_svcname: ssh

View File

@ -0,0 +1,4 @@
output: {all: '>> /var/log/cloud-init-output.log'}
no_ssh_fingerprints: true
ssh:
emit_keys_to_console: false

View File

@ -0,0 +1,2 @@
[Journal]
RateLimitIntervalSec=0

View File

@ -0,0 +1,4 @@
# systemd in 23.04+ uses a newer "compact" format by default which is not
# understood by the systemd libraries from jammy used in the subiquity snap.
[Service]
Environment="SYSTEMD_JOURNAL_COMPACT=0"

View File

@ -0,0 +1,4 @@
# systemd in 22.04+ uses "hash table hardening" by default which is not
# understood by the systemd libraries from focal used in the subiquity snap.
[Service]
Environment="SYSTEMD_JOURNAL_KEYED_HASH=0"

View File

@ -0,0 +1,3 @@
#!/bin/sh
exec sudo snap run subiquity

View File

@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=-/sbin/agetty --noclear -n --autologin ubuntu-core-installer %I $TERM

View File

@ -0,0 +1,8 @@
[Unit]
Description=Subiquity, the installer for Ubuntu Server %I
StartLimitInterval=0
[Service]
Environment=SNAP_REEXEC=0
ExecStart=
ExecStart=/usr/bin/snap run subiquity.subiquity-service %I

View File

@ -0,0 +1,4 @@
[Service]
StandardOutput=tty
ExecStart=
ExecStart=/usr/bin/snap run subiquity --ssh

View File

@ -0,0 +1,13 @@
[Unit]
IgnoreOnIsolate=yes
[Service]
Environment=SNAP_REEXEC=0
UtmpIdentifier=tty1
TTYPath=/dev/tty1
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes

View File

@ -0,0 +1,2 @@
[Service]
Environment=SNAP_REEXEC=0

View File

@ -0,0 +1 @@
/lib/systemd/system/systemd-networkd.service

View File

@ -0,0 +1 @@
/lib/systemd/system/systemd-networkd-wait-online.service

View File

@ -0,0 +1 @@
/lib/systemd/system/systemd-networkd.socket

View File

@ -9,21 +9,6 @@ case $ARCH in
;;
esac
case ${PROJECT:-}:${SUBPROJECT:-} in
ubuntu:)
echo "We don't create EFI images for Ubuntu Desktop."
exit 0
;;
ubuntu)
IMAGE_STR="# DESKTOP_IMG: This file was created/modified by the Desktop Image build process"
FS_LABEL="desktop-rootfs"
IMAGE_SIZE=12884901888 # 12G
;;
*)
IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
FS_LABEL="cloudimg-rootfs"
;;
esac
if [ "$ARCH" = "amd64" ]; then
IMAGE_SIZE=3758096384 # bump to 3.5G (3584*1024**2); Since Kinetic amd64 need more then the default 2.2G
@ -44,6 +29,22 @@ if [ "$ARCH" = "riscv64" ]; then
IMAGE_SIZE=4831838208 # bump to 4.5G (4608*1024**2); initrd creation fails with "No space left" with 3.5G
fi
case ${PROJECT:-}:${SUBPROJECT:-} in
ubuntu:)
echo "We don't create EFI images for Ubuntu Desktop."
exit 0
;;
ubuntu:desktop-preinstalled)
IMAGE_STR="# DESKTOP_IMG: This file was created/modified by the Desktop Image build process"
FS_LABEL="desktop-rootfs"
IMAGE_SIZE=12884901888 # 12G
;;
*)
IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
FS_LABEL="cloudimg-rootfs"
;;
esac
. config/binary
. config/functions
@ -104,7 +105,7 @@ create_partitions() {
--change-name=12:CIDATA \
--new=1:: \
--attributes=1:set:2
elif [ "${SUBARCH:-}" = "icicle" ]; then
elif [ "${SUBARCH:-}" = "icicle" ] || [ "${SUBARCH:-}" = "pic64gx" ]; then
# Microchip Icicle Kit
sgdisk "${disk_image}" \
--set-alignment=2 \
@ -327,6 +328,17 @@ install_grub() {
loader1="${loop_device}p13"
dd if=mountpoint/usr/lib/u-boot/${SUBARCH}/u-boot-sunxi-with-spl.bin of=$loader1
;;
"pic64gx")
cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/
# flash-kernel is needed to install the dtb for update-grub: it uses the
# /proc/device-tree/model value to pick the correct dtb and as we are in a chroot,
# the model value is wrong and we need to use /etc/flash-kernel/machine instead.
chroot mountpoint bash -c "echo 'Microchip PIC64GX Curiosity Kit' > /etc/flash-kernel/machine"
# u-boot-pic64gx contains the vendor U-Boot
chroot mountpoint apt-get install -qqy u-boot-pic64gx
loader="${loop_device}p13"
dd if=mountpoint/usr/lib/u-boot-pic64gx/u-boot.payload of=$loader
;;
"visionfive")
# flash-kernel is needed to install the dtb for update-grub: it uses the
# /proc/device-tree/model value to pick the correct dtb and as we are in a chroot,

View File

@ -1,4 +1,4 @@
# Booting on many riscv64 systems is slow. Let the user view progress.
# For minimum output use
# GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX_DEFAULT="efi=debug earlycon"
GRUB_CMDLINE_LINUX_DEFAULT="efi=debug earlycon=sbi"

View File

@ -1 +1 @@
U_BOOT_PARAMETERS="ro efi=debug earlycon"
U_BOOT_PARAMETERS="ro efi=debug earlycon=sbi"

View File

@ -10,30 +10,9 @@ case ${PASS} in
;;
esac
# The unminimize script will try to install the lxd snap using the shim script
# /usr/sbin/lxd from the lxd-installer package.
# We can't do that at this stage so just neuter the lxd command (the snap
# will get properly seeded by generic machinery).
if [ -f "/usr/sbin/lxd" ]; then
dpkg-divert --add --divert /usr/sbin/lxd.REAL --rename /usr/sbin/lxd
ln -s /bin/true /usr/sbin/lxd
yes | /usr/local/sbin/unminimize
# unminimize also uninstalls lxd-installer package
# and also removed `/usr/sbin/lxd` as a result, so we don't need to restore, but
# we do need to remove the mock we used as part of dpkg-divert
# first we need to remove the diversion
dpkg-divert --remove --no-rename /usr/sbin/lxd
# now remove the renamed file that we originally diverted to
rm -v /usr/sbin/lxd.REAL
else
# if /usr/sbin/lxd doesn't exist then lxd-installer package isn't installed.
# Instead, we can mock the command to avoid the unminimize script failing
ln -s /bin/true /usr/sbin/lxd
yes | /usr/local/sbin/unminimize
# as the lxd-installer package was not installed and thus not removed by `unminimize`
# the mock /usr/sbin/lxd will still be present, so we need to remove it
rm -v /usr/sbin/lxd
fi
# Run the unminimize script to re-install packages with all dpkg filters removed and install packages
# removed as part of minimization
yes | /usr/local/sbin/unminimize
# Fix up missing recommends. Other non-layered flavors handle this in
# live-build/auto/build, but we need to do it here. Also, there are

View File

@ -39,8 +39,14 @@ trap cleanup_hyperv EXIT
# Perform customisations
# For Ubuntu 24.04 and later cloud-init is included in desktop images. This is not applicable for Hyperv images so
# we can disable cloud-init. This leaves the cloud-init package installed but disabled so users can still
# use it if they want.
touch "${scratch_d}/etc/cloud/cloud-init.disabled"
chroot "${scratch_d}" apt-get update -y
chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure
chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure polkitd-pkla oem-config-gtk language-pack-en-base oem-config-slideshow-ubuntu
cat > ${scratch_d}/etc/modules-load.d/hyperv.conf << EOF
${IMAGE_STR}
@ -124,20 +130,19 @@ touch "${scratch_d}/var/lib/oem-config/run"
chroot "${scratch_d}" apt-get clean
raw_img=binary/boot/disk-hyperv-uefi.ext4
vhd_img=livecd.ubuntu-desktop-hyperv.vhdx
create_manifest "${scratch_d}" "$vhd_img.zip.manifest"
# End customisations
cleanup_hyperv
trap - EXIT
raw_img=binary/boot/disk-hyperv-uefi.ext4
vhd_img=livecd.ubuntu-desktop-hyperv.vhdx
qemu-img convert -O vhdx "$raw_img" "$vhd_img"
rm "$raw_img"
apt-get install -y zip
create_manifest chroot "$vhd_img.zip.manifest"
zip "$vhd_img.zip" "$vhd_img"
rm "$vhd_img"

View File

@ -10,9 +10,9 @@ import yaml
parser = argparse.ArgumentParser()
parser.add_argument('--output', required=True)
parser.add_argument('--size', required=True)
parser.add_argument('--squashfs', required=True)
parser.add_argument('--translations', required=True)
parser.add_argument('--template', required=True)
parser.add_argument('--squashfs', default='')
parser.add_argument('--translations')
parser.add_argument('--template')
parser.add_argument('--langs', default=None)
opts = parser.parse_args(sys.argv[1:])
@ -58,6 +58,7 @@ else:
template['name'] = {'en': en_name}
template['description'] = {'en': en_description}
if opts.translations:
for mo in glob.glob(os.path.join(opts.translations, '*.mo')):
with open(mo, 'rb') as fp:
t = gettext.GNUTranslations(fp=fp)