How to cross-upgrade Fedora x86(32-bit) => x86_64(64-bit) using 'preupgrade'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For the past couple months I've been working on finding a way to successfully upgrade Fedora x86(32-bit) to x86_64(64-bit). I had almost given up because nothing seemed to work despite dozens of different approaches. Then a couple days ago I started a new set of experiments and now I have successfully cross-upgraded three different systems using this technique. On the three machines that I used, all the configs that I set up were still in place after the upgrade. The machines behaved normally and I have not found any sign of problems yet. But, it would be difficult to see how this technique could ever be fully automated because it requires a certain amount of manual inspection in a number of places. And it's probably something that could not be officially supported. But at least it appears there may now be a technique to perform a successful 32-bit => 64-bit upgrade. And for those who have heavily configured machines this may be worth a try. Anyway, here's the technique:


======================================================================
         CROSS-UPGRADE FEDORA x86 => x86_64 USING PREUPGRADE
       (BACKUP EVERYTHING BEFORE YOU TRY IT)

        EXAMPLE: F10(x86) => RAWHIDE(x86_64)

PRE PREUPGRADE:
       su -                                            # do all as 'root'
cp /etc/fstab /etc/fstab.beforeupgrade # merge these after the upgrade, if necessary. echo "x86_64-redhat-linux" > /etc/rpm/platform # make yum prefer x86_64 packages cd /tmp # install a x86_64 kernel into your F10 i386 installation: rpm -ivh --force http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/x86_64/os/Packages/kernel-2.6.27.5-117.fc10.x86_64.rpm

PREUPGRADE:
       yum install yum-fastestmirror
       yum update yum\* rpm\*
       yum update              # update all F10
       preupgrade
# when preupgrade finishes downloading it will ask you to reboot (anaconda mode is next).
       # click Yes on the anaconda architecture warning.
# after anaconda finishes, shutdown. (may just hang at the end since rpmdb is confused at this point, upgrade is still good.)

POST PREUPGRADE: (perform all these actions in F10/F11 Rescue Mode in the chroot)
       BOOT INTO RESCUE W/DHCP NETWORKING
       chroot /mnt/sysimage

       REBUILD RPMDB
       rm -rf /var/lib/rpm/__db*
       rpm --rebuilddb

REMOVE/REINSTALL SELINUX (SELinux gets hopelessly confused through all this so just remove and reinstall later) yum remove selinux-policy selinux-policy-targeted policycoreutils-gui setools

       UPDATE KERNEL
       yum update kernel       # update the kernel

INSTALL AVAILABLE MATCHING x86_64 PACKAGES FOR ALL i386 'DEVEL' PACKAGES THEN REMOVE ALL i386 PACKAGES: pkgs_devel="$(rpm -qa --queryformat '%{name}\n' | sed -n '/devel/p')"
       test ! -z "$pkgs_devel" && yum install $pkgs_devel
pkgs_i386="$(rpm -qa --queryformat '%{name}.%{arch}\n' | sed -n '/i386$/p')"
       test ! -z "$pkgs_i386" && yum remove $pkgs_i386

       INSTALL AVAILABLE MATCHING x86_64 PACKAGES FOR ALL i586 PACKAGES:
pkgs_i586="$(rpm -qa --queryformat '%{name}.%{arch}\n' | sed -n '/i586$/p')"
       test ! -z "$pkgs_i586" && yum install $pkgs_i586
NOTE ANY CONFLICTS (generally because both packages install to the same filepath)
               we had two packages in conflicts: mono-core and gdm
NOW FORCE INSTALL ANY x86_64 PACKAGES IN CONFLICT (mono-core and gdm shown as examples only) rpm -ivh --force http://download.fedora.redhat.com/pub/fedora/linux/development/x86_64/os/Packages/mono-core-2.4-17.fc11.x86_64.rpm rpm -ivh --force http://download.fedora.redhat.com/pub/fedora/linux/development/x86_64/os/Packages/gdm-2.26.1-1.fc11.x86_64.rpm
       NOW RERUN INSTALL COMMAND (you should have no conflicts this time)
       test ! -z "$pkgs_i586" && yum install $pkgs_i586

       CHECK CONSISTENCY:
       yum install package-cleanup
       package-cleanup --problems      # should show no problems
       package-cleanup --dupes         # should show no dupes
       rpm -Va --nofiles --nodigests   # should show nothing
       yum update                      # should show no packages
vi /boot/grub/grub.conf # check your bootloader, remove entry for Upgrade to Rawhide/F11
       exit                            # exit chroot
       exit                            # exit Rescue Mode which reboots

       FINAL STEPS
# now boot into your new cross-upgraded Fedora(x86) => Fedora(x86_64) system.
       su -                                            # do all as 'root'
yum install selinux-policy selinux-policy-targeted policycoreutils-gui setools find / -name "*.rpmnew" -o -name "*.rpmsave" # merge new configs; all existing configs should be working. rpm -qa --whatrequires boost # binary data: handle (32-bit v. 64-bit) issues in boost apps.

======================================================================


I would hope that there might be a few out there to help test this technique. Please let me know if you find anything that needs updated.



Regards,
Gerry

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux