to prepare hard drives

Hi,
I have to prepare hd for embedded systems, I’d like to know how can I
make qfs files to prepare my hd as the qrtp cd-rom do.

To make this boot procedure as fast as possible, I’d like to know:

  • How to prevent the loader to ask which partition to use.
  • How and to prevent IDE scan.

Thanks,
Alain.

Hi Alain,

“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3DB651A6.8090507@icbt.com

Hi,
I have to prepare hd for embedded systems, I’d like to know how can I
make qfs files to prepare my hd as the qrtp cd-rom do.

I’m not sure I undestand you here. qfs (QNX File System) files are used by
package file system. In other words, the bundle of binary executables is
stored in image file, this file is copied from CD to HD during installation
(in version 6.0 this file was compressed on CD), and then this file
(qnxbase.qfs) is mounted during boot up. You can prepare such qfs file with
your binaries, but you also are able to copy your binaries to disk on
target.

To make this boot procedure as fast as possible, I’d like to know:

  • How to prevent the loader to ask which partition to use.

A: 1) Don’t use primary loader, if you don’t need partitioned drive in
target. Just dinit HD like you do for floppy disk.
2) Use any primary loader which doesn’t ask about partition but just
use active partition. There are lots of them.
3) Hex-edit the MBR (primary loader) in order to eliminate the delay. I
believe I wrote about this hack at embedded conference.

  • How and to prevent IDE scan.

And again, if I understand you right, the answer is don’t use diskboot for
booting target. Or you mean some another scan?

Cheers,
Eduard.
ed1k at qnx-night dot com

Thanks,
Alain.

ed1k a écrit:

Hi Alain,

“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3DB651A6.8090507@icbt.com> …


Hi,
I have to prepare hd for embedded systems, I’d like to know how can I
make qfs files to prepare my hd as the qrtp cd-rom do.



I’m not sure I undestand you here. qfs (QNX File System) files are used by
package file system. In other words, the bundle of binary executables is
stored in image file, this file is copied from CD to HD during installation
(in version 6.0 this file was compressed on CD), and then this file
(qnxbase.qfs) is mounted during boot up. You can prepare such qfs file with
your binaries, but you also are able to copy your binaries to disk on
target.


qnxbase.qfs seems to create the base directory tree, now I need to

manually copy /etc/system/package/packages, /etc/rc.d/rc.local, and
particularly /pkgs/repository…
How to create a mythings.qfs to include all directories/files I want?

To make this boot procedure as fast as possible, I’d like to know:

  • How to prevent the loader to ask which partition to use.



    A: 1) Don’t use primary loader, if you don’t need partitioned drive in
    target. Just dinit HD like you do for floppy disk.

But I did a fdisk and dinit allready and according to my tests I cannot

use dos fdisk If I boot with a dos floppy, it doesn’t recognize my disk
and just create a ram disk as C: !!arghh!!

  1. Use any primary loader which doesn’t ask about partition but just
    use active partition. There are lots of them.

Maybe but where? I try to find some without success. Qnx web site talk

about /usr/free/qnx4/os/disk/utils/quietloaders.tgz but it doesn’t exist
anymore!

  1. Hex-edit the MBR (primary loader) in order to eliminate the delay. I
    believe I wrote about this hack at embedded conference.


    Maybe !?!


  • How and to prevent IDE scan.



    And again, if I understand you right, the answer is don’t use diskboot for
    booting target. Or you mean some another scan?

Cheers,
Eduard.
ed1k at qnx-night dot com



Thanks,
Alain.



\

“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3DB7D91F.70609@icbt.com

qnxbase.qfs seems to create the base directory tree, now I need to manually
copy /etc/system/package/packages, /etc/rc.d/rc.local, and particularly
/pkgs/repository…
How to create a mythings.qfs to include all directories/files I want?

Exactly this question is answered at qdn.public.qnxrtp.embedded conference.
Ok, yet another cut&paste:

There is no any special utility, AFAIK.
creat a 4 Mb file

dd if=/dev/zero of=/systemX.qfs bs=1024 count=4096

creat a QNX file system inside the file

dinit /systemX.qfs

mount this file system

mount /systemX.qfs /systemX

work with files under /systemX/ like it is normal filesystem space :wink:


A: 1) Don’t use primary loader, if you don’t need partitioned drive in
target. Just dinit HD like you do for floppy disk.
But I did a fdisk and dinit allready and according to my tests I cannot use
dos fdisk If I boot with a dos floppy, it doesn’t >recognize my disk and

just create a ram disk as C: !!arghh!!

If you don’t need to have partitions on hard disk, you can do dinit only
(you must not do fdisk). Ok, you can try in DOS environment to type in
command prompt:
C:> fdisk /mbr
This command will write standard primary loader to hard disk. If your QNX
partition is marked as active (it’s selected by default in question “Boot
partition:”), the next reboot will boot this active partition without any
questions. And sure, DOS will not recognize your QNX partition on disk :slight_smile:
But it should not be a problem to repair MBR (command “fdisk /mbr” is
supposed to use for repairing MBR after being under boot viruses attack :slight_smile:)


  1. Use any primary loader which doesn’t ask about partition but just
    use active partition. There are lots of them.
    Maybe but where? I try to find some without success. Qnx web site talk
    about /usr/free/qnx4/os/disk/utils/quietloaders.tgz >but it doesn’t exist

anymore!

There is one of them in DOS, see above how to get it :slight_smile: Also, you can get
such loader from Linux or any other OS. I don’t know why it’s not documented
but I believe I saw a lot of loaders in my QNX6.1 system.

  1. Hex-edit the MBR (primary loader) in order to eliminate the delay.
    I
    believe I wrote about this hack at embedded conference.

Maybe !?!

Why not? But be very careful :slight_smile:

Cheers,
Eduard.

Hi,
Impossible to dinit without fdisk first. I finally did a fdisk /mbr,
that’s not easy but ok.
Now, the question remains, after fdisk and dinit, I still get the
question about the partition to boot and I don’t know how to remove it!

regards,
Alain.

ed1k a écrit:

“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3DB7D91F.70609@icbt.com> …



qnxbase.qfs seems to create the base directory tree, now I need to manually
copy /etc/system/package/packages, /etc/rc.d/rc.local, and particularly


/pkgs/repository…


How to create a mythings.qfs to include all directories/files I want?



Exactly this question is answered at qdn.public.qnxrtp.embedded conference.
Ok, yet another cut&paste:

There is no any special utility, AFAIK.
creat a 4 Mb file

dd if=/dev/zero of=/systemX.qfs bs=1024 count=4096

creat a QNX file system inside the file

dinit /systemX.qfs

mount this file system

mount /systemX.qfs /systemX

work with files under /systemX/ like it is normal filesystem space > :wink:




A: 1) Don’t use primary loader, if you don’t need partitioned drive in
target. Just dinit HD like you do for floppy disk.


But I did a fdisk and dinit allready and according to my tests I cannot use


dos fdisk If I boot with a dos floppy, it doesn’t >recognize my disk and
just create a ram disk as C: !!arghh!!

If you don’t need to have partitions on hard disk, you can do dinit only
(you must not do fdisk). Ok, you can try in DOS environment to type in
command prompt:
C:> fdisk /mbr
This command will write standard primary loader to hard disk. If your QNX
partition is marked as active (it’s selected by default in question “Boot
partition:”), the next reboot will boot this active partition without any
questions. And sure, DOS will not recognize your QNX partition on disk > :slight_smile:
But it should not be a problem to repair MBR (command “fdisk /mbr” is
supposed to use for repairing MBR after being under boot viruses attack > :slight_smile:> )




2) Use any primary loader which doesn’t ask about partition but just
use active partition. There are lots of them.


Maybe but where? I try to find some without success. Qnx web site talk


about /usr/free/qnx4/os/disk/utils/quietloaders.tgz >but it doesn’t exist
anymore!

There is one of them in DOS, see above how to get it > :slight_smile: > Also, you can get
such loader from Linux or any other OS. I don’t know why it’s not documented
but I believe I saw a lot of loaders in my QNX6.1 system.



3) Hex-edit the MBR (primary loader) in order to eliminate the delay.


I


believe I wrote about this hack at embedded conference.





Maybe !?!



Why not? But be very careful > :slight_smile:

Cheers,
Eduard.

\

Hi Alain,

“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3DB94239.1070203@icbt.com

Hi,
Impossible to dinit without fdisk first.

I never tried it myself. But there are lots of messages about it in
newsgroups and I believe it should work. You have to dinit whole disk, not
partition. For example, connect blank hard disk to second IDE channel of
your QNX system and

dinit -f myimage.ifs /dev/hd1

I believe, after that if you connect the hard disk to target system, the
system will boot without any questions about partitions.

I finally did a fdisk /mbr, that’s not easy but ok.

This is the way to write primary loader to hard disk in DOS environment.
Primary loader from DOS never ask about boot partition, that’s why I remind
this loader. Under QNX, you could use

fdisk -Bloadername /dev/hd0 loader

Where loadername is the filename of the primary loader. By defaul, if you
don’t use -B option, fdisk will write built-in QNX loader, this loader will
always ask for boot partition. If you don’t want that question you have to
use “quiet loader” and use -B option of fdisk.
For details, see documentation:
http://www.qnx.com/developer/docs/momentics_nc_docs/neutrino/utilities/f/fdi
sk.html

Now, the question remains, after fdisk and dinit, I still get the question
about the partition to boot and I don’t know how to remove it!

There is only one way. It’s to use primary loader which doesn’t ask
anything. Unfortunatelly, I have no personal PC (as well as many usual
stuff) at the moment, so I can’t send you example of “quiet loader” with
detailed explanations how to use it.

Best regards,
Eduard.