#!/bin/sh # clone debian system # References http://www.inittab.de/manuals/debootstrap.html #http://66.102.9.104/search?q=cache:XStg8MdXobEJ:hacking.dk/talks/debia #n/tips_og_trick/+debconf-get-selections+trick&hl=en&ie=UTF-8 # # TARGET_DIR=/mnt/hda9/ford_image DEBIAN_MIRROR_HOST=192.168.0.12 DEBIAN_MIRROR_PORT=9999
DEBIAN_APT_SOURCES=sources.list DEBIAN_APT_INTERFACES=autoinstaller.etc.network.interfaces DEBIAN_FSTAB=autoinstaller.etc.fstab debootstrap sarge $TARGET_DIR http://$%7BDEBIAN_MIRROR_HOST%7D:$%7BDEBIAN_MIRROR_PORT%7D/main dpkg --get-selections > ${TARGET_DIR}/autoinstall_dpkg.db debconf-get-selections > ${TARGET_DIR}/autoinstall_debconf.db cp ${DEBIAN_APT_SOURCES} ${TARGET_DIR}/etc/apt/sources.list cp ${DEBIAN_APT_INTERFACES} ${TARGET_DIR}/etc/network/interfaces cp ${DEBIAN_FSTAB} ${TARGET_DIR}/etc/fstab chroot ${TARGET_DIR} apt-get update
#base-config
#Man kan bruge sin backup med følgende kommandoer:
debconf-set-selections < ${TARGET_DIR}/autoinstall_debconf.db dpkg --set-selections < ${TARGET_DIR}/autoinstall_dpkg.db apt-get dselect-upgrade apt-get -u dist-upgrade
regards
Owen
On Fri, 13 Jan 2006 09:49:44 -0000 "Keith Watson" keith.watson@kewill.com wrote:
On 11/1/2006, "Adam Bower" adam@thebowery.co.uk wrote:
On Wed, Jan 11, 2006 at 02:02:07PM -0000, Safe Hammad wrote:
Then...
apt-get dist-upgrade (i /think/)
I'd go for apt-get dselect-upgrade (rather than dist-upgrade) ...
:o) > Cheers,
Safe
ummm, yeah. That's the one... not used it for some time ;)
Interestingly neither dselect-upgrade or dist-upgrade would install _all_ the marked packages. Can anyone think why that was? I wondered if it was something to do with package interdependencies.
Anyway I reverted to plan A and apt-get to download the package files on a fast connection, moved them to the new box and dpkg to install them. That worked a treat and I've successfully added the same list of packages installed on my old box onto the new one.
(incidentally at the bottom of the man page for dpkg it says;
To make a local copy of the package selection states:
dpkg --get-selections >myselections
You might transfer this file to another computer, and install it there with:
dpkg --set-selections <myselections
Note that this will not actually install or remove anything, but just set the selection state on the requested packages. You will need some other application to actually download and install the requested packages.
dooh! )
Regards,
Keith ____________ Do not fear the arising of thoughts - only be concerned lest your awareness of them be tardy. - Zen Saying
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!