Creating a diskless Debian system

From MythTV Official Wiki
Revision as of 15:28, 27 August 2011 by GBee (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Time.png Outdated: The information on this page may no longer be relevant to the current release of MythTV, 31.0. Please consider helping to update it.

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


# The NFS root server (ip address)

# 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
ln -s /proc/mounts $ROOT/etc/mtab
echo Tarring it up
cd $ROOT
tar czf $BASE *

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