how to create a qnx system setup (with persisting settings)

How to create a custom setup - to reinstall qnx from a cd or from a usb drive - while some settings must be preserved and reinstalled right after the ‘reset’.

Would it be possible to run a custom shell right after the boot of a custom (?) .boot image to save settings (in memory?? better on usb) and to start the setup with the original files right afterwards? What are the tools and the best ways to do this?

The result must be a upgrade media that ‘upgrades’ only(!) the targeted system (…) and also restores all the ‘non qnx’ extras of the system.

Probably someone already did something like it? I’ll appreciate every hint and advice you can dispense. :slight_smile:

JDInfinity,

What are you trying to achieve here with this?

Are you trying to create an update Cd/usb device that would upgrade existing systems in the field? Or are you trying to create something that would do a custom install at your factory before shipping?

Also what kind of target hardware do you have (ie, a harddisk/CF card, flash ram etc) as that willl affect what kinds of options you have.

Tim

We do this with USB sticks.

umass-enum is started with the -r option.

We have an ‘update detector’ that hooks to umass-enum to wakeup on stick insertion. When a stick is inserted it looks for one or more update files and, if found, stops the system application and brings up an update screen that allows the user to pick a version to install.

The version is then unpacked to a ramdisk and installed. Updates never overwrite persistent data (a factory reset can do that). When the update is complete the user presses a button which does a soft reboot of the system. User settings are preserved but all the software and libraries can be replaced. The IPL can be overwritten as well.

We have a USB Stick on our mind which updates one machine - best with a new formated disk when the harddrive might already show first data loss. It’s a x86 based system with a harddisk. The machine owners should only have to plug it in and boot. The logic and checking and all that including the upgrade must be on the drive, since we don’t have any process jet out there in the field that detects the plugged usb while it’s running normally.

My approach would be to create a bootable QNZ filesystem on a usb drive and place the config backup etc there, run a ‘default’ install to the hdd and then restore our stuff / or even upgrade. And … many many checks …

Is it possible to read out the harddisk / hardware health somewhere in the default qnx setup?

Let’s start somewhere…

How can one start a Script right of a clean set up bootable image? Would it be sufficient to place it in a rc.local on the usb image?

Would you suggest to use the System Builder? But I wonder how to save things or run scripts befor the setup of qnx this way?

What do you mean with the capabilities of a ‘factory reset’? Is this a QNX feature?

Factory Reset is a function of our product. It restores all system settings to original by overwriting user settings.

We wanted to put in a real factory reset that restored everything to the original factory image, but didn’t have enough flash to allow that.

JDInfinity,

You can run chkfsys which will check the file system integrity on the hard drive.

I don’t remember if this can/does report physical bad blocks on the harddrive. At lot of times on modern hard drives physical bad blocks are handled by the hard drive firmware itself without ever telling the O/S about them.

Yes. That is sufficent to start your script automatically. However if you are wanting a GUI (ie a Photon app vs a command line terminal) you won’t be able to use this method since you’ll have to start Photon and then have Photon start your GUI program.

Personally I don’t use the System Builder for things like this. My boot image only contains a driver for my hard drive (devb-eide, in your case it would be the USB drivers). After that everything else is started in rc.sysinit or rc.local. It’s much easier to debug during development since you don’t have to keep building images and replacing the .boot file. The System Builder is best used for applications running without Hard Drives/CF cards when you have to place everything inside the image.

Tim

chkfsys only checks recovered sectors. dinit will check all sectors.