How can one configure the BPI-F3 board to boot an OS installed on a NVMe M.2 SSD attached to the board?
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.
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
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
Hello! I used a simple (but maybe “dummy”) way to boot with mounting root partition from NVME. On my BPI-F3 (16Gb RAM/128 Gb emmc) I’ m flashing inner emmc Bianbu-computer image (https://archive.spacemit.com/image/k1/version/bianbu-computer/v1.0.2/bianbu-computer-s1_v1.0.2.zip) using Titantools and Bianbu image (https://archive.spacemit.com/image/k1/version/bianbu/v2.0.4/bianbu-24.04-desktop-k1-v2.0.4-release-20241206002355.img.zip) to NVME using Balena. After booting Bianbu-computer just replace root UUID in GRUB config. This method also working with Armbian and Archlinux images (I’ve checked this).
Hi! If it’s not too much trouble, can you tell me more about your actions? I tried to replace the UUID in grub.cfg manually, but I still couldn’t boot from NVME.
Hello! OK, here is step-by-step guide:
- Flash your device with Bianbu-computer image using Titantools (I used v1.0.2 image)
- Flash your NVME with needed Linux image (I used Bianbu 24.04 image, NVME to USB adapter and Balena Etcher for flashing)
- Connect your NVME device and boot in graphic mode.
- Found your root partition UUID on NVME (I used Discs application):
- Found this block in grub.cfg (on the emmc, NOT NVME):
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Bianbu Ocean(Linux System)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/Image.gz--bfda163f-c807-445f-a841-6938e8f3d7b4' {
savedefault
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root E194-9BF6
linux /Image root=UUID=bfda163f-c807-445f-a841-6938e8f3d7b4
initrd /initramfs-generic.img
devicetree /${product_name}.dtb
}
### END /etc/grub.d/30_os-prober ###
and replace to:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Bianbu(Boot from NVME)' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.6.63-advanced-9c84be70-9f23-4618-b217-9d28b771c18a' {
savedefault
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 71a74b85-54ab-4dce-a8a6-dadcea978ea2
echo 'Loading Linux 6.6.63 ...'
linux /vmlinuz-6.6.63 root=UUID=9c84be70-9f23-4618-b217-9d28b771c18a
echo 'Loading initrd ...'
initrd /initrd.img-6.6.63
echo 'Loading device tree blob...'
devicetree /spacemit/6.6.63/${product_name}.dtb
}
### END /etc/grub.d/30_os-prober ###
use your root UUID in this string:
linux /vmlinuz-6.6.63 root=UUID=9c84be70-9f23-4618-b217-9d28b771c18a
- Reboot and you can choose the system from boot menu:
Note: if boot menu doesn’t appear press ESC when your device start booting. If boot menu doesn’t change, you can edit menu options by pressing “E” on the boot menu screen:
Hey, Thank you very much for your work, a very clear guide. I did everything step by step, but unfortunately nothing worked out. The boot menu does not appear. I guess. that this is due to the fact that I do not use eMMC memory, since I have 16 GB, I was generally surprised that from the beginning I did not have a hint of a working GRUB. It’s sad, I’m missing 400mb to flash my eMMC firmware. In any case, ot dushi bratan)