Solved Raspberrypi won't boot after upgrade 11.2 -> 12.0

I have been running FreeBSD on three Raspberrypi B+ for some time now.
They are named rpi-1, rpi-2, rpi-3.

A few months ago I did a fresh install of FreeBSD 11.2 on one of them (rpi-2)
and kept running 11.1 on the other two.

In the last days I started upgrading to 12.0, following the procedure described
in this guide. I first upgraded rpi-1 and rpi-3: 11.1 -> 12.0 and everything went fine.
I then upgraded rpi-2: 11.2 -> 12.0 and now it won't boot anymore.

Notice that I have cross compiled release 12.0 on my desktop, also running 12.0,
so the three pies have the same kernel. So I have no idea why the upgrade only
worked on two of them.

The dead systems prints a warning early during the boot sequence:

Loading Environment from FAT... *** Warning - bad CRC, using default environment

After that, it eventually starts booting and the kernel hangs. Here are the last lines that
are printed in the console:

usbus0 on bcm283x_dwcotg0
fb0: <BCM2835 VT framebuffer driver> on ofwbus0
fbd0 on fb0
VT: initialize with new VT driver "fb".
fb0: 656x416(656x416@0,0) 24bpp
fb0: fbswap: 0, pitch 1968, base 0x1eb33000, screen_size 818688
gpioled0: <GPIO LEDs> on ofwbus0
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
vm_thread_new: kstack allocation failed
usbus0: 480Mbps High Speed USB v2.0

Could you give me some hint as to what I should look at that might be causing this problem?
 
I have found a solution but I do not know why it works. I looked at the msdos partitions on the images. These are mounted under /boot/msdos on a running system and, as far as I know, are used to boot the kernel.

I noticed that these partitions contained different files on the working rpi's and on the dead one.
rpi-1 still contains the old boot partition from 2016 (the original installation, 10.x, as far as I can remember) while
rpi-2 had a new boot partition from the 11.2 image.
So I just tried copying the old boot partition from rpi-1 to rpi-2 and it now boots and seem to work properly.

Summarizing: the problem appears only if I upgrade from a 11.2 to 12.00 with a 11.2 boot partition.
If anyone is interested, I can provide more information.
 
Back
Top