[systemd-devel] systemd-nspawn and kernel command line
Colin Guthrie
gmane at colin.guthr.ie
Sat Dec 7 11:03:47 PST 2013
'Twas brillig, and Shawn Landden at 07/12/13 18:57 did gyre and gimble:
> On Sat, Dec 7, 2013 at 10:33 AM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
>> Hi,
>>
>> When playing with systemd-nspawn, is there a way to override the kernel
>> command line seen inside the container. I mean it's probably not correct
>> that the host systems /proc/cmdline leaks into the container.
> No it is not, /proc/cmdline cannot be changed. What is your use case?
> Perhaps this could be added to UTS namespaces?
Could you not bind mount over it with a temporary file? Might be kinda
tricky to do tho' if it is possible.
My main use case is that we have a rescue system which passes "rescue"
on the command line of the host system.
If I use this system to "boot" containers (which would typically be the
system we are "rescuing", then it reads this "rescue" is read in the
container and starts rescue.target automatically rather than whatever
default.target is. We'd probably want to specifically boot a
multi-user.target by default and the best way to do that temporarily
would be to provide a fake "command line" to the booted instance.
Now we could change what we use to identify our rescue image, but it
would seem to me that this shouldn't be needed and faking kernel command
lines as seen by containers should be something that's possible.
Cheers!
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited http://www.tribalogic.net/
Open Source:
Mageia Contributor http://www.mageia.org/
PulseAudio Hacker http://www.pulseaudio.org/
Trac Hacker http://trac.edgewall.org/
More information about the systemd-devel
mailing list