[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Heavily customized Live-CD



Le lun 05 mar 2007 23:03:49 CET, Andrei Popescu
<andreimpopescu@gmail.com> a ?crit :

> I did look at the LIVE_HOOK variable. When exactly is it being run?
> AFAIU the xorg.conf is generated when booting the live cd.
> 
I've made some trials for a similar purpose (removing auto-login in
gdm), this kind of tasks is made when booting your live-media, by the
casper's "bottom" scripts.

I've made a small script which remove unwanted casper script in the
initrd (where they are) :

$ cat mod-initrd 
#!/bin/bash

set -ex

if [ -n "$1" ]; then
  root=$1
else
  root=$PWD/essai
fi

if [ -e tmp ]; then rmdir tmp; fi
mkdir tmp
cd tmp

initrd=$root/tftpboot/initrd.gz

if [ ! -e $initrd.orig ]; then
  cp $initrd $initrd.orig
fi

gunzip -cd $initrd | cpio -id

rm scripts/casper-bottom/15autologin

find . | cpio -H newc -o | gzip -9 > $initrd

cd .. ; rm -rf tmp

ls -l $initrd*


But it would be nice to have a cleaner solution :?we should obviously
remove/modify the Casper's scripts inside the binary image, before
generating initrd, but I?didn't have time to look at this...

	Hope it helps,
		Fred.


Reply to: