Customize your QNX AMI
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
.
- manage user accounts, groups, and permissions (e.g., root access for SSH)
- manage storage, partitions, and files
- extend the boot process
Create an Amazon EBS-backed AMIin 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.
- In superuser mode, open /etc/ssh/sshd_config.
- Find the line
PermitRootLogin no
and change it toPermitRootLogin yes
. - Save the configuration file.
- Restart the SSH service to reload the configuration file.
- Confirm that you have root access for SSH.
Manage storage, partitions, and files
You can manage the storage, partitions, and files of the instance.
# 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.
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.
# 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 a type 178 partition in nvme1:
fdisk /dev/nvme1 add -t178 -
Reboot the instance:
shutdown -
Confirm the addition of nvme1t178:
ls /dev -
Format nvme1t178:
mkqnx6fs /dev/nvme1t178 -
Mount nvme1t178
to your desired pathname:
The mounted path is made available for use (e.g., transferring files).mount /dev/nvme1t178 /pathname
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
-
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.
