Help I've lost my boot loader

Hi folks,

Last week I installed the QNX 4.25d version on my laptop and I have now
lost my
partition boot loader, root block, and the bitmap block. This did not happen
when I
loaded the upgrade, but when I ran a ‘chkfsys -u /’ and this gave me an
error message
(sorry I did not write it down) that is said was fixable. I told it to go
ahead and fix the
error.

Then I typed in ‘ls’ to check the root directory and the system came back
with ‘ls not
found’. I had access to nothing. Next I booted a QNX floppy, mounted the
hard drive,
and determined the lose.

Question is how do I get it back! I would like to avoid having to reformat
the partition
as there are files I really need to save. Any help will be greatly
appreciated, and thanks
in advance for helping.

Ivan Bannon
RJG Inc.

“Ivan Bannon” <ivan.bannon@rjginc.com> wrote in message
news:8ntu9d$lfr$1@inn.qnx.com

Hi folks,

Last week I installed the QNX 4.25d version on my laptop and I have now
lost my
partition boot loader, root block, and the bitmap block. This did not
happen
when I
loaded the upgrade, but when I ran a ‘chkfsys -u /’ and this gave me an
error message
(sorry I did not write it down) that is said was fixable. I told it to go
ahead and fix the
error.

Then I typed in ‘ls’ to check the root directory and the system came
back
with ‘ls not
found’. I had access to nothing. Next I booted a QNX floppy, mounted the
hard drive,
and determined the lose.

Question is how do I get it back! I would like to avoid having to
reformat
the partition
as there are files I really need to save. Any help will be greatly
appreciated, and thanks
in advance for helping.

If you have qnx partition: you will need to reinstall qnx boot manager, and

update the root sector.
There are two options for that, one updates the system files (.boot,
…bitmap) - that is what you probably need
and other makes tuning the partition to it’s hard disk position (this is
usefull when you have partition image and
need to boot from it). But i’m using NTO so i can’t remember exactly them.

Ivan Bannon
RJG Inc.

Solved my problem

First I booted QNX from a floppy drive.
Second I mounted the hard drive with ‘mount -p /dev/hd0 /dev/hd0t77 /hd’
I ran ‘dinit -hr /dev/hd0’ and ‘dinit -hb /dev/hd0’ to reload the partition
boot loader and the root block.
Then I ran ‘spatch /dev/hd0t77’. With spatch I located the beginning of the
the root directory by
looking for the I LOVE QNX signature (2e 00 49 03 51 4e 58), (M)arked that
block and located
the next directory entry, again by searching for the signature pattern,
(M)arked there and then
saved the blocks as a Directory in the /hd/lost+found directory.
Then exited spatch and ran ‘chkfsys -u /dev/hd0t77’. chkfsys located all
the entries in the /hd/
lost+found’ directory, which turned out to be the complete original
directory structure prior to
my messing it up.
I then moved the directories back under the new root directory and
re-booted. Everything is
back and working fine. Thanks again.

Ivan



Ivan Bannon <ivan.bannon@rjginc.com> wrote in message
news:8ntu9d$lfr$1@inn.qnx.com

Hi folks,

Last week I installed the QNX 4.25d version on my laptop and I have now
lost my
partition boot loader, root block, and the bitmap block. This did not
happen
when I
loaded the upgrade, but when I ran a ‘chkfsys -u /’ and this gave me an
error message
(sorry I did not write it down) that is said was fixable. I told it to go
ahead and fix the
error.

Then I typed in ‘ls’ to check the root directory and the system came
back
with ‘ls not
found’. I had access to nothing. Next I booted a QNX floppy, mounted the
hard drive,
and determined the lose.

Question is how do I get it back! I would like to avoid having to
reformat
the partition
as there are files I really need to save. Any help will be greatly
appreciated, and thanks
in advance for helping.

Ivan Bannon
RJG Inc.

Here is how you might try to recover.

  1. Boot off of a floppy
  2. Start the Fsys driver, maybe:

Fsys.eide &

  1. Use fdisk and see if your partition is
    still there:

fdisk /dev/hd0

If not, put it back. If you can’t remember where it
started, you could use spatch and look for
QNX4FS at the begining of a sector.

  1. Once your partition is back, mount it

mount -p /dev/hd0

  1. Try mounting the partition, as in

mount /dev/hd0t77 /hd

If the partition is there, you might
need to use fdisk to put the QNX loader
back on the disk, but otherwise you should
be ok. If you find that the partition is
corrupted, you can do the following.

dinit -hr /dev/hd0t77

The r causes the root directory to be initialized.
Now you want to find an link back the missing
directories, such as /usr and /home. You will
have to read up on how this can be done with
spatch.


Ivan Bannon <ivan.bannon@rjginc.com> wrote:

Last week I installed the QNX 4.25d version on my laptop and I have now
lost my
partition boot loader, root block, and the bitmap block. This did not happen
when I
loaded the upgrade, but when I ran a ‘chkfsys -u /’ and this gave me an
error message
(sorry I did not write it down) that is said was fixable. I told it to go
ahead and fix the
error.

Then I typed in ‘ls’ to check the root directory and the system came back
with ‘ls not
found’. I had access to nothing. Next I booted a QNX floppy, mounted the
hard drive,
and determined the lose.

Question is how do I get it back! I would like to avoid having to reformat
the partition
as there are files I really need to save. Any help will be greatly
appreciated, and thanks
in advance for helping.

Ivan Bannon
RJG Inc.


Mitchell Schoenbrun --------- maschoen@pobox.com