============================================== apt-setup apt-get update apt-get dselect-upgrade apt-get install console-apt apt-get install --target-release testing razor apt-get -s install someappl simulated install apt-get remove gdm remove package apt-cache show iproute apt-spy Parses a list of mirrors, create /etc/apt/sources.list --------------------------------- console-apt / or the sections to find your app, + to tag things for installs, c to check your selections, c to commit to them When done, capture all the software selections you made ============================================== apt-file search in which package a file is included apt-move Move cache of Debian packages into a mirror hierarchy apt-proxy apt-show-source apt-zip aptconf aptitude Console based apt frontend synaptic GUI apt frontend ============================================== ------------ /ect/profile; used by apt-get and wget export http_proxy=http://192.168.0.1:8080/ export ftp_proxy=$http_proxy netselect netselect ftp.debian.org http.us.debian.org ftp.at.debian.org --------------------------------- dpkg --get-selections > /root/installed-selections --------------------------------- on another system dpkg --set-selections < /root/installed-selections ---------------------------------------------- dpkg -i-force-something dpkg -i install packages -l list information about the package -L Package contents -c list all files in the package -r remove the package -I print information about the package including the section of the Debian system, the version number and any package dependencies that exist -S Finding which package contains... ---------------------------------------------- dpkg-reconfigure -plow drupal dpkg-reconfigure /var/cache/apt/archives/xserver-xorg ---------------------------------------------- dpkg -l courier\* ii courier-authda 0.37.3-2.3 Courier Mail Server authentication daemon ii courier-authmy 0.37.3-2.3 MySQL Authentication for Courier Mail Server un courier-authpo (no description available) ---------------------------------------------- apt-get install task-gnome-desktop task-gnome-apps task-gnome-games task-gnome-net gnome-apt ---------------------------------------------- dpkg -S 'doc/*sql' | cut -f1 -d: | sort -u ============================================== http://people.debian.org/~psg/ddg/node135.html make-kpkg build Will build a kernel. make-kpkg binary Will make all the kernel packages. make-kpkg kernel-image Will make only the kernel-image package pentium-builder ============================================== www.progeny.com/debian/download --------------------------- /etc/apt/sources.list upgrade to Progeny Debian deb http://archive.progeny.com progeny main contrib non-free deb http://archive.progeny.com/progeny newton main contrib non-free apt-get update apt-get -f dist-upgrade apt-get install debconf apt-get install [task-]progeny-potato-upgrade After the upgrade has completed, the task-progeny-potato-upgrade package should be removed; this can be done with the following command: dpkg --remove [task-]progeny-potato-upgrade apt-get install progeny-standard-system apt-get --build source sylpheed from debian unstable apt-get install iptraf ============================================== error: Dynamic MMap ran out of room echo 'APT::Cache-Limit "12582912";' >> /etc/apt/atp.conf echo 'APT::Cache-Limit "25165824";' >> /etc/apt/atp.conf ============================================== modconf manipulate modules dlocate view debian package information upgrade-system keep a Debian system up-to-date, free from accumulated obsolete libs xdebconfigurator debsigs debsums ------------ /ect/profile; used by apt-get and wget export http_proxy=http://192.168.0.1:8080/ export ftp_proxy=$http_proxy netselect netselect ftp.debian.org http.us.debian.org ftp.at.debian.org ============================================== install with Knoppix http://www.inittab.de/manuals/debootstrap.html DISK=/dev/hda MPOINT=/mnt/hda1 fdisk $DISK mkfs.ext3 ${DISK}1 for i in 1 2 5 6 7; do echo "=====> ${DISK}$i";mke2fs -m 2 -j ${DISK}$i;done for i in 1 2 5 6 7; do echo "=====> ${DISK}$i";fsck ${DISK}$i; done mount ${DISK}1 $MPOINT mkdir ${MPOINT}/usr mkdir ${MPOINT}/var mkdir ${MPOINT}/tmp mkdir ${MPOINT}/home mount ${DISK}2 ${MPOINT}/usr mount ${DISK}5 ${MPOINT}/var mount ${DISK}6 ${MPOINT}/tmp mount ${DISK}7 ${MPOINT}/home df # optional mkdir ${MPOINT}/home/var.cache.apt cd ${MPOINT}/var/cache mv apt/* ../../home/var.cache.apt rmdir /var/cache/apt ln -s ../../home/var.cache.apt apt cd / [ ! -d ${MPOINT}/etc/apt ] && mkdir -p ${MPOINT}/etc/apt [ ! -e ${MPOINT}/etc/resolv.conf ] && cp /etc/resolv.conf ${MPOINT}/etc cat << EOM > ${MPOINT}/etc/apt/sources.list deb http://ftp.us.debian.org/debian/ stable main non-free contrib deb-src http://ftp.us.debian.org/debian/ stable main non-free contrib deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free deb http://security.debian.org/ stable/updates main contrib non-free #deb http://pkg-kde.alioth.debian.org/kde-3.4.0/ ./ #deb http://www.morphix.org/debian ./ #deb http://ftp.us.debian.org/debian/ testing main #deb-src http://ftp.us.debian.org/debian/ testing main EOM # export DEBOOTSTRAP_DIR=/tmp/debootstrap/ debootstrap sarge $MPOINT http://ftp.us.debian.org/debian # I: Base system installed successfully. #-------------- chroot chroot $MPOINT DISK=/dev/hda mount /proc /proc -t proc apt-get update apt-get upgrade apt-get install grub grub-install $DISK cat << EOM > /etc/lilo.conf #LILO boot loader configuration. boot=$DISK root=$DISK}1 compact install=/boot/boot.b map=/boot/map vga=ask delay=20 image=/boot/vmlinuz root=$DISK}1 label=Linux initrd=/initrd.img read-only EOM [ ! -d ${MPOINT}/boot/grub ] && mkdir -p ${MPOINT}/boot/grub cat << EOM > ${MPOINT}/boot/grub/menu.lst # Boot automatically after 30 secs. timeout 30 color light-green/brown # By default, boot the first entry. default 1 # Fallback to the second entry. fallback 2 # For booting GNU/Linux title hda root (hd0,0) kernel /boot/vmlinuz root=${DISK}1 #initrd /initrd.img EOM install the package mkinitrd-tools and modify /etc/mkinitrd/mkinitrd.conf so $ROOT points to your new root partition (autodetection will fail in chroot). These steps are only required if you want to use one of the Debian kernel-images. apt-get install initrd-tools ============================ check /etc/mkinitrd/mkinitrd.conf (SCSI) MODULES=most DELAY=0 ROOT=/dev/sda1 # This controls the permission of the resulting initrd image. UMASK=022 # generate the initrd image. MKIMAGE='mkcramfs %s %s > /dev/null' ---------------------------- chroot# mount /proc /proc -t proc apt-get install kernel-image-2.4.18-686 apt-get install kernel-image-2.6.8-2-686 add the initrd to lilo.conf and run lilo again before leaving the chroot. chroot# exit umount $MPOINT/proc umount $MPOINT reboot ============================================== bash aliases cat <> /root/.bashrc alias agi='apt-get install ' alias agu='apt-get update ' alias agg='apt-get upgrade ' alias agr='apt-get remove' alias acse='apt-cache search ' alias acsh='apt-cache show ' alias agd='apt-get dist-upgrade' alias asv='apt-show-versions -p' EOM . /root/.bashrc apt-get install screen ============================================== debian recovery cd /var/cache/apt/archives dpkg -i libc6* libdb2* perl* dpkg -i apt* dpkg* debconf* dpkg -i * ---------------------------- dpkg -i /var/cache/apt/archives/packagefile.deb For a broken dependency, fix it or use: dpkg --ignore-depends=package1,... -i packagefile.deb dpkg --force-depends -i packagefile.deb dpkg --force-depends --purge package dpkg --force-confmiss -i packagefile.deb # Install missing conffile Rescue system after crashing /var Obtain the skeleton content of the /var directory from a minimum working Debian system based on the same or older Debian version, for example var.tar.gz, and place it in the root directory of the broken system. Then # cd / # mv var var-old # if any useful contents are left # tar xvzf var.tar.gz # use Woody skeleton file # aptitude # or dselect ---------------------------- ============================================== store packages info dpkg --get-selections > /usr/local/src/packages-2005-09-29 ---------------------------- restore to previous level dpkg --set-selections < packages-2005-09-29 apt-get -u dist-upgrade ============================================== stable/unstable mix ------------- /etc/apt/sources.list deb http://security.debian.org/ testing/updates main contrib non-free deb http://security.debian.org/ stable/updates main contrib non-free deb ftp://ftp.us.debian.org/debian/ testing main contrib non-free deb ftp://ftp.us.debian.org/debian/ unstable main non-free contrib ------------ /etc/apt/preferences Package: * Pin: release a=unstable Pin-Priority: 50 set the pin-priority for "Unstable" packages to sub-normal (normal=100), they're never fetched by default but only when "apt-get -t unstable install [packagename]"