How to remove QNX loader

Good afternoon, here is my question:
I have HDD with two partitions. First partition Windows XP (12GB) for equipment service purposes, second QNX4 (active partition) with SCADA application, QNX boot loader.

How to get rid of QNX boot loader correctly? MS-DOSs “fdisk /mbr” causes QNX4 won’t boot - “Missing operating system” - boot image of QNX4 is above 1024 cylinder and the information where it starts was lost by replacing MBR with Standard?

Is it possible to recover the “Missing operating system” (boot image above 1024 cylinder) QNX4 partition?

Thank you.

You are using the term “boot loader” when I think you mean OS loader. The confusion is understandable.
At boot time, the BIOS loads the first sector of the drive into memory and starts executing it.
This is what I would call the “boot loader”. Since the first sector has the partition table,
the code at the beginning of the sector looks for a bootable partition, and then loads
the first sector of the partition, the OS loader.

I’m fairly sure that the QNX program that puts the OS loader out there is dinit. I’m not sure how you can replace it if it was removed.
You could start looking by checking all the dinit options.

For the record, I’ve never been able to get both disk with both QNX and XP partitions to load properly. XP didn’t seem to like having QNX out there. I never tried anything beyond the QNX boot loader. There are a number of options such as Lilo.

Thank you maschoen, I will explain. Yes, I meant QNX4 (multiple OSs) loader.

Installing new empty HDD. Creating and formatting 2GB DOS partition and installing DOS for testing/service purposes. Then installing QNX4 - QNX installer will “see” DOS partition and automatically installs QNX OS loader to be able to boot DOS or QNX4 (choose among them at boot time) and sets QNX partition as active.
[QNX OS loader could be manually re/installed by QNX4s “fdisk /dev/hd0t77” and selecting (L)oader and (S)ave, if the loader was previously removed by rewriting MBR with Standard].

When booting, QNX OS loader writes:
“QNX loader boot partition 1,2 2”
[1- MS-DOS
2-QNX4 (partition set as Active)]
and if you do nothing, active (2, QNX4) will continue booting after some seconds.
If you press “1” at that dialog, then DOS (partition 1) will continue booting.

Then if you want to prevent end users (operators) to boot DOS, you can remove QNX loader from MBR (no “Boot partition 1,2 2” dialog at boot time - active partition boots).
In the past I used simple DOS antivirus which had function “Overwrite MBR - replace it with Standard” and QNX loader was gone. PC then booted directly to active (QNX4) partition (without that OS loader dialog).

Now with WinXP (larger than 8GB) partition and “new” QNX4 Suite (no need for having QNX4 boot image under 1024 cylinder) I want to prevent end users from booting Win XP too.
I tried DOSs “fdisk /mbr” from DOS boot floppy (rewriting MBR with standard) but after that QNX4 is not able to boot: “Missing operating system”.
But if I set WinXP partition as active (by the same DOS floppy fdisk), XP boots without any problems.

I’m not sure what you mean here - you don’t want people to boot XP? Then why don’t you delete the XP partition?

DOS/XP is there only for service purposes (qualified servicemen) and I do not want operators of SCADA system (QNX4+Photon) even know there is some DOS/XP partition.

I think it’s still a little ambiguous as to what you want. The question I have is, if the operators of SCADA do not know it is there, how will the qualified servicemen access it? You could remove the partition entry from the partition table. The partition will still be there. The operators will not know it is there. The servicemen will know it is there, but unfortunately will not be able to access it without replacing the partition entry.

If you just don’t want it appearing as an obvious option at boot time, you could replace the QNX loader with one that doesn’t prompt for a partition number. But again, how would the servicemen get access? They could get a shell on QNX and use fdisk to change the active partition, and reboot into XP. Then they could repeat this under XP to get back to QNX. Of course, if they can do this, can’t the operators also do this?

prevent end users (operators) to boot DOS …no “Boot partition 1,2 2” dialog at boot time

If that is all you care about, here is an idea. Why don’t you just edit the partition table and set the partition type for the DOS entry (offset 0x1c2, 1d2, 1e2 or 1f2 in sector zero) to zero. That way the QNX loader will ignore it, suppressing multiboot.

When (during service call) you want to boot windows, simply (from qnx) set the value you changed back to 07 (or whatever). Multiboot menu will re-appear.

Maybe you could also use a hex editor and remove the string that’s asking for the partition from the boot loader. This way, the normal users would just boot the system and probably won’t notice the small wait before the timeout kicks in and boots the default partition.

The service personell, on the other hand, could press the right number for the XP partition in the right moment. Of course, the regular operators must close their eyes while this happens. :smiling_imp:

denkelly, Thunderblade, thank you for the tips, I will give it a try.