Creating a New Debian Image from Scratch ======================================== Last updated: 8/22/99 Use dpkg-deb -x to install these: (* denotes binary-all package) base/base-files* base/base-passwd base/libc6 base/ldso base/libreadlineg2 base/libncurses4 base/bash base/fileutils base/textutils base/tar base/gzip base/dpkg base/libgdbmg1 base/perl-base base/perl-5.004-base base/sysvinit base/sed base/grep base/shellutils Copy all debs into (temporary) Then do a chroot into export PATH=/sbin:/bin:/usr/sbin:/usr/bin (cd /sbin; mv ldconfig.new ldconfig) (cd /usr/bin; ln -s perl5.00405 perl) touch /var/lib/dpkg/status touch /var/lib/dpkg/available dpkg -i --force-depends base/mawk base/base-files base/base-passwd base/base-files (again) base/ldso base/dpkg base/debianutils base/findutils base/libc6 base/libreadlineg2 base/libncurses4 base/bash base/fileutils base/textutils base/tar base/gzip base/libgdbmg1 base/perl-base base/perl-5.004-base dpkg -i base/grep base/sed base/diff base/mount base/sysvinit base/login base/passwd base/adduser * base/shellutils base/bsdutils base/hostname base/makedev editors/nvi base/libstdc++2.9 base/libstdc++2.10 base/procps base/hostname base/update base/netbase net/netstd base/util-linux base/e2fsprogs admin/apt base/nurses-base * base/corel-util base/kernel-image-2.2.10-netwinder base/modutils depmod -a touch /etc/fstab mount /proc /proc -t proc dpkg -i base/makedev cd /dev ./MAKEDEV std ./MAKEDEV hda ./MAKEDEV pty ./MAKEDEV console ./MAKEDEV ttyS0 ttyS1 ttyS2 ttyS2 ./MAKEDEV psaux ./MAKEDEV lp ./MAKEDEV par ./MAKEDEV fb ./MAKEDEV rtc ./MAKEDEV audio ./MAKEDEV misc ln -s psaux mouse create /etc/resolv.conf domain example.org search example.org nameserver 204.209.212.111 create /etc/apt/sources.list # Use for a local mirror - remove the ftp1 http lines for the bits # your mirror contains. # deb file:/your/mirror/here/debian stable main contrib non-free # See sources.list(5) for more information, especial # Remember that you can only use http, ftp or file URIs deb ftp://ftp.crc.ca/pub/systems/linux/debian potato main contrib non-free #deb http://http.us.debian.org/debian stable main contrib non-free deb http://non-us.debian.org/debian-non-US stable non-US create /etc/fstab # # /etc/fstab # # /dev/hda4 / ext2 defaults 1 1 /dev/hda3 none swap sw 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults Run dselect, and set up apt method (copy from existing machine). But don't download any new packages. Exit chroot. Finally, umount /proc, remove download directories, tar up, and gzip -9 (on another partition). Test (of course). --- The End ---