Making a bootable CD?

Hello,

How does someone make a bootable CD under RTP?

Tom

Actually the QNX 6 port of cdrecord (for doing the burn) works well too.

dB


John Nagle wrote ~ Mon, 05 Jul 2004 13:04:42 -0700:

See below.

John Nagle
Team Overbot


Makes a CD-ROM bootable on desktop-type PCs. This is a bit clunky,
requiring two computers and a floppy drive.

Requires:

  • A working QNX development machine with QNX 6.2.1 PE.
  • A floppy drive and blank diskette.
  • A Windows or Linux machine with a CD writer, and a CD-R blank.
  • A network connection between the two computers.
  • The program “mkisofs”.
  • The QNX program “mkifs”.
  • The base QNX components “bios.boot”, “startup-bios”, and “procnto”.

Step 1 - build a QNX image

This process is explained in standard QNX help files. Start with the
documentation roadmap, and read “Building Embedded Systems”, expecially
“Chapter 2, making an OS image”. Briefly, you collect together all the
necessary component files, write a “.bld” file (here named “demo.bld”)
which describes how to put the components together, and run

mkisofs demo.bld demo.ifs

Step 2 - build a boot floppy

Put a blank diskette in the diskette drive. Make the diskette drive
writeable by ordinary users by

su ****
chmod 777 /dev/fd0

Then execute

/sbin/dinit -f demo.ifs /dev/fd0

This creates a bootable floppy, which can be booted.

Step 3 - capture an image of the boot floppy as a file

Bootable CDs, which conform to something called the “El Torito
Specification”, actually contain a bit-for-bit image of a boot floppy,
because booting from CD was a retrofit to existing PC technology. So we
need the image of that floppy in a file.

mkdir boot
dd if=/dev/fd0 of=boot/boot.img bs=10k count=144

Step 4 - build a boot CD image
We then build a bit-for-bit image (an “.iso” file) of the CD to be
created, using “mkisofs”

mkisofs -b boot/boot.img -c boot/boot.catalog -o bootcd.iso

Step 5 - move the image to a Windows (or Linux) machine for output to CD
Standard QNX doesn’t yet write CD-R disks. Very soon, though, it will.

Step 6 - Burn .iso file to CD-R
Use something like EZ CD Creator on Windows to do this.

See below.

John Nagle
Team Overbot


Makes a CD-ROM bootable on desktop-type PCs. This is a bit clunky,
requiring two computers and a floppy drive.

Requires:

  • A working QNX development machine with QNX 6.2.1 PE.
  • A floppy drive and blank diskette.
  • A Windows or Linux machine with a CD writer, and a CD-R blank.
  • A network connection between the two computers.
  • The program “mkisofs”.
  • The QNX program “mkifs”.
  • The base QNX components “bios.boot”, “startup-bios”, and “procnto”.

Step 1 - build a QNX image

This process is explained in standard QNX help files. Start with the
documentation roadmap, and read “Building Embedded Systems”, expecially
“Chapter 2, making an OS image”. Briefly, you collect together all the
necessary component files, write a “.bld” file (here named “demo.bld”)
which describes how to put the components together, and run

mkisofs demo.bld demo.ifs

Step 2 - build a boot floppy

Put a blank diskette in the diskette drive. Make the diskette drive
writeable by ordinary users by

su ****
chmod 777 /dev/fd0

Then execute

/sbin/dinit -f demo.ifs /dev/fd0

This creates a bootable floppy, which can be booted.

Step 3 - capture an image of the boot floppy as a file

Bootable CDs, which conform to something called the “El Torito
Specification”, actually contain a bit-for-bit image of a boot floppy,
because booting from CD was a retrofit to existing PC technology. So we
need the image of that floppy in a file.

mkdir boot
dd if=/dev/fd0 of=boot/boot.img bs=10k count=144

Step 4 - build a boot CD image
We then build a bit-for-bit image (an “.iso” file) of the CD to be
created, using “mkisofs”

mkisofs -b boot/boot.img -c boot/boot.catalog -o bootcd.iso

Step 5 - move the image to a Windows (or Linux) machine for output to CD
Standard QNX doesn’t yet write CD-R disks. Very soon, though, it will.

Step 6 - Burn .iso file to CD-R
Use something like EZ CD Creator on Windows to do this.

David Bacon wrote:

Actually the QNX 6 port of cdrecord (for doing the burn) works well too.

http://www.hostwork.com/matt/qnx/ports/cdrtools_x86-2.01a15-x86-public.qpr

The last time I looked at “cdrecord”, for QNX 6.2.1), you
had to install some patches to get it to work. We had a
long discussion over this. How was that resolved?

It’s also possible to get around the need for a floppy drive.
You can “mount” a file as a floppy driver and use that.
But you need an image of a blank floppy to start the process.

John Nagle
Team Overbot

Evan Hillas wrote:

David Bacon wrote:

Actually the QNX 6 port of cdrecord (for doing the burn) works well too.


http://www.hostwork.com/matt/qnx/ports/cdrtools_x86-2.01a15-x86-public.qpr

John Nagle <nagle@downside.com> wrote:

The last time I looked at “cdrecord”, for QNX 6.2.1), you
had to install some patches to get it to work. We had a
long discussion over this. How was that resolved?

You don’t need any patches under 6.3.0 or 6.2.1B.

chris

In article <ccebgl$j28$1@inn.qnx.com>, nagle@downside.com says…

It’s also possible to get around the need for a floppy drive.
You can “mount” a file as a floppy driver and use that.
But you need an image of a blank floppy to start the process.

You don’t need “mount” and blank floppy.

dd if=/dev/zero of=./image.fli bs=512 count=2880

dinit -f bootcd.ifs ./image.fli

And tricky part

spatch ./image.fli

to make it
000000: … … … … 00 00 00 00 00 00 00 00 02 00 24 00
000010: 12 00 …DON’T CHANGE ANYTHING MORE…
save and quit, as usual.
Cheers,
Eduard.