Raspberry Pi 4B not booting single user mode on FreeBSD 14.0 aarch64. Does it work for you?
Date: Fri, 20 Jan 2023 14:22:36 UTC
was just trying to boot into single user mode from this documentation below:
https://people.freebsd.org/~rodrigc/doc/handbook/makeworld.html
Once in single-user mode, run these commands if the system is formatted
with UFS:
|#| *|mount -u /|*
|#| *|mount -a -t ufs|*
|#| *|swapon -a|*
example I created this blog post:
https://ghostbsd-arm64.blogspot.com/2023/01/time-make-j4-buildworld.html
I could boot into multi-user mode but not into Single User Mode on this
Raspberry Pi 4B.
What do you suggest and how to trouble shoot? I turned on verbose mode
and saw that it hung after starting /sbin/init
but do not know why this aarch64 ARM64 BCM2711 cpu hangs on FreeBSD
14.0 going into "single user mode".
This Version:
root@Fred_RasPi4B:~ # uname -Kmnopr
FreeBSD Fred_RasPi4B 14.0-CURRENT arm64 aarch64 1400077
root@Fred_RasPi4B:~ # uname -a
FreeBSD Fred_RasPi4B 14.0-CURRENT FreeBSD 14.0-CURRENT #6
main-n259952-7e2600ea7be2-dirty: Sun Jan 15 18:14:05 PST 2023
root@Fred_RasPi4B:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-VCHIQ arm64
With beastie_disable="NO" I tried the set boot options 7
3 safe mode :off
4 single user :on
5 verbose :on
backspace main menu
enter boot into single user mode
Warning: no time-of-day clock registered, system time will not be set
accurately
start_init: trying /sbin/init gets to /sbin/init and
hangs here
Is there specific documentation relating to booting into Single User
Mode for aarch64 ARM64?
What should I read to understand how to trouble shoot booting the u-boot
and initial FreeBSD code?
If you are in U-Boot prompt, will "boot -s" boot you up to single user
mode per the documentation?
I assume others using other aarch64 ARM SBC boards have different tools
for troubleshooting /sbin/init code.
From FreeBSD forums:
https://forums.freebsd.org/threads/freebsb-12-boot-halts-on-rpi-3.69000/
Here is the contents of file /boot/loader.conf, I setup based on the
above URL.
cat /boot/loader.conf
# beastie_disable="NO"
# loader_color="YES"
# Disable the beastie menu and color
beastie_disable="YES"
loader_color="NO"
vm.pageout_oom_seq="4096"
vm.pfault_oom_attempts="1"
kern.cam.boot_delay="5000"
I have also tried the nextboot -o "-s" -k kernel
https://www.freebsd.org/cgi/man.cgi?nextboot(8)
man nextboot
FILES
/boot/nextboot.conf The configuration file that the nextboot
configuration is written into.
EXAMPLES
To boot the GENERIC kernel with the nextboot command:
nextboot -k GENERIC
To enable into single user mode with the normal kernel:
nextboot -o "-s" -k kernel
root@Fred_RasPi4B:~ # ls -ld /boot/k*
drwxr-xr-x 2 root wheel 15360 Jan 15 23:32 /boot/kernel
drwxr-xr-x 2 root wheel 15360 Dec 13 11:43 /boot/kernel.old
drwxr-xr-x 2 root wheel 15360 Aug 5 02:31 /boot/kernel.original.F14
root@Fred_RasPi4B:~ # kldstat
Id Refs Address Size Name
1 45 0xffff000000000000 1319fa0 kernel
2 1 0xffff0000ff800000 5d000 linux64.ko
3 1 0xffff0000ff85d000 36000 linux_common.ko
4 1 0xffff0000ff893000 3c000 netlink.ko
5 1 0xffff0000ff8cf000 35000 if_rtwn_usb.ko
6 2 0xffff0000ff904000 7b000 wlan.ko
7 1 0xffff0000ff97f000 3d000 rtwn.ko
8 1 0xffff0000ff9bc000 24000 uhid.ko
9 1 0xffff0000ffc00000 26000 ums.ko
10 1 0xffff0000ffc26000 25000 usbhid.ko
11 1 0xffff0000ffc4b000 25000 hidbus.ko
12 1 0xffff0000ffc70000 25000 wmt.ko
13 1 0xffff0000ffc95000 22000 mac_ntpd.ko
root@Fred_RasPi4B:~ # ls -l /boot/ne*
-rw------- 1 root wheel 58 Jan 20 04:08 /boot/nextboot.conf
root@Fred_RasPi4B:~ # cat /boot/nextboot.conf
nextboot_enable="YES"
kernel_options="-s"
kernel="kernel"
root@Fred_RasPi4B:~ # shutdown -r now
Shutdown NOW!
shutdown: [pid 2409]
root@Fred_RasPi4B:~ #
*** FINAL System shutdown message from root@Fred_RasPi4B ***
System going down IMMEDIATELY
System shutdown time has arrived
Connection to 192.168.1.7 closed by remote host.
Connection to 192.168.1.7 closed.
Hangs at these two lines:
Warning: no time-of-day clcok registered, system time will not be set
accurately.
start_init: trying /sbin/init
Ctrl-T Ctrl-C, does nothing, Ctrl-Alt-Delete reboots the system
I have not hooked up the debugger yet to see where and why the single
user mode is hung up
after /sbin/init starts
Warning: no time-of-day clock registered
start_init: trying /sbin/init gets to /sbin/init and
hangs here
Debugger That I have available Black Magic Probe V2.3 Debugger.
https://black-magic.org/
Can purchase here: https://1bitsquared.com/products/black-magic-probe
Black Magic Probe V2.3 url Links:
https://black-magic.org/getting-started.html
<https://www.blogger.com/blog/post/edit/2557899051335274655/7101986330636354658#>
Getting Started page, where to buy. Connect the Black Magic Probe to
your computer’s USB port with mini USB cable.
Video Tutorial https://youtu.be/ANM0fdAqDow
<https://www.blogger.com/blog/post/edit/2557899051335274655/7101986330636354658#>
https://black-magic.org/hardware.html
<https://www.blogger.com/blog/post/edit/2557899051335274655/7101986330636354658#>
Blog with Hardware Version Pictures and Notes
Hackaday writeup: https://hackaday.com/tag/black-magic-probe/
Get Started https://black-magic.org/getting-started.html
https://news.ycombinator.com/item?id=19441088
--
Fred Finster
fred@thegalacticzoo.com
+1 971-718-9144
https://GhostBSD-ARM64.blogspot.com
https://ghostbsd.org