mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-09 09:51:30 +00:00
Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into ui-by-default
This commit is contained in:
commit
dc89df7ee2
218
debian/changelog
vendored
218
debian/changelog
vendored
@ -1,3 +1,221 @@
|
|||||||
|
livecd-rootfs (2.819) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ Heinrich Schuchardt ]
|
||||||
|
* Add image for StarFive VisionFive 2.
|
||||||
|
|
||||||
|
[ Steve Langasek ]
|
||||||
|
* Update URL to point to ubuntu-archive-team.ubuntu.com.
|
||||||
|
|
||||||
|
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Wed, 05 Apr 2023 18:01:07 +0200
|
||||||
|
|
||||||
|
livecd-rootfs (2.818) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ Dave Jones ]
|
||||||
|
* raspi: drop mkswap.service and swapfile.swap units in
|
||||||
|
099-ubuntu-image-customization.chroot in favour of units provided by
|
||||||
|
ubuntu-raspi-settings-desktop
|
||||||
|
* raspi: drop 01-network-manager-all.yaml in favour of configuration
|
||||||
|
provided by ubuntu-raspi-settings-desktop
|
||||||
|
* raspi: drop growfs option from fstab in favour of growroot-almost
|
||||||
|
service provided by ubuntu-raspi-settings-desktop
|
||||||
|
|
||||||
|
[ William 'jawn-smith' Wilson ]
|
||||||
|
* Skip oem-config setup in hooks if the oem user already exists.
|
||||||
|
|
||||||
|
-- Dave Jones <dave.jones@canonical.com> Tue, 28 Mar 2023 14:38:55 +0100
|
||||||
|
|
||||||
|
livecd-rootfs (2.817) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ John Chittum ]
|
||||||
|
* revert ipc change. kernel 6.2 will have the correct setting
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 27 Mar 2023 12:11:06 -0700
|
||||||
|
|
||||||
|
livecd-rootfs (2.816) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ Chad Smith ]
|
||||||
|
* Replace cloud-init.service on NetworkManager images to address an ordering
|
||||||
|
cycle interfering with autoinstall with ubuntu-desktop-installer.
|
||||||
|
(LP: #2008952)
|
||||||
|
|
||||||
|
-- Dan Bungert <daniel.bungert@canonical.com> Fri, 24 Mar 2023 18:35:46 -0600
|
||||||
|
|
||||||
|
livecd-rootfs (2.815) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ Dan Bungert ]
|
||||||
|
* debian/control: depend on zstd to fix unmkinitramfs failure.
|
||||||
|
|
||||||
|
[ Łukasz 'sil2100' Zemczak ]
|
||||||
|
* Change the mini-iso livefs artifact name from .mini-iso.iso to .iso to be
|
||||||
|
more compatible with existing cdimage machinery.
|
||||||
|
* Rename variables accessed in the mini-iso to the equivalents exported to
|
||||||
|
binary hooks.
|
||||||
|
|
||||||
|
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Thu, 23 Mar 2023 10:43:29 +0100
|
||||||
|
|
||||||
|
livecd-rootfs (2.814) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Adjust journald settings for live-server for compatibility with Subiquity.
|
||||||
|
With a move to core22 we can turn zstd back on, but the new compact flag
|
||||||
|
needs to be off. (LP: #2006985)
|
||||||
|
|
||||||
|
-- Dan Bungert <daniel.bungert@canonical.com> Mon, 20 Mar 2023 15:00:52 -0600
|
||||||
|
|
||||||
|
livecd-rootfs (2.813) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ Łukasz 'sil2100' Zemczak ]
|
||||||
|
* Make sure that for devel we also use the right intel-iot kernel flavor
|
||||||
|
for the images. We don't build any for this series, but it's good to have
|
||||||
|
parity in the devel branch.
|
||||||
|
* Add support for building intel-iot server images. Not used in lunar, but
|
||||||
|
adding to keep devel up-to-date with changes.
|
||||||
|
|
||||||
|
[ Steve Langasek ]
|
||||||
|
* No new dependencies on i386 (xorriso).
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Sat, 18 Mar 2023 08:25:03 -0700
|
||||||
|
|
||||||
|
livecd-rootfs (2.812) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Inform cloud-init when network manager is in use. (LP: #1982855)
|
||||||
|
|
||||||
|
-- Dan Bungert <daniel.bungert@canonical.com> Thu, 09 Mar 2023 14:59:17 -0600
|
||||||
|
|
||||||
|
livecd-rootfs (2.811) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ John Chittum ]
|
||||||
|
* fix: remove ipc from apparmor features in 6.1
|
||||||
|
* open 2.810 release
|
||||||
|
|
||||||
|
-- Dimitri John Ledkov <dimitri.ledkov@canonical.com> Thu, 09 Mar 2023 18:10:05 +0000
|
||||||
|
|
||||||
|
livecd-rootfs (2.810) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Add ubuntu-mini-iso build project.
|
||||||
|
|
||||||
|
-- Dan Bungert <daniel.bungert@canonical.com> Mon, 06 Mar 2023 08:17:11 -0700
|
||||||
|
|
||||||
|
livecd-rootfs (2.809) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Do not use the ubuntucinnamon-desktop task for cinnamon builds, it doesn't
|
||||||
|
seem to be present in the archive yet. Use the metapackage instead, which
|
||||||
|
seems like a better way forward anyway. For the live task, temporarily use
|
||||||
|
a hard-coded list of packages.
|
||||||
|
* Explicitly define the kernel flavor for ubuntucinnamon.
|
||||||
|
|
||||||
|
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Mon, 06 Mar 2023 11:27:02 +0100
|
||||||
|
|
||||||
|
livecd-rootfs (2.808) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Add ubuntucinnamon to the seed-determination switch-case.
|
||||||
|
|
||||||
|
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Fri, 03 Mar 2023 15:07:06 +0100
|
||||||
|
|
||||||
|
livecd-rootfs (2.807) lunar; urgency=medium
|
||||||
|
|
||||||
|
* auto/config: Add support for ubuntu core arm64 generic images (LP: #2009067)
|
||||||
|
|
||||||
|
-- Dimitri John Ledkov <dimitri.ledkov@canonical.com> Thu, 02 Mar 2023 18:18:18 +0000
|
||||||
|
|
||||||
|
livecd-rootfs (2.806) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ Sean Davis ]
|
||||||
|
* Remove snap base seed for xubuntu:minimal
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Tue, 28 Feb 2023 08:00:08 -0800
|
||||||
|
|
||||||
|
livecd-rootfs (2.805) lunar; urgency=medium
|
||||||
|
|
||||||
|
* riscv64: set attribute required partition for firmware.
|
||||||
|
|
||||||
|
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 27 Feb 2023 21:49:27 +1300
|
||||||
|
|
||||||
|
livecd-rootfs (2.804) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Clarified with Erich that edubuntu should install ubuntu-desktop-minimal
|
||||||
|
task.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 24 Feb 2023 21:11:56 -0800
|
||||||
|
|
||||||
|
livecd-rootfs (2.803) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Fix wrong task name for xubuntu-minimal.
|
||||||
|
* Fix edubuntu build: ubuntu-minimal is not a task and minimal is already
|
||||||
|
declared.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 24 Feb 2023 21:05:48 -0800
|
||||||
|
|
||||||
|
livecd-rootfs (2.802) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Address the fact that debootstrap doesn't follow Recommends and as a
|
||||||
|
result we're missing several Recommends that should be installed by
|
||||||
|
default and are on upgrades but not on new installs. This is not
|
||||||
|
applied to minimized images, which don't follow Recommends; but does get
|
||||||
|
separately applied to the ubuntu-server full squashfs.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 24 Feb 2023 17:47:54 -0800
|
||||||
|
|
||||||
|
livecd-rootfs (2.801) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ Heinrich Schuchardt ]
|
||||||
|
* RISC-V: avoid soft lockup Radeon GPUs. With Radeon GPUs and kernel 5.19 a
|
||||||
|
soft lockup was observed. Increase the watchdog threshold.
|
||||||
|
|
||||||
|
[ Łukasz 'sil2100' Zemczak ]
|
||||||
|
* Add ubuntucinnamon to the supported flavours.
|
||||||
|
* Terrible hack workaround for clearing out the non-offline apt cache
|
||||||
|
for desktop related images.
|
||||||
|
|
||||||
|
[ Dimitri John Ledkov ]
|
||||||
|
* ubuntu-cpc: set default ext4 mount option commit=30 (LP: #2006511).
|
||||||
|
* Cherry-pick jammy point release fixes.
|
||||||
|
|
||||||
|
-- Dimitri John Ledkov <dimitri.ledkov@canonical.com> Fri, 24 Feb 2023 12:20:04 +0000
|
||||||
|
|
||||||
|
livecd-rootfs (2.800) lunar; urgency=medium
|
||||||
|
|
||||||
|
* WSL: do not depend on standard anymore.
|
||||||
|
Evolve the seed to only ship the specific part useful to WSL users. This
|
||||||
|
allows to trim down the image size.
|
||||||
|
|
||||||
|
-- Didier Roche <didrocks@ubuntu.com> Mon, 20 Feb 2023 11:59:25 +0100
|
||||||
|
|
||||||
|
livecd-rootfs (2.799) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Reintroduce edubuntu.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Tue, 14 Feb 2023 15:55:41 -0800
|
||||||
|
|
||||||
|
livecd-rootfs (2.798) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Add xubuntu minimal subproject.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 13 Feb 2023 21:07:27 -0800
|
||||||
|
|
||||||
|
livecd-rootfs (2.797) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Drop dependency on rsync, not used in a very long time and lets us drop
|
||||||
|
rsync on i386.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 01 Feb 2023 07:44:33 -0800
|
||||||
|
|
||||||
|
livecd-rootfs (2.796) lunar; urgency=medium
|
||||||
|
|
||||||
|
[ Heinrich Schuchardt ]
|
||||||
|
* riscv64: adjust U-Boot installation for Nezha D1 and LicheeRV. Since
|
||||||
|
version 2022.10 U-Boot SPL and U-Boot are installed onto the same
|
||||||
|
partition. Package nezha-boot0 is not needed anymore.
|
||||||
|
|
||||||
|
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Mon, 09 Jan 2023 14:10:22 +0100
|
||||||
|
|
||||||
|
livecd-rootfs (2.795) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Don't depend on python3-launchpadlib on i386. This breaks ppa-enabled
|
||||||
|
builds on i386, but avoids pulling in a large dependency tree that's
|
||||||
|
not otherwise needed on i386.
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Thu, 05 Jan 2023 22:07:17 -0800
|
||||||
|
|
||||||
livecd-rootfs (2.794) lunar; urgency=medium
|
livecd-rootfs (2.794) lunar; urgency=medium
|
||||||
|
|
||||||
[ Sebastien Bacher ]
|
[ Sebastien Bacher ]
|
||||||
|
7
debian/control
vendored
7
debian/control
vendored
@ -30,16 +30,17 @@ Depends: ${misc:Depends},
|
|||||||
procps,
|
procps,
|
||||||
python3,
|
python3,
|
||||||
python3-apt,
|
python3-apt,
|
||||||
python3-launchpadlib,
|
python3-launchpadlib [!i386],
|
||||||
python3-yaml,
|
python3-yaml,
|
||||||
qemu-utils [!i386],
|
qemu-utils [!i386],
|
||||||
rsync,
|
|
||||||
snapd (>= 2.39) [!i386],
|
snapd (>= 2.39) [!i386],
|
||||||
squashfs-tools (>= 1:3.3-1),
|
squashfs-tools (>= 1:3.3-1),
|
||||||
sudo,
|
sudo,
|
||||||
python3-vmdkstream [amd64 i386],
|
python3-vmdkstream [amd64 i386],
|
||||||
|
xorriso [!i386],
|
||||||
xz-utils,
|
xz-utils,
|
||||||
zerofree
|
zerofree,
|
||||||
|
zstd
|
||||||
Breaks: ubuntu-defaults-builder (<< 0.32)
|
Breaks: ubuntu-defaults-builder (<< 0.32)
|
||||||
Description: construction script for the livecd rootfs
|
Description: construction script for the livecd rootfs
|
||||||
livecd-rootfs provides the script used to create the root filesystem
|
livecd-rootfs provides the script used to create the root filesystem
|
||||||
|
5
debian/tests/default-bootstraps
vendored
5
debian/tests/default-bootstraps
vendored
@ -13,6 +13,7 @@ fi
|
|||||||
# Listed subprojects can be combined with other projects as well,
|
# Listed subprojects can be combined with other projects as well,
|
||||||
# but this list gives reasonable coverage.
|
# but this list gives reasonable coverage.
|
||||||
ALL_TRIPLETS="
|
ALL_TRIPLETS="
|
||||||
|
edubuntu::
|
||||||
kubuntu::
|
kubuntu::
|
||||||
kubuntu-dvd::
|
kubuntu-dvd::
|
||||||
kubuntu-plasma5::
|
kubuntu-plasma5::
|
||||||
@ -26,6 +27,7 @@ ALL_TRIPLETS="
|
|||||||
ubuntu-budgie::
|
ubuntu-budgie::
|
||||||
ubuntu-budgie-desktop::
|
ubuntu-budgie-desktop::
|
||||||
ubuntu-budgie-live::
|
ubuntu-budgie-live::
|
||||||
|
ubuntucinnamon::
|
||||||
ubuntu-core:system-image:ubuntu-core
|
ubuntu-core:system-image:ubuntu-core
|
||||||
ubuntu-cpc::ubuntu-cpc
|
ubuntu-cpc::ubuntu-cpc
|
||||||
ubuntu-cpc:minimized:ubuntu-cpc
|
ubuntu-cpc:minimized:ubuntu-cpc
|
||||||
@ -38,7 +40,8 @@ ALL_TRIPLETS="
|
|||||||
ubuntu-mate-live::
|
ubuntu-mate-live::
|
||||||
ubuntu-netbook::
|
ubuntu-netbook::
|
||||||
ubuntu-server:live:ubuntu-server
|
ubuntu-server:live:ubuntu-server
|
||||||
xubuntu::"
|
xubuntu::
|
||||||
|
xubuntu:minimal:"
|
||||||
|
|
||||||
if [ -z "$SELECTED_TRIPLETS" ]; then
|
if [ -z "$SELECTED_TRIPLETS" ]; then
|
||||||
SELECTED_TRIPLETS="
|
SELECTED_TRIPLETS="
|
||||||
|
@ -330,6 +330,16 @@ EOF
|
|||||||
chmod +x chroot/usr/bin/man
|
chmod +x chroot/usr/bin/man
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${SUBPROJECT:-}" != minimized ] \
|
||||||
|
&& [ "${PROJECT}" != "ubuntu-server" ]
|
||||||
|
then
|
||||||
|
# debootstrap doesn't handle Recommends and fixing this is
|
||||||
|
# non-trivial, so install missing Recommends here
|
||||||
|
echo "Installing any missing recommends"
|
||||||
|
Chroot chroot "env DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get -y --fix-policy install"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "${PASSES}" ]; then
|
if [ -n "${PASSES}" ]; then
|
||||||
PATH="config/:$PATH" lb chroot_layered "$@"
|
PATH="config/:$PATH" lb chroot_layered "$@"
|
||||||
else
|
else
|
||||||
@ -485,6 +495,18 @@ EOF
|
|||||||
clean_debian_chroot
|
clean_debian_chroot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# XXX: Terrible last-minute hack to work-around issue LP: #2008082 !
|
||||||
|
# This basically needs to be done better, we simply need to make sure
|
||||||
|
# that we don't update the cache after lb cleans up. Since identifying
|
||||||
|
# that might take a moment, for now, for flavors that are generally
|
||||||
|
# affected by this, we manually clear out the archive-related Packages
|
||||||
|
# files in the cache.
|
||||||
|
case $PROJECT in
|
||||||
|
ubuntu|xubuntu|kubuntu|ubuntu-budgie|ubuntukylin|ubuntu-mate)
|
||||||
|
rm -f chroot/var/lib/apt/lists/*ubuntu.com*_Packages
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ -n "${PASSES}" ]; then
|
if [ -n "${PASSES}" ]; then
|
||||||
PATH="config/:$PATH" lb binary_layered "$@"
|
PATH="config/:$PATH" lb binary_layered "$@"
|
||||||
else
|
else
|
||||||
@ -588,6 +610,9 @@ for FLAVOUR in $LB_LINUX_FLAVOURS; do
|
|||||||
image-intel)
|
image-intel)
|
||||||
FLAVOUR="intel"
|
FLAVOUR="intel"
|
||||||
;;
|
;;
|
||||||
|
intel-iotg*)
|
||||||
|
FLAVOUR="intel-iotg"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
KVERS="$( (cd "binary/$INITFS"; ls vmlinu?-* 2>/dev/null || true) | (fgrep -v .efi || true) | sed -n "s/^vmlinu.-\\([^-]*-[^-]*-$FLAVOUR\\)$/\\1/p" )"
|
KVERS="$( (cd "binary/$INITFS"; ls vmlinu?-* 2>/dev/null || true) | (fgrep -v .efi || true) | sed -n "s/^vmlinu.-\\([^-]*-[^-]*-$FLAVOUR\\)$/\\1/p" )"
|
||||||
if [ -z "$KVERS" ]; then
|
if [ -z "$KVERS" ]; then
|
||||||
|
@ -12,7 +12,7 @@ fi
|
|||||||
|
|
||||||
echo "Building on $(hostname --fqdn)"
|
echo "Building on $(hostname --fqdn)"
|
||||||
|
|
||||||
SEEDMIRROR=http://people.canonical.com/~ubuntu-archive/seeds/
|
SEEDMIRROR=https://ubuntu-archive-team.ubuntu.com/seeds/
|
||||||
if [ -z "$MIRROR" ]; then
|
if [ -z "$MIRROR" ]; then
|
||||||
case $(hostname --fqdn) in
|
case $(hostname --fqdn) in
|
||||||
*.ubuntu.com) MIRROR=http://ftpmaster.internal/ubuntu/
|
*.ubuntu.com) MIRROR=http://ftpmaster.internal/ubuntu/
|
||||||
@ -346,12 +346,32 @@ if [ -z "${IMAGEFORMAT:-}" ]; then
|
|||||||
ubuntu-base:*)
|
ubuntu-base:*)
|
||||||
IMAGEFORMAT=ubuntu-image
|
IMAGEFORMAT=ubuntu-image
|
||||||
;;
|
;;
|
||||||
ubuntu-server:live)
|
ubuntu-server:live|ubuntu-mini-iso:)
|
||||||
IMAGEFORMAT=plain
|
IMAGEFORMAT=plain
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Configure preinstalled ubuntu-cpc images with included password
|
||||||
|
# one also must request disk1-img-xz image format
|
||||||
|
if [ "$IMAGEFORMAT" = "ext4" ] && [ "$PROJECT" = "ubuntu-cpc" ]; then
|
||||||
|
case $ARCH:$SUBARCH in
|
||||||
|
armhf:raspi2 | \
|
||||||
|
riscv64:icicle | \
|
||||||
|
riscv64:nezha | \
|
||||||
|
riscv64:licheerv | \
|
||||||
|
riscv64:sifive_* | \
|
||||||
|
riscv64:visionfive | \
|
||||||
|
riscv64:visionfive2 | \
|
||||||
|
*:generic)
|
||||||
|
IMAGE_HAS_HARDCODED_PASSWORD=1
|
||||||
|
if [ -z "${IMAGE_TARGETS:-}" ]; then
|
||||||
|
export IMAGE_TARGETS="disk1-img-xz"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
skip_lb_stage() {
|
skip_lb_stage() {
|
||||||
STAGE="$1"
|
STAGE="$1"
|
||||||
mkdir -p .build
|
mkdir -p .build
|
||||||
@ -368,6 +388,8 @@ case $IMAGEFORMAT in
|
|||||||
ubuntu-server:live)
|
ubuntu-server:live)
|
||||||
touch config/universe-enabled
|
touch config/universe-enabled
|
||||||
;;
|
;;
|
||||||
|
ubuntu-mini-iso:)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
PREINSTALLED=true
|
PREINSTALLED=true
|
||||||
;;
|
;;
|
||||||
@ -396,6 +418,8 @@ case $IMAGEFORMAT in
|
|||||||
MODEL=pi3-arm64 ;;
|
MODEL=pi3-arm64 ;;
|
||||||
armhf+cm3)
|
armhf+cm3)
|
||||||
MODEL=cm3 ;;
|
MODEL=cm3 ;;
|
||||||
|
arm64+*)
|
||||||
|
MODEL=pc-arm64 ;;
|
||||||
*)
|
*)
|
||||||
echo "Model $ARCH+${SUBARCH:-} unknown to livecd-rootfs" >&2
|
echo "Model $ARCH+${SUBARCH:-} unknown to livecd-rootfs" >&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -414,7 +438,7 @@ case $IMAGEFORMAT in
|
|||||||
|
|
||||||
CHANNEL="${CHANNEL:-edge}"
|
CHANNEL="${CHANNEL:-edge}"
|
||||||
case $MODEL in
|
case $MODEL in
|
||||||
pc-amd64)
|
pc-amd64|pc-arm64)
|
||||||
if [ -z "${SUBARCH:-}" ]; then
|
if [ -z "${SUBARCH:-}" ]; then
|
||||||
# This is to make sure there's enough writable space
|
# This is to make sure there's enough writable space
|
||||||
UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS --image-size 3700M"
|
UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS --image-size 3700M"
|
||||||
@ -556,7 +580,7 @@ if [ "$PREINSTALLED" = "true" ]; then
|
|||||||
ubuntu-server)
|
ubuntu-server)
|
||||||
add_package live oem-config-debconf ubiquity-frontend-debconf
|
add_package live oem-config-debconf ubiquity-frontend-debconf
|
||||||
;;
|
;;
|
||||||
ubuntu-base|ubuntu-oci|ubuntu-cpc|ubuntu-wsl)
|
ubuntu-base|ubuntu-oci|ubuntu-cpc|ubuntu-wsl|ubuntu-mini-iso)
|
||||||
;;
|
;;
|
||||||
ubuntu)
|
ubuntu)
|
||||||
add_package live oem-config-gtk ubiquity-frontend-gtk
|
add_package live oem-config-gtk ubiquity-frontend-gtk
|
||||||
@ -611,16 +635,19 @@ case $PROJECT in
|
|||||||
ubuntustudio*)
|
ubuntustudio*)
|
||||||
SEED=ubuntustudio.$SUITE
|
SEED=ubuntustudio.$SUITE
|
||||||
;;
|
;;
|
||||||
|
ubuntucinnamon*)
|
||||||
|
SEED=ubuntucinnamon.$SUITE
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
SEED=ubuntu.$SUITE
|
SEED=ubuntu.$SUITE
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $PROJECT in
|
case $PROJECT in
|
||||||
ubuntu-server)
|
ubuntu-server|ubuntu-mini-iso)
|
||||||
COMPONENTS='main'
|
COMPONENTS='main'
|
||||||
;;
|
;;
|
||||||
kubuntu|kubuntu-dvd|kubuntu-plasma5|ubuntu-gnome|ubuntu-budgie|ubuntukylin)
|
kubuntu|kubuntu-dvd|kubuntu-plasma5|edubuntu|ubuntu-gnome|ubuntu-budgie|ubuntukylin|ubuntucinnamon)
|
||||||
COMPONENTS='main restricted universe'
|
COMPONENTS='main restricted universe'
|
||||||
;;
|
;;
|
||||||
xubuntu|mythbuntu|lubuntu|ubuntu-mate|ubuntu-unity|ubuntustudio-dvd|ubuntu-unity)
|
xubuntu|mythbuntu|lubuntu|ubuntu-mate|ubuntu-unity|ubuntustudio-dvd|ubuntu-unity)
|
||||||
@ -654,7 +681,7 @@ case $PROJECT in
|
|||||||
add_task live ubuntu-desktop-minimal-default-languages ubuntu-desktop-default-languages
|
add_task live ubuntu-desktop-minimal-default-languages ubuntu-desktop-default-languages
|
||||||
KERNEL_FLAVOURS='generic-hwe-22.04'
|
KERNEL_FLAVOURS='generic-hwe-22.04'
|
||||||
if [ "$SUBARCH" = "intel-iot" ]; then
|
if [ "$SUBARCH" = "intel-iot" ]; then
|
||||||
KERNEL_FLAVOURS='image-intel'
|
KERNEL_FLAVOURS='intel-iotg'
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
desktop-preinstalled)
|
desktop-preinstalled)
|
||||||
@ -672,7 +699,7 @@ case $PROJECT in
|
|||||||
OPTS="${OPTS:+$OPTS }--ext-fudge-factor=15"
|
OPTS="${OPTS:+$OPTS }--ext-fudge-factor=15"
|
||||||
;;
|
;;
|
||||||
intel-iot)
|
intel-iot)
|
||||||
KERNEL_FLAVOURS='image-intel'
|
KERNEL_FLAVOURS='intel-iotg'
|
||||||
OPTS="${OPTS:+$OPTS }--initramfs=none"
|
OPTS="${OPTS:+$OPTS }--initramfs=none"
|
||||||
OPTS="${OPTS:+$OPTS }--system=normal"
|
OPTS="${OPTS:+$OPTS }--system=normal"
|
||||||
OPTS="${OPTS:+$OPTS }--hdd-label=cloudimg-rootfs"
|
OPTS="${OPTS:+$OPTS }--hdd-label=cloudimg-rootfs"
|
||||||
@ -742,8 +769,34 @@ case $PROJECT in
|
|||||||
add_chroot_hook remove-gnome-icon-cache
|
add_chroot_hook remove-gnome-icon-cache
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
edubuntu)
|
||||||
|
add_task install minimal standard ubuntu-desktop-minimal edubuntu-desktop-gnome
|
||||||
|
LIVE_TASK='edubuntu-live'
|
||||||
|
;;
|
||||||
|
|
||||||
|
ubuntucinnamon)
|
||||||
|
add_task install minimal standard
|
||||||
|
add_package install ubuntucinnamon-desktop
|
||||||
|
# XXX: Adding live packages manually temporarily until we have
|
||||||
|
# the live task for ubuntucinnamon set up properly.
|
||||||
|
add_package live ubiquity-frontend-gtk
|
||||||
|
add_package live ubiquity-ubuntu-artwork ubiquity-slideshow-ubuntu
|
||||||
|
add_package live gtk-im-libthai ibus-hangul ibus-mozc ibus-unikey
|
||||||
|
add_package live zfsutils-linux zfs-initramfs zsys
|
||||||
|
add_package live sssd realmd adcli
|
||||||
|
add_package live gparted cifs-utils
|
||||||
|
KERNEL_FLAVOURS=generic
|
||||||
|
;;
|
||||||
|
|
||||||
xubuntu)
|
xubuntu)
|
||||||
|
case ${SUBPROJECT:-} in
|
||||||
|
minimal)
|
||||||
|
add_task install minimal standard xubuntu-minimal
|
||||||
|
;;
|
||||||
|
*)
|
||||||
add_task install minimal standard xubuntu-desktop
|
add_task install minimal standard xubuntu-desktop
|
||||||
|
;;
|
||||||
|
esac
|
||||||
add_package install xterm
|
add_package install xterm
|
||||||
LIVE_TASK='xubuntu-live'
|
LIVE_TASK='xubuntu-live'
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
@ -831,9 +884,15 @@ case $PROJECT in
|
|||||||
# the GA and HWE kernels (in separate layers) so this code is
|
# the GA and HWE kernels (in separate layers) so this code is
|
||||||
# written generically to support both even though a lot of the
|
# written generically to support both even though a lot of the
|
||||||
# time only one kernel is offered.
|
# time only one kernel is offered.
|
||||||
|
case ${SUBARCH:-} in
|
||||||
|
intel-iot)
|
||||||
|
variants='intel'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
# variants='ga hwe'
|
# variants='ga hwe'
|
||||||
variants='ga'
|
variants='ga'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
for variant in $variants; do
|
for variant in $variants; do
|
||||||
if [ "$variant" = "ga" ]; then
|
if [ "$variant" = "ga" ]; then
|
||||||
@ -842,6 +901,9 @@ case $PROJECT in
|
|||||||
elif [ "$variant" = "hwe" ]; then
|
elif [ "$variant" = "hwe" ]; then
|
||||||
kernel_metapkg=linux-generic-hwe-$(lsb_release -sr)
|
kernel_metapkg=linux-generic-hwe-$(lsb_release -sr)
|
||||||
flavor=generic-hwe
|
flavor=generic-hwe
|
||||||
|
elif [ "$variant" = "intel" ]; then
|
||||||
|
kernel_metapkg=linux-intel-iotg
|
||||||
|
flavor=intel-iotg
|
||||||
else
|
else
|
||||||
echo "bogus variant: $variant"
|
echo "bogus variant: $variant"
|
||||||
exit 1
|
exit 1
|
||||||
@ -874,6 +936,25 @@ case $PROJECT in
|
|||||||
PREINSTALL_POOL_SEEDS='server-ship'
|
PREINSTALL_POOL_SEEDS='server-ship'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
ubuntu-mini-iso)
|
||||||
|
OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
|
||||||
|
|
||||||
|
OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
|
||||||
|
KERNEL_FLAVOURS=none
|
||||||
|
BINARY_REMOVE_LINUX=false
|
||||||
|
|
||||||
|
add_package install mini-iso-tools openssl ca-certificates isc-dhcp-client linux-generic
|
||||||
|
case $ARCH in
|
||||||
|
amd64)
|
||||||
|
add_package install cd-boot-images-amd64
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "unexpected architecture for $PROJECT: '$ARCH'"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
ubuntu-base)
|
ubuntu-base)
|
||||||
OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
|
OPTS="${OPTS:+$OPTS }--bootstrap-flavour=minimal"
|
||||||
;;
|
;;
|
||||||
@ -883,7 +964,7 @@ case $PROJECT in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
ubuntu-wsl)
|
ubuntu-wsl)
|
||||||
add_task install minimal standard ubuntu-wsl
|
add_task install minimal ubuntu-wsl
|
||||||
OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
|
OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none"
|
||||||
KERNEL_FLAVOURS=none
|
KERNEL_FLAVOURS=none
|
||||||
BINARY_REMOVE_LINUX=false
|
BINARY_REMOVE_LINUX=false
|
||||||
@ -925,7 +1006,7 @@ case $PROJECT in
|
|||||||
if [ "${SUBARCH:-}" = "generic" ]; then
|
if [ "${SUBARCH:-}" = "generic" ]; then
|
||||||
KERNEL_FLAVOURS=generic
|
KERNEL_FLAVOURS=generic
|
||||||
elif [ "${SUBARCH:-}" = "intel-iot" ]; then
|
elif [ "${SUBARCH:-}" = "intel-iot" ]; then
|
||||||
KERNEL_FLAVOURS=image-intel
|
KERNEL_FLAVOURS=intel-iotg
|
||||||
OPTS="${OPTS:+$OPTS }--initramfs=none"
|
OPTS="${OPTS:+$OPTS }--initramfs=none"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -1000,10 +1081,12 @@ case $PROJECT:${SUBPROJECT:-} in
|
|||||||
ubuntu-server:live)
|
ubuntu-server:live)
|
||||||
BASE_SEED='server'
|
BASE_SEED='server'
|
||||||
;;
|
;;
|
||||||
ubuntu-base:*|ubuntu-core:*)
|
ubuntu-base:*|ubuntu-core:*|ubuntu-mini-iso:)
|
||||||
;;
|
;;
|
||||||
ubuntu-oci:*)
|
ubuntu-oci:*)
|
||||||
;;
|
;;
|
||||||
|
xubuntu:minimal)
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
BASE_SEED='desktop'
|
BASE_SEED='desktop'
|
||||||
;;
|
;;
|
||||||
@ -1109,7 +1192,7 @@ case $PROJECT in
|
|||||||
KERNEL_FLAVOURS="${SUBARCH:-$KERNEL_FLAVOURS}"
|
KERNEL_FLAVOURS="${SUBARCH:-$KERNEL_FLAVOURS}"
|
||||||
case $SUBARCH in
|
case $SUBARCH in
|
||||||
intel-iot)
|
intel-iot)
|
||||||
KERNEL_FLAVOURS='image-intel'
|
KERNEL_FLAVOURS='intel-iotg'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@ -1171,7 +1254,7 @@ if [ "${IMAGE_HAS_HARDCODED_PASSWORD:-}" = "1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case $PROJECT in
|
case $PROJECT in
|
||||||
ubuntu-cpc|ubuntu-core|ubuntu-base|ubuntu-oci|ubuntu-wsl)
|
ubuntu-cpc|ubuntu-core|ubuntu-base|ubuntu-oci|ubuntu-wsl|ubuntu-mini-iso)
|
||||||
# ubuntu-cpc gets this added in 025-create-groups.chroot, and we do
|
# ubuntu-cpc gets this added in 025-create-groups.chroot, and we do
|
||||||
# not want this group in projects that are effectively just chroots
|
# not want this group in projects that are effectively just chroots
|
||||||
;;
|
;;
|
||||||
@ -1330,7 +1413,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled|ubuntu-wsl:*)
|
ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled|ubuntu-wsl:*|ubuntu-mini-iso:*)
|
||||||
# Ensure that most things e.g. includes.chroot are copied as is
|
# Ensure that most things e.g. includes.chroot are copied as is
|
||||||
for entry in /usr/share/livecd-rootfs/live-build/${PROJECT}/*; do
|
for entry in /usr/share/livecd-rootfs/live-build/${PROJECT}/*; do
|
||||||
case $entry in
|
case $entry in
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
imagesize=${IMAGE_SIZE:-2361393152}
|
imagesize=${IMAGE_SIZE:-2361393152}
|
||||||
fs_label="${FS_LABEL:-rootfs}"
|
fs_label="${FS_LABEL:-rootfs}"
|
||||||
|
|
||||||
|
AUTOMATION_HEADER="# Automatically generated by installer build process"
|
||||||
|
|
||||||
rootfs_dev_mapper=
|
rootfs_dev_mapper=
|
||||||
loop_device=
|
loop_device=
|
||||||
loop_raw=
|
loop_raw=
|
||||||
@ -997,7 +999,7 @@ configure_network_manager() {
|
|||||||
# default. Installing NM on an existing system only manages wifi and wwan via
|
# default. Installing NM on an existing system only manages wifi and wwan via
|
||||||
# /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf. When setting
|
# /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf. When setting
|
||||||
# the global backend to NM, netplan overrides that file.
|
# the global backend to NM, netplan overrides that file.
|
||||||
if [ -e chroot/usr/sbin/NetworkManager -a ! -f chroot/etc/netplan/01-network-manager-all.yaml ]; then
|
if [ -e chroot/usr/sbin/NetworkManager -a ! -f chroot/etc/netplan/01-network-manager-all.yaml -a "$SUBPROJECT" != "desktop-preinstalled" ]; then
|
||||||
echo "===== Enabling all devices in NetworkManager ===="
|
echo "===== Enabling all devices in NetworkManager ===="
|
||||||
mkdir -p chroot/etc/netplan
|
mkdir -p chroot/etc/netplan
|
||||||
cat <<EOF > chroot/etc/netplan/01-network-manager-all.yaml
|
cat <<EOF > chroot/etc/netplan/01-network-manager-all.yaml
|
||||||
@ -1006,6 +1008,72 @@ network:
|
|||||||
version: 2
|
version: 2
|
||||||
renderer: NetworkManager
|
renderer: NetworkManager
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# inform cloud-init of the same (LP: #1982855)
|
||||||
|
mkdir -p chroot/etc/cloud/cloud.cfg.d
|
||||||
|
cat <<EOF > chroot/etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg
|
||||||
|
${AUTOMATION_HEADER}
|
||||||
|
# Let NetworkManager manage all devices on this system
|
||||||
|
system_info:
|
||||||
|
network:
|
||||||
|
renderers: ['network-manager']
|
||||||
|
activators: ['network-manager']
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Position cloud-init.service After=NetworkManager.service.
|
||||||
|
# (LP: #2008952).
|
||||||
|
# We override the entire cloud-init.service definition because
|
||||||
|
# systemd drop-in files only allow adding Before/After constraints
|
||||||
|
# yet we are dropping the Before=sysinit.target from the upstream
|
||||||
|
# cloud-init.service.
|
||||||
|
# This override can be dropped when NetworkManager.service can run
|
||||||
|
# Before=sysinit.target when it drops strict dbus.service dependency.
|
||||||
|
cat <<EOF > chroot/lib/systemd/system/cloud-init.service
|
||||||
|
${AUTOMATION_HEADER}
|
||||||
|
# Based on cloud-init 23.1 for Desktop LiveCD
|
||||||
|
[Unit]
|
||||||
|
Description=Initial cloud-init job (metadata service crawler)
|
||||||
|
DefaultDependencies=no
|
||||||
|
Wants=cloud-init-local.service
|
||||||
|
Wants=sshd-keygen.service
|
||||||
|
Wants=sshd.service
|
||||||
|
After=cloud-init-local.service
|
||||||
|
After=systemd-networkd-wait-online.service
|
||||||
|
# Installer Added After=NetworkManager* ordering
|
||||||
|
After=NetworkManager.service
|
||||||
|
After=NetworkManager-wait-online.service
|
||||||
|
After=networking.service
|
||||||
|
Before=network-online.target
|
||||||
|
Before=sshd-keygen.service
|
||||||
|
Before=sshd.service
|
||||||
|
# Before=sysinit.target Installer removed to allow for NM dependency
|
||||||
|
Before=shutdown.target
|
||||||
|
Conflicts=shutdown.target
|
||||||
|
Before=systemd-user-sessions.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/cloud-init init
|
||||||
|
RemainAfterExit=yes
|
||||||
|
TimeoutSec=0
|
||||||
|
|
||||||
|
# Output needs to appear in instance console output
|
||||||
|
StandardOutput=journal+console
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=cloud-init.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Allow cloud-init clean to inform of strict network-manager config
|
||||||
|
mkdir -p chroot/etc/cloud/clean.d
|
||||||
|
cat <<EOF > chroot/etc/cloud/clean.d/99-installer-use-networkmanager
|
||||||
|
# Inform clone image creators about strict network-manager cfg for cloud-init
|
||||||
|
if [ -f /etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg ]; then
|
||||||
|
echo "WARNING: cloud-init network config is limited to using network-manager."
|
||||||
|
echo "If this is undesirable: rm /etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg"
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
chmod +x chroot/etc/cloud/clean.d/99-installer-use-networkmanager
|
||||||
else
|
else
|
||||||
echo "==== NetworkManager not installed ===="
|
echo "==== NetworkManager not installed ===="
|
||||||
fi
|
fi
|
||||||
|
@ -56,9 +56,12 @@ build_layered_squashfs () {
|
|||||||
|
|
||||||
Echo_message "lb_binary_layered: treating pass $pass"
|
Echo_message "lb_binary_layered: treating pass $pass"
|
||||||
|
|
||||||
|
# Per convention, we include the subarch name next to the project
|
||||||
|
PROJECT_FULL=$PROJECT${SUBARCH:+-$SUBARCH}
|
||||||
|
|
||||||
# Building squashfs filesystem & manifest
|
# Building squashfs filesystem & manifest
|
||||||
local overlay_dir="overlay.${pass}"
|
local overlay_dir="overlay.${pass}"
|
||||||
base="${PWD}/livecd.${PROJECT}.${pass}"
|
base="${PWD}/livecd.${PROJECT_FULL}.${pass}"
|
||||||
squashfs_f="${base}.squashfs"
|
squashfs_f="${base}.squashfs"
|
||||||
|
|
||||||
# We have already treated that pass
|
# We have already treated that pass
|
||||||
@ -113,7 +116,7 @@ build_layered_squashfs () {
|
|||||||
create_manifest "chroot" "${squashfs_f_manifest}.full"
|
create_manifest "chroot" "${squashfs_f_manifest}.full"
|
||||||
|
|
||||||
# Delta manifest
|
# Delta manifest
|
||||||
diff -NU0 ${PWD}/livecd.${PROJECT}.$(get_parent_pass $pass).manifest.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest
|
diff -NU0 ${PWD}/livecd.${PROJECT_FULL}.$(get_parent_pass $pass).manifest.full ${squashfs_f_manifest}.full|grep -v ^@ > $squashfs_f_manifest
|
||||||
|
|
||||||
squashfs_f_size="${base}.size"
|
squashfs_f_size="${base}.size"
|
||||||
du -B 1 -s "overlay.${pass}/" | cut -f1 > "${squashfs_f_size}"
|
du -B 1 -s "overlay.${pass}/" | cut -f1 > "${squashfs_f_size}"
|
||||||
@ -121,7 +124,7 @@ build_layered_squashfs () {
|
|||||||
# We take first live pass for "global" ISO properties (used by installers and checkers):
|
# We take first live pass for "global" ISO properties (used by installers and checkers):
|
||||||
# Prepare initrd + kernel
|
# Prepare initrd + kernel
|
||||||
# Main manifest and size files
|
# Main manifest and size files
|
||||||
prefix="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
|
prefix="livecd.$PROJECT_FULL"
|
||||||
if [ ! -e "${prefix}.manifest" ] && $(is_live_layer "$pass"); then
|
if [ ! -e "${prefix}.manifest" ] && $(is_live_layer "$pass"); then
|
||||||
totalsize=$(cat ${squashfs_f_size})
|
totalsize=$(cat ${squashfs_f_size})
|
||||||
curpass="$pass"
|
curpass="$pass"
|
||||||
@ -130,7 +133,7 @@ build_layered_squashfs () {
|
|||||||
# We climbed up the tree to the root layer, we are done
|
# We climbed up the tree to the root layer, we are done
|
||||||
[ -z "$curpass" ] && break
|
[ -z "$curpass" ] && break
|
||||||
|
|
||||||
totalsize=$(expr $totalsize + $(cat "${PWD}/livecd.${PROJECT}.${curpass}.size"))
|
totalsize=$(expr $totalsize + $(cat "${PWD}/livecd.${PROJECT_FULL}.${curpass}.size"))
|
||||||
done
|
done
|
||||||
echo ${totalsize} > "${prefix}.size"
|
echo ${totalsize} > "${prefix}.size"
|
||||||
|
|
||||||
@ -141,7 +144,7 @@ build_layered_squashfs () {
|
|||||||
|
|
||||||
if [ -f config/$pass.catalog-in.yaml ]; then
|
if [ -f config/$pass.catalog-in.yaml ]; then
|
||||||
echo "Expanding catalog entry template for $pass"
|
echo "Expanding catalog entry template for $pass"
|
||||||
usc_opts="--output livecd.${PROJECT}.install-sources.yaml \
|
usc_opts="--output livecd.${PROJECT_FULL}.install-sources.yaml \
|
||||||
--template config/$pass.catalog-in.yaml \
|
--template config/$pass.catalog-in.yaml \
|
||||||
--size $(du -B 1 -s chroot/ | cut -f1) --squashfs ${pass}.squashfs \
|
--size $(du -B 1 -s chroot/ | cut -f1) --squashfs ${pass}.squashfs \
|
||||||
--translations config/catalog-translations"
|
--translations config/catalog-translations"
|
||||||
@ -168,9 +171,9 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Ubiquity-compatible removal manifest for ISO not using a layered-aware installer
|
# Ubiquity-compatible removal manifest for ISO not using a layered-aware installer
|
||||||
if [ -n "$(ls livecd.${PROJECT}.*install.live.manifest.full 2>/dev/null)" ] && \
|
if [ -n "$(ls livecd.${PROJECT_FULL}.*install.live.manifest.full 2>/dev/null)" ] && \
|
||||||
[ -n "$(ls livecd.${PROJECT}.*install.manifest.full 2>/dev/null)" ]; then
|
[ -n "$(ls livecd.${PROJECT_FULL}.*install.manifest.full 2>/dev/null)" ]; then
|
||||||
echo "$(diff livecd.${PROJECT}.*install.live.manifest.full livecd.${PROJECT}.*install.manifest.full | awk '/^< / { print $2 }')" > livecd.${PROJECT}-manifest-remove
|
echo "$(diff livecd.${PROJECT_FULL}.*install.live.manifest.full livecd.${PROJECT_FULL}.*install.manifest.full | awk '/^< / { print $2 }')" > livecd.${PROJECT_FULL}-manifest-remove
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 644 *.squashfs *.manifest* *.size
|
chmod 644 *.squashfs *.manifest* *.size
|
||||||
|
@ -84,12 +84,15 @@ create_partitions() {
|
|||||||
--new=13:256:25575 \
|
--new=13:256:25575 \
|
||||||
--change-name=13:loader1 \
|
--change-name=13:loader1 \
|
||||||
--typecode=13:B161E8AB-7D4B-4DB4-821C-4120A0554A35 \
|
--typecode=13:B161E8AB-7D4B-4DB4-821C-4120A0554A35 \
|
||||||
|
--attributes=13:set:0 \
|
||||||
--new=16:25576:32799 \
|
--new=16:25576:32799 \
|
||||||
--change-name=16:loader2b \
|
--change-name=16:loader2b \
|
||||||
--typecode=16:F79E76D9-AC98-418B-8F31-E17EA24FF07C \
|
--typecode=16:F79E76D9-AC98-418B-8F31-E17EA24FF07C \
|
||||||
|
--attributes=16:set:0 \
|
||||||
--new=14:32800:43007 \
|
--new=14:32800:43007 \
|
||||||
--change-name=14:loader2 \
|
--change-name=14:loader2 \
|
||||||
--typecode=14:F4FA3898-3478-4941-887D-FCEC4E9E3C05 \
|
--typecode=14:F4FA3898-3478-4941-887D-FCEC4E9E3C05 \
|
||||||
|
--attributes=14:set:0 \
|
||||||
--new=15::+106M \
|
--new=15::+106M \
|
||||||
--typecode=15:ef00 \
|
--typecode=15:ef00 \
|
||||||
--change-name=15:ESP \
|
--change-name=15:ESP \
|
||||||
@ -104,6 +107,7 @@ create_partitions() {
|
|||||||
--new=13:256:25575 \
|
--new=13:256:25575 \
|
||||||
--change-name=13:loader \
|
--change-name=13:loader \
|
||||||
--typecode=13:ef02 \
|
--typecode=13:ef02 \
|
||||||
|
--attributes=13:set:0 \
|
||||||
--new=15::+106M \
|
--new=15::+106M \
|
||||||
--typecode=15:ef00 \
|
--typecode=15:ef00 \
|
||||||
--change-name=15:ESP \
|
--change-name=15:ESP \
|
||||||
@ -124,6 +128,23 @@ create_partitions() {
|
|||||||
--change-name=3:uEnv \
|
--change-name=3:uEnv \
|
||||||
--new=1:: \
|
--new=1:: \
|
||||||
--attributes=1:set:2
|
--attributes=1:set:2
|
||||||
|
elif [ "${SUBARCH:-}" = "visionfive2" ]; then
|
||||||
|
# VisionFive 2
|
||||||
|
sgdisk "${disk_image}" \
|
||||||
|
--set-alignment=4096 \
|
||||||
|
--new=13:4096:8191 \
|
||||||
|
--typecode=13:2E54B353-1271-4842-806F-E436D6AF6985 \
|
||||||
|
--change-name=13:loader1 \
|
||||||
|
--new=2:8192:16383 \
|
||||||
|
--typecode=2:7a097280-70d2-44bc-886c-ff5ffbb7b098 \
|
||||||
|
--change-name=2:loader2 \
|
||||||
|
--new=12:16384:24575 \
|
||||||
|
--change-name=12:CIDATA \
|
||||||
|
--new=15:24576:229375 \
|
||||||
|
--typecode=15:ef00 \
|
||||||
|
--change-name=15:ESP \
|
||||||
|
--new=1:229376: \
|
||||||
|
--attributes=1:set:2
|
||||||
else
|
else
|
||||||
# preinstalled server, currently FU540
|
# preinstalled server, currently FU540
|
||||||
# FU740 too in the future
|
# FU740 too in the future
|
||||||
@ -132,9 +153,11 @@ create_partitions() {
|
|||||||
--new=13:34:2081 \
|
--new=13:34:2081 \
|
||||||
--change-name=13:loader1 \
|
--change-name=13:loader1 \
|
||||||
--typecode=13:5B193300-FC78-40CD-8002-E86C45580B47 \
|
--typecode=13:5B193300-FC78-40CD-8002-E86C45580B47 \
|
||||||
|
--attributes=13:set:0 \
|
||||||
--new=14:2082:10239 \
|
--new=14:2082:10239 \
|
||||||
--change-name=14:loader2 \
|
--change-name=14:loader2 \
|
||||||
--typecode=14:2E54B353-1271-4842-806F-E436D6AF6985 \
|
--typecode=14:2E54B353-1271-4842-806F-E436D6AF6985 \
|
||||||
|
--attributes=14:set:0 \
|
||||||
--new=15::+106M \
|
--new=15::+106M \
|
||||||
--typecode=15:ef00 \
|
--typecode=15:ef00 \
|
||||||
--new=12::+4M \
|
--new=12::+4M \
|
||||||
@ -243,10 +266,11 @@ install_grub() {
|
|||||||
local my_d=$(dirname $(readlink -f ${0}))
|
local my_d=$(dirname $(readlink -f ${0}))
|
||||||
echo "Adjusting GRUB defaults for ${ARCH}"
|
echo "Adjusting GRUB defaults for ${ARCH}"
|
||||||
mkdir -p mountpoint/etc/default/grub.d/
|
mkdir -p mountpoint/etc/default/grub.d/
|
||||||
cp ${my_d}/riscv64/grub/cmdline.cfg mountpoint/etc/default/grub.d/
|
cp ${my_d}/riscv64/grub/10_cmdline.cfg mountpoint/etc/default/grub.d/
|
||||||
case "${SUBARCH}" in
|
case "${SUBARCH}" in
|
||||||
"icicle")
|
"icicle")
|
||||||
echo "Installing GRUB for ${SUBARCH} board"
|
echo "Installing GRUB for ${SUBARCH} board"
|
||||||
|
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
|
# 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,
|
# /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.
|
# the model value is wrong and we need to use /etc/flash-kernel/machine instead.
|
||||||
@ -298,16 +322,12 @@ install_grub() {
|
|||||||
chroot mountpoint bash -c 'FK_FORCE=yes apt-get install -qqy grub-efi-riscv64 flash-kernel'
|
chroot mountpoint bash -c 'FK_FORCE=yes apt-get install -qqy grub-efi-riscv64 flash-kernel'
|
||||||
efi_target=riscv64-efi
|
efi_target=riscv64-efi
|
||||||
|
|
||||||
# nezha-boot0 is actually compatible with the LicheeRV boards (and probably other D1-based boards)
|
# u-boot-nezha supports both the LicheeRV and the Nezha D1.
|
||||||
chroot mountpoint apt-get install -qqy nezha-boot0
|
|
||||||
# FSBL, which gets U-Boot SPL
|
|
||||||
loader1="/dev/mapper${loop_device///dev/}p13"
|
|
||||||
dd if=mountpoint/usr/lib/u-boot/nezha/boot0_sdcard_sun20iw1p1.bin of=$loader1
|
|
||||||
# The real U-Boot
|
|
||||||
# u-boot-nezha actually contains both the LicheeRV and the Nezha boards support
|
|
||||||
chroot mountpoint apt-get install -qqy u-boot-nezha
|
chroot mountpoint apt-get install -qqy u-boot-nezha
|
||||||
loader2="/dev/mapper${loop_device///dev/}p14"
|
# Since version 2022.10 U-Boot SPL and U-Boot are installed onto the same partition.
|
||||||
dd if=mountpoint/usr/lib/u-boot/${SUBARCH}/u-boot.toc1 of=$loader2
|
# Package nezha-boot0 is not needed anymore.
|
||||||
|
loader1="/dev/mapper${loop_device///dev/}p13"
|
||||||
|
dd if=mountpoint/usr/lib/u-boot/${SUBARCH}/u-boot-sunxi-with-spl.bin of=$loader1
|
||||||
# Provide end-user modifyable CIDATA
|
# Provide end-user modifyable CIDATA
|
||||||
cidata_dev="/dev/mapper${loop_device///dev/}p12"
|
cidata_dev="/dev/mapper${loop_device///dev/}p12"
|
||||||
setup_cidata "${cidata_dev}"
|
setup_cidata "${cidata_dev}"
|
||||||
@ -370,8 +390,35 @@ EOF
|
|||||||
# without a cloud datasource.
|
# without a cloud datasource.
|
||||||
setup_cinocloud mountpoint
|
setup_cinocloud mountpoint
|
||||||
;;
|
;;
|
||||||
|
"visionfive2")
|
||||||
|
echo "Installing GRUB for ${SUBARCH} board"
|
||||||
|
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.
|
||||||
|
# This explains why we install flash-kernel here.
|
||||||
|
chroot mountpoint mkdir -p /etc/flash-kernel/
|
||||||
|
chroot mountpoint bash -c "echo 'StarFive VisionFive 2 v1.3B' > /etc/flash-kernel/machine"
|
||||||
|
chroot mountpoint bash -c 'FK_FORCE=yes apt-get install -qqy grub-efi-riscv64 flash-kernel'
|
||||||
|
efi_target=riscv64-efi
|
||||||
|
# Provide end-user modifyable CIDATA
|
||||||
|
cidata_dev="/dev/mapper${loop_device///dev/}p12"
|
||||||
|
setup_cidata "${cidata_dev}"
|
||||||
|
# Provide stock nocloud datasource
|
||||||
|
# Allow interactive login on baremetal board,
|
||||||
|
# without a cloud datasource.
|
||||||
|
setup_cinocloud mountpoint
|
||||||
|
# Flash-kernel creates boot.scr if it believes we did
|
||||||
|
# not boot in UEFi mode. Remove it so that we can boot
|
||||||
|
# via GRUB.
|
||||||
|
chroot mountpoint rm -f /boot/boot.scr
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
|
cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/
|
||||||
|
echo "Installing u-boot-menu for ${SUBARCH} board"
|
||||||
chroot mountpoint apt-get install -qqy u-boot-menu #grub-efi-riscv64
|
chroot mountpoint apt-get install -qqy u-boot-menu #grub-efi-riscv64
|
||||||
|
mkdir -p mountpoint/etc/u-boot-menu/conf.d/
|
||||||
|
cp ${my_d}/riscv64/u-boot-menu/*.conf mountpoint/etc/u-boot-menu/conf.d/
|
||||||
efi_target=riscv64-efi
|
efi_target=riscv64-efi
|
||||||
chroot mountpoint u-boot-update
|
chroot mountpoint u-boot-update
|
||||||
u_boot_arch="${SUBARCH}"
|
u_boot_arch="${SUBARCH}"
|
||||||
@ -402,7 +449,11 @@ EOF
|
|||||||
chroot mountpoint u-boot-update
|
chroot mountpoint u-boot-update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${SUBARCH:-}" != "visionfive" ] && [ "${SUBARCH:-}" != "nezha" ] && [ "${SUBARCH:-}" != "licheerv" ] && [ "${SUBARCH:-}" != "icicle" ]; then
|
if [ "${SUBARCH:-}" != "nezha" ] && \
|
||||||
|
[ "${SUBARCH:-}" != "licheerv" ] && \
|
||||||
|
[ "${SUBARCH:-}" != "icicle" ] \
|
||||||
|
[ "${SUBARCH:-}" != "visionfive" ] && \
|
||||||
|
[ "${SUBARCH:-}" != "visionfive2" ]; then
|
||||||
## TODO remove below once we have grub-efi-riscv64 for the platforms
|
## TODO remove below once we have grub-efi-riscv64 for the platforms
|
||||||
rm mountpoint/tmp/device.map
|
rm mountpoint/tmp/device.map
|
||||||
umount mountpoint/boot/efi
|
umount mountpoint/boot/efi
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
# When booting with Radeon GPUs a soft lockup was observed. Increase the
|
||||||
|
# watchdog threshhold.
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT sysctl.kernel.watchdog_thresh=60"
|
@ -0,0 +1 @@
|
|||||||
|
U_BOOT_PARAMETERS="ro efi=debug earlycon"
|
@ -0,0 +1,3 @@
|
|||||||
|
# When booting with Radeon GPUs a soft lockup was observed. Increase the
|
||||||
|
# watchdog threshhold.
|
||||||
|
U_BOOT_PARAMETERS="$U_BOOT_PARAMETERS sysctl.kernel.watchdog_thresh=60"
|
@ -72,7 +72,7 @@ if [ -n "${root_fs_label}" ]; then
|
|||||||
sed -i "s,^[^#${bl}]*\([${bl}]*/[${bl}].*\),${lstr}\1," "${rootd}/etc/fstab"
|
sed -i "s,^[^#${bl}]*\([${bl}]*/[${bl}].*\),${lstr}\1," "${rootd}/etc/fstab"
|
||||||
fi
|
fi
|
||||||
cat > /etc/fstab << EOM
|
cat > /etc/fstab << EOM
|
||||||
LABEL=cloudimg-rootfs / ext4 discard,errors=remount-ro 0 1
|
LABEL=cloudimg-rootfs / ext4 discard,commit=30,errors=remount-ro 0 1
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
# for quantal and newer, add /etc/overlayroot.local.conf
|
# for quantal and newer, add /etc/overlayroot.local.conf
|
||||||
|
79
live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary
Executable file
79
live-build/ubuntu-mini-iso/hooks/01-mini-iso.binary
Executable file
@ -0,0 +1,79 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
case $ARCH in
|
||||||
|
amd64)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
. config/binary
|
||||||
|
|
||||||
|
KERNEL=chroot/boot/vmlinuz
|
||||||
|
INITRD=chroot/boot/initrd.img
|
||||||
|
|
||||||
|
mkdir -p "chroot/etc/initramfs-tools/conf.d"
|
||||||
|
cat > chroot/etc/initramfs-tools/conf.d/casperize.conf <<EOF
|
||||||
|
export CASPER_GENERATE_UUID=1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chroot chroot update-initramfs -u
|
||||||
|
|
||||||
|
case $ARCH in
|
||||||
|
amd64)
|
||||||
|
mkdir -p "ubuntu-mini-iso/amd64"
|
||||||
|
cp -a chroot/usr/share/cd-boot-images-amd64/tree ubuntu-mini-iso/amd64/tree
|
||||||
|
cp -a chroot/usr/share/cd-boot-images-amd64/images ubuntu-mini-iso/amd64/images
|
||||||
|
mkdir -p "ubuntu-mini-iso/amd64/tree/casper"
|
||||||
|
cp "$KERNEL" ubuntu-mini-iso/amd64/tree/casper/vmlinuz
|
||||||
|
cp "$INITRD" ubuntu-mini-iso/amd64/tree/casper/initrd
|
||||||
|
mkdir -p "ubuntu-mini-iso/amd64/tree/boot/grub"
|
||||||
|
cat > ubuntu-mini-iso/amd64/tree/boot/grub/grub.cfg <<EOF
|
||||||
|
menuentry "Choose an Ubuntu version to install" {
|
||||||
|
set gfxpayload=keep
|
||||||
|
linux /casper/vmlinuz iso-chooser-menu ip=dhcp ---
|
||||||
|
initrd /casper/initrd
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
mkdir -p ubuntu-mini-iso/$ARCH/tree/.disk
|
||||||
|
|
||||||
|
touch ubuntu-mini-iso/$ARCH/tree/.disk/base_installable
|
||||||
|
|
||||||
|
tmpdir=$(mktemp -d)
|
||||||
|
unmkinitramfs $INITRD $tmpdir
|
||||||
|
if [ -e "$tmpdir/main/conf/uuid.conf" ]; then
|
||||||
|
uuid_conf="$tmpdir/main/conf/uuid.conf"
|
||||||
|
elif [ -e "$tmpdir/conf/uuid.conf" ]; then
|
||||||
|
uuid_conf="$tmpdir/conf/uuid.conf"
|
||||||
|
else
|
||||||
|
echo "uuid.conf not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cp "$uuid_conf" ubuntu-mini-iso/$ARCH/tree/.disk/casper-uuid-generic
|
||||||
|
rm -fr $tmpdir
|
||||||
|
|
||||||
|
cat > ubuntu-mini-iso/$ARCH/tree/.disk/cd_type <<EOF
|
||||||
|
full_cd/single
|
||||||
|
EOF
|
||||||
|
|
||||||
|
version=$(distro-info --fullname --series=$LB_DISTRIBUTION \
|
||||||
|
| sed s'/^Ubuntu/ubuntu-mini-iso/')
|
||||||
|
|
||||||
|
cat > ubuntu-mini-iso/$ARCH/tree/.disk/info <<EOF
|
||||||
|
$version - $ARCH ($BUILDSTAMP)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
dest="${PWD}/livecd.${PROJECT}.iso"
|
||||||
|
xorriso="$(cat chroot/usr/share/cd-boot-images-amd64/xorriso-cmd.txt)"
|
||||||
|
|
||||||
|
cd ubuntu-mini-iso/$ARCH
|
||||||
|
$xorriso -o $dest
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
rm -rf ubuntu-mini-iso
|
@ -18,3 +18,10 @@ ln -s /bin/true /usr/bin/snap
|
|||||||
yes | /usr/local/sbin/unminimize
|
yes | /usr/local/sbin/unminimize
|
||||||
rm /usr/bin/snap
|
rm /usr/bin/snap
|
||||||
dpkg-divert --remove --rename /usr/bin/snap
|
dpkg-divert --remove --rename /usr/bin/snap
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# additional recommends missing from server-minimal that wouldn't be
|
||||||
|
# corrected by a fix to debootstrap to handle Recommends.
|
||||||
|
echo "Installing any missing recommends"
|
||||||
|
env DEBIAN_FRONTEND=noninteractive apt-get -y --fix-policy install
|
||||||
|
@ -11,6 +11,8 @@ case $PASS in
|
|||||||
kernel_metapkg=linux-generic
|
kernel_metapkg=linux-generic
|
||||||
elif [ "$flavor" = "generic-hwe" ]; then
|
elif [ "$flavor" = "generic-hwe" ]; then
|
||||||
kernel_metapkg=linux-generic-hwe-$(lsb_release -sr)
|
kernel_metapkg=linux-generic-hwe-$(lsb_release -sr)
|
||||||
|
elif [ "$flavor" = "intel-iotg" ]; then
|
||||||
|
kernel_metapkg=linux-intel-iotg
|
||||||
else
|
else
|
||||||
echo "bogus flavor: $flavor"
|
echo "bogus flavor: $flavor"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -13,6 +13,8 @@ case $PASS in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
PROJECT=$PROJECT${SUBARCH:+-$SUBARCH}
|
||||||
|
|
||||||
# Fish out generated kernel image and initrd
|
# Fish out generated kernel image and initrd
|
||||||
mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-$flavor
|
mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-$flavor
|
||||||
mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-$flavor
|
mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-$flavor
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
# systemd in 22.04+ uses zstd compression by default, which is not understood
|
|
||||||
# by the systemd libraries from focal used in the subiquity snap.
|
|
||||||
[Journal]
|
|
||||||
Compress=false
|
|
@ -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"
|
@ -11,18 +11,22 @@ if [ "$IMAGEFORMAT" == "none" ]; then
|
|||||||
touch /var/log/syslog
|
touch /var/log/syslog
|
||||||
chown syslog:adm /var/log/syslog
|
chown syslog:adm /var/log/syslog
|
||||||
|
|
||||||
# Create the oem user account
|
# Create the oem user account only if it doesn't already exist
|
||||||
|
if ! id "oem" &>/dev/null; then
|
||||||
|
/usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem
|
||||||
|
/usr/sbin/oem-config-prepare --quiet
|
||||||
|
touch "/var/lib/oem-config/run"
|
||||||
|
fi
|
||||||
|
|
||||||
/usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem
|
/usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem
|
||||||
|
|
||||||
/usr/sbin/oem-config-prepare --quiet
|
/usr/sbin/oem-config-prepare --quiet
|
||||||
touch "/var/lib/oem-config/run"
|
touch "/var/lib/oem-config/run"
|
||||||
|
|
||||||
# Update the fstab to include the "discard" option, and
|
# Update the fstab to include the "discard" option
|
||||||
# "x-systemd.growfs" to ensure the root partition is expanded on first
|
|
||||||
# boot
|
|
||||||
awk \
|
awk \
|
||||||
-v root_fs_label="writable" \
|
-v root_fs_label="writable" \
|
||||||
-v root_fs_options="discard,x-systemd.growfs" \
|
-v root_fs_options="discard" \
|
||||||
'
|
'
|
||||||
BEGIN { OFS="\t"; count=0; }
|
BEGIN { OFS="\t"; count=0; }
|
||||||
|
|
||||||
@ -51,35 +55,5 @@ if [ "$IMAGEFORMAT" == "none" ]; then
|
|||||||
}
|
}
|
||||||
' /etc/fstab > /etc/fstab.new
|
' /etc/fstab > /etc/fstab.new
|
||||||
mv /etc/fstab.new /etc/fstab
|
mv /etc/fstab.new /etc/fstab
|
||||||
|
|
||||||
# Add units for a 1GiB swapfile, generated on first boot
|
|
||||||
cat << EOF > /lib/systemd/system/mkswap.service
|
|
||||||
[Unit]
|
|
||||||
Description=Create the default swapfile
|
|
||||||
DefaultDependencies=no
|
|
||||||
Requires=local-fs.target
|
|
||||||
After=local-fs.target
|
|
||||||
Before=swapfile.swap
|
|
||||||
ConditionPathExists=!/swapfile
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
ExecStartPre=fallocate -l 1GiB /swapfile
|
|
||||||
ExecStartPre=chmod 600 /swapfile
|
|
||||||
ExecStart=mkswap /swapfile
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=swap.target
|
|
||||||
EOF
|
|
||||||
cat << EOF > /lib/systemd/system/swapfile.swap
|
|
||||||
[Unit]
|
|
||||||
Description=The default swapfile
|
|
||||||
|
|
||||||
[Swap]
|
|
||||||
What=/swapfile
|
|
||||||
EOF
|
|
||||||
mkdir -p /lib/systemd/system/swap.target.wants
|
|
||||||
ln -s ../mkswap.service /lib/systemd/system/swap.target.wants/
|
|
||||||
ln -s ../swapfile.swap /lib/systemd/system/swap.target.wants/
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user