NetBSD aarch64 10.0 install on Raspberry Pi 4B, wahoo it works, Fred!

NetBSD aarch64 10.0  install on Raspberry Pi 4B,   wahoo it works, Fred! 



Well, this is a good accomplishment for May 7th 2024. Installing NetBSD 10.0 on a Raspberry Pi 4B with 8Gigs.    

May 7th is also my son Conner Louis Tilley:    7lbs, 7 ounces, born on the 7th of May.  My little triple 7 ( in the next month June of 1995 Boeing announced the Triple Seven, 777 model Dreamliner Airplane ) arrived into my Life,  my son,  Connor Louis Tilley.
https://www.facebook.com/connor.tilley.2903  He is a video games developer with Amazon Games


When did the Boeing Triple Seven, 777 come out?
The Boeing 777 is a family of wide-body twin-engine commercial jet aircraft with variants for both passenger and cargo transportation. The 777 was first flown on June 12, 1994, and commercial service commenced on June 7, 1995.


So there are 2 objectives to accomplish when setting up NetBSD 10.0 for a Raspberry Pi 4B.   Download and  write  arm64.img into a USB Flash drive stick.  Download Paul Bartard's github  pftf ZIP file and write its contents into a microSD card.  I misinformed thoughts were that I should create /efi/boot  directory in the microSD card and copy in a file  bootaa64.efi from netbsd.org  arm64.img files.

Booting

The device boots by finding a file "bootcode.bin". The primary location is a FAT32 partition on the uSD card, and an additional location is on a USB drive. See the upstream documentation on booting and read all the subpages.

The standard approach is to use a uSD card, with a fdisk partition table containing a FAT32 partition marked active, and a NetBSD partition. The NetBSD partition will then contain a disklabel, pointing to an FFS partition (a), a swap partition (b) and the FAT32 boot partition mounted as /boot (e). The file /boot/cmdline.txt has a line to set the root partition.

URLS:

Now, write the operating system image to your SD card:

$ cd ..
$ gunzip arm64mbr.img.gz
# dd if=arm64mbr.img of=/dev/rld0d bs=1m conv=sync progress=1

Note your operating system's dd command and device names may vary from NetBSD's. Be careful.

These astr0baby wordpress instructions from 2021 are good basic methods to follow.
I use pftf github  version 1.37 from April 2024 written into a FAT32 msdos fs partition on a microSD card and the April 20 2024 arm64.img.gz image file written to a USB Flash Drive stick of 64GB  that I had on hand.  (smallest you can find is 32GB in the USA stores in May 2024, yet a 8GB or 16GB will work fine for your initial testing of NetBSD 10.0).
After writing into the 2 memory devices,  Plug both into the raspberry pi 4b and then plug in the power.   The partition on the USB flash drive stick will be expanded, and then the system will reboot and start a second time, so will take a few minutes before you are given a login prompt.   Login:   root       Just type 'root' and you will get in to NetBSD 10.0 terminal window to type a few commands and edit a file or 2.
https://www.netbsd.org/  Front page of NetBSD website with url links to read
https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.0/evbarm-aarch64/binary/gzimg/  Directory of gzipped image files to download.  I picked that GPT version (not the MBR version, Master Boot Record)

More NOTES on using NETBSD

Mr. Oluade, Have you tried FreeBSD-14.0-RELEASE on a Raspberry Pi 4B, 3B, or 400 Keyboard? https://freebsd.org/where See aarch64 image file in 

https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/ 

wget -c https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-arm64-aarch64-RPI.img.xz


Here is my blog post with directions on how to download a image of GhostBSD for Raspberry Pi Aarch64 https://ghostbsd-arm64.blogspot.com/2024/01/january-19-2024-howto-download.html

https://ghostbsd-arm64.blogspot.com/2024/01/hdmi-audio-sound-patches-into-ghostbsd.html#more These same directions work for standard FreeBSD14.0-RELEASE source code to compile a kernel with HDMI Audio supported for Raspberry Pi 4B, 400, 3B hardware.


ps recently booted NetBSD 10.0 on a Raspberry Pi 4B using UEFI written to a microSD card and NetBSD 10.0 arm64.img.xz into a USB Flash drive stick.

https://mail-index.netbsd.org/port-arm/2021/05/03/msg007265.html

https://wiki.netbsd.org/ports/aarch64/

Seth Kenlon article that helped me install NetBSD 10.0 aarch64 to a Raspberry Pi 4B.
https://opensource.com/article/19/3/netbsd-raspberry-pi

My notes on installing NetBSD 10.0 using arm64.img.gz to a USB flash drive and UEFI firmware to a microSD card.

https://ghostbsd-arm64.blogspot.com/2024/05/netbsd-aarch64-100-install-on-raspberry.html


Fred Finster

https://twitter.com/l_finster34982



 

https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.0/evbarm-aarch64/binary/sets/  sets of NetBSD packages, that one can install.
bootaa64.efi  Arm64  bootaa64.efi file that could be use and placed on the first FAT32 partition in a  directory  /EFI/BOOT/bootaa64.efi   This file is already in the Arm64.img.gz file and was not needed by me to get the NetBSD 10.0 to boot on my Raspberry Pi 4B.  Listed here for reference.  March 28, 2024 date.
https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.0/evbarm-aarch64/binary/gzimg/arm64.img.gz   Arm64.img  file to download about 381 Megabytes in size.  You will write this into a single USB Flash drive stick.  Careful now Contents will be overwritten!  Adjust accordingly ! Otherwise data-loss may occur.   You can use the command line 'dd' command or a USB image writing tool like Balena Etcher etcher.io  or Rufus  rufus.ie  or other tool you are comfortable with. Popsicle or SUSE  Usb image writer
For the microSD card use this Pete Bartard's github.com location:    I used version 1.37
https://github.com/pftf/RPi4/releases/latest   You download the latest version for you.

1.1 Preparing the UEFI drive,  reference Astr0baby instructions:

First we need to build an UEFI microSD card

mkdir -p $HOME/RPI4/UEFI
cd $HOME/RPI4/UEFI

wget https://github.com/raspberrypi/firmware/archive/master.zip
wget https://github.com/pftf/RPi4/releases/download/v1.20/RPi4_UEFI_Firmware_v1.20.zip

unzip master.zip
rm master.zip

Remove the kernel files in firmware-master/boot/ extracted directory

rm -f firmware-master/boot/kernel*

Now we will prepare a microSD card (I have used a 32GB with a USB adapter) Attach it to the computer USB port. We will re-format and re-label the microSD card now.
Unmount it first if there as a FS already present when you attached the card

sudo umount /path/to/mountNote that on Manjaro Linux, I used the "unzip" command that extracted the files and directories onto the existing empty FAT32 partition I found on the microSD card.  This partition was mounted with these 2 Manjaro Linux commands:mkdir -p /media/user/UEFI  
" mount -t vfat /dev/sdd1 /media/user/UEFI "cp -p RPi4_UEFI_Firmware_v1.37.zip /media/user/UEFI
cd /media/user/UEFI sudo unzip RPi4_UEFI_Firmware_v1.37.zip sudo rm RPi4_UEFI_Firmware_v1.37.zip
Your Linux or Windows commands maybe different. I also did not use the master firmware zip file. I should look into using that method. OPTIONS: edit  file /boot/config.txt,  increase CPU clock speed by using force_turbo=1  statementWanted to test HDMI Audio setup from the one Terminal window and google this:
audiotest 0
I also edited /etc/ssh/sshd_config to allow/Permit using root ssh login
force_turbo=1

Wish to add firefox browser package to your running NetBSD 10.0 aarch64 system?
edit file  /etc/pkg_install.conf  using vi or nano  with this text line:

arm64$ cat /etc/pkg_install.conf
PKG_PATH=ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/aarch64/10.0/All/


Pre-compiled packages:
- Pre-compiled packages path setting: see /etc/pkg_install.conf
PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/aarch64/10.0/All/

arm64$pkg_add  firefox


arm64$ pkg_info -a 
gtk3+-3.24.38nb6    GIMP Toolkit v3 - libraries for building X11 user interfaces
libv4l-1.24.1       Video4Linux userspace library
firefox-120.0.1     Web browser with support for extensions (version 120)
htop-3.2.2          Enhanced version of top utility
tree-1.8.0          Print a text or HTML tree diagram of a directory structure
arm64#arm64# pkg_info tree
Information for tree-1.8.0:

Comment:
Print a text or HTML tree diagram of a directory structure

Description:
Tree is a recursive directory listing program  that  produces  a  depth
indented  listing  of  files,  which  is colorized ala dircolors if the
LS_COLORS environment variable is set and output is to  tty.

Tree has various options for changing the information printed (size,
permissions, etc.) As well as plain text output, it is capable of
producing HTML output that includes links with an appropriate prefix.

Homepage:
http://mama.indstate.edu/users/ice/tree/

arm64$ pkg_add tree
pkg_add: Can't create pkgdb entry: /usr/pkg/pkgdb/tree-1.8.0: Permission denied
pkg_add: no files matching ``/usr/pkg/pkgdb/tree-1.8.0/+*'' found: No such file or directory
pkg_add: 1 package addition failed
arm64$ whoami
fred
arm64$ su root
Password:
arm64# pkg_add tree
arm64# tree .
.
|-- Arm64
|-- Documents
|-- Downloads
|-- Photos
`-- firefox.core

4 directories, 1 file
arm64# pwd
/home/fred
arm64# ls
.Xauthority       .cshrc            .login            .profile          Arm64             Photos
.cache            .dbus             .logout           .serverauth.3020  Documents         firefox.core
.config           .local            .mozilla          .shrc             Downloads
arm64#
arm64# pkg_add firefox
pkg_add: package `firefox-120.0.1' already recorded as installed
arm64#

#  TEST HDMI using  audiocfg
arm64# audiocfg test 0
0: [*] audio0 @ vcaudio0: vchiq auds 3
       playback: 2ch, 48000Hz
       record:   unavailable
       (P-) slinear_le 16/16, 2ch, 48000-48000Hz
  testing channel 0... done
  testing channel 1... done
arm64#

Show the mounting and file space available

Last login: Tue May  7 12:53:38 2024 from 192.168.1.31
NetBSD 10.0_STABLE (GENERIC64) #0: Sun Apr 28 13:43:59 UTC 2024

Welcome to NetBSD!

arm64$ ls
Arm64        Documents    Downloads    Photos       firefox.core
arm64$ mount
/dev/dk1 on / type ffs (noatime, local)
/dev/dk0 on /boot type msdos (local)
ptyfs on /dev/pts type ptyfs (local)
procfs on /proc type procfs (local)
tmpfs on /var/shm type tmpfs (local)
arm64$ df -h
Filesystem     Size   Used  Avail %Cap Mounted on
/dev/dk1        28G   3.5G    23G  13% /
/dev/dk0        79M    32M    47M  40% /boot
ptyfs          1.0K   1.0K     0B 100% /dev/pts
procfs         4.0K   4.0K     0B 100% /proc
tmpfs          743M   4.0K   743M   0% /var/shm
arm64$
du: /root/.cache: Permission denied
du: /root/.dbus: Permission denied
du: /root/.config: Permission denied
du: /usr/games/hide: Permission denied
du: /var/at/jobs: Permission denied
du: /var/at/spool: Permission denied
du: /var/cron/tabs: Permission denied
du: /var/games/hackdir/save: Permission denied
du: /var/spool/ftp/hidden: Permission denied
du: /var/spool/postfix/active: Permission denied
du: /var/spool/postfix/bounce: Permission denied
du: /var/spool/postfix/corrupt: Permission denied
du: /var/spool/postfix/defer: Permission denied
du: /var/spool/postfix/deferred: Permission denied
du: /var/spool/postfix/flush: Permission denied
du: /var/spool/postfix/hold: Permission denied
du: /var/spool/postfix/incoming: Permission denied
du: /var/spool/postfix/private: Permission denied
du: /var/spool/postfix/maildrop: Permission denied
du: /var/spool/postfix/public: Permission denied
du: /var/spool/postfix/saved: Permission denied
du: /var/spool/postfix/trace: Permission denied
du: /var/tpm: Permission denied
2.5G    /
arm64$ su root
Password:
arm64# du -hs /
3.6G    /
arm64#
df -h
Filesystem     Size   Used  Avail %Cap Mounted on
/dev/dk1        28G   3.5G    23G  13% /
/dev/dk0        79M    32M    47M  40% /boot
ptyfs          1.0K   1.0K     0B 100% /dev/pts
procfs         4.0K   4.0K     0B 100% /proc
tmpfs          743M   4.0K   743M   0% /var/shm
arm64# mount
/dev/dk1 on / type ffs (noatime, local)
/dev/dk0 on /boot type msdos (local)
ptyfs on /dev/pts type ptyfs (local)
procfs on /proc type procfs (local)
tmpfs on /var/shm type tmpfs (local)
arm64#
https://wiki.netbsd.org/tutorials/user_management/  Instructions for the adding Users to the NetBSD system
https://www.netbsd.org/docs/misc/index.html  Miscellaneous Documents to read about setting up a NetBSD system 

arm64# useradd --list
useradd: unknown option -- -
usage: useradd -D [-F] [-b base-dir] [-e expiry-time] [-f inactive-time]
        [-g gid | name | =uid] [-k skel-dir] [-L login-class]
        [-M homeperm] [-r lowuid..highuid] [-s shell]
usage: useradd [-moSv] [-b base-dir] [-c comment] [-d home-dir] [-e expiry-time]
        [-f inactive-time] [-G secondary-group] [-g gid | name | =uid]
        [-k skeletondir] [-L login-class] [-M homeperm] [-p password]
        [-r lowuid..highuid] [-s shell] [-u uid] user
arm64# useradd -mv -G wheel -p fathog14 joe
useradd: Password `fathog14' is invalid: setting it to `*************'
arm64# passwd joe
Changing password for joe.
New Password:
Retype New Password:

arm64# userdel joe
arm64# ls /etc/skel
.cshrc    .login    .logout   .profile  .shrc     Arm64     Documents Downloads Photos
arm64#  #  I added 4 directory entries to the user skeleton directory file list:
cd /etc/skel; mkdir -p  Arm64 Documents Downloads Photos


man useradd
preset for all users by using the range field in the
             /etc/usermgmt.conf file.

     -v      Enable verbose mode - explain the commands as they are executed.
             This option is included if built with EXTENSIONS.

     Once the information has been verified, useradd uses pwd_mkdb(8) to
     update the user database.  This is run in the background, and, at very
     large sites could take several minutes.  Until this update is completed,
     the password file is unavailable for other updates and the new
     information is not available to programs.

FILES
     /etc/usermgmt.conf
     /etc/skel/*
     /etc/login.conf

EXIT STATUS
     The useradd utility exits 0 on success, and >0 if an error occurs.

SEE ALSO
     chpass(1), passwd(1), pwhash(1), group(5), login.conf(5), passwd(5),
     usermgmt.conf(5), pwd_mkdb(8), user(8), userdel(8), usermod(8)

  • window manager running on top of the X server. The window manager is a special X client that is allowed to control the placement of windows. It can also decorate windows with standard widgets (usually these provide actions like window motion, resizing, iconifying, window killing, etc.). ctwm(1) is NetBSD's default window manager.

9.5. Starting X

You can start X with the following command:

$ startx

If your basic X server configuration is correct, you are left in the X environment with the default window manager (ctwm). If you want a more advanced window manager or desktop environment, many are available in pkgsrc. See Section 9.7, “Other window managers or desktop environments” for information about adding and changing window managers.


startx    will start the ctwm  window manage ?  right click with a mouse button, and you can open a terminal or open a web browser.


How I use JuiceSSH on a chromebook to log in to NetBSD 10.0 over the network. 

The #1 free SSH client for Android. JuiceSSH was released in December 2012 and has since blown us away with popular demand and a growing, friendly and ...



https://mail-index.netbsd.org/oindex.html   See a good read in the mailing list.  I am looking for evbarm information in  the mailing list.





Comments

Popular posts from this blog

HDMI Audio sound patches into GhostBSD source code /usr/ghost14/ghostbsd-src SOLVED Jan20 2024

How to install GhostBSD-Arm64 into a USB Flash Drive stick April 24, 2024 update edition.

January 19, 2024 Howto Download a Raspberry Pi 4B bootable image from http://ghostbsdarm64.hopto.org/packages/