How To Boot Through NVMe?

How can one configure the BPI-F3 board to boot an OS installed on a NVMe M.2 SSD attached to the board?

1 Like

Install u-boot on emmc, configure the env to have the root=/dev/nvme0n1p{the partition}, if you aren’t used to u-boot I can give you the minimal line to use.

Sure will help. Please go ahead

in /boot/env_k1-x.txt put

console=ttyS0,115200
init=/init
bootdelay=0
loglevel=8

nvme_root=/dev/nvme0n1p6
knl_name=Image.gz.itb
ramdisk_name=initramfs.img
commonargs=setenv bootargs earlycon=${earlycon} earlyprintk console=tty1 console=${console} loglevel=${loglevel} clk_ignore_unused swiotlb=65536 rdinit=${init} root=${nvme_root}
autoboot=run commonargs; run detect_dtb; run loadknl; run loaddtb; run loadramdisk; bootm ${kernel_addr_r} ${ramdisk_combo} ${dtb_addr};

Since I do not need more than this, your mileage may vary.

Make sure nvme_root ramdisk_name and knl_name are the correct ones, you may install the u-boot userspace tools and do fw_printenv to see what’s the default env in your setup first.

1 Like

Hello,

I just found your post. I have been trying to get this going for some time. When you say install u-boot on emmc I read you need to make a boot directory with other files. Is the only file required u-boot? I am running through the debug console so I can see everything. Can you give me more details on what partitions and or files are required?

Thanks Franco

You need to install uboot on the emmc, here some more information, the main detail is that you have /dev/mmcblk2boot0 to populate.

Lately I’m using the u-boot and kernel sources from bianbu since they got some useful updates (dts nodes for the fan among the many) while waiting for the upstreaming efforts to lead to the mainline kernel available.

Hopefully this weekend I’ll write down more notes that can be followed along :slight_smile:

If anyone wants an image cut that’s just these bits to flash to eMMC using TitanTools, let me know and I’ll clone mine.

I’ve just basically flashed the eMMC with the full Bianbu NAS image, flashed an M.2 with the .img.zip equivalent, booted to it, updated U-Boot, and then removed the unneeded partitions from the eMMC.

Good stuff, I can fix mine to boot from eMMC and use the NVME instead of booting from SD Card. I just haven’t done that. I’m really enjoying Ubuntu 24.04 on my BPI-F3.

Franco

Ubuntu 24.04 on BPI-F3 Notes here. https://

Could you share this file to flash eMMC, please? Also want to use BPI-F3 as NAS, but with the system on NVME.

Sure, I’ll copy the initrd file to my github tonight, Just replace your with that one. If you already imaged ubuntu 24.04 to your m.2 it should just work.

Once you change the initrd you can run whatever you want from m.2 I’m running Ubuntu 24.04 and it’s awesome.

Franco

I’ve put the file on my github in bpi-f3 files. It’s called initrd.gz. Rename it to the initrd.img-6.1.15.

I would suggest making a backup of your initrd before over writing it with this one.

The rest should just work Franco