Skip to content
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

Raspberry Pi Support #57

Open
bmatheny opened this issue Mar 31, 2022 · 12 comments
Open

Raspberry Pi Support #57

bmatheny opened this issue Mar 31, 2022 · 12 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bmatheny
Copy link

Hello. Do you know if anyone has successfully used this project with raspberry pi's? If not, any thoughts on (at a high level) what kinds of changes might be needed to support them?

Thanks!

@khuedoan
Copy link
Owner

khuedoan commented Apr 1, 2022

I'm not aware of anyone, and I don't have the hardware needed to test. However everything other than PXE boot should work as long as your apps support ARM images.

You can have some RPis with Rocky Linux preinstalled, then remove the boot target in metal/Makefile like this:

- default: boot cluster
+ default: cluster

I'm not sure how PXE boot works on RPi, but here's a starting point if you want to port/improve the current setup:

iso_url: "https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.5-x86_64-minimal.iso"
iso_checksum: "sha256:4eb2ae6b06876205f2209e4504110fe4115b37540c21ecfbbc0ebc11084cb779"

if option architecture-type = 00:07 {
filename "grubx64.efi";
}

@bmatheny
Copy link
Author

bmatheny commented Apr 1, 2022

Awesome. I'll have a go at it over the weekend and put up a PR if it makes sense, worst case I'll just comment back here. Thanks!

@minhtt159
Copy link

@bmatheny How is your experience with Rasp Pi? Since PXE booting on Raspberry Pi is kinda different.

@Bourne-ID
Copy link
Contributor

Bourne-ID commented Jun 29, 2022

Hey, I've been looking at this and playing around with it for a few days. I had hoped the new HTTP_BOOT (option 7) might have made it easier, IE flash PI boot order, throw some host configs at it and then install over ethernet. However I'm falling short on this -at least for the time being- as downloads need to be signed and the EEPROM containing the public key - which adds a manual step to this process, something I don't want to add.

I'm relatively new at PXE, TFTP and Pi's unique PXE strategy, but I feel there's a reason there's a majority of blog posts giving Pi a diskless PXE instead of a full initialisation and installation. However I feel the latest bootloader may have added some additional options.

My current plan for Pi is to try a diskless boot, network mount and then cloud-init an installation onto the SD card, followed by a reboot. It would require the boot order to be SDCard, Network, Restart which is a pre-step, therefore first boot on an empty SD card would default to Network, and would then hit SD card on the reboot.

Is there a better way? Probably. Does it gel well with this project? Well, time will tell. I think taking the worst case from above, flashing Rocky Linux manually and bypassing the pxe Metal stage may be an option.

No promises. But more as I have it.

@khuedoan khuedoan pinned this issue Jun 29, 2022
@khuedoan khuedoan added enhancement New feature or request help wanted Extra attention is needed labels Jun 29, 2022
@mrsauravsahu
Copy link

I have a Raspberry PI 4 with Ubuntu Server running. I'm running into errors, checking if I can fix them and get it running.

@clainor
Copy link

clainor commented Jul 6, 2022

Joining effort, I have a bunch of pi 4 and I already have success on a PXE boot on pi 3 diskless (with iSCSi setup and some prep beforehand).

@Bourne-ID
Copy link
Contributor

Bourne-ID commented Jul 11, 2022

Quick update on my side - manual steps of Net Boot (w/ blank SD card and NFS) into Rocky, flash the IMG file to local storage and then reboot seems to be a working solution - #70 will allow for multiarch PXE, and an NFS docker pod will be required as a future change.

I still believe booting Rocky over NFS to then flash Rocky from IMG to SD optimisable...

Is anyone interested in investigating the embedded RPI-imager to see if this or a similarly small (512MB) image can be automated to do a flash from network to SD Card? If so then the first PXE boot can be a minimal image and then let the RPI boot from SD Card afterwards with a seed first-boot.sh file into the RPI.

I'm hoping the RPI option 7 Netboot will be a final solution in the future; however right now any HTTP downloads on option 7 needs to be signed and the public keys flashed to the RPI, which isn't an automatic remote process.

(That and IP Based HTTP downloads are currently broken. something to come back to later.)

@mrsauravsahu
Copy link

Unfortunately, I've decided to try other ways of setting up my PI - mainly because I want to use Ubuntu on the PI, and terraform to do the setup. This is a great project though.

@Bourne-ID
Copy link
Contributor

Still tapping away at this. I've managed to get RPI to boot through dnsmasq to pick up rpi essential files from TFTP.

I've then managed to use a NFS4 docker image using TCP over custom ports to connect the RPI root FS over NFS (having to use custom ports over 2049 because rpcbind seems to enjoy stealing the port from Docker, at least on my Ubnutu box).

However I'm currently stuck on extracting the root FS using Ansible inside the tools container -

The image for Rocky RPI is a .img.xz, a MBR file with 3 partitions of which we need two (0.fat, boot, and 2.img, root). 0.fat can be extracted through 7z, however the 2.img must be mounted to ensure symlinks are preserved - something which 7z is unable to do on extraction.

But, as ansible is run through the tools container and therefore doesn't have sudo/root access (unless I broke something?), and because mount -o requires root, my usual methods of mounting the img file is being blocked.

I'm wondering if I should go back to see if I can find a mini-linux image - the objective is to net boot just to then do a run-once dd copy to the SD card on the rpi. If there's a mini linux image that I can git clone instead for example, could solve this issue...

Let me know if anyone has any thoughts.

@khuedoan
Copy link
Owner

khuedoan commented Aug 5, 2022

as ansible is run through the tools container and therefore doesn't have sudo/root access

This was introduced in c5602bd because the files created by the tools container are owned by root:root, but I think you can revert it without side effects (except file permissions)

@remy415
Copy link

remy415 commented Aug 8, 2022

I don't know about RPis, but I'm using Khadas VIM3s ATM and am currently playing with the configuration. I originally purchased these because of the A311D SOC with NPU, but currently it seems like the NPU has very little software support so far so AI/ML workloads on SBC = not quite yet. I did find a guide on their site for NPU set up, I'm executing the setup now and will report back later if I have any success. It's a challenge because it seems like anytime I mess something up, I need to boot to the rescue image and re-install Ubuntu.

The VIM3 uses a small rescue image + cloud image installs to re-image. I haven't explored any network-based install methods yet.

Has anyone had success with any ARM64 SBC-based K8S clusters? Can they be added to a standard K8S cluster controller (ie Rancher/etc)?

@khuedoan
Copy link
Owner

I just stumble upon this Raspberry Pi 4 UEFI Firmware project, which might be a better way to PXE boot because we don't have to add custom logic for the Pi.

It might be a while until I can test this myself though (they are out of stock everywhere in my country, and I refuse to pay the $220+ scraper price 😥)

zanehala added a commit to zanehala/homelab that referenced this issue Mar 30, 2023
retX0 pushed a commit to retX0/homelab that referenced this issue Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants