Server Imaging Notes
From Physiki
Contents |
Tablet configuration notes:
- Created script to auto-configure hosts based on
- need script to detect video device at boot
- need script to configure wacom at boot
- Using Ubuntu's *source* 2.6.10 kernel
- apt-get install linux-source-2.6.10
- ln -s /usr/src/linux-source-2.6.10 /usr/src/linux
- removed all other kernel packages (linux-image-*, linux-headers-*)
- Patched for wacom_acpi.
- Downloaded patches from http://www.theory.bham.ac.uk/staff/schofield/linux/tc1100/
- linux-2.6.11-wacom_acpi.patch, linux-2.6.11-wacom_acpi_enable_future_usage.patch
- tc1100s use wacom and wacom_acpi, tc4200s use just wacom
- Configure kernel with following extra options:
- IDE-related drivers static
- ext2,3 drivers static
- wacom_acpi driver
- install nvidia driver via module-assistant, apt-get install nvidia-glx
- install firmware for ipw2100 and ipw2200:
- Need uEye camera software installed
- Install uEye driver
- apt-get install libpng3
- Install uEye grabber software
- Make wireless, copper autoconfigured
- Get reboot/suspend/sleep to work
- Auto screen rotation
- Report IP at boot (IF using campus address)
- Edit default and root accounts, copy to /etc/skel:
- Easy VNC access
- Need onscreen keyboard
- Need menu options for all custom-installed software
- Keyboard shortcuts
- clean up /usr/custom
- disable all default sounds
- disable CPU intensive screensavers
- enable power management for display
- enable acpi support in DE
- clean up desktops
- KDE:
- Disable launch notify
- KDE:
Server configuration notes:
- Build net-bootable kernel (I used v2.6.8.1)
- make xconfig
- devfs disabled
- ext2/3 compiled statically
- IDE chipset DMA support compiled in statically
- b44 and tg3 modules
- make; make modules_install
- make xconfig
- Configure PXELinux: (http://syslinux.zytor.com/pxe.php#config)
- Download syslinux from http://syslinux.zytor.com/download.php
tar -xjf syslinux-3.11.tar.bz2 cp syslinux-3.11/pxelinux.0 /var/lib/tftpboot/
- Copy the built kernel image to /var/lib/tftpboot/vmlinuz
mkdir /var/lib/tftpboot/pxelinux.cfg
- Edit /var/lib/tftpboot/pxelinux.cfg/default:
default linux label linux kernel vmlinuz append vga=normal init=/sbin/init initrd=initrd.img.gz ramdisk_size=360000 root=/dev/ram rw --
- Configure DHCP server
- Install DHCP server
- Configure DHCP server
apt-get install dhcpd tftpd-hpa
- Edit /etc/dhcpd.conf:
allow booting; allow bootp; ## These two lines required to prevent interference with other DHCP servers deny unknown-clients; not authoritative; option domain-name "netboot"; option subnet-mask 255.255.255.0; # option domain-name-servers 192.168.0.1; # option routers default_router; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.100 192.168.0.250; option broadcast-address 192.168.0.255; } group { next-server 192.168.0.1; filename "pxelinux.0"; # Add one line per host here: host tc1100_12 { hardware ethernet 00:0f:20:d2:46:f9; } }
Created debian ramdisk distro:
- This initrd image contains the network-boot OS used to image the tablets. We need the following features:
- When tablet boots, it reports its IP address to maxwell
- Maxwell needs to be able to log into tablet as root
- UDPcast should be installed
- Prepare some server-related stuff for later:
- create /root/.ssh/id_dsa.pub if it doesn't already exist:
ssh-keygen -t dsa -f /root/.ssh/id_dsa (enter blank password)
- create user which tablets will use to report IP addresses
adduser tabletscript mkdir /home/tabletscript/.ssh
- server needs a script allowing the tablet to report its IP address
- Make initrd.img:
dd if=/dev/zero of=/root/initrd.img bs=1024 count=300000 mke2fs /root/initrd.img mount -o loop /root/initrd.img /root/m/ mkdir /root/m/sys mkdir -p /root/m/root/.ssh cp /root/.ssh/id_dsa.pub /root/m/root/.ssh/authorized_keys debootstrap sarge /root/m/ ftp://mirrors.kernel.org/debian
- Create /root/m/etc/apt/sources.list with at least this line:
deb http://mirrors.kernel.org/debian testing main contrib non-free
chroot /root/m/ passwd apt-get update apt-get install ssh udpcast module-init-tools acpid hdparm grub
Note: (acpid is important because it operates the fans and prevents overheating)
- Configure defaults for hdparm in /etc/default/hdparm
/dev/hda -d1
- Free up some space
apt-get remove --purge aptitude at cron anacron info ipchains exim4-config dselect ed fdutils man-db manpages netkit-inetd nvi whiptail apt-get autoclean rm /var/cache/apt/archives/*
- Configure DHCP in /etc/network/interfaces:
auto eth0 iface eth0 inet dhcp
- Create IP reporting script in /etc/init.d/reportip:
#!/bin/sh ifconfig | ssh tabletscript@maxwell.mines.edu reportTabletIP ln -s /etc/init.d/reportip /etc/rc2.d/S98reportip ssh-keygen -t dsa -f /root/.ssh/id_dsa ( no password )
- Exit chroot, add image's dsa key to tablet user's auth keys:
cat /root/m/root/.ssh/id_dsa.pub > /home/tabletscript/.ssh/authorized_keys
- Copy kernel modules to image
cp -r /lib/modules/2.6.8.1/ /root/m/lib/modules/
- Fill up the rest of the image with 0, gzip
cat /dev/zero > /root/m/f rm /root/m/f umount /root/m/ gzip -c /root/init.img > /var/lib/tftpboot/initrd.img.gz
More info
Mac Backup(for fast OS X backuping)