Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

PXE Boot Linux RT for PXI

We're going to be trying to diskless boot our PXIe-8840QC that is currently running the NI Linux RT for PXI 2019.

 

I'm currently trying to figure out how to create the initial RAM image file that will be loaded from the PXE server.

 

We've already got the Linux Server side set up with DHCP, xinetd, tftp, etc. and demonstrated PXE booting CentOS diskless systems. 

 

Why? This is needed in our regulated environment, we have to diskless boot systems if possible for security and cost reasons.  If we don't diskless boot a system we have to turn over the disks after the test are complete - that gets $$$

 

I doubt anyone has done this, if anyone at NI has any insight that would be great.  I'll be posting here as I make progress.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 1 of 5
(2,925 Views)

I've been making some progress trying to figure this out, albeit slow.

 

I changed the BIOS settings (Hit F10 on start-up) - set to PXE Network Boot as per the PXIe-8840 manual:

 

PXE Network Boot—This setting specifies whether or not the PXE network boot agent is
enabled. When enabled, the Intel Boot Agent is displayed in the Boot Option Priorities
menu, allowing you to boot from a PXE server on the local subnet. Note that the Intel Boot
Agent device names are preceded by IBA GE Slot in the Boot Option Priorities menu.
The system must be restarted for this setting to take effect. The default value is Disabled.

 

As it states you have to restart - but it can't be a "reboot" command from the CLI - that just restarts in the current configuration without loading the bios again.  You have to use the power button to cycle the power to get the system to netboot.

 

The system I have configured as the server is not completely set up correctly for netbooting the NI image it seems, but I have gotten the pxeboot to at least assign the IPaddress to the chassis. 

 

Using Wireshark I can see the generic query at the start of the DHCP status screen on the PXIe monitor.  After a few tried I then see that the IP address has been assigned and the chassis is sending further queries.  Where I am hung up is the initram file and the image file...

 

I found through exploring another post the existence of NI tools in the /usr/local/natinst/bin folder – but the post stressed that there very little documentation on the tools. In this folder on the system I discovered a shell script file titled nivalidatestartup. Upon investigating the contents of this file I came to find that the system has a hidden boot folder under /boot labeled .safe.

 

Apparently in this .safe folder there is a Kernel Image and Ramdisk image that seemed to be apparent in most other Linux systems. These files are needed on the Netboot Server side.

 

Partial contents of nivalidatestartup.sh
.
.
.
safepath =/boot/.safe
kernel=/boot/.safe/bzImage
ramdisk=/boot/.safe/ramdisk.gz
grub_bootimage_cfg=/boot/.safe/bootimage.cfg

 

In the pxelinux.cfg on our Server system I am pointing to the kernel and ramdisk files - but I am not sure if I have an img file - I will have to look again at the bootimage.cfg

 

I feel like I am getting close to getting this system netbooting - but not having set anything up like this in Linux before, feel like I am making slow progress...

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 2 of 5
(2,882 Views)

I got the PXIe chassis to talk to the Server and I have the DHCP Server assigning the correct IP Address based on the MAC address of the PXIe Ethernet port!  We're getting moving...

 

I was incorrect when I stated I had that working in the first post - once I corrected the dhcpd.conf file in my /etc/dhcp folder the assignment of IP did work and was observed in Wireshark.

 

Now I need to know the proper bootloader...

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 5
(2,861 Views)

ok - I got the PXIe-8840QC to boot with the pxe net boot protocol using DHCP and TFTP - with the boot/.safe kernel and initramfs I found in the boot/.safe folder

 

Of course this boots the controller into the safe mode - but it starts up, downloads the kernel and initram and puts the PXIe into LV Linux RT safe mode!!  I can navigate around the "drive" and see the file system.  Pretty cool - might not be impressive to the Linux experts here, but I am not one of those. 😄  This is all with the hard drive disc removed.

 

Basic concept proven.  Next: I just need to create or find kernel and initram that will load the system in run mode. 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 4 of 5
(2,851 Views)

NOTE: This thread is a duplicate of NI-Linux-Real-Time-Discussions/PXE-Boot-Linux-RT-for-PXI/td-p/4009413 , you can find a solution there.

 

Message 5 of 5
(2,817 Views)