problem installing 6.3.0 ( How to boot QNX from 2nd HD )

Haven’t had any luck solving this on the newsgroup:

I installed QNX 6.3.0 from CD to secondary master 2.5gig HD, specified to use QNX boot loader, chose “put on both drive 1 and drive 2 boot sector”. I just see the “Hit Esc for .altboot” and a blinking cursor (no dots). Only thing I can do is ctrl-alt-del. Tried Esc, doesn’t do anything. Tried copying /.altboot to /.boot, didn’t help. I have spent a lot of time on this already, trying all sorts of things. But I’m rather inexperienced with the details of MBR vs boot loader stages etc so troubleshooting is very partial.

System info:

  1. My primary master has win2k, primary slave is CD-ROM, there is no secondary slave. PC is an AMD K6-2.
  2. The secondary master used to have Suse Linux, with lilo as boot loader so I could choose between win2k and lilo.
  3. fdisk info:

pasted from “fdisk /dev/hd0 show”:

 _____OS_____     Start      End     ______Number______   Size    Boot
  1. NTFS 7 0 254 254 4096512 2000 MB *
  2. Extd’d 15 255 1243 988 15888285 7757 MB

pasted from “fdisk /dev/hd1 show”

  1. QNZ 79 0 618 618 4991553 2437 MB *

I don’t know if it makes sense for two partitions to be “boot”, I thought only one was possible.
4) Drive 1 (hd0) shows from BIOS it is LBA w/ UDMA 2, whereas Drive 2 (hd1) is LBA w/ Mode 4 (whatever that is).

Any help would be greatly appreciated.

Oliver

There are some discussions on using grub to boot QNX from the second disk:
openqnx.com/PNphpBB2-viewtopic-t3157-.html

You can apply the same idea to lilo. I haven’t used lilo for a long time, I think it is called “map-drive”.

Yes thanks for the link. I tried that couple days ago just after my post and it worked. In case others face the same situation, the following brings together info that is scattered over several places on the 'net:

What seems to happen is that the QNX boot loader hangs if the drive that contains QNX is not the primary drive. Note that booting actually involves several stages, and it’s the second stage boot loader of QNX that’s the problem. There is one, system wide, stage 1 loader on your system (in MBR of drive 1), whereas there is one stage 2 loader per bootable partition on your system (AFAIU).

There are two solutions:

  1. use a stage 1 boot loader that allows you to virtually “swap” the two hard drives; the stage 2 boot loader then thinks it is booting from drive 1 and it works. As mentioned elsewhere, the grub (legacy) boot loader supports this (see below), so replace the stage 1 boot loader from QNX with the grub stage 1 boot loader.
  2. use a stage 2 loader that works :slight_smile: I used grub with loadifs. The latter seems to be a stage 2 QNX loader that supports the “multiboot” standard supported by grub.

I didn’t have any other Linux partition from which I could work, so:

  • after installing QNX to drive 2, I booted once more from CD-ROM and choose “run from CD”.
  • download the precompiled, qnx-patched grub v0.95, which is mentioned in post, using mozilla and save it in /usr/share/package. For me, qnxDrive is drive 2, ie /fs/hd1t79, so I saved in /fs/hd1t79/usr/share/package.
  • from shell: cd to the qnx partition (/fs/hd1t79).
  • Unzip & untar the downloaded file
  • cd to /fs/hd1t79/boot/grub, follow the instructions on grub website to install grub stage 1 on MBR. I used the grub shell to do the setup
  • edit menu.lst for both solutions (swap and loadifs).
  • Contrary to the note in the grub legacy docs, which say that for QNX the chainloader +4 is needed, I can use chainloader +1.

My /boot/grub/menu.lst file is therefore:

title Win 2000
root (hd0,0)
rootnoverify
makeactive
chainloader +1

title QNX 6.3
root (hd1,0)
rootnoverify
makeactive
chainloader +1 
map (hd0) (hd1)
map (hd1) (hd0)

title QNX 6.3 IFS
root (hd1,0)
kernel /boot/grub/loadifs
module /boot/fs/qnxbasedma.ifs

Any comments/clarifications on above are welcome.

Kojo

Nice summary.
Thanks Kojo!

BTW, instead of booting CDROM again, you could download the QNX patched grub floppy image from:
mama.indstate.edu/users/liug/grub-0.95.img.gz
and create (using “dd” in Unix or “rawwrite” in Windows) a grub boot floppy disk and boot from it. You can then install the grub onto the hard disk.

This was useful!

You can also make this work with lilo : Just use “boot-as=0x80” option.

Thanks.