Difference between revisions of "Creating a diskless Debian system"

From MythTV Official Wiki
Jump to: navigation, search
m (Categorized)
Line 62: Line 62:
 
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
 
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
 
</nowiki></pre>
 
</nowiki></pre>
 +
 +
[[Category:Scripts]]

Revision as of 05:29, 24 April 2006

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