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:
parent
c67d361843
commit
a784b433ca
@ -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")
|
||||
|
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user