| 8 Apr 2024 |
@cnx:loang.net | * is it possible to boot from a bcachefs partition comprise of nvme, emmc and (usb-connected) ssd? | 07:23:47 |
@cnx:loang.net | ah nvm u-boot doesn't seem to support bcachefs | 07:52:07 |
Pratham Patel (you can mention me) | you can keep /boot as ext4 and /boot/efi as efi and other partitions as bcachefs | 07:53:10 |
Pratham Patel (you can mention me) | cnx: ^^^ | 07:53:26 |
@cnx:loang.net | i'm not familiar with u-boot (process), does it not load the kernel but efi? | 08:24:47 |
Pratham Patel (you can mention me) | You can do both | 08:25:37 |
Alex | In reply to @cnx:loang.net i'm not familiar with u-boot (process), does it not load the kernel but efi? The boot partition contains the systemd-boot loader, the kernel, and the initrd. | 08:25:48 |
Alex | Or was it GRUB? | 08:26:05 |
Pratham Patel (you can mention me) | but if you want a non-ext for rootfs, it's best to boot into a bootloader (grub/systemd-boto) from uboot and then load kernel | 08:26:20 |
@cnx:loang.net | thanks! | 08:27:05 |
Alex | Anyway, here's the full boot chain typically used on the JH7110-based SBCs:
ZSBL (ROM) -> OpenSBI and u-boot (usually flash) -> GRUB/systemd-boot (boot partition) -> kernel (boot partition) -> initrd, AKA NixOS stage 1 (boot partition) -> root system, AKA NixOS stage 2 | 08:29:19 |
@cnx:loang.net | how is opensbi and u-boot loaded? | 08:30:04 |
@cnx:loang.net | i mean where are they loaded from a storage in case of sdio? | 08:30:25 |
@cnx:loang.net | the beginning of the drive? | 08:30:32 |
Alex | Nope, the ZSBL looks for a partition with a specific type in the GPT. | 08:30:56 |
@cnx:loang.net | i see, so say i can have a partition for them on the emmc and use the rest for boot partition and os? | 08:31:59 |
Alex | Yes, but you can also keep them in flash and have the entire disk for yourself. | 08:32:21 |
@cnx:loang.net | i'm reluctant to override the stock flash, is it possible to back it up? | 08:32:58 |
Alex | Presumably, though I don't know how you'd do that. | 08:33:14 |
Alex | You probably should be updating it because the vendor has significantly improved it over the past year. | 08:33:42 |
Pratham Patel (you can mention me) | ZSBL is in SoC's ROM. That has an offset to look for, where OpenSBI is stored. OpenSBI either has a hardcoded offset that it looks for, to load U-Boot, or you can specify one at build-time (IIRC, the later is done for the VF2) and then U-Boot scans storage mediums in the given order and scans for EFI partitions and loads from the first match. | 08:34:01 |
Alex | Up to you I guess. | 08:34:03 |
Pratham Patel (you can mention me) | In reply to @cnx:loang.net i'm reluctant to override the stock flash, is it possible to back it up? even if you f it up | 08:34:26 |
Pratham Patel (you can mention me) | it's easy to override it | 08:34:32 |
Pratham Patel (you can mention me) | using the vendor's recovery tool | 08:34:40 |