Well...
What you COULD do if you really can't wait... and are feeling brave... is create a dd image from scratch with... this...
scratch_master.sh
#!/bin/bash
#
# Create an image which can be dd'ed onto
# a harddisk, and, after adding a boot loader
# using grub, be ready for consumption.
# TODO must apt-get install syslinux squashfs-tools genisoimage sbm on HOST
#set -e
LIVECDURL="http://www.linuxmce.org"
IMAGEFILE=`tempfile -p 1004`
#IMAGEFILE=1004
http_proxy=http://127.0.0.1:3128
TEMPDIR=`mktemp -d 1004-dir.XXXXXXXXXX`
TEMPISO=`mktemp -d 1004-iso.XXXXXXXXXX`
#TEMPDIR=snapshot
#TEMPISO=isoshot
apt-get install syslinux squashfs-tools genisoimage sbm
mkdir -p $TEMPISO/{casper,isolinux,install}
trap futureTrap EXIT
futureTrap () {
umount -lf $TEMPDIR/proc
umount -lf $TEMPDIR/sys
umount -lf $TEMPDIR/dev/pts
umount -lf $TEMPDIR
}
#########################
# FUNCTIONS
#########################
bootstrapper() {
dd if=/dev/zero of=$IMAGEFILE count=4 bs=1GB
mkfs.ext2 -F $IMAGEFILE
debootstrap --arch=i386 --include=mysql-server lucid $TEMPDIR
}
mainMount () {
mount -o loop $IMAGEFILE $TEMPDIR
mount none -t proc $TEMPDIR/proc
mount none -t devpts $TEMPDIR/dev/pts
mount none -t sysfs $TEMPDIR/sys
mkdir -p $TEMPDIR/root/new-installer/lmcemaster/
cp /etc/network/interfaces $TEMPDIR/etc/network/interfaces
}
mkExe () {
chmod +x $TEMPDIR/root/new-installer/lmcemaster/ping.sh
chmod +x $TEMPDIR/root/new-installer/lmcemaster/cleanup.sh
chmod +x $TEMPDIR/usr/pluto/bin/gpgupdate.sh
chmod +x $TEMPDIR/usr/sbin/invoke-rc.d
chmod +x $TEMPDIR/usr/bin/screen
chmod +x $TEMPDIR/root/new-installer/lmcemaster/chmaster.sh
}
stopStartups () {
mv $TEMPDIR/usr/sbin/invoke-rc.d $TEMPDIR/usr/sbin/invoke-rc.d.orig
cat <<EOL > $TEMPDIR/usr/sbin/invoke-rc.d
#!/bin/bash
exit 0
EOL
mv $TEMPDIR/usr/bin/screen $TEMPDIR/usr/bin/screen.orig
cat <<EOL > $TEMPDIR/usr/bin/screen
#!/bin/bash
exit 0
EOL
}
fixSources () {
cat <<EOL > $TEMPDIR/etc/apt/sources.list
deb http://deb.linuxmce.org/ubuntu/ lucid beta2
deb http://deb.linuxmce.org/ubuntu/ 20dev_ubuntu main
deb http://packages.medibuntu.org/ lucid free non-free
EOL
cat <<EOL > $TEMPDIR/etc/apt/sources.list.d/ubuntu.org
deb http://archive.ubuntu.com/ubuntu lucid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-security main restricted universe multiverse
deb http://debian.slimdevices.com/ stable main
EOL
#create preseed file
cat <<EOL | LC_ALL=C chroot $TEMPDIR debconf-set-selections
debconf debconf/frontend select Noninteractive
# Choices: critical, high, medium, low
debconf debconf/priority select critical
msttcorefonts msttcorefonts/http_proxy string
msttcorefonts msttcorefonts/defoma note
msttcorefonts msttcorefonts/dlurl string
msttcorefonts msttcorefonts/savedir string
msttcorefonts msttcorefonts/baddldir note
msttcorefonts msttcorefonts/dldir string
msttcorefonts msttcorefonts/blurb note
msttcorefonts msttcorefonts/accepted-mscorefonts-eula boolean true
msttcorefonts msttcorefonts/present-mscorefonts-eula boolean false
sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-jre sun-java6-jre/jcepolicy note
sun-java6-jre sun-java6-jre/stopthread boolean true
debconf debconf/frontend select Noninteractive
# Choices: critical, high, medium, low
debconf debconf/priority select critical
EOL
}
mkImg () {
rm -f $TEMPDIR/etc/udev/rules.d/70-persistent-net-rules
umount $TEMPDIR
sleep1
e2fsck -fy $IMAGEFILE
cp $IMAGEFILE ./1004
cp 1004 1004bu
}
####################################
# SCRIPTS
####################################
# chrooted
writeScripts () {
cat <<EOL > $TEMPDIR/root/new-installer/lmcemaster/chmaster.sh
#!/bin/bash
export HOME=/root
export LC_ALL=C
mkdir -p /var/run/network
/root/new-installer/lmcemaster/ping.sh
apt-get install -y dbus
dbus-uuidgen > /var/lib/dbus/machine-id
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
/usr/pluto/bin/gpgupdate.sh
apt-get dist-upgrade -y --force-yes --allow-unauthenticated
apt-get clean
apt-get install linux-image-generic libc-dev-bin linux-libc-dev libc6-dev linux-headers-generic manpages-dev screen -y
apt-get clean
mysqldPID=\`mysqld --skip-networking&\`
echo MySQL PID: \$mysqldPID
chmod 755 \$TEMPDIR/var/lib/mysql
apt-get install lmce-hybrid -y --allow-unauthenticated
apt-get clean
# Add the minimal KDE meta package, which will also install Xorg.
apt-get install kde-minimal -y --allow-unauthenticated
apt-get clean
#
apt-get install pluto-x-scripts pluto-orbiter -y --allow-unauthenticated
apt-get clean
# Asterisk stuff
apt-get install lmce-asterisk -y --allow-unauthenticated
apt-get clean
# Additional stuff wanted by l3top
apt-get install ubuntu-standard casper lupin-casper discover1 laptop-detect os-prober linux-generic grub2 plymouth-x11 ubiquity-frontend-kde initramfs-tools
apt-get clean
kill \`lsof $TEMPDIR|grep mysqld|cut -d" " -f3|sort -u\` || :
sleep 3
kill \$mysqldPID || :
EOL
#### Check online status
# chrooted
cat <<EOL > $TEMPDIR/root/new-installer/lmcemaster/ping.sh
#!/bin/bash
while ! ping -c 1 google.com | sleep 1 > /dev/null 2>&1; do /etc/init.d/networking restart; sleep 5; done
EOL
#### Update and get gpg keys
# chrooted
cat <<EOL > $TEMPDIR/usr/pluto/bin/gpgupdate.sh
#!/bin/bash
gpgs=\$(apt-get update |& grep -s NO_PUBKEY | awk '{ print \$NF }' | cut -c 9-16); if [ -n \$gpgs ]
then for gpg in \$gpgs; do gpg --keyserver pgp.mit.edu --recv-keys \$gpg
gpg --export --armor \$gpg | apt-key add -
done
apt-get update
fi
EOL
#### Cleanup script
# chrooted
cat <<EOL > $TEMPDIR/root/new-installer/lmcemaster/cleanup.sh
#!/bin/bash
ls /boot/vmlinuz-2.6.**-**-generic > list.txt
sum=\$(cat list.txt | grep '[^ ]' | wc -l)
if [ \$sum -gt 1 ]; then
dpkg -l 'linux-*' | sed '/^ii/!d;/'"\$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
fi
rm list.txt
apt-get clean
rm -rf /tmp/*
rm /etc/resolv.conf
rm /var/lib/dbus/machine-id
rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl
rm /usr/sbin/invoke-rc.d
mv /usr/sbin/invoke-rc.d.orig $TEMPDIR/usr/sbin/invoke-rc.d
rm /usr/bin/screen
mv /usr/bin/screen.orig $TEMPDIR/usr/bin/screen
umount -lf /proc
umount -lf /sys
umount -lf /dev/pts
#umount $TEMPDIR/dev
EOL
#############################
# Config files
#############################
#### Set temporary network file
#cat <<EOL > $TEMPDIR/etc/network/interfaces.2
#auto lo
#iface lo inet loopback
#auto eth0
#iface eth0 inet dhcp
#auto eth1
#iface eth1 inet dhcp
#EOL
}
###########################
# Main Execution Area
###########################
# If not bootstrapping, hash bootstrapper, fixSources, finalizeFs, and mkImg
bootstrapper
mainMount
writeScripts
mkExe
fixSources
stopStartups
LC_ALL=C chroot $TEMPDIR /usr/pluto/bin/gpgupdate.sh
LC_ALL=C chroot $TEMPDIR /root/new-installer/lmcemaster/chmaster.sh
LC_ALL=C chroot $TEMPDIR /root/new-installer/lmcemaster/cleanup.sh
finalizeFs
mkImg
then get
lmcemasterand
dvd-installer You will rename them to remove the numbers. I put the commands below. You will need to install debootstrap and dpkg-devel before running the first script. The second will install what it needs.
chmod +x on all of them. Keeping them all in the same directory. Make the following modifications. To save yourself SOME time, grab a copy of video-wizard-videos_1.1_all.deb from /var/cache/apt/archives of a current LMCE 1004 directory, put it in the same directory as the scripts, and unhash lines 50-54 of lmcemaster to prevent having to download all 489 megs of it. Unhash line 50 at the very least to copy dvd-installer.sh into the proper place.
Another thing YOU should do is drop that nifty image of yours in the same directory and hash line 363 of lmcemaster and add a line like so:
# if [ -e $DDMASTER/splash.png ]; then cp $DDMASTER/splash.png $ISODIR/isolinux/splash.png; fi
cp splash.png $ISODIR/isolinux
I am also screwing with the menu sizing to try and fit on your little screen, which is why it will be a little... weird if you use it as is. I am currently trying (at line 190 lmcemaster)
menu width 70
menu margin 10
I do sudo su before these sorts of things... so I don't type sudo before everything as it should be implied.
chmod +x scratch_master.sh
mv lmcemaster.3 lmcemaster
chmod +x lmcemaster
mv dvd-installer.2.sh dvd-installer.sh
chmod +x dvd-installer.sh
./scratch_master.sh
A bit of warning... I have never run scratch_master... but I have looked over it a lot and it really SHOULD work... lol. It is just too big a drain on my tiny internet... if it encounters any errors they should be minor. Post and I will fix.
Another thing, keep that 1004 image backup the first script spits out. You will only want to make it once, and you will be using it a lot. Now
./lmcemaster
Once you run lmcemaster you will douche up that image... so once run just: cp 1004bu 1004
and you are ready to run again to create another image. lmcemaster will spit out an iso named LMCE-1004-beta.iso and its md5. You can load that in a vm, use unetbootin to drop it to a thumb or burn a dvd.
I have not even begun to get back to live boot again. No idea what it will do.
If lmcemaster hits an error it will die. It should not hit an error. If it does and you want to continue because it is awesome even if it errors, hash line two. (set -e)