Customize your QNX AMI

Updated: March 11, 2025

This section describes how to customize your QNX AMI instance.

The QNX Image Filesystem (IFS) generates the QNX AMI; this root IFS should remain unaltered. For details on the root IFS, go to the QNX Neutrino User's Guide about Working with Filesystems.

However, you can perform the following customizations: If you want to save a copy of your customized AMI, then follow how to “Create an Amazon EBS-backed AMI” in the Amazon EC2 User Guide at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html.

Manage user accounts, groups, and permissions

If you have owner privilages, then you can control the user or group access to the instance, including passwords and permissions. For detailed steps, go to the Managing User Accounts chapter in the QNX Neutrino User's Guide.

Enable root access for SSH
You can allow root access for SSH. To allow root access for SSH, edit the sshd configuration file of the instance:
  1. In superuser mode, open /etc/ssh/sshd_config.
  2. Find the line PermitRootLogin no and change it to PermitRootLogin yes.
  3. Save the configuration file.
  4. Restart the SSH service to reload the configuration file.
  5. Confirm that you have root access for SSH.

Manage storage, partitions, and files

You can manage the storage, partitions, and files of the instance.

Initially, there is one NVME storage device (nvme0) associated with the instance. To view the traget's devices, run ls /dev on the target. Here's an example output of the ls /dev command:
# ls /dev
bpf           pci           ptyp4         slog          ttyp0         tymem
console       pf            ptyp5         slog2         ttyp1         urandom
io-sock       pfil          ptyp6         socket        ttyp2         zero
mem           pipe          ptyp7         stderr        ttyp3
mqueue        ptyp0         random        stdin         ttyp4
null          ptyp1         sem           stdout        ttyp5
nvme0         ptyp2         ser1          text          ttyp6
nvme0t178     ptyp3         shmem         tty           ttyp7
The partition /dev/nvme0t178 is a system partition union mounted at / (slash). This small partition should only be for the system libraries and binaries, not for application-level libraries and binaries.
CAUTION:
Don't change the permissions of the directories under this partition. Otherwise, users won't be able to log in.
Add storage

You can add larger volumes for application-level libraries and binaries. To attach a volume to the instance, follow the steps in “Attach an Amazon EBS volume to an instance” at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html.

After the volume attaches to the instance, use the instance terminal to reboot the instance by running shutdown.
Note: The instance reboot may take a while for baremetal instances. We recommend adding more storage when you launch a new baremetal instance.
After the instance reboots, the attached volume appears as the next NVME device nvmeN, where N is the next available number (e.g., nvme1) followed by the partition type. In the following example, note the addition of nvme1t179:
# ls /dev
bpf           nvme1         ptyp2         ser1          text          ttyp6
console       nvme1t179     ptyp3         shmem         tty           ttyp7
io-sock       pci           ptyp4         slog          ttyp0         tymem
mem           pf            ptyp5         slog2         ttyp1         urandom
mqueue        pfil          ptyp6         socket        ttyp2         zero
null          pipe          ptyp7         stderr        ttyp3
nvme0         ptyp0         random        stdin         ttyp4
nvme0t178     ptyp1         sem           stdout        ttyp5
Create and format your partitions
You can partition your volume to organize your storage. To partition a volume (e.g., nvme1), run the following commands:
  1. Create a type 178 partition in nvme1:
    fdisk /dev/nvme1 add -t178
  2. Reboot the instance:
    shutdown
  3. Confirm the addition of nvme1t178:
    ls /dev
  4. Format nvme1t178:
    mkqnx6fs /dev/nvme1t178
  5. Mount nvme1t178 to your desired pathname:
    mount /dev/nvme1t178 /pathname
    The mounted path is made available for use (e.g., transferring files).
Transfer files

You can transfer files between the host and the mounted storage of the instance using the Momentics IDE or the scp utility. For details on using the SCP, go to the scp entry in the Utilities Reference.

Configure the boot process

You can configure the boot process. There are two methods to configure the boot process:
  • startup script

    You can configure the boot process by using a configured startup script, (i.e., /var/start_script.sh). The boot process looks for the startup script that IFS executes, integrating its code into the boot process.

  • System Launch and Monitor (SLM) configuration file

    You can configure the boot process by using the SLM configuration file (i.e., /etc/slm/slm.conf). The SLM uses this configuration file to start and manage any custom components to run during boot. For details on using the SLM, go to the slm entry in the Utilities Reference.

You can use either the start_script.sh or the SLM to launch your custom software management tools to manage your application-level software, such as starting the customer-specific process for the lifecycle management.