Creating a diskless Debian system
From MythTV Official Wiki
Outdated: The information on this page may no longer be relevant to the current release of MythTV, 34.0. Please consider helping to update it. This page was last modified on 2011-08-27.
First make your system boot a kernel over the network - Google should help :)
Then I used this script to set up the diskless filesystem. It creates the base.tgz for the diskless package
#!/bin/bash ROOT=/var/lib/diskless/default/root/ HTTP_SRC="http://ftp.uk.debian.org/debian" FLAVOUR=etch BASE=/var/lib/diskless/default/base.tgz HOST=myfrontend DOMAIN=test.com # The NFS root server (ip address) SERVER=10.0.0.4 # No config below here (I hope) mkdir $ROOT 2>&1 # --resolve-deps needed to get libslang2 for whiptail debootstrap --resolve-deps $FLAVOUR $ROOT $HTTP_SRC # shadowconfig needed to allow ssh to run chroot $ROOT /sbin/shadowconfig on # initialise the sources list cp /etc/apt/sources.list $ROOT/etc/apt # Now get the apt listings, finalise any installs and install ssh. chroot $ROOT /usr/bin/apt-get update chroot $ROOT /usr/bin/apt-get -f install chroot $ROOT /usr/bin/apt-get install openssh-server # Set up the system echo $HOST.$DOMAIN > $ROOT/etc/hostname echo $HOST > $ROOT/etc/mailname cat <<EOF none /proc proc defaults 1 0 $SERVER:/var/lib/diskless/default/root / nfs rw,defaults,nolock 0 1 EOF ln -s /proc/mounts $ROOT/etc/mtab echo Tarring it up cd $ROOT tar czf $BASE * exit
Also need:
apt-get install locales
and possibly run base-config
and
cd /dev/ MAKEDEV update
ssh in and install:
apt-get install am-utils emacs21 less make module-init-tools nfs-common xserver-xfree86 xfree86-common xbase-clients xfonts-75dpi xfonts-base xfonts-scalable xine-ui xlibs xutils ogle-mmx libgtk2.0-0 lirc mythdvd mythgallery mythmusic mythnews mythtv-frontend mythtv-themes mythvideo mythweather mingetty apt-get purge mysql-server
Finally, this is ESSENTIAL to make myth work. Don't ask me why. Don't ask how many days of searching it took to find it.
rm /etc/localtime ln -s /usr/share/zoneinfo/Europe/London /etc/localtime