Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Development Computer Stopped Booting - Newbie in Trouble: (4 Items)
   
Development Computer Stopped Booting - Newbie in Trouble  
As it's ON all the time - not sure when it stopped working (as it was running until reboot).
It may have been me - I'm building a new QNX station on newer hardware, so we can backup (current system has no way to 
create backups) - and I may have moved something?? Pretty sure I didn't delete.

We tried a reboot when the embedded QNX build onto a CF card failed to boot.

Now, upon reboot of the development system - I see the following:
Press ESC for alternate OS.
(No S, or D, or '?')
When I press ESC - nothing happens.

I finally created a working boot floppy, which loads a .boot AOK, and Fsys.

I then manually type in "Fsys.eide fsys -Ndsk0 -no=hd0. -n5=cd0. eide -a1f0 -i14"
This is what I recently captured from the /boot/build/hard.1.425 file on this system, and also reflects this systems 
sysinit.1 - in the #Image: /bin/Fsys.eide fsys -Ndsk0 -n0=hd0. -n5=cd0. eide -a1f0 -i14 line.
Followed by #Image: /bin/mount -p /dev/hd0.0 /dev/hd0.0t78 /.

This finds the HD and seems to correctly ID it, and the hd0.0 is now in /dev.

But, when I run 'mount -p /dev/hd0.0' - I get the following error:
cannot mount partition 63 (03fh) on /dev/hs0.0:
error No SPace Left on Device
disk /dev/hd0.0 has 12594960 sectors
partition (29343793..1960021297) does not fit within disk.

It DOES create a partition /dev/hd0.0t117 - which IS one of the four original partitions.
The original partitions are:
QNX Type 77 1gb
QNY Type 78 1gb (this is the active boot partition)
QNZ Type 79 11mb
nonQNX Type 117 ?

So I did a bunch of research online, then tried the following after booting with my floppy, and running Fsys.eide shown 
above.
fdisk /dev/hd0.0 loader (no errors, so I presume it did what it should)
try 'mount -p /dev/hd0.0' again - same error.
reboot
dcheck -v /dev/hd0.0 (reports disk is OK)
dinit -hb /dev/hd0.0 (no errors)
reboot
try to run chkfsys -v -f /dev/hs0.0 - reports 'can't find device for /dev/hd0.0. nothing to check (now I'm not entirely 
sure I ran the Fsys.eide?).
try to mount -p /dev/hd0.0 again - same error again.

I haven't run 'dinit -hr /dev/hd0.0' - manual caution using -r, and it also sounded like a fix if the filesystem MOUNT 
didn't work (vs the partition mount).
I also started reading up on SPATCH - sounds scary.

Any other suggestions I can try to get this booting again?

We have no one here anymore who knows about QNX, and this is our only development system (well, the one I'm rebuilding -
 but it fails to create working embedded CF cards also).

Thx
Cross posted to openqnx.com and comp.os.qnx
Re: Development Computer Stopped Booting - Newbie in Trouble  
Hi,

It seems that your partition table is damaged.
First of all before any further experiments create a reserve copy of
your CF card. Connect your CF to any other machine with QNX or Linux and
perform following command:

Backup:
dd if=/dev/hdN of=cf_reserve_copy.img       
(Ensure that you have enough space to store a reserve copy)

Restore command:
dd if=cf_reserve_copy.img of=/dev/hdN       where /dev/hdN is your CF

Check output:
# fdisk /dev/hd0.0 show
# fdisk /dev/hd0.0 info

If partition table is damaged and you know exact size of original
partitions you can manually create correct partition table:
- boot from floppy
- run Fsys.eide
- erase MBR:
   # i=0; while [ $i -lt 512 ]; do echo -ne '\0' >> /zero.dat; let
i=$i+1; done
   # dd   if=/zero.dat of=/dev/hd0.0 bs=512 count=1
- restart Fsys.eide
- create partitions
   # fdisk /dev/hd0.0
- mark bootable partition
   # fdisk /dev/hd0.0 boot -s2
- write loader:
   # fdisk /dev/hd0.0 loader

I guess this can help if you are lucky enough.
Another way is to use special programs that allow to restore partition
table for example gpart utility in Linux (it supports QNX4 FS if I am
not mistaken).


Regards,
Pavel

> As it's ON all the time - not sure when it stopped working (as it was running until reboot).
> It may have been me - I'm building a new QNX station on newer hardware, so we can backup (current system has no way to
 create backups) - and I may have moved something?? Pretty sure I didn't delete.
>
> We tried a reboot when the embedded QNX build onto a CF card failed to boot.
>
> Now, upon reboot of the development system - I see the following:
> Press ESC for alternate OS.
> (No S, or D, or '?')
> When I press ESC - nothing happens.
>
> I finally created a working boot floppy, which loads a .boot AOK, and Fsys.
>
> I then manually type in "Fsys.eide fsys -Ndsk0 -no=hd0. -n5=cd0. eide -a1f0 -i14"
> This is what I recently captured from the /boot/build/hard.1.425 file on this system, and also reflects this systems 
sysinit.1 - in the #Image: /bin/Fsys.eide fsys -Ndsk0 -n0=hd0. -n5=cd0. eide -a1f0 -i14 line.
> Followed by #Image: /bin/mount -p /dev/hd0.0 /dev/hd0.0t78 /.
>
> This finds the HD and seems to correctly ID it, and the hd0.0 is now in /dev.
>
> But, when I run 'mount -p /dev/hd0.0' - I get the following error:
> cannot mount partition 63 (03fh) on /dev/hs0.0:
> error No SPace Left on Device
> disk /dev/hd0.0 has 12594960 sectors
> partition (29343793..1960021297) does not fit within disk.
>
> It DOES create a partition /dev/hd0.0t117 - which IS one of the four original partitions.
> The original partitions are:
> QNX Type 77 1gb
> QNY Type 78 1gb (this is the active boot partition)
> QNZ Type 79 11mb
> nonQNX Type 117 ?
>
> So I did a bunch of research online, then tried the following after booting with my floppy, and running Fsys.eide 
shown above.
> fdisk /dev/hd0.0 loader (no errors, so I presume it did what it should)
> try 'mount -p /dev/hd0.0' again - same error.
> reboot
> dcheck -v /dev/hd0.0 (reports disk is OK)
> dinit -hb /dev/hd0.0 (no errors)
> reboot
> try to run chkfsys -v -f /dev/hs0.0 - reports 'can't find device for /dev/hd0.0. nothing to check (now I'm not 
entirely sure I ran the Fsys.eide?).
> try to mount -p /dev/hd0.0 again - same error again.
>
> I haven't run 'dinit -hr /dev/hd0.0' - manual caution using -r, and it also sounded like a fix if the filesystem MOUNT
 didn't work (vs the partition mount).
> I also started reading up on SPATCH - sounds scary.
>
> Any other suggestions I can try to get this booting again?
>
> We have no one here anymore who knows about QNX, and this is our only development system (well, the one I'm rebuilding
 - but it fails to create working embedded CF cards also).
>
>...
View Full Message
Re: Development Computer Stopped Booting - Newbie in Trouble  
Thanks for the input!

Unfortunately, I don't have a record of the exact partition values - didn't run into that tip until after the crash.

Attached are the fdisk show and info results.
I don't think the partition info shown is accurate, as the values aren't very close to what I had recorded.
Any input if you look at these is appreciated.

I'm going to take a look at the gpart utility - thx.

If that doesn't work, I think I'll try to slave this HD in the new system I am building - just to try and get everything
 backed up somewhere.

Then, I'll try the partition repair as you've laid out - again, thx.
Attachment: Image fdisk_showandinfo_aftcrash.jpg 984.64 KB
Re: Development Computer Stopped Booting - Newbie in Trouble  
Hi,

The fdisk output shows that you replaced primary boot loader and 
partition table by secondary OS loader.
By the dinit -hb /dev/hd0.0 command you've wrote secondary loader to the
MBR.
When you use dinit on a partitioned hard disk you should always specify
a partition (dinit -h /dev/hd0.0t77).

Any way first of all you should restore your partition table and I think
you are on the right way.


Regards,
Pavel

> Thanks for the input!
>
> Unfortunately, I don't have a record of the exact partition values - didn't run into that tip until after the crash.
>
> Attached are the fdisk show and info results.
> I don't think the partition info shown is accurate, as the values aren't very close to what I had recorded.
> Any input if you look at these is appreciated.
>
> I'm going to take a look at the gpart utility - thx.
>
> If that doesn't work, I think I'll try to slave this HD in the new system I am building - just to try and get 
everything backed up somewhere.
>
> Then, I'll try the partition repair as you've laid out - again, thx.
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post100601
> To cancel your subscription to this discussion, please e-mail general-qnx4-unsubscribe@community.qnx.com