Skip to content

Instantly share code, notes, and snippets.

@dominicusin
Last active July 1, 2017 12:47
Show Gist options
  • Select an option

  • Save dominicusin/03a654d6fc52f66bacd8c11c096c6cf2 to your computer and use it in GitHub Desktop.

Select an option

Save dominicusin/03a654d6fc52f66bacd8c11c096c6cf2 to your computer and use it in GitHub Desktop.
copy deb installs with settings on other loc
#!/bin/sh
debootstrap --verbose --arch=amd64 --components=main,contrib,non-free --include="`echo "$(dpkg-query -Wf '${Package},')mc"`" sid talis http://vwakviie2ienjx6t.onion/debian/
apt-get install dselect debconf-utils
mkdir system-selections
cd system-selections
dpkg-query -Wf '${Package}\n' >Packages.lst;
dpkg --get-selections '*' > dpkg-selections;
update-alternatives --get-selections > alternatives
debconf-get-selections > debconf;
apt-mark showauto > pkgs_auto.lst;
apt-mark showmanual > pkgs_manual.lst
apt-mark showhold
###
scp -r oldsystem:system-selections ~
###
apt-get install dselect debconf-utils
dselect update
dpkg --set-selections < system-selections/dpkg-selections
debconf-set-selections < system-selections/debconf
apt-get -u dselect-upgrade
update-alternatives --set-selections < system-selections/alternatives
apt-mark auto $(cat system-selections/pkgs_auto.lst)
apt-mark manual $(cat system-selections/pkgs_manual.lst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment