2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-02-17 06:05:50 +00:00

restore initctl, setup ttyS0, mkfs.ext4 -O

Signed-off-by: LEI WANG <ssst0n3@gmail.com>
This commit is contained in:
LEI WANG 2024-08-27 18:37:10 +08:00
parent c67d361843
commit a784b433ca
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View File

@ -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")

View File

@ -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 \