pmcg521
Posts: 34
Joined: Thu Jun 08, 2017 2:41 pm

Network boot a non-Raspbian OS? [Pi 3]

Tue Jan 23, 2018 11:24 pm

Hello,

You all have been helpful with networks in the past and I'm hoping you can assist me further.
Following this tutorial [https://www.raspberrypi.org/documentati ... utorial.md],
I was able to successfully boot a Raspberry Pi 3 client, using another Pi 3 as a DHCP server. But I need further help, and I need to know if what I'm trying to do is possible, and where to find explanations.

I want to achieve two things:

1) Network boot with an OS different than Raspbian whose only dependencies are kernel.img, bootcode.bin, fixup.dat (all four), and config.txt. The problem is, over network boot, the Pi 3 client boot ROM expects the following files to be present: https://github.com/raspberrypi/firmware ... aster/boot

Thus, TFTP fails every time since it could not find bcm2837.dtb and other missing files that I don't need. Any way to define my own network boot file dependencies instead? Or is there a way to trick the Pi into thinking I have these unnecessary files?

Once I get #1, I'd love to move the server to an actual Linux box.

2) Network boot a Pi 3 from a Linux computer. The dev who posted the tutorial I referenced claims (in the comments) to have this working by using a Linux machine as a server. I attempted this and added Option 43 (set to "Raspberry Pi Boot"), but I only got 4 requests, and no replies.

What exactly do I need to have in my Linux server configuration to get my Pi 3 to boot a custom OS image?

Thanks.

fruitoftheloom
Posts: 20687
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Network boot a non-Raspbian OS? [Pi 3]

Wed Jan 24, 2018 4:10 am

pmcg521 wrote:
Tue Jan 23, 2018 11:24 pm
Hello,

You all have been helpful with networks in the past and I'm hoping you can assist me further.
Following this tutorial [https://www.raspberrypi.org/documentati ... utorial.md],
I was able to successfully boot a Raspberry Pi 3 client, using another Pi 3 as a DHCP server. But I need further help, and I need to know if what I'm trying to do is possible, and where to find explanations.

I want to achieve two things:

1) Network boot with an OS different than Raspbian whose only dependencies are kernel.img, bootcode.bin, fixup.dat (all four), and config.txt. The problem is, over network boot, the Pi 3 client boot ROM expects the following files to be present: https://github.com/raspberrypi/firmware ... aster/boot

Thus, TFTP fails every time since it could not find bcm2837.dtb and other missing files that I don't need. Any way to define my own network boot file dependencies instead? Or is there a way to trick the Pi into thinking I have these unnecessary files?

Once I get #1, I'd love to move the server to an actual Linux box.

2) Network boot a Pi 3 from a Linux computer. The dev who posted the tutorial I referenced claims (in the comments) to have this working by using a Linux machine as a server. I attempted this and added Option 43 (set to "Raspberry Pi Boot"), but I only got 4 requests, and no replies.

What exactly do I need to have in my Linux server configuration to get my Pi 3 to boot a custom OS image?

Thanks.

The Blog may give some helpful hints:

https://www.raspberrypi.org/blog/piserver/

Regards x86 Linux you can not go far wrong by using Debian Stretch with RPD:

https://www.raspberrypi.org/downloads/r ... i-desktop/
Retired disgracefully.....

pmcg521
Posts: 34
Joined: Thu Jun 08, 2017 2:41 pm

Re: Network boot a non-Raspbian OS? [Pi 3]

Wed Jan 24, 2018 4:49 pm

fruitoftheloom:

The Blog may give some helpful hints:

https://www.raspberrypi.org/blog/piserver/

Regards x86 Linux you can not go far wrong by using Debian Stretch with RPD:

https://www.raspberrypi.org/downloads/r ... i-desktop/
Thanks for the quick reply. I had no idea PiServer existed. It seems to be the closest thing to what I need. However...

The cluster I'm setting up will be reliant on *constant* user changing of the OS image. It will *not* be an average cluster where users are on an OS such as Raspbian. Rather, users create their own image and run it on a Pi via network boot. We accomplished this on Pi 1's, in which the user hands off the image to a server (via terminal command on an x86 machine), which decides which Pi 1 is free. A free Pi is picked up, and the user's custom image is replaced on the free Pi's SD card. Viola, the user sees the OS run.

But I have yet to find a solution given these parameters on the Pi 3. PiServer seems so close... But unnecessary for my needs. I don't mind doing the nasty work and setting up my own server on an x86 with a distro other than Debian. Again, I rely on constant changing of the OS from the user.

fruitoftheloom
Posts: 20687
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Network boot a non-Raspbian OS? [Pi 3]

Wed Jan 24, 2018 5:19 pm

pmcg521 wrote:
Wed Jan 24, 2018 4:49 pm
fruitoftheloom:

The Blog may give some helpful hints:

https://www.raspberrypi.org/blog/piserver/

Regards x86 Linux you can not go far wrong by using Debian Stretch with RPD:

https://www.raspberrypi.org/downloads/r ... i-desktop/
Thanks for the quick reply. I had no idea PiServer existed. It seems to be the closest thing to what I need. However...

The cluster I'm setting up will be reliant on *constant* user changing of the OS image. It will *not* be an average cluster where users are on an OS such as Raspbian. Rather, users create their own image and run it on a Pi via network boot. We accomplished this on Pi 1's, in which the user hands off the image to a server (via terminal command on an x86 machine), which decides which Pi 1 is free. A free Pi is picked up, and the user's custom image is replaced on the free Pi's SD card. Viola, the user sees the OS run.

But I have yet to find a solution given these parameters on the Pi 3. PiServer seems so close... But unnecessary for my needs. I don't mind doing the nasty work and setting up my own server on an x86 with a distro other than Debian. Again, I rely on constant changing of the OS from the user.

If you have creating a SD Card for a RPi1 sorted, this should also work for RPi 2/3 as the latest kernel / firmware is backward compatable..
Retired disgracefully.....

kovacsadam07
Posts: 6
Joined: Tue Sep 01, 2015 10:35 pm

Re: Network boot a non-Raspbian OS? [Pi 3]

Sat Sep 01, 2018 7:13 pm

For anyone in the future:
I used u-boot to boot Pi3 from network. This way I can even create a menu (https://github.com/lentinj/u-boot/blob/ ... README.pxe)

On the dhcp side I use these settings:
host rpi3 {
hardware ethernet XX:XX:XX:XX:XX:XX;
filename "bootcode.bin";
option bootfile-name "bootcode.bin";
option vendor-class-identifier "PXEClient";
option vendor-encapsulated-options 6:1:3:a:4:0:50:58:45:9:14:0:0:11:52:61:73:70:62:65:72:72:79:20:50:69:20:42:6f:6f:74:ff;
}

Return to “Networking and servers”