PDA

View Full Version : old packages in rpmdb after interupted preupgrade


mps2006
27th April 2012, 08:11 AM
Hi,

I tried going F16-F17 via preupgrade. Part way through the upgrade, preupgrade hung with no response. One of the consoles said something like "dump2efs media <path to luks volume> doesn't exist". (FWIW it hung on sbcl, the 2144th package of 2929).

I shutdown and restarted the upgrade. It installed the rest of the packages normally.

I now have a working hybrid F16-F17 system, complete with fireworks. The kernel is still FC16, but the packages are all fc17 (Gnome is at 3.4 for example).

However... yum reports that for the 2144 packages that were installed that the fc16 version is installed alongside the fc17 one, like so:

NetworkManager-gtk.x86_64 1:0.9.2-1.fc16 @updates
NetworkManager-gtk.x86_64 1:0.9.4.0-1.git20120328.fc17

this means running yum or yum distro-sync fails, even with --skip-broken.

Basically, it seems that I have the correct binaries, but that because preupgrade was interupted and didn't complete the "clean-up" part, the rpmdb is not correct.

How can I fix this?

package-cleanup --cleandupes wants to remove every single package on my system...

thanks
M.

DBelton
27th April 2012, 08:15 AM
upgrading from F16 to F17 using preupgrade is a little different than with previous versions due to filesystem changes, so there is a specific order to do things in as outlined in the Fedora docs.


Fedora 16 -> Fedora 17
Warning (medium size).png
This references an unreleased version of Fedora. The steps here may change before release.

First install the new Fedora 17 gpg key

rpm --import https://fedoraproject.org/static/1ACA3465.txt

Fedora 17 will locate the entire base operating system in /usr. The directories /bin, /sbin, /lib, /lib64 will only be symlinks:

/bin → /usr/bin
/sbin → /usr/sbin
/lib → /usr/lib
/lib64 → /usr/lib64

Some reasoning behind this change is outlined here:

http://www.freedesktop.org/wiki/Soft...ForTheUsrMerge

Currently installed systems need some manual steps to convert the current system to match the layout of Fedora 17. After that, the system can continue to be updated with YUM as usual.

Some RPM packages in Fedora 17 are carrying an RPM dependency guard, which will make sure, they can only be installed when /bin, /sbin, /lib, /lib64 are symlinks and not directories like in Fedora 16 and older.

The installed system’s base filesystem layout can not be safely altered, while the system itself is running on top of it. Dracut, the initramfs used to find and mount the root filesystem, can be instructed to convert the filesystem to match Fedora 17’s expectations.

If your system has a split-off /usr, a separate mount point, the dracut /usr mount conversion logic might not work. If /usr resides on the net, then ou should add "rd.neednet=1" and the network settings like "ip=dhcp" on the kernel command line. /usr on iSCSI, FCoE, NBD also is supported, as long as “netroot=...” is specified on the kernel command line for these disks (see man dracut.kernel(7)). If you have /usr on LVM, MD raid or DM raid, make sure the kernel command line has either all settings like "rd.lvm.lv=..." to ensure the /usr device is accessible in dracut or just remove all restrictions like "rd.lvm...", "rd.md...", "rd.dm...". Either way, you should probably use anaconda to update, if you are experiencing problems with a separate /usr.

Here are the steps to prepare your system, to convert it, and to be able to continue updating your installed system with yum:

Download and install the most recent dracut packages:

# yum update dracut

You should at least have dracut-009-15.fc15 for Fedora 15 or dracut-013-22.fc16 for Fedora 16.

Turn off any "hostonly" settings in /etc/dracut.conf*, if you turned on "hostonly".

Update the installed initramfs image for your current kernel, and instruct dracut to include the dracut module to convert your current filesystem:

# dracut --force --add convertfs

If your system has a split-off /usr, a separate mount point, and you don't know the kernel command line parameter to add, you can also try (dracut tries to generate them internally):

# dracut -H --force --add convertfs

If dracut detects ‘rd.convertfs’ on the kernel command line at bootup, it starts the filesystem conversion of the root filesystem. If it is already converted, it will just do nothing.
Warning (medium size).png
dracut will by default update the initramfs for the currently running kernel. Make sure that no new kernel has been installed since last boot and that you really will boot into the updated initramfs.

Change the following kernel commandline parameter directly in the bootloader menu, which is shown during bootup, or edit the line in /etc/grub*.cfg to remove ro and rhgb and append rw rd.info rd.convertfs enforcing=0

Explanation of the options:

- remove “ro” (read only)
- append “rw” (read write) to let dracut mount your root filesystem writeable
- remove “rhgb” (Red Hat graphical boot) to disable the graphical bootsplash
- append “rd.info” to get a more verbose output from dracut
- append “rd.convertfs” to enable the /usr-move conversion script in dracut
- append “enforcing=0” to disable SELinux enforcement

During bootup, dracut will now convert your filesystem, and /lib, /lib64, /bin and /sbin should then all be symbolic links to the corresponding directories in /usr.

After the conversion, the system needs to be immediately updated to Fedora 17. No packages from Fedora 16 or Fedora 15, or older rawhide packages must be installed anymore. Make sure to disable any Fedora 15 and Fedora 16 repositories in yum!

Any files with conflicting names, which the conversion could not resolve, will be backed up to files named *.usrmove~ residing in /usr/lib, /usr/lib64, /usr/bin and /usr/sbin.

Verify that dracut really completed the conversion. The log messages, which dracut has generated during bootup, can be retrieved with:

# dmesg | grep dracut

After a successful conversion, revert the changes made to the kernel command line in the bootloader config file /etc/grub*.cfg.

Then run,

# yum --releasever=17 update rpm
# rm -f /var/lib/rpm/__*
# rpm --rebuilddb
# yum --releasever=17 --disableplugin=presto --skip-broken distro-sync
# fixfiles onboot

After upgrading, all should be set and done.

Have fun with your system and say “Good bye” to /bin, /sbin, /lib, /lib64 and meet them in /usr.

mps2006
27th April 2012, 04:21 PM
Hi Thanks for quick reply.
Yes, the usrmove has happened and I have symlinks etc.

the error on distro-sync is:

Error: Protected multilib versions: systemd-44-6.fc17.x86_64 != systemd-44-4.fc17.i686
Error: Protected multilib versions: vlc-core-2.0.0-5.fc17.x86_64 != vlc-core-1.1.13-3.fc16.i686


Any ideas?

---------- Post added 27th April 2012 at 06:21 AM ---------- Previous post was 26th April 2012 at 10:21 PM ----------

Hi,

So with some manual clean up I was able to do the distro-sync and now have all the fc17 packages.

dracut reports successful filesystem conversion

However, the fc17 kernel will not boot - it drops me into a shell with messages like "dracut warning: cannot find lv_root"

What do I need to do to get the fc17 kernel to boot?

thanks
M.

Hansvon
27th April 2012, 04:46 PM
Maybe try to remake the initramfs: for kernel 3.3.2-8.fc17.x86_64
dracut -f /boot/initramfs-3.3.2-8.fc17.x86_64.img 3.3.2-8.fc17.x86_64

Or inspect /etc/grub2.cfg. See if something in the "linux" line is different from an older kernel...

mps2006
27th April 2012, 04:55 PM
Thanks. Rebuilding the initramfs gets me further! It now asks me for luks password, but then drops into a shell saying:
"dependency failed" and it says "failed to start /sys/bus/usb/drivers"

The lines in /etc/grub2.cfg are identical.

Any more ideas?

Thanks!
M.

Edit: this is what systemctl status says afterwards (when I am in the emergency shell):
sys-bus-usb-drivers.mount - /sys/bus/usb/drivers
Loaded: loaded
Active: failed (Result: exit-code) since Fri, 27 Apr 2012 16:05:36 +0100; 1min 31s ago
Where: /sys/bus/usb/drivers
What: none
Process: 569 ExecMount=/bin/mount /sys/bus/usb/drivers (code=exited, status=32)
CGroup: name=systemd:/system/sys-bus-usb-drivers.mount

Hansvon
27th April 2012, 05:38 PM
Maybe try to "yum reinstall systemd"? When I updated to F17, I had systemd.i686 installed too. I removed it.

mps2006
27th April 2012, 06:03 PM
Good idea, thanks. Unfortunately doesn't change anything. Neither does the systemd-44-7 that is in updates-testing.

Hmmm....

Inegol Kultur Park Travel Photos on Instagram - Hotel Nacional De Cuba Travel Photos on Instagram - Fullerton Museum Center