OpenQNX :: The QNX Community Portal

May 13, 2008 - 10:35 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 68 unlogged users and 1 registered user 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
SergeyProgrammer
Post subject: disk loader - getting ms-dos "fdisk /mbr" effect  PostPosted: Oct 15, 2005 - 08:32 AM
Active Member


Joined: Oct 17, 2003
Posts: 30

Hello, all,


I'm trying to make my boot process as fast as possible, so I want to remove "Boot partition 1?" messsage (mainly, the delay for this message). Shortly speaking, I want to have pc2 (second stage) loader to be run with no prompt (like it is for floppy diskettes).
I tried to write with dloader pc1-flop loader with no effect. The effect I want to get can be provided with ms-dos fdisk with /mbr key, the problem is that I can't use ms-dos fdisk in my machine (no floppy, no HDD, just QNX and DiskOnChip).
Imho, I need some kind of fisrt-stage loader, which loads an active partition (the only partition in my case) without a prompt.

So can you help me with information about fast loading?

Thanks in any case.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
SergeyProgrammer
Post subject: RE: disk loader - getting ms-dos "fdisk /mbr" effe  PostPosted: Oct 15, 2005 - 12:37 PM
Active Member


Joined: Oct 17, 2003
Posts: 30

Thanks to all once more, I solved the problem. I needed DOS quiet loader, so I got it from another HDD by
typing (under QNX 6.2.1):
#!/bin/sh
#Script: get_dos_ipl.sh
# Note! HDD0 must have default MS-DOS loader (like after fdisk /mbr) for proper ipl grabbing
dd if=/dev/hd0 of=./ipl-diskpc1-dos count=1 bs=446
#end of get_dos_ipl.sh

After that I needed to set this first stage ipl. But I found quiet second stage ipl as a result of my research (see web-page Eduard Kromskoy, http://ed1k.qnx.org.ru/loaders.html).
In the end, I made HDD bootstrap initialization script:
#!/bin/sh
# Script: set_dos_and_fast_ipl.sh
# Script for writing MS-DOS MBR and fast and quiet QNX loader
# OS: QNX 6.x
#
# Copyrights:
# * (c) 2005 Sergey P Sobolev, mailto: sobolevsp@mail.ru
# Note! You can use this script "AS IS". It works nice on my system, but I don't promise anything! Smile
# * ipl-diskpc2-quiet is written by Eduard Kromskoy, http://ed1k.qnx.org.ru/loaders.html
#
# Set first stage bootstrap (partition selector)
dloader /dev/hd0 ./ipl-diskpc1-dos
# Set second stage bootstrap (system loader)
# Note: for .altboot you should press and hold Shift key
dloader /dev/hd0t79 ./ipl-diskpc2-quiet
#end of script set_dos_and_fast_ipl.sh


Note: It is not a bad idea to back up your current ipls in this way (tested):
#!/bin/sh
# Script: get_old_ipl.sh
# Note! HDD0 must have default MS-DOS loader (like after fdisk /mbr) for proper ipl grabbing
dd if=/dev/hd0 of=./ipl-diskpc1-old count=1 bs=446
dd if=/dev/hd0t79 of=./ipl-diskpc2-old count=1 bs=510
#end of get_old_ipl.sh

And script for restoring:
#!/bin/sh
# Script: set_old_ipl.sh
dloader /dev/hd0 ./ipl-diskpc1-old
# Set second stage bootstrap (system loader)
# Note: for .altboot you should press and hold Shift key
dloader /dev/hd0t79 ./ipl-diskpc2-old
# end of script set_old_ipl.sh

PS: Please, be very careful with using these scripts - they changes your HDD MBR, so it is theoretically may cause loss all of your data!

Regards,
SergeyProgrammer
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
SmeeAgain
Post subject:   PostPosted: Oct 17, 2005 - 05:59 AM
Senior Member


Joined: Aug 12, 2004
Posts: 136
Location: Germany
Although you already solved your problem,
this article by Rob Krten explains how to modify the QNX bootloader(s) to boot faster (i.e. without delay).
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
ed1k
Post subject:   PostPosted: Oct 19, 2005 - 02:11 AM
QNX Master


Joined: Jul 23, 2002
Posts: 94

That's a good article for people who want/needs to go with stuff out of box (even if heavily spatched). The main difference of my loaders is that they use multisector read, i.e read as many sectors as possible in one int13 call. They work faster with flash ATA compliant drives and an old PC. (In addition to the speed up by eliminating keyboard input delay which is the same for the two approaches). But no warranty whatsoever. If someone (or QSSL) is interested I can send source code to QSS, they will test it and sell it with their usual warranty Smile Nobody asked for that yet.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
SergeyProgrammer
Post subject:   PostPosted: Oct 20, 2005 - 07:37 PM
Active Member


Joined: Oct 17, 2003
Posts: 30

The only problem I've faced with while using ed1k's IPL was that it can't work with old BIOS exactly because of int13 extension using.
With the help of my colleague I had got fast IPL, which is based on old QNX second stage IPL (no delay for input, no messages, ESC is used for switching). It is available on request too. Wink
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
SergeyProgrammer
Post subject:   PostPosted: Oct 22, 2005 - 07:31 AM
Active Member


Joined: Oct 17, 2003
Posts: 30

When I said "can't work with old BIOSes" I forgot to say that it couldn't work with some modern embedded systems too, f.e. Ampro CoreModule CM2-420 (single board computer, x86 arc.)
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
SergeyProgrammer
Post subject: Now loaders are available at sourceforge  PostPosted: Apr 12, 2008 - 05:17 PM
Active Member


Joined: Oct 17, 2003
Posts: 30

Since there was some interest for the loaders and Eduard's page changed location to unknown, I created a project at Sourceforge and put the loaders there:
http://qnx6ipl.wiki.sourceforge.net
http://qnx6ipl.cvs.sourceforge.net/qnx6ipl/qnx6ipl
 
 View user's profile Send private message Send e-mail  
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.