Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------------------------------------------------------------------------------------------------------------
- --- NOPE NOPE NOPE
- --------------------------------------------------------------------------------------------------------------
- # Add the x86_64 kernel
- sudo apt-get install linux-image-amd64
- # Add the architecture to dpkg
- sudo sudo dpkg --add-architecture amd64
- # Reboot on the x86_64 kernel
- reboot
- # Checkpoint the currently installed packets
- dpkg --get-selections "*:i386"|grep -v deinstall >dpkg-get-selections.cp.00.i386
- dpkg --get-selections "*:amd64"|grep -v deinstall >dpkg-get-selections.cp.00.amd64
- dpkg --get-selections "*:all"|grep -v deinstall >dpkg-get-selections.cp.00.all
- # Install debootstrap
- sudo apt-get install debootstrap
- # Prepare the x86 debootstrap tree
- mkdir -p bootstrap-i386
- debootstrap --arch=i386 --download-only --include=openssh-client,openssh-server jessie bootstrap-i386/
- # Prepare the x86_64 debootstrap tree
- mkdir -p bootstrap-amd64
- debootstrap --arch=amd64 --download-only --include=openssh-client,openssh-server jessie bootstrap-amd64/
- # Agregate and mark for install all the base packages from the x86_64 debootstrap tree
- ls -1 bootstrap-amd64/var/cache/apt/archives/|egrep "\.deb$"|cut -d "_" -f1|awk '{print $1 " install"}' >dpkg-get-selections.base
- --------------------------------------------------------------------------------------------------------------
- -- OK
- --------------------------------------------------------------------------------------------------------------
- sudo aptitude search '?narrow(?not(?archive("^[^n][^o].*$")),?version(CURRENT))?architecture(i386)'
- sudo apt-get install linux-image-amd64 dctrl-tools
- sudo dpkg --add-architecture amd64
- sudo apt-get update
- reboot
- cd /var/cache/apt/archives
- sudo apt-get clean
- sudo aptitude search --disable-columns -F%p '~ri386~i!~o' | xargs -n1 sudo apt-get -o APT::Architecture=amd64 download # This will take a while.
- grep-status --field=Status "install ok installed" | grep-dctrl --field=Multi-Arch same --show-field=Package --no-field-names | sed 's/$/:amd64/' | xargs -n1 sudo apt-get -y install # This will take even longer and fail.
- # This is a custom script to remove i386 packages that are already installed as amd64.
- # You should run it multiple times because packages are processed alphabetically and will meet dependency problems.
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #!/bin/bash
- i=1
- echo "Get AMD64 packages"
- sudo aptitude search '~ramd64~i' | awk '{print $2}' > packages.amd64
- echo "Get i386 packages"
- sudo aptitude search '~ri386~i' | awk '{print $2}' | sed -e 's/:i386//' > packages.i386
- echo "Compute common lines"
- comm -1 -2 --nocheck-order packages.i386 packages.amd64 > packages.comm
- tot=`cat packages.comm | wc -l`
- echo "${tot} common packages to remove."
- for deb in `cat packages.comm`; do
- echo "######################################"
- echo "Remove ${deb}:i386 (${i}/${tot})"
- echo "######################################"
- sudo dpkg -r ${deb}:i386
- i=$((i+1))
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # Fuck'd up package beyond recuperation
- sudo mv /var/lib/dpkg/info/python-pil:i386.* /tmp/
- sudo apt-get -f install
- # Look for broken packages
- aptitude search ~b
- # Remove the i386 kernel
- sudo aptitude remove '~ri386~nlinux-~i'
- # This command shows the installed i386 packages. Make sure they all have an amd64 counterparty.
- sudo aptitude search '~ri386~i'
- --------------------------------------------------------------------------------------------------------------
- --------------------------------------------------------------------------------------------------------------
- phonon-backend-vlc (recommended), phonon4qt5-backend-gstreamer, phonon-backend-gstreamer
- # Reference
- # http://www.ewan.cc/?q=node/90 # NOPE
- # http://anarc.at/services/upgrades/cross-architecture/
- # http://www.nanonanonano.net/linux/debian/crossgrading
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement