Disk initialization (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
To write only the loader (and not erase the disk), also specify the -b option.
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
QNX Neutrino.
For example, under Neutrino:
dinit -f hello.ifs /dev/fd0 Under Windows: dinit -f hello.ifs a: |
The dinit utility initializes a formatted diskette or hard disk so that you can use it as a QNX filesystem. The default values are determined from the current configuration of the specified drive.
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.
Initialize a hard disk:
dinit -h /dev/hd0t77
Initialize a floppy disk:
dinit /dev/fd0
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 mountpoint
chkfsys, dcheck, diskboot, dloader, fdformat, fdisk
Controlling How Neutrino Starts, Backing Up and Recovering Data and Fine-Tuning Your System in the Neutrino User's Guide