my R2 is booting from the SD-card at the moment.
Would be great to use the R2 without the SD-Card.
I read that booting with Kernel 5.4 is possible via SD or emmc only.
As my Ubuntu 20.4.03 is bigger than 8gb, i can’t use the emmc.
So my idea is, to copy the small BOOT-partition on the emmc,
and copy the ROOT-partition on a SSD connected via SATA.
So i started to copy the ROOT-partition on the SSD and connected it to the R2.
I still used the SD-card for the BOOT-partition (no emmc for now). There was no “uEnv.txt” in “bananapi/bpi-r2/linux/” so i created one and wrote:
root=/dev/sdb rw rootfstype=ext4 rootwait
When i boot it, i get:
Partition Map for MMC device 1 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 204800 524288 54fd6008-01 0c
2 729088 32768000 54fd6008-02 83
mmc1 is available
Device 1: Vendor: Man 000003 Snr b1569c01 Rev: 1.5 Prod: SC32G�
Type: Removable Hard Disk
Capacity: 30436.5 MB = 29.7 GB (62333952 x 512)
Filesystem: FAT16 "BPI-BOOT "
Boot from SD
** Unable to read file bananapi/bpi-r2/linux/uEnv.txt **
** Unable to read file uEnv.txt **
## Error: "uenvcmd" not defined
8250159 bytes read in 1057 ms (7.4 MiB/s)
bootm flag=0, states=70f
## Booting kernel from Legacy Image at 84000000 ...
Image Name: Linux Kernel 5.4.0-main
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 8250095 Bytes = 7.9 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
why can’t the R2 not read the uEnv.txt? I got the same error message when the file is empty or deleted.
Is it necessary to define uenvcmd?
The R2 is booting up usually (fully from SD not SSD).
of course you can boot from sdcard and use ssd for rootfs, but you cannot boot directly from sata. you need either sdcard or emmc to get into uboot
then you can change rootfs passed to linux kernel
just override root and change it to the ssd (/dev/sdxy)
if you want to have uEnv.txt/kernel on ssd too it is a bit more difficult as you need to adjust device and partition and make sure sata is correctly intialized…as your uEnv.txt then is already on sata you need to change uboots builtin environment (= change the file from my repo and recompile/reflash uboot)
“you can boot from sdcard and use ssd for rootfs, but you cannot boot directly from sata. you need either sdcard or emmc to get into uboot”
Ok great, this is what im trying at the moment.
“then you can change rootfs passed to linux kernel”
Ok but where i need to change this? Where is the file located that you attached? Is it somewhere on the Boot-Partition? Sorry, i was not able to find it.
basicly you need only the steps to fill the boot0 partition with the emmc preloader, then flash my debian-image to emmc userpartition (/dev/mmcblkX), change uenv.txt (for uboot - root passed to linux kernel) and fstab (mount of rootfs)
Where do i get the Zip-File and where should move it to? Or is it not necessary?
I skipped this point for now, and tried to boot the R2 without SD-Card. But uBoot is still not displayed. I also checked the bootswitch. But it the same result when its switched to SD or EMMC.
Is there anything i forgot?
this is dd’ing the image to user-partition, if you have the image already uncompressed, you can do
dd if=image | pv | dd of=.....
or if you don’t need status or have not installed pv
dd if=image of=device ...
maybe adding status=progress (newer dd imho have it) instead of noxfer
as i said, you should see at least bootrom (~10 lines of output before any other header is read)…for uboot you have to write the image. if you see bootrom but no further output maybe partition config is wrong or preloader on boot0 is missing
ok, i used your image (linked above) and put it on a sd-card. I changed uEnv.txt and fstab to my ssd with the ROOT-partition on it - and it works! yeah! Thanks for that!
Then i tried to move the image on the emmc (https://bananapi.gitbook.io/bpi-m3/zh/howtoburnlinuximagetoemmc) and removed the sd card. It does not boot anymore. As long as i press the power-button, the leds are on. When i release ti after 15seconds, all leds are off. No message on UART. Boot-switch does not change anything.