-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make real installer image #4148
Conversation
85921eb
to
4e9d5db
Compare
I am going to see if I can get this to be the future phase soon. What it involves:
In theory, that should boot it right up. The boot process then will be:
|
Update: this now has no dependency on pillar or debug containers. It removed that in a less-than-optimal way. Since this is intended to go away anyways, I just copied over |
88df1b3
to
deb0aaa
Compare
kmod-libs cryptsetup-libs libblkid | ||
RUN eve-alpine-deploy.sh | ||
|
||
COPY . . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't copy the Dockerfile
into the container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all early draft, and will change a lot in the coming days. Don't waste your time on it yet @christoph-zededa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But since you raised it, why not? The final image is FROM scratch
anyways?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because if you change something in the Dockerfile at the end, the next docker build
will start from this COPY
instead of from the change in the Dockerfile.
This is all early draft
Yes, forgot about it for a moment ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run tests
Signed-off-by: Avi Deitcher <[email protected]>
I am closing this because I do not want CI to be running on it with all of the changes. When ready, I will reopen it. |
This is an attempt to fix the hack of the installer image.
The way the current installer image works is the following:
rootfs.img
installer.img
rootfs.img
to root, so we can use our original kernel and initrd insiderootfs.img
to bootinstaller.img
, which contains a simple alpine container and installer script, along with container config files, to a specific onboot path, effectively "hacking" therootfs.img
This "hack" requires knowing exactly where the path is to the container, what numbering to give it, ensuring nothing changes elsewhere. Essentially, it is messy and brittle.
This changes it. It is not perfect, but it is a step forward.
Now, there is an actual
pkg/installer
, which builds a small container. That container always is part ofrootfs.img
, and is part ofonboot
. However, it only runs if the file/opt/install/true
exists./opt/install
is bind-mounted from the read-only host filesystem.The installer image works as follows:
rootfs.img
which includes the installer. changedinstaller.img
. unchangedrootfs.img
to root, so we can use our original kernel and initrd insiderootfs.img
to boot. unchangedinstaller.img
(unchanged), but the contents are not just a single file/opt/install/true
. changedBecause
/opt/install
is bind-mounted into the installer container, only when run ininstaller
mode will it run the installer. In all other (regular) cases, it just ignores the installer.What was changed
pkg/mkimage-raw-efi/Dockerfile
has a smallerinstaller.img
pkg/installer
was createdimages/rootfs.yml.in
has anonboot
section forinstaller
tools/parse-pkgs.sh
was updated to support installerWhat else needs to be fixed
Several things:
installer.img
, although that should still workinstaller-net
, which may or may not be broken from this and need to be fixedrootfs.img
too big? It uses no memory when in regular mode, but still takes some disk spaceLong term
Long term, we should change the whole thing to have a separate installer image. Rather than "image that contains grub and grub.cfg that knows how to loopback mount from
rootfs.img
and then hack that installation", it should just have its own kernel and initrd, where the initrd is just the installer.We should do that next. But as @jsfakian is working on getting the interactive installer working in #4055, and the whole mess of getting it to work as part of the installer image, this is a valid interim step.
Help testing
Whoever can help test this installer, please do.