Re: [vserver] support for alpine linux guests

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Wed 29 Aug 2007 - 11:01:35 BST
Message-Id: <1188381695.15162.18.camel@nc.nor.wtbts.org>

Thanks for you feedback. Really appreciated!

On Mon, 2007-08-27 at 22:06 +0200, Daniel Hokka Zakrisson wrote:
> Natanael Copa wrote:
> > Hi,
> >
> > Alpine Linux is a distribution for secure light weight
> > servers/firewalls, based on uclibc/busybox, built using Gentoo
> > framework.
> >
> > Attatched is initpre and initpost scripts to allow easy installation of
> > Alpine Linux guests. It is done in seconds. Create directory
> > distributions/alpine and save the attatched files there.
>
> Why is sysv the only supported initstyle? Why wouldn't plain work?

layziness. It worked but init scripts needs some modifications and it
looked pretty easy to make sysv working.

I will look into fixing that.

> Just using chroot to run things isn't okay, start the guest and execute
> whatever commands are needed inside.

just curious. why? (where is the documentation covering this that i
missed?)

> For copying files into the guest, use chroot-sh truncate.
>
> Checking for grsec stuff in the initpost script is just wrong.

ok. I will remove that.

> For examples on how to do these things, just look at the redhat initpost
> script.

Looks pretty hackish. Since I'm the author of alpine I have the power to
make the default scripts and things vserver friendly.

To avoid the 'chroot "$vdir" /bin/busybox --install -s' I have the
following options:
        * make sure template archive contains all it needs (running
        busybox --install -s before creating the emplate archive)
        
        * execute both /etc/init.d/rcS and /etc/init.d/rcL from
        cmd.start. (busybox --install -s is called from rcS)

Which is preferred?

To avoid the 'chroot "$vdir" rc_add -s 20 -k syslog' it looks like a
serious overkill to do the complicated "start vserver", "execute in
vserver" and "stop vserver" as showed in redhat initpost. The only thing
needed is to create 2 links in the chroot:

  ln -s ../init.d/syslog $vdir/etc/rcL.d/S20syslog
  ln -s ../init.d/syslog $vdir/etc/rcK.d/K20syslog

How can that be easily done correctly without starting/stopping the
vserver?

Natanael Copa
Received on Wed Aug 29 11:01:52 2007

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 29 Aug 2007 - 11:01:58 BST by hypermail 2.1.8