zfsonlinux / pkg-zfs

Native ZFS packaging for Debian and Ubuntu
https://launchpad.net/~zfs-native/+archive/daily
308 stars 55 forks source link

GRUB Installation Issues on Precise #60

Closed rlaager closed 11 years ago

rlaager commented 11 years ago

I've been meaning to mention this for a while, but hadn't gotten around to it. This just came up in the #zfsonlinux chat room, so I thought I should file it now.

At the time I'm writing this, the zfs-native/grub PPA has grub version 1.99-21ubuntu3+zfs1 for Precise, which is less than the version in the Ubuntu archives (1.99-21ubuntu3.5). Accordingly, on an up-to-date Precise system, this happens:

$ sudo apt-get install zfs-initramfs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 zfs-initramfs : Depends: zfs-grub but it is not installable
E: Unable to correct problems, you have held broken packages.

According to apt_preferences(5), this is because APT will "Never downgrade unless the priority of an available version exceeds 1000."

Thus, changing the priorities (or even just the LP-PPA-zfs-native-grub priority) in the pin-zfs-native preferences file to 1001 fixes this:

--- ubuntu-zfs-6~precise-orig/pin-zfs-native    2011-12-23 09:44:21.000000000 -0600
+++ ubuntu-zfs-6~precise/pin-zfs-native 2012-11-23 19:52:30.338230461 -0600
@@ -4,7 +4,7 @@

 Package: *
 Pin: release o=LP-PPA-zfs-native-grub
-Pin-Priority: 900
+Pin-Priority: 1001

 Package: *
 Pin: release o=LP-PPA-zfs-native-stable

Other options to fix this would include A) building new ZFS grub packages every time Ubuntu's grub package is updated, or B) shipping the grub packages under new names (e.g. zfs-grub-pc--which for compatibility with other dependencies, should Provides: grub-pc).

dajhorn commented 11 years ago

The ubuntu-zfs-7 meta increases the PIN priority to 1001 for Precise and Quantal, which should resolve this bug for most ZoL users. I will revisit this issue for Lucid before it goes into extended server support come April.