Crossgrading a minimal install of Debian 9

By testing the previous instructions for a full crosgrade I run into trouble. Here is the results of my tests to do a full crossgrade of a minimal installation of Debian inside a VM.

First you need to install a 64bits kernel and boot with it. See my previous post on how to do it.

Second you need to do a bootstrap of crossgrading:

 apt-get clean
 apt-get upgrade
 apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64 bash:amd64 dash:amd64 init:amd64
 dpkg --install /var/cache/apt/archives/*_amd64.deb
 dpkg --install /var/cache/apt/archives/*_amd64.deb
 dpkg --print-architecture
 dpkg --print-foreign-architectures
 apt-get --fix-broken --allow-remove-essential install

Third do a full crossgrade:

 apt-get install --allow-remove-essential $(dpkg --list | grep :i386 | awk '{print $2}' | sed -e s/:i386// )

This procedure seams to be a little fragile, but worked most of the time for me.

Comments

1. On Thursday, 13 July, 2017, 02:08 by Raz

I've crossgraded a few existing system I have systems I have.

My procedure starts fairly similar to yours but I usually download all the equivalent packages I have installed as i386 and then install the 64bit libraries before I attempt the full crossgrade:
aptitude search --disable-columns -F%p '~ri386~i!~o' | sed 's/i386/amd64/' |
xargs apt-get download
dpkg --install /var/cache/apt/archives/lib*_amd64.deb

The download above tends to find any packages that aren't available anymore also which is a help before you get too far into the crossgrade.

The above is usually followed up by:
#Now install the none libraries.
dpkg --install /var/cache/apt/archives/!(lib*)_amd64.deb
dpkg --pending --configure

#Repeat the next 2 steps a few times
dpkg --install /var/cache/apt/archives/*_amd64.deb
dpkg --pending --configure

# The manually install the ones that are failing.
dpkg --get-selections | grep :i386 | sed -e s/:i386/:amd64/ | dpkg --set-selections

Add a comment

HTML code is displayed as text and web addresses are automatically converted.

They posted on the same topic

Trackback URL : http://blog.calhariz.com/index.php/trackback/58

This post's comments feed