CD boot

Thanks Delia, that worked great for me… except I forgot the image I had was
trying to mount /dev/fd0 as /, needless to say it didn’t load correctly, :slight_smile: But it
the system did boot from the cd and load the ./boot file even if it was the wrong
one, so I’ll call that I great success until I have the time to change my file
structure.

Delia Leal wrote:

What does your image file look like? Here is an image and sysinit file
that work for cd booting on my qnx PC. The image needs to identify your
CD and then use Is9660fsys to mount it as /. Also, it needs ramdisk
space (Fsys -r 4096)

Image file:

sys/boot
$ boot -v

sys/Proc32
$ Proc32 -l 1

sys/Slib32
$ Slib32

sys/Slib16
$ Slib16

/bin/Fsys
$ Fsys -r 4096

/bin/Fsys.eide
$ Fsys.eide fsys -Ndsk1 -n5=cd1. eide -a170 -i15

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd1.0

/bin/sinit
$ sinit -i /etc/config/sysinit -s /bin/esh TERM=qnxm

Sysinit file:

Dev &
Dev.con -n 4 -O 256 &
reopen /dev/con1
/bin/prefix -A /dev/console=/dev/con1
export PATH=/ram:.:/bin:/usr/bin
export HOME=///
dinit /dev/ram
mount /dev/ram /ram
prefix -A /pipe=/ram
fcat /util.tar.F | pax -vr
Fsys.aha8scsi &
cp /bin/dinit /bin/mount /bin/pax /bin/prefix /bin/Iso9660fsys /ram
cp /bin/Fsys.aha8scsi /bin/umount /bin/sin /bin/ls /bin/slay /ram
cp /bin/esh /ram/sh
cp /bin/fcat /ram/melt
melt -z </etc/logo.F
rtc hw
echo Welcome to QNX 4.25E
ontty /dev/con1 /bin/esh

Once you create the image file, copy it to a qnx formatted floppy as
.boot Then do a ‘cp /dev/fd0 boot.image’ command. Place this
boot.image file in the directory where all the other files to be added
to the CD are. It’s important to add some utils that you’d like to use
as well in the ramdisk space. For example:
on a qnx machine enter:
mkdir ./ram
cp -p /bin/Pipe ./ram
cp -p /bin/fdisk ./ram
cp -p /bin/use ./ram
add any utility you wish to use, just dont exceed the ramspace that you
designated in the image (Fsys -r 4096).
Then enter 'find ./ram/* | pax -x cpio -vw | freeze > util.tar.F
copy util.tar.F to the directory with all your other cd files.

Basically, you need to add to the cd image all the utils/files you will
need to run your sysinit file and anything else you’d like to run on
boot up and after. This QNX site also explains.
http://www.qnx.com/support/sd_bok/solution.qnx?10345

Then enter ‘mkisofs -o cdimagename.iso -RalL -b boot.image
/your/cd&image/files’
Copy this image file to a windows machine that has a cd-burner. Then,
click on the file and burn away.

Good luck!!
delia

Shashank wrote:

Thanks for all the feedback to my questions regarding the CD boot. I could
successfully burn a CD image. Then I boot from the CD but somehow doesn’t
seem to find the sysinit file. It says:

“Unable to open system initialization file: no such file or directory”

Does any one know what the problem could be?

Thanks again,

Shashank

“Shashank” <> sbalijepalli@precitech.com> > wrote in message
news:av1nbs$s5s$> 1@inn.qnx.com> …
Hi,
I have a CD R-W drive and I downloaded the mkisofs utility. But there
isn’t
much information on this utility. I have never before burned data to a CD.
Do I need some special software to do that and could someone tell me how
to
use mkisofs?

Thank you,
Shashank

“Rob” <> rob@spamyouself.com> > wrote in message
news:aufepd$3o0$> 1@inn.qnx.com> …
Sorry, it’s at > ftp://ftp.qnx.com > in
/usr/free/qnx4/gnu/mkisofs-1.11.1.tgz
There’s also a .readme

“Shashank” <> sbalijepalli@precitech.com> > wrote in message
news:aufbu6$nh$> 1@inn.qnx.com> …
Can someone tell me where the “mkisofsys” utility is located on
ftp://quics.qnx.com> .

Thank you,
Shashank

“Rob” <> rob@spamyouself.com> > wrote in message
news:au7bqo$9m4$> 1@inn.qnx.com> …
Yes it’s feasible. I installed a system a couple of weeks ago using
this
exact same methodology. It was a 4.25E OS version though… so,
don’t
quote
me on whether 4.24 will work > :wink: > You’ll need mkisofsys (I found it
somewhere on > ftp://qnx.com > ) The real trick is making the CD
bootable.
We
ended up making a bootable floppy w/ a CD .boot on it and then
dd’ing
the
1.44M off to a file to be used for the CD boot image. The rest of
it
was
mostly just trial & error to get everything just right. There is
some
useful info in the QNX Knowledge Base. Oh, and watch out for
symbolic
links
when making the CD file system image. If you want to have a fully
working
OS on the bootable CD, use the -r (Rockwell option). Otherwise,
just
make
a
file system with the basic utilities you’ll need for accessing the
hard
drive, creating your partitions and pax’ing the rest of your install
into
place on the hard drive.

To be honest, we haven’t quite perfected everything yet… but, the
basic
method you outlined below does work and it is how we’re planning to
install
&/or update our production systems. So far it looks very
promising…
I
can’t foresee any showstoppers, once you know how to get a bootable
CD
built
and working.

-Rob

“Shashank” <> sbalijepalli@precitech.com> > wrote in message
news:au74km$2bp$> 1@inn.qnx.com> …
We make software controls for machines. Our development is on
QNX4.24
with
Photon. I need a way to copy our entire OS image(including
applications)
to
the hard disk of the software control. I thought of a method but
wasn’t
sure if it was the best way.

  1. Copy the OS image onto a writeable CD.

  2. Boot from the CD on the control and move the contents to the
    hard
    drive
    of the control.

  3. Boot from the Hard drive of the Control.

Is this a feasible option or is there a better way? The reason is
our
service people need an easy way to install our developed systems.

Thank you,

Shashank









\

Hi,
Thanks for all the information. Finally, I could create a
bootable CD with an image of a temporary directory.
I tried to make an iso image of the entire root “/” but it fails on some of
the directories. Could anyone suggest a method to make an installation CD
that would install QNX on the hard-drive and just copy the contents of the
CD to hard-drive?

Thanks,
Shashank

“Chris Nasr” <cnasr@mechtronix.ca> wrote in message
news:3E1D932B.B559C997@mechtronix.ca

Thanks Delia, that worked great for me… except I forgot the image I had
was
trying to mount /dev/fd0 as /, needless to say it didn’t load correctly,
:slight_smile: > But it
the system did boot from the cd and load the ./boot file even if it was
the wrong
one, so I’ll call that I great success until I have the time to change my
file
structure.

Delia Leal wrote:

What does your image file look like? Here is an image and sysinit file
that work for cd booting on my qnx PC. The image needs to identify your
CD and then use Is9660fsys to mount it as /. Also, it needs ramdisk
space (Fsys -r 4096)

Image file:

sys/boot
$ boot -v

sys/Proc32
$ Proc32 -l 1

sys/Slib32
$ Slib32

sys/Slib16
$ Slib16

/bin/Fsys
$ Fsys -r 4096

/bin/Fsys.eide
$ Fsys.eide fsys -Ndsk1 -n5=cd1. eide -a170 -i15

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd1.0

/bin/sinit
$ sinit -i /etc/config/sysinit -s /bin/esh TERM=qnxm

Sysinit file:

Dev &
Dev.con -n 4 -O 256 &
reopen /dev/con1
/bin/prefix -A /dev/console=/dev/con1
export PATH=/ram:.:/bin:/usr/bin
export HOME=///
dinit /dev/ram
mount /dev/ram /ram
prefix -A /pipe=/ram
fcat /util.tar.F | pax -vr
Fsys.aha8scsi &
cp /bin/dinit /bin/mount /bin/pax /bin/prefix /bin/Iso9660fsys /ram
cp /bin/Fsys.aha8scsi /bin/umount /bin/sin /bin/ls /bin/slay /ram
cp /bin/esh /ram/sh
cp /bin/fcat /ram/melt
melt -z </etc/logo.F
rtc hw
echo Welcome to QNX 4.25E
ontty /dev/con1 /bin/esh

Once you create the image file, copy it to a qnx formatted floppy as
.boot Then do a ‘cp /dev/fd0 boot.image’ command. Place this
boot.image file in the directory where all the other files to be added
to the CD are. It’s important to add some utils that you’d like to use
as well in the ramdisk space. For example:
on a qnx machine enter:
mkdir ./ram
cp -p /bin/Pipe ./ram
cp -p /bin/fdisk ./ram
cp -p /bin/use ./ram
add any utility you wish to use, just dont exceed the ramspace that you
designated in the image (Fsys -r 4096).
Then enter 'find ./ram/* | pax -x cpio -vw | freeze > util.tar.F
copy util.tar.F to the directory with all your other cd files.

Basically, you need to add to the cd image all the utils/files you will
need to run your sysinit file and anything else you’d like to run on
boot up and after. This QNX site also explains.
http://www.qnx.com/support/sd_bok/solution.qnx?10345

Then enter ‘mkisofs -o cdimagename.iso -RalL -b boot.image
/your/cd&image/files’
Copy this image file to a windows machine that has a cd-burner. Then,
click on the file and burn away.

Good luck!!
delia

Shashank wrote:

Thanks for all the feedback to my questions regarding the CD boot. I
could
successfully burn a CD image. Then I boot from the CD but somehow
doesn’t
seem to find the sysinit file. It says:

“Unable to open system initialization file: no such file or directory”

Does any one know what the problem could be?

Thanks again,

Shashank

“Shashank” <> sbalijepalli@precitech.com> > wrote in message
news:av1nbs$s5s$> 1@inn.qnx.com> …
Hi,
I have a CD R-W drive and I downloaded the mkisofs utility. But
there
isn’t
much information on this utility. I have never before burned data to
a CD.
Do I need some special software to do that and could someone tell me
how
to
use mkisofs?

Thank you,
Shashank

“Rob” <> rob@spamyouself.com> > wrote in message
news:aufepd$3o0$> 1@inn.qnx.com> …
Sorry, it’s at > ftp://ftp.qnx.com > in
/usr/free/qnx4/gnu/mkisofs-1.11.1.tgz
There’s also a .readme

“Shashank” <> sbalijepalli@precitech.com> > wrote in message
news:aufbu6$nh$> 1@inn.qnx.com> …
Can someone tell me where the “mkisofsys” utility is located on
ftp://quics.qnx.com> .

Thank you,
Shashank

“Rob” <> rob@spamyouself.com> > wrote in message
news:au7bqo$9m4$> 1@inn.qnx.com> …
Yes it’s feasible. I installed a system a couple of weeks ago
using
this
exact same methodology. It was a 4.25E OS version though…
so,
don’t
quote
me on whether 4.24 will work > :wink: > You’ll need mkisofsys (I
found it
somewhere on > ftp://qnx.com > ) The real trick is making the CD
bootable.
We
ended up making a bootable floppy w/ a CD .boot on it and then
dd’ing
the
1.44M off to a file to be used for the CD boot image. The
rest of
it
was
mostly just trial & error to get everything just right. There
is
some
useful info in the QNX Knowledge Base. Oh, and watch out for
symbolic
links
when making the CD file system image. If you want to have a
fully
working
OS on the bootable CD, use the -r (Rockwell option).
Otherwise,
just
make
a
file system with the basic utilities you’ll need for accessing
the
hard
drive, creating your partitions and pax’ing the rest of your
install
into
place on the hard drive.

To be honest, we haven’t quite perfected everything yet…
but, the
basic
method you outlined below does work and it is how we’re
planning to
install
&/or update our production systems. So far it looks very
promising…
I
can’t foresee any showstoppers, once you know how to get a
bootable
CD
built
and working.

-Rob

“Shashank” <> sbalijepalli@precitech.com> > wrote in message
news:au74km$2bp$> 1@inn.qnx.com> …
We make software controls for machines. Our development is
on
QNX4.24
with
Photon. I need a way to copy our entire OS image(including
applications)
to
the hard disk of the software control. I thought of a
method but
wasn’t
sure if it was the best way.

  1. Copy the OS image onto a writeable CD.

  2. Boot from the CD on the control and move the contents to
    the
    hard
    drive
    of the control.

  3. Boot from the Hard drive of the Control.

Is this a feasible option or is there a better way? The
reason is
our
service people need an easy way to install our developed
systems.

Thank you,

Shashank










\

On Wed, 08 Jan 2003 14:37:20 -0800, Delia Leal <Delia.Leal@sri.com> wrote:

What does your image file look like? Here is an image and sysinit file
that work for cd booting on my qnx PC. The image needs to identify your
CD and then use Is9660fsys to mount it as /. Also, it needs ramdisk
space (Fsys -r 4096)

Image file:

sys/boot
$ boot -v

sys/Proc32
$ Proc32 -l 1

sys/Slib32
$ Slib32

sys/Slib16
$ Slib16

/bin/Fsys
$ Fsys -r 4096

/bin/Fsys.eide
$ Fsys.eide fsys -Ndsk1 -n5=cd1. eide -a170 -i15

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd1.0

/bin/sinit
$ sinit -i /etc/config/sysinit -s /bin/esh TERM=qnxm

I’m busy trying to get this going, and foud this post very helpful.
The problem I’ve come across is that it appears as if / is not mounted
correctly, so all of the commands following in sysinit are
not found.
Could there be race condition between Fsys.eide & Iso9660?
I’m testing this on a laptop which supports booting from CD.
The CD is slave and the HD is master.

On Thu, 20 Mar 2003 16:25:06 GMT, acellarius@yahoo.com wrote:

I’m busy trying to get this going, and foud this post very helpful.
The problem I’ve come across is that it appears as if / is not mounted
correctly, so all of the commands following in sysinit are
not found.
Could there be race condition between Fsys.eide & Iso9660?
I’m testing this on a laptop which supports booting from CD.
The CD is slave and the HD is master.

Never mind.
Nothing that a little textto -l sysinit couldn’t fix…

One (possibly lame :wink: thought… Change the /bin/sinit line to:
$ sinit -s /bin/esh -i /etc/config/sysinit TERM=qnxm

Are you testing this with a floppy or a burned CD? You could use one of
your previously burned CDs and set your BIOS to boot from a test floppy,
until you get it right.

Another thought… I don’t quite understand why this has worked for me. The
CD is on the slave/secondary ide and there is a flash ide drive on the
primary… but, try eliminating all the options to Fsys.eide …
Fsys.eide -v &

-Rob

<acellarius@yahoo.com> wrote in message news:1106_1048177506@192.168.0.5

On Wed, 08 Jan 2003 14:37:20 -0800, Delia Leal <> Delia.Leal@sri.com> > wrote:
What does your image file look like? Here is an image and sysinit file
that work for cd booting on my qnx PC. The image needs to identify your
CD and then use Is9660fsys to mount it as /. Also, it needs ramdisk
space (Fsys -r 4096)

Image file:

sys/boot
$ boot -v

sys/Proc32
$ Proc32 -l 1

sys/Slib32
$ Slib32

sys/Slib16
$ Slib16

/bin/Fsys
$ Fsys -r 4096

/bin/Fsys.eide
$ Fsys.eide fsys -Ndsk1 -n5=cd1. eide -a170 -i15

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd1.0

/bin/sinit
$ sinit -i /etc/config/sysinit -s /bin/esh TERM=qnxm

I’m busy trying to get this going, and foud this post very helpful.
The problem I’ve come across is that it appears as if / is not mounted
correctly, so all of the commands following in sysinit are
not found.
Could there be race condition between Fsys.eide & Iso9660?
I’m testing this on a laptop which supports booting from CD.
The CD is slave and the HD is master.

On Thu, 20 Mar 2003 14:26:31 -0600, “Rob” <rob@spamyouself.com> wrote:

One (possibly lame > :wink: > thought… Change the /bin/sinit line to:
$ sinit -s /bin/esh -i /etc/config/sysinit TERM=qnxm

Are you testing this with a floppy or a burned CD? You could use one of
your previously burned CDs and set your BIOS to boot from a test floppy,
until you get it right.

Another thought… I don’t quite understand why this has worked for me. The
CD is on the slave/secondary ide and there is a flash ide drive on the
primary… but, try eliminating all the options to Fsys.eide …
Fsys.eide -v &

Thanks for these ideas-those were the ones I was thrashing with.

For some reason, there were CRLF pairs in the sysinit (come to think of
it, probably because it was a cut and paste job from Windows
to QNX…) and sinit & sh (or whoever it is that excutes sysinit)
choked on those. Clue was that sysinit was found, so it could
not have been the race condition I was thinking.

The dumber the problem… the more difficult and rewarding the solutions, eh
:wink:

-Rob

<acellarius@yahoo.com> wrote in message news:1103_1048193561@192.168.0.5

On Thu, 20 Mar 2003 14:26:31 -0600, “Rob” <> rob@spamyouself.com> > wrote:
One (possibly lame > :wink: > thought… Change the /bin/sinit line to:
$ sinit -s /bin/esh -i /etc/config/sysinit TERM=qnxm

Are you testing this with a floppy or a burned CD? You could use one of
your previously burned CDs and set your BIOS to boot from a test floppy,
until you get it right.

Another thought… I don’t quite understand why this has worked for me.
The
CD is on the slave/secondary ide and there is a flash ide drive on the
primary… but, try eliminating all the options to Fsys.eide …
Fsys.eide -v &

Thanks for these ideas-those were the ones I was thrashing with.

For some reason, there were CRLF pairs in the sysinit (come to think of
it, probably because it was a cut and paste job from Windows
to QNX…) and sinit & sh (or whoever it is that excutes sysinit)
choked on those. Clue was that sysinit was found, so it could
not have been the race condition I was thinking.

Rob <rob@spamyouself.com> wrote:

The dumber the problem… the more difficult and rewarding the solutions, eh
:wink:

-Rob

Well said.