Skip navigation.
Home
The QNX Community Portal

View topic - Bootable CD with QNX 4.25

Bootable CD with QNX 4.25

Read-only archive of qnx.qnx4 (General QNX4 Discussion Group) at inn.qnx.com

Bootable CD with QNX 4.25

Postby olego » Wed Dec 28, 2005 6:45 am

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
New Member
 
Posts: 4
Joined: Sat Jul 16, 2005 11:00 am

Re: Bootable CD with QNX 4.25

Postby Oleg Sobolev » Wed Jan 18, 2006 2:27 am

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
Oleg Sobolev
 

Re: Bootable CD with QNX 4.25

Postby Jeffrey Adler » Wed Jan 18, 2006 4:26 am

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

Jeffrey Adler
 

RE: Re: Bootable CD with QNX 4.25

Postby ianc » Wed Jan 18, 2006 4:31 am

this is incorrect. Bootable CD is possible with QNX4. We have done it. See explanation in the QNX 4 knowledge base at qnx.com
ianc
Active Member
 
Posts: 80
Joined: Wed Jan 22, 2003 6:04 am
Location: Bendigo, Australia

Re: Bootable CD with QNX 4.25

Postby Pavel Kycina » Wed Jan 25, 2006 9:08 am

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



Pavel Kycina
 

Re: Re: Bootable CD with QNX 4.25

Postby Pavel Kycina » Wed Jan 25, 2006 9:12 am

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
Pavel Kycina
 

Re: Bootable CD with QNX 4.25

Postby Pavel Kycina » Fri Jan 27, 2006 12:57 pm

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
Pavel Kycina
 

Re: Bootable CD with QNX 4.25

Postby olego » Fri Feb 03, 2006 8:26 am

olego wrote: 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 =(
olego
New Member
 
Posts: 4
Joined: Sat Jul 16, 2005 11:00 am

Re: Bootable CD with QNX 4.25

Postby booBot » Fri Feb 03, 2006 11:21 am

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.
booBot
Senior Member
 
Posts: 633
Joined: Tue Feb 24, 2004 5:07 pm

Re: Bootable CD with QNX 4.25

Postby Rob Hem » Tue Feb 07, 2006 1:02 am

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"
Rob Hem
 

Re: Bootable CD with QNX 4.25

Postby olego » Mon Feb 20, 2006 1:52 pm

booBot 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.


I had "sh" -> "ksh" in /bin directory. And it don't work. /bin/sh is not absolute symlink.
olego
New Member
 
Posts: 4
Joined: Sat Jul 16, 2005 11:00 am

Re: Bootable CD with QNX 4.25

Postby bilcar » Mon Feb 20, 2006 2:46 pm

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.
bilcar
Senior Member
 
Posts: 573
Joined: Wed Feb 04, 2004 5:50 pm
Location: Crete, IL

Re: Bootable CD with QNX 4.25

Postby davej » Wed Oct 24, 2007 8:45 pm

[quote="Jeffrey Adler"]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
davej
New Member
 
Posts: 1
Joined: Wed Oct 24, 2007 8:43 pm


Return to qnx.qnx4

Who is online

Users browsing this forum: No registered users and 1 guest

cron