Page 1 of 1

Packaging for Xen / kernel too old

PostPosted: May 18th, '12, 15:44
by gigatux
Hi,

I'm hoping to package up Mageia 2 for automated deployments on a Xen-based VPS. How this usually works is to essentially tar up a minimal filesystem and unpack, configure networking and set root passwords when a user choose to install this.

It seems like the glibc inside Mageia 2 RC is rather new and because when the installer attempts to chroot into the Mageia environment to run passwd (the installer environment only runs kernel 2.6.32), I get the error FATAL: kernel too old when attempting to enter Mageia in a chroot.

Is there a way around this? Maybe some way of installing a glibc that's compatible with older kernels? I imagine it's not just me that will see this issue, but others attempting a similar thing with virtualisation. It's likely that OpenVZ users would have even more trouble, with the guest OS being forced to run the same kernel version as the master, many on 2.6.18 (CentOS 5).

Thanks,

Marc

Re: Packaging for Xen / kernel too old

PostPosted: May 21st, '12, 13:55
by gigatux
It sounds like there is no simple solution to this from my own research and lack of responses!

I have basically decided to manually create the /etc/shadow line for root using a combination of sed and openssh (for MD5 generation) so this now seems to work as expected.

I am proud to say that GigaTux now provides an on-demand install of Mageia 2 RC for any VPS system, and it all seems to work really well! I will recreate this when version 2 is released stable but I'm really happy playing with the RC so far - nice work!

Re: Packaging for Xen / kernel too old

PostPosted: May 21st, '12, 21:10
by doktor5000
Excuse my ignorance, but what does VPS mean to you? Virtual private server?
Out of curiosity, could you please elaborate on the use case and advantages over other free virtualizsation solutions?

Re: Packaging for Xen / kernel too old

PostPosted: May 21st, '12, 21:53
by gigatux
Hi,

Sorry, I should have elaborated. Yes, I mean VPS as a Virtual Private Server.

I think in this case, my issue applies to any virtualisation solution as, in order to set the root password, one would usually chroot into the Mageia install and then run passwd. In this case, I am using Xen, and with Xen and (I believe) KVM, you will be running a different kernel in the Mageia domain. However, you might be running an older kernel in the controlling domain and it is here that you would try to chroot.

Thanks,

Marc

Re: Packaging for Xen / kernel too old

PostPosted: May 21st, '12, 22:09
by doktor5000
Well, what can be rather easily achieved would be to to force each user to set their password at next login, f.ex. with chage.
For what you want to achieve, maybe something like ESXi would be better?

Re: Packaging for Xen / kernel too old

PostPosted: May 21st, '12, 22:20
by gigatux
That certainly is a possibility that I hadn't thought of. It would make Mageia different from all other distros that we provide though. FYI, it's all done using DTC, which is a FOSS control panel that handles VPS provisioning.

Either way, as per the above, the solution of manually writing an /etc/shadow line seems to work perfectly, so I think the combination of ease of use (i.e. setting a password using the control panel) and amazingness (offering Mageia) has word out here. My patch to do this (for DTC) has already been submitted upstream.