View topic - x86 image on usbstick

x86 image on usbstick

Discussion about the QNX6 OS.

x86 image on usbstick

Postby marwooj » Thu Nov 22, 2007 5:53 pm

Hi,
My goal is to crate qnx image that I can put on usbstick and boot it using grub.
The image is not directly installed to /dev/usb but I want it to put raw file on a vfat formated pendrive.

Using in grub

title QNX_rtl
kernel /boot/memdisk.bin
initrd /boot/qnx.raw

I have tried with all this
bios.build
finstall.build
qnxbasedmaaps.build
qnxbasesmp.build
qemu-minimal.build
qnxbase.build
qnxbasedma.build

and they all boot fine in QEMU but neither wants to boot in real PC from grub and pendrive

They boots almost fine but stops after

Hit Esc for .altboot............................................................
.................

What could be fix for booting qnx with my method?
marwooj
Active Member
 
Posts: 10
Joined: Thu Nov 22, 2007 5:52 pm

RE: x86 image on usbstick

Postby mario » Thu Nov 22, 2007 8:23 pm

None of these image are meant to boot off a USB flash disk, you need to write a custom image for that. All these images expect a bunch of files to be present on a QNX partition

You should also make sure that the perticular USB device is supporte by QNX.

As for the grub part I can't help you.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: x86 image on usbstick

Postby marwooj » Fri Nov 23, 2007 3:35 pm

Misunderstanding
the grub part
kernel /boot/memdisk.bin
initrd /boot/qnx.raw

makes that qnx.raw image is like floppy drive image for boot loader, so the OS thinks it is on fd not on pendrive
marwooj
Active Member
 
Posts: 10
Joined: Thu Nov 22, 2007 5:52 pm

RE: x86 image on usbstick

Postby mario » Fri Nov 23, 2007 6:25 pm

No, it makes the qnx.raw image look like a floppy driver to the loader,but once QNX starts, it takes over the machine completely.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: RE: x86 image on usbstick

Postby marwooj » Sat Nov 24, 2007 8:36 am

mario wrote:No, it makes the qnx.raw image look like a floppy driver to the loader,but once QNX starts, it takes over the machine completely.


Ok, you are right, but everything QNX needs to run is on qnx.raw (it is made from qemu-minimal.build example - I just commented out part with mounting, it does not make any different for QNX to boot in qemu) image so one it is loaded into ram I do not need to mount it under QNX. I do not need to load anything extra outside image for now I just need it to boot.
marwooj
Active Member
 
Posts: 10
Joined: Thu Nov 22, 2007 5:52 pm

Postby noc » Sun Nov 25, 2007 3:00 am

In your build file, try to change the line
[virtual=x86,bios +compress]
to
[virtual=x86,elf +compress]

(change "bios" to "elf")

Also, since you are playing with usbstick, you should consider using "syslinux" tools. Here is the entry I have in my syslinux.cfg file:

Code: Select all
LABEL qnx6
                KERNEL mboot.c32
                APPEND myown.ifs
noc
Senior Member
 
Posts: 1634
Joined: Sat Jul 06, 2002 4:34 am

Postby marwooj » Sun Nov 25, 2007 3:25 pm

noc wrote:In your build file, try to change the line
(change "bios" to "elf")


Hi noc ,
What is the different between "bios" and "elf"?

Can you point me to documentation?
marwooj
Active Member
 
Posts: 10
Joined: Thu Nov 22, 2007 5:52 pm

Postby noc » Sun Nov 25, 2007 7:24 pm

You need to use ELF/multi-boot format (keyword "elf" in boot build file) that is required by grub, pxeboot, syslinux, etc. boot loaders.

Here are some references:

http://www.openqnx.com/PNphpBB2-viewtopic-t5866-.html
http://www.openqnx.com/index.php?name=N ... le&sid=324
http://www.openqnx.com/index.php?name=P ... ic&p=25141
noc
Senior Member
 
Posts: 1634
Joined: Sat Jul 06, 2002 4:34 am

Postby marwooj » Mon Nov 26, 2007 8:31 am

Hi noc,
Thx for your help, it works now, I have
Code: Select all
[virtual=x86,elf +compress] bootstrap = {
    }

and in grub just
Code: Select all
title QNX_elf
        kernel /boot/qnx.elf


It boot great

Now I need to find out what is different between
bootstrap =
and
boot =

Regards,
marwooj
Active Member
 
Posts: 10
Joined: Thu Nov 22, 2007 5:52 pm

Postby termterm » Fri Sep 05, 2008 6:36 pm

#date 2008.08.26
#standard(full) self-hosted install qnx-6.3.0 SP3 on x86 system
#/dev/hd2 - usb-flash-drive
#dd if=/dev/zero of=/dev/hd2
#sync
#mount -e
#fdisk /dev/hd2 add
#sync
#eject /dev/hd2 #remove masstorage manually
#eject -t /dev/hd2 #load masstorage manually
#mount -e
#fdisk /dev/hd2 boot -t 77
#fdisk -B /usr/qnx630/target/qnx6/x86/boot/sys/ipl-diskpc1-flop /dev/hd2 loader
#dinit -h /dev/hd2t77
#dinit -8 -d 80 -b -B /usr/qnx630/target/qnx6/x86/boot/sys/ipl-diskpc2 /dev/hd2t77
#mount -t qnx4 /dev/hd2t77 /fs/hd2t77
#cp -Mqnx -pRf / /fs/hd2t77/ #except /proc /dev /fs
#sync
#umount /fs/hd2t77
This image was successfully booted on HP 6720s (console mode);
and unsuccessfully booted on intel-945.
termterm
New Member
 
Posts: 1
Joined: Fri Sep 05, 2008 6:31 pm

Re: x86 image on usbstick

Postby jackychentw » Wed Apr 17, 2019 7:30 am

marwooj wrote:Hi noc,
Thx for your help, it works now, I have
Code: Select all
[virtual=x86,elf +compress] bootstrap = {
    }

and in grub just
Code: Select all
title QNX_elf
        kernel /boot/qnx.elf


It boot great

Now I need to find out what is different between
bootstrap =
and
boot =


Regards,


Hello Marwooj
I have similar requirement, but I am newbie to QNX.
I found many default build file in /boot/build
I tried to modify qnxbasesmp-apic.build to change the keyword of bios to elf, and boot to bootstrap
and type:
mkifs qnxbasesmp-apic.build /root/qnx.elf
And write below in /boot/grub/grub.cfg in hd0(grub2 base)

set default=0
set timeout=10
set root=(hd0,1)
terminal console
menuentry “QNX 6.5” {
multiboot (hd0,1)/images/qnx.elf
}

The grub2 can show the menu of QNX 6.5, but it will show error when into the boot item
error: invalid arch-dependent ELF magic
I am not sure if the command(mkifs) is correct to generate elf or not, could you please share your step

Thanks
jackychentw
New Member
 
Posts: 1
Joined: Wed Apr 17, 2019 3:42 am


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 0 guests

cron