This Fedora classroom session on creating live cds using livecd-tools is the single most useful source of information;
http://fedoraproject.org/wiki/Classr...g_Fedora_Remix
And this kickstart file example:
%packages section :
https://fedorahosted.org/spin-kickst...desktop.ks#L12
%post section:
https://fedorahosted.org/spin-kickst...desktop.ks#L97
Code:
cat > /etc/rc.d/init.d/fedora-live << EOF
marks the start of the shell script text that must go into the
fedora-live (you might find "livesys" mentioned instead of "fedora-live" - same concept) script in the /etc/rc.d/init.d folder of the generated live system
when it boots
And this is where your live cd's internal scripts must go
before the gnome/kde desktop of your live system starts up.
Whatever you want to happen
after GNOME/KDE desktop shows up, should go into the appropriate GNOME application's initialization script, most likely in the home directory of the default user of your live cd (assuming it boots into a GNOME/KDE desktop) typically /home/fedora or so.
For more info on the
%post section see this:
http://fedoraproject.org/wiki/Classr...a_Remix#t21:14
%post --nochroot is interesting.
See this:
http://fedoraproject.org/wiki/Classr...a_Remix#t21:23
Quote:
* normally, %post runs "inside" the installed system; the way livecd-tools works (as does revisor) is it creates a filesystem inside a file, then mounts that on say, /var/tmp/livemedia-filesystem 21:23
* %post would "chroot" into /var/tmp/livemedia-filesystem and runs entirely on what is to become the live media 21:23
* a "%post --nochroot" however does not chroot, and runs on the composing system
|
So here you can copy your custom files from your currently running Fedora system (which is being used to make the kickstart file or to run the livecd-tools program) into the live system via a temporary directory in the /var/tmp directory
Google is always your friend:
http://www.google.com/search?q=%25post++nochroot
But see this specifically:
http://www.nabble.com/using--post--n...html#a14974746
$INSTALL_ROOT and $LIVE_ROOT are the place where you do the transfer of files from your running system to the livecd's future file-system.
$INSTALL_ROOT is
/var/tmp/livecd-creator-NNNNNN/install_root where NNNNNN is a random, generated, alphanumeric string
$LIVE_ROOT is the / directory on created the live cd.
this works fine to copy stuff to the livecd:
Code:
%post --nochroot
mkdir $INSTALL_ROOT/transferables
cp /home/username/.../file.txt $INSTALL_ROOT/transferables
cp $INSTALL_ROOT/transferables $LIVE_ROOT ("cp -a" preserves attributes, so you might prefer that _IF_ you want to preserve permissions or username/group etc)
%end
Here are more sample kickstart files:
https://fedorahosted.org/spin-kickstarts/browser
Snippets for specific tasks:
https://fedorahosted.org/spin-kickst...owser/snippets
To build on top of an already created iso file (maybe while making multiple attempts to get the perfect remaster / live cd) use the --base-on option in the livecd-creator program