-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB Boot, no SD card #645
Comments
My hunch is the BerryBoot code doesn't know the usb device partition. It may only load .img file from microSD. |
I guess, since they are very similar, that berryboot uses the same schema as PINN and NOOBS and since PINN has been updated to boot from USB without any SD card , berryboot should be able to eith the needed modifications. |
I now create a berryboot SD card and installed OS on USB SSD. I see a small 127MB fat32 partition is created on USB SSD and a copy of berryboot files are saved there. However I still can't boot it from USB SSD. The error is same: error finding or mounting boot partition. Hope the author has some quick idea. Maybe some special cmdline.txt can be used to use the USB SSD partition. |
Same issue here. It works just fine from microsd Card, not from USB SSD. Same for latest PINN. Any tips how to fix it on Berryboot V2.0? |
I don't know how to fix the current BerryBoot v2. Maybe with the right kernel parameters in the commandline.txt file similar to the SysLinux style it could find the image files. linux /boot/vmlinuz-linux root=/dev/sda3 initrd=/boot/initramfs-linux.img I don't know what kind of boot loader is in Pi firmware though. But I have succeeded with plain Pi OS image. The guide I used mentioned NOOBS image doesn't work. I have a write up here: With NOOBS image, the first partition is for recovery and the recovery image failed to load. It complains about missing fixup4rc.dat which doesn't exist. From the files in PINN I see it is using recovery style image. BerryBoot is using OS image. Theoretically they should both be able to work if crafted to load kernel and initrd ramdisk image correctly from the boot device. Maybe something is still not right. |
From the pull request #582, there is a "bootdev=" parameter in cmdline.txt. Maybe it can be used. I also see after BerryBoot installs OS successfully, a "datadev=GUID" is added in cmdline.txt. Maybe it is the same syntax for bootdev. You can give it a try. |
Ha, found the answer. It is about using partition UUID. So I add bootdev in the cmdline.txt line:
with the UUID shown by blkid command for the first fat32/vfat partition on your USB SSD. Now the boot partition is loaded properly and Berryboot worked. The ... dot line is shown when the boot partition is being tried to mount. Look at the script in: |
Looking at the script, tou could put also bootdev=sd* . |
If the SSD is your only USB storage device, it is usually sda1. But not guaranteed technically. A better script should get the list from lsblk and try the first partition on each block device to use. It can mount the partition and check if berryboot.img exists. This way it could detect the boot partition on either the microSD card or USB storage even if both are inserted at the time. This probably is a feature request to anyone interested to modify the script. Oh lsblk is not available on the tiny busybox system. |
137Mb fat32 partition on sda1 and added this to cmdline.txt |
Ok, first of all, because the boot partition sda1 is mounted, the code to partition/format the SSD has to be changed to not touch the boot partition. I guess current BerryBoot will wipe the entire disk, and would fail because sda1 is already mounted as /boot, and shouldn't be changed. So right now still need to boot BerryBoot from microSD, and install to USB SSD. Then a copy of the /boot will be made on sda1. Then change the cmdline.txt on sda1 to add "bootdev=/dev/sda1,root=/dev/sda2" and it should be able to boot to the first OS you installed. Of course you should have enabled USB boot by using the 06-15 bootloader firmware and start*.elf, fixup*.dat from 05-22 firmware. I have not tried this end-to-end though. Second, the bootdev=sda1 doesn't work. bootdev=/dev/sda1 should work. In the init script, there is a if [ |
$BOOTDEV is already pointing to /dev/$BOOTDEV (/dev/sda1 if you edit the bootdev= ) if [ $BOOTDEV == sd* ]; then BerryBoot is also working with only the SD card and boot meu and installed OS's coexist in the same device (SD card), therefore should be possible to have everything on the external USB device. |
As in my last post, when set bootdev=sda1 in cmdline.txt, following test doesn't work like you think It can be done by You should set bootdev=/dev/sda1 in cmdline.txt then it will be used as is to mount /dev/sda1 and find berryboot.img on it. I found this when modifying the script (it is in bbloader.img) to let it detect other partitions from /proc/partitions. In the case of microSD card, there is only one initial fat32 partition on it, berryboot probably resize it and then create OS root partition. If we start with a small (say, 0.5GB or less) fat32 partition on USB SSD, it may be confused and fail to do what it is doing to prepare partition for the OS. Try create the first fat32 partition to 8GB size on USB SSD and put berryboot to boot on it. If it can use this 8GB partition to install an OS, then it would be great success for now. |
hello is there any instructions on how to boot the rpi4 from a usb with berryboot step by step ? |
I’m assuming that this isn’t an interesting idea to follow up @maxnet? Seems this is an obvious thing people would want. If PINN has it won’t this mean people will head to that instead? |
Since the new USB boot option in the new Pi4 firmware, there is a way to have Berryboot booting from USB without any SD card (pinn already has this fuctionality)?
Thank you.
The text was updated successfully, but these errors were encountered: