[SOLVED] ZFS not loading after apt-get upgrade

mpascu

New Member
May 10, 2017
3
0
1
30
Hello everyone,
I've been enjoying my proxmox intalation for a year until today. (I've got Proxmox 4.1 as far as I remember)
I just changed to the no-subscription sources and because I was already on the shell I made the disastrous mistake of "apt-get update, apt-get upgrade". I was not aware that proxmox should be upgraded by dist-upgrade.

After that, I rebooted the server and It worked fine for an hour but when I rebooted again and after it passes GRUB it shows a message like: "failed to load zfs modules" and a busybox shell.
Tried to modprobe zfs and i got "modprobe: can't load module spl (zfs/spl.ko): Invalid argument"

I also tried downloading the latest proxmox installation ISO and selecting the rescue option with no luck: "unable to find boot disk"

The thing is that I've got some important code and software on the VM's and reinstalling proxmox and start from scratch is not an option.

Is there any way to recover this proxmox installation or at least some files of an VM?

If it can be helpful I also had an exclusive disc on the PVE node with backups of all VM's.

Thanks in advance and sorry for the bad english, it's not my primary languange

I finally managed to repair the non-booting proxmox install. Here are the steps I followed:
1- Get a live usb with a ZFS capable distro, I used PartedMagic, it's 9$ but If you're here you probably have a problem that's woth it.

2- Import the zfs pool. PartedMagic somewhat imported automatically the proxmox rpool in a bad way because the "/" mountpoint of the proxmox rpool interfered with the linux distro mountpoint, so: first I've had to export de badly imported rpool:

# zpool export rpool

Make a dir to mount proxmox filesystem:

# mkdir /mnt/proxdisc

And mount the filesystem there:

# zpool import -f -R /mnt/proxdisc rpool

3- Next, we need to chroot into our proxmox filesystem to repair what has happened:

# chroot /mnt/proxdisc

And update the system properly:

# apt-get update
# apt-get dist-upgrade

In my case the upgrade showed some errors and missed some packages because of dependencies but made the job and booted fine afterwards.

4- Finally you should regenerate initramfs as fabian told:
# update-initramfs -u
 
Last edited:
Salut M Pascu,

In the worst case scenario, you could install on another PC a fresh proxmox(using LVM on installing , not zfs). Then you will add the old proxmox hdd in this PC. From command line you can import your zfs pool with:

Code:
zfs import

After that you can see your old pool with :

Code:
zfs list


PS: I guess that we have the same primary language ;)
 
  • Like
Reactions: mpascu
Salut M Pascu,

In the worst case scenario, you could install on another PC a fresh proxmox(using LVM on installing , not zfs). Then you will add the old proxmox hdd in this PC. From command line you can import your zfs pool with:

Code:
zfs import

After that you can see your old pool with :

Code:
zfs list


PS: I guess that we have the same primary language ;)

Seems easy, I will try this tomorrow if I don't make any progress.

PS: I'm spanish :)

Have you tried apt-get dist-upgrade?

I would try that if I had a normal shell, for now I just have a busybox command promt with very limited commands
 
try booting a previous kernel/initrams from the "advanced options" in grub. if that does not succeed, you will have to boot some kind of ZFS capable live environment, chroot into your / and finish the upgrade this way. make sure to regenerate the initramfs ("update-initramfs -u") afterwards, so that the next boot works again..
 
  • Like
Reactions: mpascu
HUGE THANKS TO EVERYBODY! I managed to repair my proxmox setup!

When I have some time I will update the OP with the steps I followed.

try booting a previous kernel/initrams from the "advanced options" in grub. if that does not succeed, you will have to boot some kind of ZFS capable live environment, chroot into your / and finish the upgrade this way. make sure to regenerate the initramfs ("update-initramfs -u") afterwards, so that the next boot works again..

There was and old kernel but the system hang up after selecting it.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!