diff --git a/builder.go b/builder.go index 11edf44..942b7df 100644 --- a/builder.go +++ b/builder.go @@ -284,7 +284,7 @@ func (b *builder) mountImg(ctx context.Context) error { r := ctx.Value("release").(OSRelease) if r.ID == ReleaseUbuntu { if strings.HasPrefix(r.VersionID, "12.") { - mkfsExt4Opts = append(mkfsExt4Opts, "-O", "^has_journal") + mkfsExt4Opts = append(mkfsExt4Opts, "-O", "^has_journal,^metadata_csum") } } logrus.Infof("mounting raw image") diff --git a/templates/ubuntu12.Dockerfile b/templates/ubuntu12.Dockerfile index dea0aa9..528fce4 100644 --- a/templates/ubuntu12.Dockerfile +++ b/templates/ubuntu12.Dockerfile @@ -2,6 +2,12 @@ FROM {{ .Image }} USER root +# restore initctl +RUN rm /sbin/initctl && dpkg-divert --rename --remove /sbin/initctl + +# setup ttyS0 +RUN cp /etc/init/tty1.conf /etc/init/ttyS0.conf && sed -i s/tty1/ttyS0/g /etc/init/ttyS0.conf + RUN ARCH="$([ "$(uname -m)" = "x86_64" ] && echo amd64 || echo arm64)"; \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \