We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

mdidomenico
Posts: 6
Joined: Thu Feb 02, 2017 10:44 pm

pxe boot and custom kernels

Mon Feb 13, 2017 10:46 pm

Is there anything special about the kernels and pxe booting? I'm able to get the kernel to load from a raspbian image over pxe. But i can't seem to get any other kernel to pxe. I've tried my own cross-compiled versions using the directions from raspberrypi.org and I've tried extracting the centos arm ported kernel

i can see the pi3 tftp all the requisite files, but it never seems to flip over into the kernel, it just sits there with a blank (disable_splash=1) screen

User avatar
DougieLawson
Posts: 43580
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: pxe boot and custom kernels

Tue Feb 14, 2017 12:45 am

Does your kernel boot OK on your 3B from a USB stick?

Because that's how I tested PXE with two Raspberries. I got my 2B booted from an SDCard with that bootable USB stick that holds the bootcode/kernel and root fs for my 3B inserted in a USB socket. The 2B runs dnsmasq as the DHCP server and TFTP server. The 3B is wired to the 2B with a straight cat5 cable.

Mount the USB stick partion #2 (/dev/sda2) at /tftp. Mount the USB stick partition #1 (/dev/sda1) at /tftp/boot.

Set up the 2B with a fixed IP address 10.1.2.1 and get it running as an NFS server with /tftp in the exports list.

Run dsnmasq with this config

Code: Select all

port=0
dhcp-range=10.1.2.10,10.1.2.40,300h
log-dhcp
enable-tftp
tftp-root=/tftp/boot
pxe-service=0,"Raspberry Pi Boot"
Have this as /tftp/boot/cmdline.txt

Code: Select all

dwc_otg.lpm_enable=0 console=tty1 root=/dev/nfs nfsroot=10.1.2.1:/tftp elevator=deadline rootwait quiet splash plymouth.ignore-serial-consoles ip=dhcp
Power on the 3B and watch the magic happen.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Bluesky or by LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: pxe boot and custom kernels

Tue Feb 14, 2017 1:31 am

I've had a custom iscsi build running since last julyish

mdidomenico
Posts: 6
Joined: Thu Feb 02, 2017 10:44 pm

Re: pxe boot and custom kernels

Tue Feb 14, 2017 9:21 pm

Yes, the pi will boot just fine from an SD card, with both the raspbian kernel, centos kernel, and my custom kernel. it's just when i try to boot via pxe the kernel fails to load with anything but the raspbian kernel. all of the kernels tftp from the server, but just never hand off from the bootloader, i'm guessing.

User avatar
DougieLawson
Posts: 43580
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: pxe boot and custom kernels

Tue Feb 14, 2017 9:50 pm

What's in config.txt, you can define the kernel to load there. Default is

Code: Select all

kernel=kernel.img
for RPi1, B+, Zero or CM or

Code: Select all

kernel=kernel7.img
for RPi2B, RPI3B & CM3. I'm not sure whether PXE will load an alternative kernel.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Bluesky or by LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

mdidomenico
Posts: 6
Joined: Thu Feb 02, 2017 10:44 pm

Re: pxe boot and custom kernels

Thu Feb 16, 2017 2:06 am

I've had set the kernel7.img from the raspbian distro, or set it to one of, either the centos kernel (copied from the /boot partition of the centos arm image) or a custom kernel that i compiled using the directions from the raspberrypi.org website. in the latter cases i can't get the system to pxe those images, but they do boot from the sdcard. the raspbian image works fine.

Return to “Troubleshooting”