- Can I convert the architecture of my Ubuntu 18.04 LTS server from
arm64? I've already got it doing a "multiarch" thing, but I'm not sure that's the best solution. How should I proceed?
- How can I systematically go through all of the
aptpackages I have installed, and replace the
I have this disk image backed-up, so I don't mind solutions which may destroy the server - I can just reinstall the image if anything goes wrong.
I would like to convert from armhf to arm64 on my Raspberry Pi 3 B. I have followed the instructions here, and produced a working 64-bit Ubuntu Bionic Server (which is cool). However, I notice that, while I can install and run
arm64 (i.e. 64-bit) packages, most of the packages on my server are
armhf (i.e. 32-bit). I would like to replace all (or as many as possible) of the
arm64. The server currently lists
arm64 as a "foreign" architecture, and
armhf as its native architecture. Can I switch these round?
ubuntu@ubuntu:~$ dpkg --print-architecture armhf ubuntu@ubuntu:~$ dpkg --print-foreign-architectures arm64
Is there some way to make the system switch these two around so that
arm64 becomes the default, and
armhf is used only where
arm64 packages are not available?
Please note: I have no background in computer science, so please forgive my naivety. My thinking is that 64-bit computing will be on average quicker than 32-bit since any software trying to deal with large numbers or high precision can just use the 64-bit architecture of the ARMv8 chip on the Pi 3 B rather than extending the processing of the numbers to several clock cycles. I have seen discussions on Raspberry Pi forums where some conflicting opinions are aired regarding the pros and cons of converting to 64-bit. I would be very grateful if somebody could compile a simple list of pros and cons as I don't understand the complexities of these discussions.
Currently, I don't know if there will be a performance increase in moving to 64-bit, but what the heck - it's a Raspberry Pi - you're supposed to play around with them!
I followed the instructions at the Ubuntu Wiki page; doing this:
sudo dpkg --add-architecture arm64 sudo apt update
I now find
To confirm the 64-bit nature of the server:
Linux ubuntu 4.15.0-1022-raspi2 #24-Ubuntu SMP PREEMPT Wed Aug 29 10:40:48 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
DEB_BUILD_ARCH=armhf DEB_BUILD_ARCH_ABI=eabihf DEB_BUILD_ARCH_BITS=32 DEB_BUILD_ARCH_CPU=arm DEB_BUILD_ARCH_ENDIAN=little DEB_BUILD_ARCH_LIBC=gnu DEB_BUILD_ARCH_OS=linux DEB_BUILD_GNU_CPU=arm DEB_BUILD_GNU_SYSTEM=linux-gnueabihf DEB_BUILD_GNU_TYPE=arm-linux-gnueabihf DEB_BUILD_MULTIARCH=arm-linux-gnueabihf DEB_HOST_ARCH=armhf DEB_HOST_ARCH_ABI=eabihf DEB_HOST_ARCH_BITS=32 DEB_HOST_ARCH_CPU=arm DEB_HOST_ARCH_ENDIAN=little DEB_HOST_ARCH_LIBC=gnu DEB_HOST_ARCH_OS=linux DEB_HOST_GNU_CPU=arm DEB_HOST_GNU_SYSTEM=linux-gnueabihf DEB_HOST_GNU_TYPE=arm-linux-gnueabihf DEB_HOST_MULTIARCH=arm-linux-gnueabihf DEB_TARGET_ARCH=armhf DEB_TARGET_ARCH_ABI=eabihf DEB_TARGET_ARCH_BITS=32 DEB_TARGET_ARCH_CPU=arm DEB_TARGET_ARCH_ENDIAN=little DEB_TARGET_ARCH_LIBC=gnu DEB_TARGET_ARCH_OS=linux DEB_TARGET_GNU_CPU=arm DEB_TARGET_GNU_SYSTEM=linux-gnueabihf DEB_TARGET_GNU_TYPE=arm-linux-gnueabihf DEB_TARGET_MULTIARCH=arm-linux-gnueabihf
This seems to suggest that whenever I install a package using apt, the system will go for an
armhf package by default.
I would like to make
arm64 the non-foreign architecture, and armhf my foreign architecture on this server.