CentOS 6: i386 to x86_64 upgrade
Warning: risky on production. Snapshot before every major step. This documents what worked once on a CentOS 6.8 i386 VPS that needed amd64 packages.
Overview
- Snapshot →
yum upgradeon i386 → snapshot again - Force-install an x86_64 kernel RPM, reboot (amd64 kernel + i386 userspace)
- Download amd64 builds of all installed i686 packages → remove
*.i686.rpm→rpm -iv --force *.rpm→ reboot
Step 0 — snapshots
Take a full snapshot in your hypervisor before starting.
Step 1 — latest i386 packages
yum upgrade -y
Snapshot again.
Step 2 — amd64 kernel
Copy an kernel-2.6.32-642.el6.x86_64.rpm (or matching line) to the host:
rpm -Uhv --force --ignorearch kernel-2.6.32-642.el6.x86_64.rpm
reboot
You should boot an x86_64 kernel with i386 userspace.
Step 3 — download amd64 RPM set
mkdir x64 && cd x64
rpm -qa | grep '\.i686' | sed 's/.i686//' | xargs yumdownloader
If a repo fails GPG/metadata (example: APItools_monitor), disable that repo and retry. Some kernel packages may not download — handle separately.
Example messages you can ignore if the rest downloads:
No Match for argument kernel-2.6.32-642.el6.x86_64
Snapshot again before the next step.
Step 4 — replace userspace
rm -f *.i686.rpm
rpm -ivh --force *.rpm
reboot
Result
System ran amd64 userspace on the same data partition. Monitor for broken third-party repos or kmods. Not supported by CentOS — treat as last resort.