Jump to content
News about the LabVIEW Wiki! Read more... ×
viSci

Transfer Image from cDAQ-9133 Linux RT to cDAQ-9133 WES7

Recommended Posts

I have two cDAQ-9133 controllers, one with WES7 and one with LinuxRT.  I would like to convert the cDAQ 9133 with WES7 to LinuxRT.  Both cDAQ's were purchased 6 months ago to determine the best OS for our application.  I have gone through all of the forums and it seems like I might be able to use the NI recovery disk or possibly a disk cloning utility like acronis or similar.  Has anyone had success doing this?

Share this post


Link to post
Share on other sites

I'm still searching but I had a similar issues.  Someone mistakenly ordered the Windows version of the 9132 when we wanted the Linux RT.  I asked NI what it would take to change it over and they said we would have to send it back getting a refund (probably minus stacking fee I can't remember) and then buy the new one.  The reason was that the part numbers of the product were different and one example was that if we ever needed support it would be directed to the wrong place, and a replacement would give us the wrong one.  I can't remember if I had this conversation in an email or online, or a private message I'll post it if I find it online.

Share this post


Link to post
Share on other sites

I was told if you are within the first 30 days you can send it back to NI and they will replace it with your OS of choice.  In my case that is not possible so I have to find a way to do it myself.  I found this document 

http://www.ni.com/product-documentation/54592/en/

which alludes to being able to restore a cDAQ image or even make it a dual boot device but details are lacking.

Edited by viSci

Share this post


Link to post
Share on other sites

You might just ask your field sales. They can, on occasion, do nice things.

Share this post


Link to post
Share on other sites
On 12/5/2018 at 10:12 AM, viSci said:

Has anyone had success doing this?

I need to image a few cRIOs in the near future.  Have you had any luck finding details for  restoring the cDAQ image?

Share this post


Link to post
Share on other sites
13 hours ago, bbean said:

I need to image a few cRIOs in the near future.

Creating a crio image is a little different than changing the entire OS stack from Windows to Linux.
You can image a crio using the Replication and Deployment utility. I use this all the time.

Quote

 I would like to convert the cDAQ 9133 with WES7 to LinuxRT. 

I think you would need to get the installation image NI uses to setup that specific Linux cRIO and some instructions. NI has the image and they can choose to give it to you or not. If they can't provide it due to warranty or licensing issues. Then they should offer a service where you send it in so they can do it for free or even a fee. It's not unreasonable to ask for a service fee since this is not a common request. However, considering the astronomical cost of the hardware, they should do this without question. In the past, when I've requested things from support that are out of the ordinary, they tend to shrug it off. However, once I get a sales rep involved and explain the customer need and criticality of the situation, then they have the power to get support to do anything. NI should be doing this, not you.

Share this post


Link to post
Share on other sites
5 hours ago, Michael Aivaliotis said:

Creating a crio image is a little different than changing the entire OS stack from Windows to Linux.
You can image a crio using the Replication and Deployment utility. I use this all the time.

I think you would need to get the installation image NI uses to setup that specific Linux cRIO and some instructions. NI has the image and they can choose to give it to you or not. If they can't provide it due to warranty or licensing issues. Then they should offer a service where you send it in so they can do it for free or even a fee. It's not unreasonable to ask for a service fee since this is not a common request. However, considering the astronomical cost of the hardware, they should do this without question. In the past, when I've requested things from support that are out of the ordinary, they tend to shrug it off. However, once I get a sales rep involved and explain the customer need and criticality of the situation, then they have the power to get support to do anything. NI should be doing this, not you.

I know about the RAD.  But I think my needs are similar viSci, because I actually need to "wipe" a cRIO before removing it from a "secure" area and then re-image it from the clean media.  

Share this post


Link to post
Share on other sites

With the help of my NI inside sales rep, I was able to get a cDAQ Linux installation image and instructions to restore and existing Linux chassis or convert a WES7 to Linux.  NI was very protective with this stuff even though the Linus RT source is published on GIthub.

  • Thanks 1

Share this post


Link to post
Share on other sites
4 hours ago, bbean said:

I know about the RAD.  But I think my needs are similar viSci, because I actually need to "wipe" a cRIO before removing it from a "secure" area and then re-image it from the clean media.

From NIMax you can format a cRIO.

Share this post


Link to post
Share on other sites
On 12/8/2018 at 3:21 PM, Michael Aivaliotis said:

From NIMax you can format a cRIO.

Yeah but I wonder how much of a format this really does.  I was experimenting with reading/writing NTFS drives from within Linux RT.  All that was needed was a few commands to install the appropriate package through opkg.  After that it could read and write NTFS USB drives just fine.  At some point I wanted to start fresh so I formatted it through MAX.  But after the MAX format I was still able to read and write NTFS drives.  So I suspect this isn't so much as a format as a "Remove all NI software and config, and copy over the base image".  All OS level things might just be left alone.  I never really followed up on this, and I do have several controllers so I could have mixed one up and formatted the wrong one, I'll try to reproduce this test later today to see if it is reproducible.

See edit, I thought MAX format didn't wipe everything, now it seems it does wipe more than just NI software as OPKG installed packages are removed.

EDIT: Okay a few other things for anyone that cares (just me then?).  If you are using the Legacy FTP, you can read NTFS drives but cannot write to them.  Running LabVIEW VIs, and the web interface to look at the U drive returns errors, and empty drives, but FTP can read and transfer files.  This is where my confusion came from.  I formatted the controller and FTP could still read the drive.  But since I couldn't write to it or transfer data to it without extra packages being installed, this means a MAX format does uninstall OPKG installed packages, so it probably does wipe everything and start from a fresh image.

Share this post


Link to post
Share on other sites
On 12/8/2018 at 3:21 PM, Michael Aivaliotis said:

From NIMax you can format a cRIO.

Is there anyway to do this without MAX? or a description of what happens when MAX executes the format? 

Unfortunately no Windows boxes are allowed in the previous mentioned "secure" area.   So the wipe needs to be done without MAX.   Once the cRIO is wiped it can leave the secure area and all normal NI stuff (MAX, RAD, windows) can be used.   As someone told me, its the security policy it doesn't have to make sense.

Share this post


Link to post
Share on other sites

Well you can offer them to use a hammer 😀. It's about as senseful as that rule 😉. But there might be rules about bringing in a hammer too.

But honestly, Linux has everything on board and even a slimmed down NI Linux RT should still know the dd command line tool.

There you can do:

Filling the disk with all zeros (This may take a while, as it is making every bit of data 0) :

  • dd if=/dev/zero of=/dev/sdX bs=1M *replace X with the target drive letter.

If you are wiping your hard drive for security, you should populate it with random data rather than zeros (This is going to take even longer than the first example.) :

dd if=/dev/urandom of=/dev/sdX bs=1M *replace X with the target drive letter.

The reason one should fill with urandom in case of required security is explained here: http://www.marksanborn.net/howto/wiping-a-hard-drive-with-dd/

If all else fails you could create a mini USB stick with minimal unix install and the dd tool and then get it through security check at said place (Hey it does not contain any Windows 😀) boot from it and wipe the drive from there.

Needless to say that such a controller won't boot up after this anymore and you will need a bootable USB drive to turn it alive again, but that seems to be the price as they want to be sure no secret can sneak out through the door with any device.

Edit: Ohh, and you will of course need to take a keyboard with you. Somehow you will have to enter those commands on the shell. I hven't tried but I would expect that if you plug a USB keyboard in the controller, you will actually be able to use it. The next challenge will be to have some form of display. A VT 100 terminal may come in handy as you can connect it to the RS-232 port on the controller if it has one. Otherwise you have to login blind (good luck) and enter those commands blind too (even more good luck with that). All in all I think the hammer method is still the best one and simply buy a new controller 😀.  A headless controller really is headless, and to control it you do need some kind of terminal with a display and a keyboard at least. That could be a very simple Linux device but I fail to see how a Linux computer would be more secure to take in than a Windows one.

With these rules, just tell them to get the controller out there themselves! 

Edited by Rolf Kalbermatter

Share this post


Link to post
Share on other sites
8 hours ago, bbean said:

Is there anyway to do this without MAX? or a description of what happens when MAX executes the format? 

Unfortunately no Windows boxes are allowed in the previous mentioned "secure" area.   So the wipe needs to be done without MAX.   Once the cRIO is wiped it can leave the secure area and all normal NI stuff (MAX, RAD, windows) can be used.   As someone told me, its the security policy it doesn't have to make sense.

Shouldn't such absurd rules come with a budget? Like, no you can't take the machine out of the secure area but here why don't you just buy another instead? :D

 

Share this post


Link to post
Share on other sites

thanks for all the feedback. its why i love this site.

Share this post


Link to post
Share on other sites

Yes I know but the mentioned rule makes even that difficult. First if your target has no physical DIP switch you have to use NI MAX to set it into safe mode. -> Bummer. There is probably some ini file setting somewhere that you could change through SSH and then reboot, so the NI MAX is probably avoidable but:

SSH requires a device that can run it, which will be in almost all cases a real computer. Maybe the "No Windows box allowed behind this line" offers an escape by allowing to use a Linux box, but then I would consider that rule even more stupid. Either you ban all computers or none, just excluding Windoze makes no real sense. The more important question is what nisystemformat really does. Does it wipe the disk completely and if so why not just use dd? If not there will be data left on the device, which I'm sure is the entire reason to require it to be wiped before leaving that area.

Edited by Rolf Kalbermatter

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.