-
Notifications
You must be signed in to change notification settings - Fork 9
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
Bring alpine initrd closer to other flavors #1088
Conversation
Set the dirs to be the same as other flavors, especially the livecd one as we read the configs from that dir, so kairos tooling expects the livecd to be mounted there Signed-off-by: Itxaka <itxaka@kairos.io>
Signed-off-by: Itxaka <itxaka@kairos.io>
@@ -375,16 +383,16 @@ if grep -q netboot /proc/cmdline; then | |||
sync | |||
# Create mountpoints | |||
ebegin "Create mountpoints" | |||
mkdir -p /media/root-rw /run/rootfsbase $sysroot/media/root-rw $sysroot/run/rootfsbase | |||
mkdir -p $rootRW $rootfsbase $sysroot$rootRW $sysroot$rootfsbase |
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.
if I understand correctly this:
/media/root-rw /run/rootfsbase $sysroot/media/root-rw $sysroot/run/rootfsbase
Becomes this
/run/overlay /run/rootfsbase $sysroot/run/overlay $sysroot/run/rootfsbase
so that means that /media/root-rw
got changed to /run/overlay
and same to the one that is prefixed by the $sysroot
why did the location change?
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.
to have it in line with what immucore does. We mount a writable /run/overlay and then submounts things there (/etc /var and so on, basically the ephemeral parts)
So in this case, this initrd was just doing its own thing. In this case it should not matter much as nothing should be using that, especially during live boot, but having ti be the same makes it easier to understand both what dracut does and what we do :)
@@ -398,20 +406,20 @@ if grep -q cdroot /proc/cmdline ;then | |||
label=$(grep -o CDLABEL.* /proc/cmdline | cut -f 1 -d ' ' | cut -f 2 -d '=' ) | |||
# Create mountpoints | |||
ebegin "Create mountpoints" | |||
mkdir -p /media/root-ro /media/root-rw /run/rootfsbase $sysroot/media/root-ro $sysroot/media/root-rw $sysroot/run/rootfsbase | |||
mkdir -p $liveroot $rootRW $rootfsbase $sysroot$liveroot $sysroot$rootRW $sysroot$rootfsbase |
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.
here similar comment, why did /media/root-ro
got moved to /run/initramfs/live
?
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.
same thing. On dracut it automounts the livecd under that path but we were mounting it under root-ro because the upstream init from alpine did that. It makes no sense for us to deviate from what we expect and it shows, this was causing alpine to not autoinstall with a config bundled, because the livecd was mounted under that path and agent looks under /run/initramfs/live to read any configs coming from the live media.
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.
smart approach changing them to variables 👍
Im drunk or something? Signed-off-by: Itxaka <itxaka@kairos.io>
Set the dirs to be the same as other flavors, especially the livecd one as we read the configs from that dir, so kairos tooling expects the livecd to be mounted there
Fixes: kairos-io/kairos#2912