Skip to content

Commit

Permalink
Bump osbuilder to produce a livecd with tty1 as default console
Browse files Browse the repository at this point in the history
Grub configuration for livecd (iso) is installed here:
https://github.com/kairos-io/osbuilder/blob/89b014b2b2a1f27bd0c0c5269cecec2a1b8f37bf/tools-image/Dockerfile#L25

and it repositories were bumped in osbuilder to use the latest and
updates grub configuration where `console=tty1` is set **after**
`console=ttyS0` thus making it the default console for systemd services.

Also:

- remove not used bootargs.cfg file (has been moved to the "packages"
  repo)
- Change to the DATASOURCE check which is what we need in reality (not
  CLOUD_INIT which was indirectly checking that DATASOURCE would be set
  by Earthly)

Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Nov 22, 2023
1 parent c95fd37 commit 3647a4f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 71 deletions.
4 changes: 2 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ END
ARG COSIGN_EXPERIMENTAL=0
ARG CGO_ENABLED=0
# renovate: datasource=docker depName=quay.io/kairos/osbuilder-tools versioning=semver-coerced
ARG OSBUILDER_VERSION=v0.8.6
ARG OSBUILDER_VERSION=v0.10.1
ARG OSBUILDER_IMAGE=quay.io/kairos/osbuilder-tools:$OSBUILDER_VERSION
ARG GOLINT_VERSION=1.52.2
# renovate: datasource=docker depName=golang
Expand Down Expand Up @@ -521,7 +521,7 @@ uki-artifacts:
RUN mkdir -p /oem # be able to mount oem under here if found
RUN mkdir -p /efi # mount the esp under here if found
RUN find . \( -path ./sys -prune -o -path ./run -prune -o -path ./dev -prune -o -path ./tmp -prune -o -path ./proc -prune \) -o -print | cpio -R root:root -H newc -o | gzip -2 > /tmp/initramfs.cpio.gz
RUN echo "console=tty1 console=ttyS0 net.ifnames=1 rd.immucore.oemlabel=COS_OEM rd.immucore.oemtimeout=2 rd.immucore.debug rd.immucore.uki selinux=0" > /tmp/Cmdline
RUN echo "console=ttyS0 console=tty1 net.ifnames=1 rd.immucore.oemlabel=COS_OEM rd.immucore.oemtimeout=2 rd.immucore.debug rd.immucore.uki selinux=0" > /tmp/Cmdline
RUN basename $(ls /boot/vmlinuz-* |grep -v rescue | head -n1)| sed --expression "s/vmlinuz-//g" > /tmp/Uname
SAVE ARTIFACT /boot/vmlinuz Kernel
SAVE ARTIFACT /etc/os-release Osrelease
Expand Down
64 changes: 0 additions & 64 deletions images/bootargs.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions tests/autoinstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var _ = Describe("kairos autoinstall test", Label("autoinstall-test"), func() {
var vm VM

BeforeEach(func() {
if os.Getenv("CLOUD_INIT") == "" || !filepath.IsAbs(os.Getenv("CLOUD_INIT")) {
Fail("CLOUD_INIT must be set and must be pointing to a file as an absolute path")
if os.Getenv("DATASOURCE") == "" {
Fail("DATASOURCE must be set and it should be the absolute path to a datasource iso")
}

_, vm = startVM()
Expand Down
5 changes: 2 additions & 3 deletions tests/reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package mos_test

import (
"os"
"path/filepath"
"time"

. "github.com/onsi/ginkgo/v2"
Expand All @@ -13,8 +12,8 @@ import (
var _ = Describe("kairos reset test", Label("reset-test"), func() {
var vm VM
BeforeEach(func() {
if os.Getenv("CLOUD_INIT") == "" || !filepath.IsAbs(os.Getenv("CLOUD_INIT")) {
Fail("CLOUD_INIT must be set and must be pointing to a file as an absolute path")
if os.Getenv("DATASOURCE") == "" {
Fail("DATASOURCE must be set and it should be the absolute path to a datasource iso")
}

_, vm = startVM()
Expand Down

0 comments on commit 3647a4f

Please sign in to comment.