[Fedora-livecd-list] specifying kickstart file upon boot of liveCD

Jon Steer jsteer at bitscout.com
Sat Sep 15 19:28:10 UTC 2007


We have several use cases for the liveCD/liveUSB.
Some of the use cases require that there is manual intervention after boot
up for configuring the system and application evironment . But we have at
least two use cases where both system and application configuration is done
post-boot with no manual intervention.

The no-manual intervention is a precanned configuration for known system
enviroments (like a QA lab or marketing demo) that turns the machine into an
appliance.

We have several applications on the box that all require (for example) the
same sql authentication. Rather than have the user type it once (or several
times) we use precanned setup scripts or puppet.

You are right, I can add an init.d/foo that looks at /proc/cmdline.  I just
thought that I'd try to reuse kickstart for that functionality. Kickstart
provided most of what I needed like network setup and authentication setup.

thanks,
jon




On 9/15/07, Douglas McClendon <dmc.fedora at filteredperception.org> wrote:
>
> Jon Steer wrote:
> > I have built a console-based LAMP LiveCD appliance. We use VMs to host
> the
> > liveCD during the testing process.
> >
> > We'd like to be able to specify a kickstart file on the boot line that
> would
> > cause either puppet to run or other dynamic configuration tasks to occur
> > without manual intervention.
>
> This seems like it's just a matter of adding a new custom service to
> /etc/rc.d/init.d/ which would do something with /proc/cmdline.  Take a
> look at how the current /etc/rc.d/init.d/fedora-live generated in the
> %post of the standard livecd-fedora-base-desktop.ks, deals with the
> possible liveimg argument that might be in /proc/cmdline.
>
> You could easily enough cause stuff to happen there (after fedora user
> is added), including something like (this is untested, just idea fodder,
> most likely missing quite a few needed things)-
>
> kickstart=$( cat /proc/cmdline | \
>              sed -e 's/\s/\n/g' | \
>              grep "^ks" | \
>              sed -e 's/ks=//' )
> if [ "x${kickstart}" != "x" ]; then
>     mkdir -p /home/fedora/.config/autostart
>     cat <<EOF > /home/fedora/.config/autostart/kabluiprogs.desktop
> [Desktop Entry]
> Name=No name
> Encoding=UTF-8
> Version=1.0
> Exec=/usr/bin/handlekickstart
> EOF
>
>     cat <<EOF > /usr/sbin/handlekickstart
> #!/bin/bash
> /usr/sbin/anaconda --kickstart=$kickstart
> EOF
> chmod +x /usr/bin/handlekickstart
>
> cp -a /etc/pam.d/liveinst /etc/pam.d/handlekickstart
> ln -s consolehelper /usr/bin/handlekickstart
>
>
> >
> > On normal bootup of the liveCD, we would expect manual intervention.
>
> Not sure what you mean by this, or really if what I suggested above was
> the sort of thing you had in mind.
>
> -dmc
>
>
> --
> Fedora-livecd-list mailing list
> Fedora-livecd-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-livecd-list
>



-- 
"Don't stand still, if you see me running down the road, 'cause there is
trouble right behind me".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-livecd-list/attachments/20070915/127bd480/attachment.htm>


More information about the Fedora-livecd-list mailing list