Solved Can't load kernel when back to BE 11.2 from 12.0-RELEASE

Hello,

I recently updated a server from 11.2-RELEASE-p5 to 12.0−RELEASE. All or almost all went fine.
Before to update, I used beadm to create 11.2 boot environment, just in case...

Today, I wanted to try something with 11.2 so I activated the BE I created before updating and rebooted.

The boot process is now stuck at "can't load kernel". I have a command line (OK _) but I'm unable to make the system start. ls tells me : "open '/' failed: no such file or directory".

I updated the bootcode (gtpzfsboot) of my disks with the one of the 12.0 (I have a mirror zfs as system pool). I don't know if this is relevant for my problem.

Anyway, I seriously need help.
 
Did you do zpool upgrade zroot at any point? 12 added two new options to ZFS which if you did that upgrade would mean the pool would refuse to import on the older system. Also there are significant changes to the bootloader I believe. They changed from forth to lua. It might be better to try and boot from an 11.2 USB stick?
 
Yes, I did upgrade the pool. I'm just trying to boot from a 11.2 USB stick... :)
No dice for the first try. The PC didn't want to boot on the stick... Ok, I understood why.

But what should I do when I'll on 11.2?
 
So I booted with an 11.2 USB stick and all my partitions were visible. I put the 11.2 gptzfsboot bootcode on the first disk (the one the PC starts on) and the boot menu reappeared.

The first time, I let the 11.2 system try to boot but it couldn't. It complained about it can't mount any system file or something like that.

After that, I used the boot environment menu to boot on the default one, I mean 12.0. It booted like a charm. Then, I reactivated the default BE with bectl.

It's a pity in some way... The 11.2 version of gptzfsboot can start either the 11.2 or 12.0 release while the 12.0 version can only starts its own.

Well... Problem solved. Thank you very much xtaz.
 
OK. Yes, I think your 11.2 install will now be unbootable because you upgraded the ZFS pool. This makes it incompatible with older versions and there is no way back from that. So your problem is actually related to the new bootloader code in 12 then. Lots of other people on this forum have been reporting problems booting 12. It looks like the new loader doesn't work for a lot of setups. Hopefully the powers that be can solve these issues.
 
I used a VM to reproduce the problems I encountered.

First, actually, the 12.0 bootcode gptzfsboot (used only for legacy BIOS boot) is unable to start a 11.2 boot environment. But a 11.2 gptzfsboot can start a 12.0 boot environment. If the installation was made with efi activated, there is no problem to boot on a 11.2 BE.

From the time zpool upgrade zroot is executed, the zfs pool cannot longer be mounted on 11.2. And there is no (obvious) means to go back.

So, no bootcode update nor zpool upgrade until you're sure you don't want to roolback. That's what I learned.
 
Emrion Upgrade of pool can bite you for sure. I never upgrade bootcode though if I'm not explicitly told to do so. I am curios about your situation. Are you able to interrupt early bootloader ? It's when the dash '-' character shows up on screen hit the ESC, you'll get to the prompt. There you can manually choose which boot to choose (e.g. rpool/ROOT/11.2:/boot/zfsloader) .. maybe you can manually start it this way?
 
First at all, my problem on the "iron" server is solved. Here, I was trying to understand with a VM what happened and learn from my errors.

I'll try what you say. I wasn't aware the boot process can be interrupted at this point. But anyway, because of the upgrade of the pool, the boot cannot be complete under 11.2 BE.

Somewhere in the process, it asked me to update the bootcode but I think it was just after zpool upgrade. In fact, I'd already updated the bootcode because I saw that the md5 of 11.2 and 12.0 versions do not match... My first mistake.
 
Emrion Glad you solved it, I saw that above. I'm just curious if you are still able to manually boot after that situation. This can also help future googlers who might run into this situation. I've a hunch that more people will hit similar issue with upgrade to 12.0.
 
Yes, there was a means to boot. And it begins actually by pressing "Esc" while the dash is displayed.
Then, you got someting like this:
- FreeBSD/x86 boot Default: zroot/ROOT/be-11.2:/boot/loader boot: _

Knowing that zroot is the name of the zfs pool and be-11.2 the name of the boot environment that is going to be started.

In my case, I had only to type zroot/ROOT/default:/boot/loader

And then all run fine as it's the 12.0 version that boots. After that, it's time to activate the default BE with bectl.

Well seen. :)
 
Emrion This is what I used and mentioned it here. It's quite handy as inserting bootable medium is not always an option.
Thanks for confirming this! Fellow future googlers will be happy ;)
 
Back
Top