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
Highlighted

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
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 1 of 26
(897 Views)
Highlighted

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

Ryan Vallieu
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 2 of 26
(845 Views)
Highlighted

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

 

Ryan Vallieu
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 26
(834 Views)
Highlighted
Solution
Accepted by topic author 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 26
(336 Views)
Highlighted

Bless you!

I will read post-haste.

Ryan Vallieu
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 5 of 26
(317 Views)
Highlighted

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
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 6 of 26
(311 Views)
Highlighted

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 26
(295 Views)
Highlighted

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
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 8 of 26
(275 Views)
Highlighted

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 26
(266 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
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 10 of 26
(262 Views)