Booting

The current boot support is for x86 PC partition-table-based (the same base system as current booting) with a BIOS that supports INT13X (LBA).

The mkqnx6fs utility creates a .boot directory in the root of the new filesystem. This is always present, and always has an inode of 2 (the root directory itself is inode 1). The mkqnx6fs utility also installs a new secondary boot loader in the first 8 KB of the partition (and patches it with the location and offset of the filesystem).

The fs-qnx6.so filesystem protects this directory at runtime; in particular it can't be removed or renamed, nor can it exceed 4096 bytes (128 entries). Files placed into the .boot directory are assumed to be boot images created with mkifs. The name of the file should describe the boot image (e.g., 6.3.2SP3, 6.4.0_with_diskboot, or SafeMode_1CPU).

The directory can contain up to 126 entries. You can create other types of object in this directory (e.g., directories or symbolic links) but the boot loader ignores them. The boot loader also ignores certain-sized regular files (e.g., 0 or larger than 2 GB), as well as those with names longer than 27 characters.

The filesystem implicitly suspends snapshots when a boot image is open for writing; this guarantees that the boot loader will never see a partially-written image. You typically build the images elsewhere and then copy them into the directory, and so are open for only a brief time; however this scheme also works if you send the output from mkifs directly to the final boot file.

Note: To prevent this from being used as a DOS attack, the default permissions for the boot directory are root:root rwx------. You can change the permissions with chmod and chown, but beware that if you allow everyone to write in this directory, then anyone can install custom boot images or delete existing ones.

For information about booting from a Power-Safe filesystem, see the Controlling How Neutrino Starts chapter in this guide.