dpkg --add-architecture i386
#!/bin/bash
xrdb -merge <<EOI
xterm*altSendsEscape: true
XTerm*eightBitInput: false
EOI
username
ALL = NOPASSWD: /sbin/poweroff
username
ALL = NOPASSWD: /sbin/reboot
mkfs.ext4 ...
debootstrap lucid /target
echo "auto eth0" >>/target/etc/network/interfaces
echo "iface eth0 inet dhcp" >>/target/etc/network/interfaces
cp /etc/resolv.conf /target/etc/resolv.conf
mount -o bind /proc /target/proc
mount -o bind /sys /target/sys
mount -o bind /dev /target/dev
chroot /target
#
apt-get update
export LC_ALL=C
aptitude reinstall console-setup
sed "s:main:main restricted universe multiverse:" /etc/apt/sources.list >/tmp1
mv /tmp1 /etc/apt/sources.list
apt-get update
apt-get install nano mc ssh linux-image command-not-found bash-completion
passwd
exit
mount -o remount,ro /target
apt-get install locales util-linux-locales
/etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
/usr/share/locales/install-language-pack en_US.UTF-8
modprobe kvm
modprobe kvm-intel
modprobe kvm-amd
kvm -drive file=image -boot c -drive if=virtio,file=image -cdrom ubuntu-10.04.2-desktop-i386.iso -net nic,model=virtio -net user