QNX on a Microdrive

I am trying to put an image of QNX on a 1GB IBM Microdrive. I create an image using mkifs (mkifs micro.bld micro.img). I create a type 77 partition using fdisk. I make that partition bootable as well. After I create the partition I do an “dinit -hb /dev/hd0t77” to initialize the drive, then I put my image on it by doing “dinit -f micro.img /dev/hd0t77”. All seems to go okay, but when I restart the machine so it can boot from the microdrive it hangs at

.altbootD (altboot followed by D).

I can’t seem to get past this. Below is the build file I use for the microdrive. Is there something special I have to do, since I am using a microdrive? Any help would be greatly appreciated. Thanks in advance.


[virtual=x86,bios +compress] .bootstrap={
startup-bios -s 64k
PATH=/proc/boot:/bin:/sbin LD_LIBRARY_PATH=/proc/boot:/usr/lib procnto

[+script] .script={

display_msg “Embedded QNX Image…”

devc-con -n1 &
reopen /dev/con1
[+session] ksh &

devb-eide blk automount=hd0t79:/ &
waitfor /x86/bin 60



[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

[code=uip data=copy perms=+r,+x]


Given QNX isn’t even running at this point, my guess would be that the bios’s view of the disk layout is different than what QNX saw when you formated the disk.

As in you have LBA turned on in the bios, but not when you ran the disk driver - or something like that.

At the point where it failed, the seconday loader is using the bios to read blocks off the disk, and not finding the data it expects. It has nothing to do with your ifs file, since it never got loaded into memory (it fails trying to do that)


I have never used -f option of dinit. Instead I would just mount the partition then copy the image into the partition over the .boot file with a standard cp command.

Thanks for the suggestions. As for the dinit -f option. I tried using the cp command before, but I always get a “resource busy” error, so I found that dinit -f seemed to work (I was able to create bootable floppy this way).

This is how I format the drive. I create a floppy with a qnx image on it that has commands I will need like fdisk, dinit, and devb-eide, etc… (I do this because when I boot up my development system with the microdrive as a second drive, I get an error “no 80 conductor cable installed” and when I try mounting that drive it reads/writes really slow. It seems to work better when I boot to a floppy) So I boot to the image on my floppy then use the command “dinit -h /dev/hd0” to initialize the drive. I then use the command “fdisk add -b -t 77” to create a partition. This seem to go okay and in the dev directory I can see hd0t77 partition. I can then do (not sure if it is necessary) a “dinit -h /dev/hd0t77” on the hd0t77 partition.

At this point I can mount the partition and see that the .boot file for that partition is 0 bytes. I then use “dinit -f micro.img /dev/hd0t77” to copy the image to the partition. I can see that the .boot then becomes the same size as my image file.

But as rick suggested, the image is not the issue. It is the disk layout. Since a lot of the options in the bios are set to AUTO, I tried setting some manually like LBA, disabling UDMA. and changing PIO mode etc…, but so far it still doesn’t seem to work. Is there anything else I might try here?

Not sure if this will help, but since I have a few 1GB microdrives I tried installing the full blown QNX6.2.1 on it to see if it would boot that way. When the install was complete, it did not want to boot using the “.boot”. I get an “fs-pkg” and “.diskboot” error. So I tried hitting ESC to use “.altboot” and this did some stuff (like create swapfile, etc…) then it seemed to boot okay. Once I was in Photon, it seemed to behave normally. I thought I read that the “.altboot” here does something like disables DMA or something. I understand that this is not the way I want to go, but I thought it might help in finding a solution.

Any more advise would be greatly appreciated.


Boot from the full install. Using fdisk look at the geometry used/detected by devb-eide. Then force the geometry when first install it (dinit and stuff) and in the boot image as well.

Another test would be use a real HD and see if that works.

I got a brand new hard drive (IDE) and went through the same procedures for formatting it and getting my custom image on it as I do the Microdrive. This booted my image just fine. I wonder if there is an issue with the CF connector on the Ampro Littleboard. The only way I have been able to get the Microdrive to boot is to install full blown QNX 6.2.1 and when it begins the boot up and asks says “Press ESC for .altboot” I press ESC and it goes through some stuff and boots. Otherwise I get an error “Unable to locate fs-pkg” and a .diskboot error. What does “.altboot”, in this case, do different than normal “.boot”?


.altboot is an image that disable DMA. Appartenly the microdrive doesn’t like DMA. At least now you know your procedure works.

When the system boots from Microdriver use ‘pidin arg’, that will show you the argument used to startup devb-eide. Just use the same in your custom image.

I did the “pidin arg” on the micrdrive that booted the full verision of Neutrino and what they were using to load the drive was

“devb-eide blk auto=parition dos exe=all cam quiet eide nobmstr”

I put this line in my build file (in place of my current devb-eide) and reformatted the drive created the partition, put my custom image on it and it booted. So this worked! The thing that I don’t understand is that this line comes toward the end of the “SCRIPT” section of my build file. I even had a “display_msg” before it to display text on the screen (for debug) and this never got displayed I was only getting the “.altbootD”. Does it not execute the commands in the script section in order?

Thanks for your help!