4

I upgraded a Ubuntu Maverick to Precise server but I get the following error while updating grub:

error: physical volume pv0 not found.

Now, for my system I have /dev/sda through /dev/sde

  • /dev/sda1 is a Linux partition for /boot
  • and /dev/sda5 is an LVM partition
  • /dev/sdb through /dev/sde are PVs for the LVM

By looking at my vg config, pv0 is /dev/sda5

I only have one Volume Group called "ns2" where the root (/) and some other logical volumes for the system.

I tried looking on the Web for help but they said I should upgrade to Grub2 as it is better to LVM support. I did that and I get the same error. I haven't rebooted the server but I have the feeling it is not going to boot. Still, I want to fix that error.

My boot partition is not in an LVM volume so even grub1 or grub2 should look at it without problems.

Any ideas? I just tried reinstalling grub but I get the same error, still it seems to go "fine".

What can I check before rebooting? This server is in another location and I have no remote access to the console, so I want to go there ready if something needs to be done.

Edit: Added more information http://pastebin.com/Smr1pB8W

Edit: Added pvs information http://pastebin.com/yubMd232

larsks
  • 41,276
  • 13
  • 117
  • 170
rreg
  • 43
  • 1
  • 5

1 Answers1

2

It sounds like you didn't reboot between upgrading LVM2/GRUB and the kernel.

You will want to "pin" an old grub version long enough to reboot your system into a current kernel version. At that point you should be good to unpin, upgrade grub and everything should be kosher.

Add this to /etc/apt/preferences:


# Force grub to 1.98+20100804-5ubuntu3
Package: grub-pc
Pin: release n=maverick
Pin-Priority: 1000

Now

 apt-get update && apt-get -s dist-upgrade

Assuming you get a line like Inst grub-pc [ 1.98+20100804-5ubuntu3] .... (and the resulting dependency shuffling doesn't break your system... Watch for things like libc downgrades) you can apt-get dist-upgrade to force grub back to sanity. I would suggest running update-grub one more time to make sure you're not walking into an un-bootable situation.

Let me know how it goes :)

Gryu
  • 479
  • 1
  • 6
  • 14
  • I downgrade it and the errors went away, I still need to be there physically just in case something happens. I'll come back later with an update. – rreg May 29 '12 at 02:05
  • I uninstalled the `grub-pc` package then pinned it down and installed the one from **maverick**. Everything is working now, I still want to try to update to the one from **precise** but right now I don't have to. Thank you. – rreg May 29 '12 at 09:47
  • Great! Like I mentioned above, you should be fine to change everything back to stable now. Grub is an incredibly resilient tool, it's unfortunate that the error messages are so cryptic at times. :) – Zach Morgan Jun 02 '12 at 17:05