LISAsoft-LiveCD process

From OSGeo
Revision as of 01:38, 21 December 2009 by Wiki-HamishBowman (talk | contribs) (update link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page has been superseded by the Live GIS Build wiki page.

How LISAsoft's LiveCD is created

Basically, we follow this HOW-TO: http://www.debuntu.org/how-to-customize-your-ubuntu-live-cd

As starting point we use current Ubuntu ISO-image. In the following it is assumed that the image is stored under ~/Desktop.

Preparing the Host

$ sudo apt-get install squashfs-tools chroot
$ mkdir /tmp/livecd
$ sudo mount -o loop ~/Desktop/ubuntu-7.10-desktop-i386.iso /tmp/livecd
$ mkdir ~/livecd
$ mkdir ~/livecd/cd
$ rsync --exclude=/casper/filesystem.squashfs -a /tmp/livecd/ ~/livecd/cd
$ mkdir ~/livecd/squashfs
$ mkdir ~/livecd/custom
$ sudo modprobe squashfs
$ sudo mount -t squashfs -o loop /tmp/livecd/casper/filesystem.squashfs \
    ~/livecd/squashfs/
$ sudo cp -a ~/livecd/squashfs/* ~/livecd/custom
$ sudo cp /etc/resolv.conf /etc/hosts ~/livecd/custom/etc/

Getting into our future image

$ sudo chroot ~/livecd/custom
# mount -t proc none /proc/
# mount -t sysfs none /sys/
# export HOME=/root

Making DISPLAY usable within CHROOT

  • extract display cookie (do this as the normal VMware user)
xauth extract /tmp/display $DISPLAY
  • bind mount /tmp, so that it's visible on chroot
sudo mount --bind /tmp/ /home/vmplanet/livecd/custom/tmp
  • on chroot environment
xauth merge /tmp/display
export DISPLAY=:0

Cleaning up within CHROOT

# apt-get clean
# rm -rf /tmp/*
# umount /proc/
# umount /sys/
# exit 

Building the ISO image

chmod +w ~/livecd/cd/casper/filesystem.manifest

sudo chroot ~/livecd/custom dpkg-query -W --showformat='${Package} \
  ${Version}\n' > ~/livecd/cd/casper/filesystem.manifest

sudo cp ~/livecd/cd/casper/filesystem.manifest \
  ~/livecd/cd/casper/filesystem.manifest-desktop

sudo mksquashfs ~/livecd/custom ~/livecd/cd/casper/filesystem.squashfs \
  -no-duplicates -noappend

sudo rm ~/livecd/cd/md5sum.txt
sudo -s
(cd ~/livecd/cd && find . -type f -print0 | \
   xargs -0 md5sum > md5sum.txt) 

cd ~/livecd/cd

sudo mkisofs -r -V "Arramagong-Live-v0_4" -b isolinux/isolinux.bin \
  -c isolinux/boot.cat -cache-inodes -J -l \
  -no-emul-boot -boot-load-size 4 -boot-info-table \
  -o ~/Desktop/Arramagong-Live-v0_4.iso .

See also