I've done a really dumb thing: I installed Ubuntu 8.04 on a desktop & told the installer it was an AMD64 machine. The install went fine & most things work. Some don't & that's 'cos it's actually an Intel P4 :{

Is there a simple way to change th architecture, other than a full clean install?

Oh, and in the meantime, I ran the updater & it's now running 9.04.

If get the 9.04 installer & run that on the existing system, will that sort things without losing any changes I've made/software I've installed & customised?

The main problem is that Skype will not install as it, unsurprisingly, complains about "wrong architecture". Also, I can't install some of the stuff needed to display videos in Firefox for the same reason.

Any ideas gratefully received.

Dani AI

Generated

Short answer: you cannot safely "flip" a full Debian/Ubuntu install from amd64 to i386 in place. As suggested, a reinstall is the clean, reliable fix if you want a true 32‑bit system. There are two less‑invasive options to get 32‑bit apps running on a 64‑bit install, though — verify what you actually have first, then choose a path.

Check what is actually running:

uname -m
dpkg --print-architecture
getconf LONG_BIT

If uname -m shows x86_64 and dpkg --print-architecture shows amd64, you have a 64‑bit userspace. To run 32‑bit binaries (Skype, some browser codecs) on that system you can either install the 32‑bit compatibility bundle or create a 32‑bit chroot:

  • Quick compatibility: install the 32‑bit compatibility libraries (ia32-libs on older Ubuntu releases) and then install the 32‑bit .deb. Example:

    sudo apt-get update
    sudo apt-get install ia32-libs
    sudo dpkg -i skype-2.x.xx.i386.deb
    sudo apt-get -f install

    ia32-libs does not guarantee every third‑party binary will work, but fixes most common cases.

  • Clean isolation: create an i386 chroot with debootstrap and run the 32‑bit app inside it (safe, reversible):

    sudo apt-get install debootstrap
    sudo debootstrap --arch=i386 jaunty /srv/chroot/jaunty-i386 http://archive.ubuntu.com/ubuntu
    sudo chroot /srv/chroot/jaunty-i386 /bin/bash

If you do want a full i386 system, backup and reinstall. Recommended workflow to preserve user data and installed packages:

dpkg --get-selections > ~/packages.list
sudo tar czpf ~/etc-backup.tgz /etc
sudo tar czpf ~/home-backup.tgz /home

Then boot the i386 installer, use manual partitioning to keep/restore a separate /home (do not format it unless you have backups), install, and restore packages:

sudo dpkg --set-selections < ~/packages.list
sudo apt-get -u dselect-upgrade

Notes and cautions: "reinstalling over the top" often leaves mixed-architecture libraries and subtle breakage; backing up first is essential. The compatibility route (ia32-libs or chroot) is usually faster and safer if the hardware actually supports 64‑bit but you only need a few 32‑bit apps.

Recommended Answers

All 3 Replies

if it installed and works then you do have a 64bit machine... it wouldnt work at all if you didnt... you cant really just switch... you'll need to reinstall the architecture you want.

Thanks for the response icyshout.

if it installed and works then you do have a 64bit machine... it wouldnt work at all if you didnt...

In part that's true because even a P4 Celeron (which is what's actually in the machine) will run 64 bit, AFAIR. But something I tried to install the other day (and I can't now remember what) complained about "wrong architecture" and said the OS was AMD64. So I'm assuming that the Ubuntu installer correctly figured out that this is not an AMD64 machine & installed a kernel that would work but some libraries etc are the wrong ones - in other words, it's a hybrid :{

you cant really just switch... you'll need to reinstall the architecture you want.

I realise there's no easy way to switch :) What I was wondering is if it needs to be a clean install from scratch - which would be a major nuisance - or if installing "over the top" of the existing installation would work? Or is there another way I haven't thought of?

you could do an over the top reinstall but you'd end up with weird problems that you could alleviate if you just did a fresh install.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.