Initialize a disk for use as a QNX 4 filesystem (QNX Neutrino, QNX 4)
dinit [-8bpqr] [-F|h] [-B filename|-O] [-d drive_number] [-f bootfile] [-i blocks] [-L label|-l label] [-m message] [-N] [-R] [-r] [-S size] drive
QNX Neutrino, Linux, Microsoft Windows
This option is required for booting from secondary hard drives (if you specify an explicit drive number, it overrides -F or -h).
dinit -L "" /dev/fd0
To add support for long filenames to an existing QNX 4 filesystem, log in as root and create an empty, read-only (permissions 0444) file named .longfilenames in the root directory of the filesystem.
Device names under Windows differ from those under QNX 4 and
For example, under Neutrino:
dinit -f hello.ifs /dev/fd0
dinit -f hello.ifs a:
The dinit utility initializes a formatted diskette or hard disk so that you can use it as a QNX 4 filesystem, using fs-qnx4.so. The default values are determined from the current configuration of the specified drive.
|We recommend that you use dinit to initialize the QNX 4 filesystem, and dloader to make it bootable. The dinit bootloader options are for backwards compatibility reasons, but aren't generally used anymore.|
If the disk is a hard disk, you need to specify the -h or -H (hard) option. This option helps protect you against typing errors that might cause dinit to initialize your hard disk. To initialize a hard disk, you must be the superuser.
After initializing a hard disk with dinit, you should use the dcheck utility to remove any bad blocks from the disk allocation bitmap. For example:
dinit -h /dev/hd0t77 dcheck -m /dev/hd0t77
When dinit initializes a disk, it writes a loader in the first block. If the disk is a floppy diskette, the loader is the bootstrap loader, else it's the secondary (or partition) loader. If you need to rewrite the loader without reinitializing the disk, specify the -b option.
The -m option lets you change the message the OS displays when booting from disk. Normally, the message is:
Press ESC to boot alternate OS.
Your new message may contain up to 30 characters plus the trailing period. You can specify the minimum message of “.” by specifying -m. for the option.
The following table shows the shared objects and related commands for the filesystems:
|Partition type||Filesystem||Shared object||Initialize with:||Check with:|
|1, 4, or 6||DOS||fs-dos.so||mkdosfs||chkdosfs|
|11, 12, or 14||FAT32||fs-dos.so||mkdosfs||chkdosfs|
|77, 78, or 79||QNX 4||fs-qnx4.so||dinit||chkfsys|
|175||Apple Macintosh HFS or HFS Plusa||fs-mac.so||N/A||N/A|
|177, 178, or 179||Power-Safe||fs-qnx6.so||mkqnx6fs||chkqnx6fsb|
b Not usually necessary.
For more information, see the Filesystems chapter of the System Architecture guide.
Initialize a hard disk:
dinit -h /dev/hd0t77
Initialize a floppy disk:
Pause before initializing hard disk:
dinit -hp /dev/hd0t77
Don't use the -r option unless you know exactly what you're doing. You use the -r option only after a disaster has destroyed the first few blocks of your disk (e.g. a power failure occurred while the disk was being updated). In order for any damage to be repaired, you must follow dinit -r with this command:
chkfsys, dcheck, diskboot, dloader, fdformat, fdisk, fs-qnx4.so, mkdosfs, mkqnx6fs
Filesystems chapter of System Architecture
QNX Neutrino User's Guide: