Bootable CD with QNX 4.25

Hello, All!

I have to create bootable CD with QNX 4.25. I made boot floppy
image. Boot script is here:


sys/boot
$ boot -v

sys/Proc32
$ Proc32

sys/Slib32
$ Slib32

sys/Slib16
$ Slib16

/bin/Fsys
$ Fsys -r 1024

/bin/Fsys.eide
$ Fsys.eide -v

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd0

/bin/sinit
$ sinit -s /bin/sh -i /etc/config/sysinit TERM=qnx

On CD I placed /bin, /etc and /usr dirs with some files.

Than I create ISO image:

mkisofs –b boot.flp –o cd_image.iso –l –R /qnx_cd_boot

mkisofs version 1.11.1
boot.flp - image of boot floppy
/qnx_cd_boot - dir with files


And when I try to boot from CD I got:

[00] SIM=“eide 2.00A” HBA=“EIDE”
[00,0,0] type=00 ver=01 resp=00 flags=00
[01 SIM=“eide 2.00A” HBA=“EIDE”
[010,0] type=05ver=00

Unable to exec /bin/sh: No such file of directory

Where is mistake? I think that files on CD is not executables, and I
have to put its on RAM disk and make chmod +x on them. But how?
/etc/sysinit is not executed (I put cmd in sysinit file “echo Hello
from sysinit!” and have not seen it while boot).

Any help will be very appreciative

olego wrote:

Hello, All!

ETC…

/bin/Fsys.eide
$ Fsys.eide -v

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd0

UNFORTUNATELY CREATE REALLY BOOTABLE CD WITH
QNX 4 VERY NON SIMPLY TASK!

EXPLAINS THIS BECAUSE AT .boot image ABSOLUTELY
ABSENT ANY WAIT_FOR BETWEEN EXECUTE COMPONENTS
OF KERNEL THEREFORE IF KERNEL EXECUTE Fsys.eide
this Manager require a delay to recognise
and create block oriented files on prefix /dev/hd?
and /dev/cd? and immediately kernel execute
Iso9660fsys before REAL recognising disk and CD
structures by Fsys.eide and therefore your
system not see /bin/sh on non mounted cdfs!

To create BOOTABLE cd with QNX 4 you need create
bootable floppy as attachment to your cd
and mount cd from floppy! Only this solution
is simple! At another way present a very hard
task to create (by wrote on assembler or C)
a special cd qnx loader or create special
qnx kernel for embedded systems which creates
a qnx boot in RAM.

Sincerely yours
Oleg Sobolev
QNX engineeer Aurora Corporation
Saint-Petersburg
E-mail: ortodox@mail.wplus.net
ICQ#: 26873368

I have done it. If anyone wants info, please e-mail me.

Jeff.

“Oleg Sobolev” <ortodox@mail.wplus.net> wrote in message
news:dqk92u$a2r$1@inn.qnx.com

olego wrote:

Hello, All!

ETC…

/bin/Fsys.eide
$ Fsys.eide -v

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd0

UNFORTUNATELY CREATE REALLY BOOTABLE CD WITH
QNX 4 VERY NON SIMPLY TASK!

EXPLAINS THIS BECAUSE AT .boot image ABSOLUTELY
ABSENT ANY WAIT_FOR BETWEEN EXECUTE COMPONENTS
OF KERNEL THEREFORE IF KERNEL EXECUTE Fsys.eide
this Manager require a delay to recognise
and create block oriented files on prefix /dev/hd?
and /dev/cd? and immediately kernel execute
Iso9660fsys before REAL recognising disk and CD
structures by Fsys.eide and therefore your
system not see /bin/sh on non mounted cdfs!

To create BOOTABLE cd with QNX 4 you need create
bootable floppy as attachment to your cd
and mount cd from floppy! Only this solution
is simple! At another way present a very hard
task to create (by wrote on assembler or C)
a special cd qnx loader or create special
qnx kernel for embedded systems which creates
a qnx boot in RAM.

Sincerely yours
Oleg Sobolev
QNX engineeer Aurora Corporation
Saint-Petersburg
E-mail: > ortodox@mail.wplus.net
ICQ#: 26873368

this is incorrect. Bootable CD is possible with QNX4. We have done it.
See explanation in the QNX 4 knowledge base at qnx.com

Hello,

I would be interested. I sent you an email, but got no reply.

I removed at and dot from the state email address.

Thanks,
Pavol Kycina

“Jeffrey Adler” jeffadler.at.bigfoot.dot.com@127.0.0.1 wrote in message
news:dqkfl1$e46$1@inn.qnx.com

I have done it. If anyone wants info, please e-mail me.

Jeff.

“Oleg Sobolev” <> ortodox@mail.wplus.net> > wrote in message
news:dqk92u$a2r$> 1@inn.qnx.com> …
olego wrote:

Hello, All!

ETC…

/bin/Fsys.eide
$ Fsys.eide -v

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd0

UNFORTUNATELY CREATE REALLY BOOTABLE CD WITH
QNX 4 VERY NON SIMPLY TASK!

EXPLAINS THIS BECAUSE AT .boot image ABSOLUTELY
ABSENT ANY WAIT_FOR BETWEEN EXECUTE COMPONENTS
OF KERNEL THEREFORE IF KERNEL EXECUTE Fsys.eide
this Manager require a delay to recognise
and create block oriented files on prefix /dev/hd?
and /dev/cd? and immediately kernel execute
Iso9660fsys before REAL recognising disk and CD
structures by Fsys.eide and therefore your
system not see /bin/sh on non mounted cdfs!

To create BOOTABLE cd with QNX 4 you need create
bootable floppy as attachment to your cd
and mount cd from floppy! Only this solution
is simple! At another way present a very hard
task to create (by wrote on assembler or C)
a special cd qnx loader or create special
qnx kernel for embedded systems which creates
a qnx boot in RAM.

Sincerely yours
Oleg Sobolev
QNX engineeer Aurora Corporation
Saint-Petersburg
E-mail: > ortodox@mail.wplus.net
ICQ#: 26873368
\

Hello,

I have searched QNX4 knowledge base (searched for cd ando also for boot) and
got no relevant hit.

Could you share your info (how did you find it)

Thanks, Pavol Kycina


“ianc” <Ian.Cannon@ge-dot-com.no-spam.invalid> wrote in message
news:dqkl5e$hem$1@inn.qnx.com

this is incorrect. Bootable CD is possible with QNX4. We have done it.
See explanation in the QNX 4 knowledge base at qnx.com

Thanks everyone for help.

My problem seemed to be the old primary boot loader on the boot floppy
image. It “crashed” on images larger than cca 512kB. Now with newer loader
(from QNX4.25E) it is working fine.

Thanks again, PK

“olego” <oleg@kgpa-dot-ru.no-spam.invalid> wrote in message
news:dotgdl$2ra$1@inn.qnx.com

Hello, All!

I have to create bootable CD with QNX 4.25. I made boot floppy
image. Boot script is here:


sys/boot
$ boot -v

sys/Proc32
$ Proc32

sys/Slib32
$ Slib32

sys/Slib16
$ Slib16

/bin/Fsys
$ Fsys -r 1024

/bin/Fsys.eide
$ Fsys.eide -v

/bin/Iso9660fsys
$ Iso9660fsys /=/dev/cd0

/bin/sinit
$ sinit -s /bin/sh -i /etc/config/sysinit TERM=qnx

On CD I placed /bin, /etc and /usr dirs with some files.

Than I create ISO image:

mkisofs –b boot.flp –o cd_image.iso –l –R /qnx_cd_boot

mkisofs version 1.11.1
boot.flp - image of boot floppy
/qnx_cd_boot - dir with files


And when I try to boot from CD I got:

[00] SIM=“eide 2.00A” HBA=“EIDE”
[00,0,0] type=00 ver=01 resp=00 flags=00
[01 SIM=“eide 2.00A” HBA=“EIDE”
[010,0] type=05ver=00

Unable to exec /bin/sh: No such file of directory

Where is mistake? I think that files on CD is not executables, and I
have to put its on RAM disk and make chmod +x on them. But how?
/etc/sysinit is not executed (I put cmd in sysinit file “echo Hello
from sysinit!” and have not seen it while boot).

Any help will be very appreciative

olegowrote:

I have to create bootable CD with QNX 4.25. I made boot floppy
image. Boot script is here:

[… skip…]

And when I try to boot from CD I got:

[00] SIM=“eide 2.00A” HBA=“EIDE”
[00,0,0] type=00 ver=01 resp=00 flags=00
[01 SIM=“eide 2.00A” HBA=“EIDE”
[010,0] type=05ver=00

Unable to exec /bin/sh: No such file of directory

[…skip…]

I got it!!! My mistake was I’ve made symlink /bin/sh → /bin/ksh
and it wasn’t right! When I renamed /bin/ksh to /bin/sh my CD booted
OK. I think filesystem ISO9660 does not support symlinks =(

On Fri, 03 Feb 2006 12:52:14 +0300, olego
<oleg@kgpa-dot-ru.no-spam.invalid> wrote:

I think filesystem ISO9660 does not support symlinks
I’m sure it does support the symlinks.

I think it’s much safer to make “sh → ksh” rather then “/bin/sh →
/bin/ksh”, at least I re-visited all the symlinks on my box: if the target
is in the same directory - I remove the path part from the symlink.

Tony.

Tony wrote:

On Fri, 03 Feb 2006 12:52:14 +0300, olego
oleg@kgpa-dot-ru.no-spam.invalid> > wrote:

I think filesystem ISO9660 does not support symlinks

I’m sure it does support the symlinks.

I think it’s much safer to make “sh → ksh” rather then “/bin/sh -
/bin/ksh”, at least I re-visited all the symlinks on my box: if the
target is in the same directory - I remove the path part from the symlink.

Tony.

Here’s a recursive script I wrote to fix the symlink problem


#ifdef __USAGE

Turn Symbolic/Logical Links into hard links for regular files, using the

cd_root_dir as a prefix for source file in each hard link.

For symbolic links to directories, replace the target symbolic link with a

real directory and recursively copy the cd_root_dir prefixed source

directory

to the new target directory.

#Usage:
#%C cd_root_dir [logfile]

#endif

if [ $# -lt 1 ]; then
exec use $0
fi

if [ $# -lt 2 ]; then
export L1=/dev/null
else
export L1=$2
cat /dev/null > $L1
fi

export PFX=fullpath -t $1

export F1=/tmp/fixdir$$
export F2=/tmp/lnlist$$
export SL=/tmp/slist$$

Recurse to find a base non-symbolic link source file or directory

get_link_source ()
{
LFILE=$1
LINK=ls -l $LFILE | sed 's,.* -> ,,'

case $LINK in
…/|./) SRC=dirname $LFILE/$LINK;;
//[0-9]) SRC=$LINK;;
/
) SRC=$PFX$LINK;;
esac

if [ -L $SRC ]; then
get_link_source $SRC
fi
}

Process a list of symbolic links

do_list ()
{
while read FILE; do
if [ -L $FILE ]; then

get_link_source $FILE

if [ -d $SRC ]; then
echo “/bin/rm -f $FILE; mkdir $FILE; cp -pR $SRC $FILE”

$F1
elif [ -L $SRC ]; then

echo “#Unresolved link $FILE → $SRC” >> $L1
else
echo “ln -f $SRC $FILE” >> $F2
fi
fi
done
}

Make as many passes as necessary to resolve all symbolic links

cat /dev/null > $F1
cat /dev/null > $F2
find $1 -type l | sort > $SL

while [ -s $SL ]; do
echo “Resolving SList”
do_list < $SL

echo “Executing Fix SLink Directories List”
sh -x $F1 2>> $L1

echo “Executing Make Hard Links List”
sh -x $F2 2>> $L1

cat /dev/null > $F1
cat /dev/null > $F2
find $1 -type l | sort > $SL
done

/bin/rm -f $F1 $F2 $SL

echo “Setting root ownership & no write perms for $1 tree…\c”
chmod -R a-w $1
chown -R root:root $1

echo “\nDONE”

booBotwrote:
On Fri, 03 Feb 2006 12:52:14 +0300, olego
oleg@kgpa-dot-ru.no-spam.invalid> > wrote:
I think filesystem ISO9660 does not support symlinks
I’m sure it does support the symlinks.

I think it’s much safer to make “sh → ksh” rather then “/bin/sh

/bin/ksh”, at least I re-visited all the symlinks on my box: if the
target
is in the same directory - I remove the path part from the symlink.
Tony.[/quote:1432effc80]

I had “sh” → “ksh” in /bin directory. And it don’t work. /bin/sh
is not absolute symlink.

I had “sh” → “ksh” in /bin directory. And it don’t work. /bin/sh
is not absolute symlink.

Make sure /bin is in your path.

I have done it. If anyone wants info, please e-mail me.

Jeff.

I know its been some time, but I’m interested in doing this also.

Thanks,
Dave