OpenQNX :: The QNX Community Portal

Aug 08, 2008 - 12:48 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 35 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
olego
Post subject: Bootable CD with QNX 4.25  PostPosted: Dec 28, 2005 - 06:45 AM
New Member


Joined: Jul 16, 2005
Posts: 4

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

_________________
Best regards,
Oleg O. Ossovitskii
chief programmer of KGPA Ltd.
 
 View user's profile Send private message  
Reply with quote Back to top
Oleg Sobolev
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Jan 18, 2006 - 02:27 AM
Guest





olego wrote:

Quote:
Hello, All!

ETC...

Quote:
/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
 
   
Reply with quote Back to top
Jeffrey Adler
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Jan 18, 2006 - 04:26 AM
Guest





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...
Quote:
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

 
   
Reply with quote Back to top
ianc
Post subject: RE: Re: Bootable CD with QNX 4.25  PostPosted: Jan 18, 2006 - 04:31 AM
Active Member


Joined: Jan 22, 2003
Posts: 35
Location: Bendigo, Australia
this is incorrect. Bootable CD is possible with QNX4. We have done it. See explanation in the QNX 4 knowledge base at qnx.com
 
 View user's profile Send private message  
Reply with quote Back to top
Pavel Kycina
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Jan 25, 2006 - 09:08 AM
Guest





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...
Quote:
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



 
   
Reply with quote Back to top
Pavel Kycina
Post subject: Re: Re: Bootable CD with QNX 4.25  PostPosted: Jan 25, 2006 - 09:12 AM
Guest





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...
Quote:
this is incorrect. Bootable CD is possible with QNX4. We have done it.
See explanation in the QNX 4 knowledge base at qnx.com
 
   
Reply with quote Back to top
Pavel Kycina
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Jan 27, 2006 - 12:57 PM
Guest





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...
Quote:
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
 
   
Reply with quote Back to top
olego
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Feb 03, 2006 - 08:26 AM
New Member


Joined: Jul 16, 2005
Posts: 4

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 =(

_________________
Best regards,
Oleg O. Ossovitskii
chief programmer of KGPA Ltd.
 
 View user's profile Send private message  
Reply with quote Back to top
booBot
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Feb 03, 2006 - 11:21 AM
Senior Member


Joined: Feb 24, 2004
Posts: 633

On Fri, 03 Feb 2006 12:52:14 +0300, olego
<oleg@kgpa-dot-ru.no-spam.invalid> wrote:
Quote:
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.
 
 View user's profile Send private message Visit poster's website ICQ Number 
Reply with quote Back to top
Rob Hem
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Feb 07, 2006 - 01:02 AM
Guest





Tony wrote:
Quote:
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"
Quote:
$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"
 
   
Reply with quote Back to top
olego
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Feb 20, 2006 - 01:52 PM
New Member


Joined: Jul 16, 2005
Posts: 4

booBot wrote:
On Fri, 03 Feb 2006 12:52:14 +0300, olego
<oleg@kgpa-dot-ru.no-spam.invalid> wrote:
Quote:
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.

_________________
Best regards,
Oleg O. Ossovitskii
chief programmer of KGPA Ltd.
 
 View user's profile Send private message  
Reply with quote Back to top
bilcar
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Feb 20, 2006 - 02:46 PM
Senior Member


Joined: Feb 04, 2004
Posts: 573
Location: Crete, IL
Quote:

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.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
davej
Post subject: Re: Bootable CD with QNX 4.25  PostPosted: Oct 24, 2007 - 08:45 PM
New Member


Joined: Oct 24, 2007
Posts: 1

[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
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.