Architektúra váltás

  1. Add the new architecture
    dpkg --print-architecture
    # i386
     
    dpkg --add-architecture amd64
     
    dpkg --print-foreign-architectures
    # amd64
     
    apt-get update
  2. Install a kernel that supports both architectures in userland
    apt-get install linux-image-amd64:amd64
     
    reboot
  3. Crossgrade dpkg tar and apt
    apt-get clean
     
    apt-get upgrade
     
    apt-get --download-only install dpkg:amd64 tar:amd64 apt:amd64
     
    dpkg --install /var/cache/apt/archives/*_amd64.deb
     
    dpkg --print-architecture
    # amd64
     
    dpkg --print-foreign-architectures
    #i386
  4. Swap arch of libs
    dpkg --get-selections \
        | grep ':i386' \
            | sed -e 's/:i386/:amd64/' \
                | dpkg --set-selections
     
    apt-get -f install
  1. Architektúra beállítása (/etc/apt/apt.conf.d/00arch):
    00arch
    APT::Architectures "amd64,i386";
  2. apt takarítása
    apt-get clean
     
    rm -rf '/var/lib/apt/lists'
     
    apt-get update
  3. dpkg available újragenerálása
    dpkg --clear-avail
     
    du '/var/lib/dpkg/available'
    # 0       /var/lib/dpkg/available
     
    find '/var/lib/apt/lists' -name '*_Packages' -exec dpkg --merge-avail {} \;
     
    du '/var/lib/dpkg/available'
    # 67872   /var/lib/dpkg/available