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.
Solved! Go to Solution.
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.
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
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.
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.
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.
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!