Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Rooting on non-boot device GPT partition



QUOTE
What's the proper way these days to root off of a GPT partition on a USB adapter on a Pi 4? Or any other system?
END QUOTE

This reply is RPi4 specific. It might not cover
everything that you want.

For stock RPi4 eeprom firmware (no USB-MSD):
I only put https://github.com/pftf/RPi4/releases/tag/v1.16
related materials on the microsd card. Other than RPI_EFI.fd
I might have more recent materials for the rest. Everything
else was on the GPT USB3 SSD. UEFI/ACPI v1.16 handles GPT.
UEFI allows picking what to boot from. It is important
currently to select the Serial console instead of the
Graphical one and to save that. I disabled the 3 GiByte
RAM limit and saved that.

For the stable (no longer BETA) USB-MSD RPi4 firmware:
I used a microsd card with an empty msdos file system
(to avoid a UEFI/ACPI v1.16 mishandling of an empty
card slot that prevents progress). The USB3 SSD has
the https://github.com/pftf/RPi4/releases/tag/v1.16
related material where it also has netbsd.img and
bootaa64.efi materials. USB-MSD handles GPT.

I show this last configuration:

# uname -ap
NetBSD NBSDRPi4 9.99.64 NetBSD 9.99.64 (GENERIC64) #1: Sun May 31 01:41:16 UTC 2020  root@NBSDRPi4:/usr/obj/sys/arch/evbarm/compile/GENERIC64 evbarm aarch64

(I started from an armbsd.org Generic 64-bit image.)

# gpt show sd0
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2          4         Pri GPT table
          6      32762         Unused
      32768     163840      1  GPT part - EFI System
     196608  442728448      2  GPT part - NetBSD FFSv1/FFSv2
  442925056   25165824      3  GPT part - NetBSD swap
  468090880     771243         Unused
  468862123          4         Sec GPT table
  468862127          1         Sec GPT header

# df -m
Filesystem    1M-blocks       Used      Avail %Cap Mounted on
/dev/dk1         212749      70145     131966  34% /
/dev/dk0             79         22         57  28% /boot
kernfs                0          0          0 100% /kern
ptyfs                 0          0          0 100% /dev/pts
procfs                0          0          0 100% /proc
tmpfs               742          0        742   0% /var/shm

# find /boot/ -name "*" -print
/boot/
/boot/netbsd.img
/boot/RPI_EFI.fd
/boot/config.txt
/boot/bcm2711-rpi-4-b.dtb
/boot/OVERLAYS
/boot/OVERLAYS/disable-bt.dtbo
/boot/OVERLAYS/miniuart-bt.dtbo
/boot/fixup4.dat
/boot/start4.elf
/boot/EFI
/boot/EFI/BOOT
/boot/EFI/BOOT/bootaa64.efi
/boot/Readme.md

(I do not even have a cmdline.txt for it
to use. I set up UEFI to boot via
/boot/EFI/BOOT/bootaa64.efi . With UEFI/ACPI
on the microsd card, I still had netbsd.img
and EFI/BOOT/bootaa64.efi on the USB3 SSD
under /boot/ .)

# more /boot/config.txt
arm_64bit=1
enable_uart=1
uart_2ndstage=1
enable_gic=1
armstub=RPI_EFI.fd
disable_commandline_tags=1
disable_overscan=1
device_tree_address=0x1f0000
device_tree_end=0x200000
dtoverlay=disable-bt
over_voltage=6
arm_freq=2000

For reference:

# mount -tmsdos /dev/ld0e /mnt
# find /mnt/ -print
/mnt/
#

So, it appears to me that use of
https://github.com/pftf/RPi4/releases/tag/v1.16
related materials and UEFI configuration to use
EFI/BOOT/bootaa64.efi gets one into the NETBSD
general environment for the rest of the stages.

I hope that helps.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



Home | Main Index | Thread Index | Old Index