NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

PXE Boot Linux RT for PXI

Solved!
Go to solution

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

 

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 $$$

 

Last week I got the system to PXE boot using existing kernel and initram I found in the boot/.safe folder and copied those over to use on the server as the files to load over PXE / tftp.  

 

I now need to figure out how to build a kernel and initram that reflects our current install with the drivers, etc. in place on the system so the system is not in Safe Mode and I can launch an rtexe with full hardware driver support.


Anyone have any tips on the build processes? I am new to Linux.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 1 of 28
(4,447 Views)

ah found that the /boot/runmode folder had a bzImage kernel and initramfs files to try and utilize...

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

Hmm, well it loaded the kernel ok, but had an error trying to load the initramfs

 

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 28
(4,384 Views)
Solution
Accepted by RVallieu

Hi Ryan,

 

I wrote a short tutorial for PXE booting NI Linux RT ramdisk images you might find useful: https://github.com/harisokanovic/nilrt-net-boot

Take a look at README.md and nilrt-make-netboot-image.sh script for image creation instructions.

 

-- Haris

 

 

Message 4 of 28
(3,886 Views)

Bless you!

I will read post-haste.

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

I think this will work great - what I lacked was the knowledge on how to create that netboot disk image.

 

I will follow-up with any questions.

 

I would note that you should add some clarification on where tftboot folder is supposed to be located (Server).  The instructions for where to copy the netboot image could be clearer - i.e. state that you need to connect a backupdrive external drive and replace with the correct /path

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

Sounds good. I'll see about clarifying the instruction. You don't necessarily need a USB drive, any storage with enough space will work. I thought it would be less confusing that way, but maybe I was wrong.

 

0 Kudos
Message 7 of 28
(3,845 Views)

Ran the shell script to create the img.d files - but the system returned on error.

    img.d/
        bzImage - Linux kernel image
        init - gzipped cpio ramdisk of runmode filesystem
        SHA256SUM - checksums of aforementioned files

It still built the img.d folder and contents as outlined in your example above, but there was an error in the Checksum function.

 

INFO: sha256sum: can't read 'init' : Input/output error

 

I'll try out the net boot with the created content - not sure if the SHA256SUM checksum of files will impact that.  The ext drive I am using is 2TB so it is large enough for the images.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 8 of 28
(3,825 Views)

Hi Ryan,

 

To be honest, I can't tell exactly what's wrong. It sounds like sha256sum encountered an EIO error (errno) reading the init file. This usually means the disk or bus/connection failed.

 

Can you run `sha256sum img.d/*` by hand on the same device?

 

Could you try saving img.d to another USB storage device or to /home/admin/?

Note that /home/admin/ is on a ramdisk in safemode, so there's a good chance you could run out of space depending on your image size. My test images were ~700M so it worked for me.

 

-- Haris

 

 

0 Kudos
Message 9 of 28
(3,816 Views)

Well it was something wrong with my external drive I guess, I built it to another location and didn't get the error.  I will just sftp the file instead of using an external drive.

 

I will keep you posted!

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 10 of 28
(3,812 Views)