Booting FreeBSD Arm64 from either a NVME disk or a USB SSD, Like Ugreen Case

From: Fred L. Finster <fred_at_thegalacticzoo.com>
Date: Tue, 02 Jul 2024 08:43:29 UTC
Hello Arjun and  Klaus,

So glad to see another Arm64 computer running FreeBSD 14.x in a little 
bit of time.   May I provide some helpful information to your discussion 
of booting an Arm64 NeoVerse computer?

I would like to help create booting FreeBSD kernel image in a disk 
medium.  Others like Klaus have solid knowledge of the details.  I have 
first hand experience from reading, studying, and building a bootable 
FreeBSD kernel image for the Raspberry Pi 4B Arm64 hardware.  Okay, its 
just a baby computer compared to your 16 CPU CORE Neoverse machine,  yet 
the kernel bootup method is still the same.

Klaus your knowledge is helping this process of bringing up a new 
machine with FreeBSD ARM64 operating system.  I recognize your  FreeBSD 
experience is more solid and deeper than what I have learned over the 
past 6 years using GhostBSD as my daily driver.  Now I do have 
experience running "make buildworld" for the tools and "make 
buildkernel" for the source code into a bootable file 
/boot/kernel/kernel I also have experience setting up Poudriere Package 
builder using Vermadens Poudriere setup web blog wordpress page.  I was 
running Poudirere builder to night on the Raspberry Pi 4B building the 
RUST 1.78 compiler.

There is a third option to use a USB SSD for booting your new ARM64 
machine,  create a USB SSD drive on a different FreeBSD or GhostBSD 
computer with either the UFS boot partition and file systems.  One can 
also setup and use the OpenZFS Zettabyte File System.  Move the created 
USB SSD over to the Arm64 machine and Plug in the USB SSD.  Easy to 
modify, fix , or repair the disk structure on a USB SSD.  I suppose the 
same can work with a single USB Flash Drive Stick.

Use commands  like 'gpart'  and 'geom disklist' to verify the setup of 
the USB SSD disk partitions.


Here are a couple FreeBSD commands to look at the drives being attached 
to the computer.
gpart status
gpart status /dev/ad0    or gpart status /dev/da0
gpart show -lp
gpart show -lp /dev/ad0  or gpart show -lp /dev/da0

camcontrol devlist
geom disk list
gpart status da1
gpart show -lp da1



Here is my blog with directions for creating partitions on a USB SSD.
https://ghostbsd-arm64.blogspot.com/
partition type numbers A501 A%03 A504  freebsd style partition numbers

https://ghostbsd-arm64.blogspot.com/2023/11/arm64-boot-usb-flash-drive-hey-buddy.html

https://ghostbsd-arm64.blogspot.com/2023/12/partition-type-numbers-for-freebsd-and.html#more

https://ghostbsd-arm64.blogspot.com/2023/12/how-to-install-ghostbsd-arm64-into-usb.html

Search on word  'SSD'  or '500'

Arjun,

You are welcome to call me  Fred Finster 971-718-9144
I will be happy to sign a NDA with human resources to meet with Intel's 
business procedures and methods.  I can meet up with you Tuesday or 
Wednesday this week in Hillsboro Oregon.

I have used Klara Systems article to build a bootable image of FreeBSD 
kernel for writing into a USB flash drive to boot up FreeBSD on a 
Raspberry Pi 4B Arm64  single board computer.
https://ghostbsd-arm64.blogspot.com/2023/11/creating-ghost14-aarch64-arm64-boot.html
https://ghostbsd-arm64.blogspot.com/2023/11/creating-ghost14-aarch64-arm64-boot.html


The details are on my blog  https://ghostbsd-arm64.blogspot.com
https://ghostbsd-arm64.blogspot.com/2023/12/how-to-install-ghostbsd-arm64-into-usb.html
https://ghostbsd-arm64.blogspot.com/2023/10/honey-i-broke-my-zfs-usb-sata-ssd-1-tb.html

I can definitely help you get FreeBSD Arm64 booting on your Arm64 
machine from my experience working with FreeBSD Arm64 over the past 9 
months.

I am happy to see you successfully boot FreeBSD image on your new Arm64 
computer.
What do you have for a JTAG and OpenOCD interface to debug booting up 
this Arm64 system?  Jeff Probe from FLIRC is a good tool to use with 
GNU Debugger GDB  or the LLDB debugger that comes with CLANG.

I wish you success in making your NVME disk operational soon.  If that 
is not working quite yet.  Try a USB SSD device.  They are fast and 
large to hold FreeBSD and compile FreeBSD kernel from sources.

Fred Finster
971-718-9144
fredfinster58@gmail.com
fred@thegalacticzoo.com

Brooks Oregon
Happy to help you first hand, Arjun.

> From: Anantharam, Arjun <arjun.anantharam_at_intel.com>
> Date: Tue, 02 Jul 2024 00:38:39 UTC
> 
> Unfortunately, PXE boot is still not an option on this platform yet. Will have to rely on FreeBSD iso/img installation from NVMe partition(RAMDisk method) untill we can get PXE to work with UEFI on this platform..
> 
> Thanks,
> Arjun
> 
> ________________________________
> From: owner-freebsd-arm@FreeBSD.org <owner-freebsd-arm@FreeBSD.org> on behalf of Klaus Küchemann <maciphone2@googlemail.com>
> Sent: Friday, June 28, 2024 7:35 AM
> To: Andrew Turner <andrew@fubar.geek.nz>; Warner Losh <imp@bsdimp.com>; Mark Millard <marklmi@yahoo.com>; freebsd-arm@freebsd.org <freebsd-arm@freebsd.org>; Anantharam, Arjun <arjun.anantharam@intel.com>; kib@freebsd.org <kib@freebsd.org>
> Subject: Re: FreeBSD OS installation stuck after selecting Boot installer
> 
> 
> 
>> Am 28.06.2024 um 12:09 schrieb Andrew Turner <andrew@fubar.geek.nz>:
> 
>> …..What device type is the installer on? e.g. NVMe, USB. I see what look like two NVMe devices on the pci bus, however the nvme driver only attaches to one….
>>
>>
> 
>  what did I typically do at first in the past when hanging on <mountroot>-things  debugging on arm64…..
> The following seems to give a very nice option as it seems to indicate that the NIC-driver is working:
> 
>> ………...
>>> net devices:
>>>    net0:
>>>    net1:
>>>    net2:
>>>    net3:
>>>
> 
> You can compile fbsd-current into a folder at e.g. on net0 ,
>  setup an PXE-environment(nice description in the handbook) and then :
> 
> OK set currdev=net0
> 
> OK load boot/kernel/kernel
> 
> OK boot
> —
> 
> If the uart problem is based on baudrate(not driver/attachment), there are tools like picocom
> where you can change the baudrate on the fly ,
> That sometimes enlightens the situation..
> 
> Regards
> 
> K.
> 


-- 
Fred Finster
GhostBSD-Arm64.blogspot.com
t.me/ghostbsd  Telegram Channel
GhostBSD.org  GhostBSD website
ghostbsdarm64.hopto.org/packages