[comp.sys.ibm.pc] No hard disk recognition---HELP!!

dmc@ntcsd1.UUCP (David Clemens) (08/07/89)

   Something really strange happened yesterday. But first some background...

   I am working with a PS/2 Model 80 computer running Xenix 386. The system 
has a 115M hard disk of which 20M is in a DOS partition.

   Yesterday, I had to reinstall the Xenix operating system(don't ask why, it 
was my mistake), as well as the drivers for our peripheral equipment(CD-ROM 
drives, Exelan card, and Computone card). Anyway, after installing the 
Computone card first, I rebooted the system to test it before installing the 
rest of the equipment. However, I forgot to take out the disk that had the
computone drivers on it.

   When the computer tried to reboot, it saw the disk in the drive and tried
to boot off of it. This apparently accomplished nothing, but when I took
the disk out and again tried to reboot, the computer came up in IBM BASIC.
(IBM BASIC boots up from memory when a the computer has no other operating
system installed)

   When I use the PS/2 reference disk, it shows the configuration to be the
same as it was before the problem and when I boot off of a DOS disk, I can
still access the DOS partition on the hard disk. Without the DOS floppy,
however, it still boots into BASIC.

   Does anyone out there know what is wrong with this system? It has been 
suggested that something wrote over the boot sectors on the HD, so I backed
up the DOS partition and reinstalled DOS there using the Select command as
if I was installing it for the first time on a new HD. Alas, no dice there.

   Can anyone out there help me?
   Mail me any suggestions, and I'll post the first one that works.

                         Thanx in advance...
                                  David Clemens

Disclaimer: The above ideas were the result of the head-on collision of two
       apparently random thought processes in the lower portion of my brain.
-----------------------------------------------------------------------------
|  I'm not weird, I'm normal...        | David Clemens                      |
|  The rest of the world is weird.     | {backbone}!mcnc!rti!ntcsd1!dmc     |
-----------------------------------------------------------------------------

davis@clocs.cs.unc.edu (Mark Davis) (08/08/89)

In article <451@ntcsd1.UUCP> dmc@ntcsd1.UUCP (David Clemens) writes:
> ...
>   I am working with a PS/2 Model 80 computer running Xenix 386. The system 
>has a 115M hard disk of which 20M is in a DOS partition.
> ... when I took
>the disk out and again tried to reboot, the computer came up in IBM BASIC.
>(IBM BASIC boots up from memory when a the computer has no other operating
>system installed)

Apparently David's spool directory is full because mail bounces with
	"mail: cannot append to /usr/mail/dmc"
but this may be of general interest anyway, so I will post:

It sounds to me like the "master boot record" on your hard disk got
blown away.  The master boot record is on cylinder 0, head 0, sector 1
of the hard disk.  It contains (amoung other things), the name of the
operating system that you used to partition the disk, some boot code
(that nobody explains) and the partition table.

When the computer boots, it reads the master boot record, does some
magic with the boot code and interprets the partition table to find out
where there is an OS to boot from.  Then it goes to that partition, and
reads the first record that boots the rest of the OS.

If you boot DOS from a floppy, some but not all of the information in
that record must be used.  For sure you need the partition table.  I
think DOS actually gets most of its geometry information from the BIOS
tables (some interrupt vectors set by the BIOS ROM boot code), so it
may not need anything else in that record.

It sounds to me like your Computone disk blew away part, but not all of the
master boot record.  To restore it, there are two possibilities:
	1. run FDISK again (which will destroy data on the disk)
				OR
	2. Get a good hard disk recovery program and try to fix the
	   master boot record.

If there is important data on the disk, you really have to try 2, but
it will be very time consuming for you to figure out what you are doing
and then fix it.  I would recommend that you start by getting the Paul
Mace Hard Disk Data Recovery book.  You will also benefit from using a
utility like Norton's, but I believe you may be able to fix it with
debug.

Based on the information that you posted, I would estimate that getting
the information and programs, learning enough and then doing the fix
would require about 6 man hours.  If the data is not critical, it must
be possible to Nuke the disk (run FDISK) and re-install everything from
the ground up in less time than that.

I live in Durham (489-0157) and work in Chapel Hill (962-1739), so feel
free to call if you have further questions.

Hope this helps - Mark (davis@cs.unc.edu or uunet!mcnc!davis)

jcmorris@mbunix.mitre.org (Joseph C. Morris) (08/09/89)

In article <451@ntcsd1.UUCP> dmc@ntcsd1.UUCP (David Clemens) writes:
>
> [hard disk won't boot -- system enters cassette BASIC]

Have you checked the possibility that the partition table on the fixed
disk (cylinder 0,head 0, sector 1) hasn't been changed?  If you somehow
zapped the table to mark a non-bootable partition as bootable, the BIOS
boot code would reject the disk and go to C-BASIC instead.  If you are
able to reach the files on the disk by booting from a diskette, the
other data in the partition table is probably valid.

Another possibility is that you've clobbered the boot sector for the
DOS partition (absolute cylinder 0, head 1, sector 1; this is the first
sector of the DOS partition).  If the 55AA signature is missing the disk
is nonbootable.  This doesn't sound likely, however, since you said you've
re-installed DOS on the disk.  (The c/h/s=0/1/1 is valid only if the
DOS partition is the first on the disk.)

Use Norton Utilities to inspect absolute c/h/s=0/0/1 (the partition table)
and absolute 0/1/1 (the boot record for the first partition) to see if
they're contaminated; NU allows you to edit the partition table and set
the boot flag as appropriate.

Good luck.

thurm@shorty.CS.WISC.EDU (Matthew Thurmaier) (08/09/89)

One of the things that we teach in SCO Authorized classes is how to recover
from crashes like this.

There are several things that you may want to try:
1.) If the hardware isn't being seen by anything, then your configuration is
	fouled.  If I remember correctly, this is NOT your case though.

2.) If the system tries to boot off of the hard disk but can't find the magical
	boot program spoken of earlier by 9101@thorin.cs.unc.edu, then you can
	place your N1 floppy in the floppy drive and type "hd(40)/xenix" at the
	boot
	:
	prompt.  This will boot from the floppy, but load xenix from the hard
	disk.

	if it can't find /xenix, try "/xenix.old" and "/usr/sys/conf/xenix-".

3.) If it boots, but can't find a xenix, then you can boot off of N1, and
	press the DELETE key when it asks you if you want to continue.  Something
	that most people don't understand is that there is nothing really magic
	about the installation disk N1.  You still have XENIX running, but you
	have a limited set of commands.  Things like 'ls' aren't there, but
	who needs them when you have "echo *".  'cat' can be replaced with an
	appropriate 'dd' command. So...

	You now have a prompt of "<Install> ".  try the following:

	fsck -n /dev/rhd0root

	You may need to proceed the 'fsck' w/ a '/bin/' or '/etc/', it is late
	and I can't remember if you path is set up by then, and if not, where
	fsck is kept.  Anyway, the '-n' says "DON'T MAKE ANY CHANGES".  This
	will prevent fsck from clobering your potentially corrupt but salvagable
	system.  If you are really gutsy, leave of the -n.  But, don't say yes
	to any questions asking you if it's ok to clear an I-NODE of 400 or less.
	400 is actually just a rule I came up with a long time ago.  It works for
	me.

	If the system fsck's, then mount it with:

	mount /dev/hd0root /mnt

	Then copy over your xenix with:

	cp /xenix /mnt/xenix

	Then you may have to brand the /mnt/xenix with your serial number.  Look
	up brand in either (C), (M), or (ADM).  Again, all commands may need a
	"/etc" or "/bin" in front of them.

	At this point, you should have a kernel.

4.) If you boot block is bad on your disk, then you will have to either use
	'dd' to put one there by hand (again, the /boot program is on your N1)
	or use the 'mkfs' command with a prototype file, which precludes you 
	from getting any valuable data off of the root filesystem, since you
	just re-made it.


A word to everyone about this lesson, make yourselves a bootable-rootable
floppy disk with your already-serialized/branded kernel and all of your 
drivers (like cartridge tape [hint hint]) and devices (like /dev/rct0) and
all of your favorite utilities (like vi and a truncated /etc/termcap) while
you have a working system.  You can do this with "mkdev fd".

Good Luck.  I will be in my office most of tomorrow and will be pleased to
answer questions then.


Matthew.
Snail Mail:                                 E Mail:
Matthew J. Thurmaier                ...!{allegra,harvard,seismo}!shorty!matt
The Computer Classroom              matt@shorty.wisc.edu
6701 Seybold Road, Ste. 122
Madison, WI 53719
(608) 271-2171
                                  "why am I ALWAYS going somewhere?" >>-matt-->