Raspberry Pi 4B - reboot process stops during Upgrade from FreeBSD 14.0-RELEASE-p8 to 14.1-RELEASE-p2 (with mountroot: mmcsd0 error 19). Please help.

Hi there :)

My name is Stan from Germany, I'm 45 y.o. and experienced/advanced FreeBSD admin/user since 2019.
(Previously admin/user of several Linux-Distros, until "systemd" occured.)
So I'm familiar with UNIX-like systems...
I'm working with FreeBSD workstations and servers since Version 12.
As a side project, I'm running a private FreeBSD webserver with Apache, sqlite, PHP, calDAV and webDAV.
This system is installed on a "SanDisk Extreme PRO" SDHC-Card, which runs within a "Raspberry Pi 4B (8GB)" at my home.
Since the initial setup in 2019 it runs just fine, without any issues or errors.
The upgrades from Version 12 to 13 and 13 to 14 went through without any problems too.
So I was very happy with my setup for about 5 years... Until last Sunday (2024-06-30).

During my regular maintenance, I decided to upgrade it from 14.0 to 14.1, as the release was already some weeks ago.
But before doing so, I updated it to the latest (14.0-RELEASE-p8) version, followed by pkg update/upgrade,
to ensure the latest versions of all installed packages too.
This pre-process went through without any problems (as usual since 2019!).

Now we're coming to the upgrade process from 14.0-RELEASE-p8 to 14.1-RELEASE-p2,
which resulted in an error (for the first time, in my case)...



Protocol:

blackfoxx@BERRYFOXX:~ $ sudo freebsd-update upgrade -r 14.1-RELEASE
Password:
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 14.0-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic world/base

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg

Does this look reasonable (y/n)? y

Fetching metadata signature for 14.1-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.
Fetching files from 14.0-RELEASE for merging... done.
Preparing to download files... done.
Fetching 3271 patches... (...) done.
Applying patches... done.
Fetching 444 files... (...) done.
Attempting to automatically merge changes in files... done.
The following file could not be merged automatically: /etc/ntp/leap-seconds
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...
(manually merged "leap-seconds" and "sshd_config" files, according to guidelines by the FreeBSD-Forum)
The following files will be removed as part of updating to 14.1-RELEASE-p2:
(tl;dr)
The following files will be added as part of updating to 14.1-RELEASE-p2:
(tl;dr)
The following files will be updated as part of updating to 14.1-RELEASE-p2:
(tl;dr)
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".

blackfoxx@BERRYFOXX:~ $ sudo /usr/sbin/freebsd-update install
Installing updates...
Kernel updates have been installed. Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.

blackfoxx@BERRYFOXX:~ $ sudo reboot



Then the following sh*t happens:

> Raspberry Pi 4B (8GB) Firmware boots up successfully...
> FreeBSD 14.1 Kernel + Modules are loading successfully...
> FreeBSD Loader takes over and starts to boot...
>> After a few seconds it stops booting with the message: "mmcsd0: Timeout"
>> followed by:
>>> mountroot: waiting for device /dev/mmcsd0s2a...
>>> Mounting from ufs:/dev/mmcsd0s2a failed with error 19.
>>> ? - List valid disk boot devices
>>>> mountroot> ?
>>>> mountroot: mmcsd0
>>>>> mountroot> ufs:/dev/mmcsd0s2a
>>>>> mountroot: waiting for device /dev/mmcsd0s2a...
>>>>> Mounting from ufs:/dev/mmcsd0s2a failed with error 19.
-END OF STORY- (so far)

- From now on every attempt to (re)boot fails again at this same stage.
- My "SanDisk Extreme PRO" SDHC-Card is still fine, without any (physical) errors.
- I checked it 3 times and in every possible way with my FreeBSD 14.0 Workstation.
- fsck and fsck_ffs detected NO errors or issues > file system is clean!
- I can access the card via my "Transcend" Cardreader and read all files without any issues.
- Another SD-Card, with the original "Raspberry Pi OS", boots up normally.
- If I write my previous made Backup-Image (with the FreeBSD 14.0 Installation) back to the same SD-Card, it boots up normally as it always did before.
- So any Hardware issues (regarding the RPI 4B or the SD-Card) are absolutely excluded.

Filesystem-Layout of mmcsd0:

FS_Server_2024-07-01_18-04-08.png


- I already spent 12+ hours searching the web for "Mounting from ... failed with error 19" issues and tried a dozen "solutions".
- I tried the default versions of "/boot/loader.conf", "/etc/fstab", "/etc/rc.conf" and "/etc/sysctl.conf".
- I tried the latest version of "u-boot.bin"
- I tried the latest Firmware for my RPI model, but with no luck at all...
- I wasn't able to find out what this "error 19" in fact means.

Now I reached the end of my knowledge (and patience) and hope that some (or at least one) of you experts here will be able to help me getting my server up and running again!
(But please avoid suggestions like "You have to install/setup from scratch...", as it will be the absolute last solution I wanna do.)

Thanks in advance!
 
This was discussed last month in the mailing lists (see link below). It's likely you have a Raspberry Pi 4B with a revision ending in B0T as opposed to the newer revision ending in C0T. I use a Raspberry Pi 4B as a networking device (since the genet driver performs far better than on Linux) and had the exact same problem when upgrading from 13.2 to 13.3. Then I inserted a new memory card with 14.0 on it and upgraded to 14.1. Same result, so it affects both 13.3 and 14.1. For now I'm back to running 14.0 and it's working fine.

https://lists.freebsd.org/archives/freebsd-arm/2024-May/003924.html

I briefly checked through the bug reports but it seems none of those involved in the linked conversation have submitted one.
 
Thank you Professor_Fate !
This Information helped me (at least) to stop trying to fix here "something" which is out of my influence.
So I'm gonna stay with (fine working) 14.0 too, until a working solution is (hopefully) found...
 
Back
Top