[RHEL] Passer de 32 à 64 bit sans réinstaller

Written by admin on October 11, 2012 Categories: Linux, RedHat Tags: , , , , ,

Procédure testée sur RHEL 5.5 32 vers 64

Backup tout !

echo "x86_64-redhat-linux" > /etc/rpm/platform    # i686-redhat-linux pour du 32 bit
sed -i -re "s/i386/x86_64/g" /etc/yum.conf /etc/yum.repos.d/*  # ou modif manuelle equivalente
yum clean all
rpm -qa > /root/rpm-qa.txt
cat /root/rpm-qa.txt | sed -re "s/(.*)-[^-]*-[^-]*$/\1/" | sort | uniq  > /root/rpm-qa.txt.sort
rpm -e kernel pcmciautils
yum -y install kernel
reboot

cat /root/rpm-qa.txt.sort | xargs -n1 rpm -e --justdb --nodeps --allmatches

Prendre un café.

yum -y install glibc yum
rm -rf /var/cache/yum/*

Vérifier qu’il y a suffisement de place sur /var et /usr

cat /root/rpm-qa.txt.sort | xargs yum -y install

Prendre deux cafés

reboot

On vérifie si tous les packages d’origine sont installés

rpm -qa > rpm-qa.after.txt
cat /root/rpm-qa.after.txt | sed -re "s/(.*)-[^-]*-[^-]*$/\1/" | sort | uniq  > /root/rpm-qa.txt.after.sort
diff /root/rpm-qa.txt.after.sort /root/rpm-qa.txt.sort

Sources :

http://www.alexhudson.com/2010/12/10/upgrade-your-i386-fedora-install-to-64-bit/

http://lists.fedoraproject.org/pipermail/devel/2009-April/028018.html

http://hacktux.com/yum/force/reinstall

http://wowtutorial.org/node/160

 

No Comments on [RHEL] Passer de 32 à 64 bit sans réinstaller

Leave a Reply

Your email address will not be published. Required fields are marked *