🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.linux
Article #54825

Re: Hardisk will not boot

#54825
From: Matthew Tippett
Date: Fri, 12 Sep 1997 00:00
99 lines
4610 bytes
Graham Philip Crowe wrote:
> 
> Try booting DOS from a floppy and then type 'fdisk /mbr', this will re-write
> the master boot record on your HDD (if you have LILO here then do not do
> this) I usually install LILO into the boot sector of the active partition.
> Also check to see if you have made the appropriate partition active.
> I had this problem on my pc after re partitioning the HDD and it was the MBR.

Sledgehammer techniques work well, but it still wont solve the complete problem.
On that system my guess is that LILO is on the MBR.  There is a major
flaw in the setup of this disk.  Looks like FIPS or Linux FDISK has had
a hand in setting this puppy up.

I think we can get this going without resorting to fdisk /MBR.

> : I just put a new hard disk in the system and transferred all the data over to
> : the new disk.

I bet you copied the system files over too.  Now the boot sector on /dev/hda2
(or /dev/hda1) doesn't know where to get the DOS system files from.

> : The problem is now that I cannot get the hardisk to boot, I can boot both Linux
> : and DOS from a floppy. During bootup floppy A: is detected, and after that C:
> : should be detected and booted from, but nothing.
> 
> : I have performed a dd to zero the first 512 bytes of the two DOS partitions.

That is probably where your problem is.  The boot sector *NEEDS* to have the
DOS boot code (installed as described below).

If you boot off a floppy with the same version of DOS/Win95/whatever on 
it you should be able to run a SYS C: which will then setup the Boot 
Sector of the active partition (DOS).

> :    Device Boot  Begin   Start     End  Blocks   Id  System
> : /dev/hda1           1       1     813  409720+   6  DOS 16-bit >=32M
> : /dev/hda2   *     814     814    1017  102816    6  DOS 16-bit >=32M
> : /dev/hda3        1018    1018    1148   66024   82  Linux swap
> : /dev/hda4        1024    1149    6232 2562336   83  Linux native
A couple of comments on your partition though.

1) DOS will only work with *ONE* primary partition.
   To have a C: and D: you need to have your drive D: in an extended partition.
   DOS IS STUPID I know, but when you got legacy you got legacy.

2) You have the smaller (100M against 400M) partition marked active.
   Depending on you LILO config that may be a problem.

So in summary.  To get you going try the following steps.   (If you 
are unsure on think I am on the wrong track don't risk your data, mail me.)
I have made a couple of assumptions.  These are..

1)	You have LILO on your MBR, with an appropriate entry to boot Linux off
	/dev/hda4 and an other (DOS) OS from /dev/hda1.

2)	Your big partition (/dev/hda1 400M) is your main DOS partition.

3)	You don't want to access /dev/hda2 from DOS. (you wont be able to
	with this setup).

The steps to recovery..... (Usual disclaimers apply :).

1)	Make sure that LILO boots linux properly.

2)	Make sure that LILO prints allows you to select the DOS
	partition to boot from.  (You won't boot but will look as though
	it's going to).

3)	Using Linux FDISK set /dev/hda1 active.

4)	Boot up with a disk of the OS as the DOS partition.

5)	Make sure that the C: that came up is the one that you want.
	It most likely will be /dev/hda1 (if you followed 3).

6)	Reboot and you should find that the dos boot works.

7)	Copy your data off /dev/hda2 (under Linux you won't see it under
	DOS).  

8)	Using *DOS* fdisk you should delete the small primary partition
	and then you should be able add an extended partition and then
	from there you can add a logical drive in the extended partition.

9)	Copy your data back to what now should be /dev/hda5.

You should now have a working system.

BEFORE YOU START:

Make sure you have read and understand what each step does.  I may have
made an assumption that is wrong.  If you don't understand a step - mail me.
When playing with your partition table you can STUFF THINGS UP REAL EASY.
Take care, and make sure you know what you are doing.

Have fun...  Good Luck...

Matthew
Technical Details
Message-ID: <34189081.26AFA9B3@dsto.defence.gov.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <5v1qrs$av$1@daveney.matra.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102983,abaecf1253958bc4
X-Google-Attributes: gid102983,public
From: Matthew Tippett <Matthew.tippett@dsto.defence.gov.au>
Subject: Re: Hardisk will not boot
Date: 1997/09/12
Message-ID: <34189081.26AFA9B3@dsto.defence.gov.au>
X-Deja-AN: 272211139
References: <5v1qrs$av$1@daveney.matra.com.au>
To: Graham Daveney <graham@daveney.matra.com.au>, gpc01@wraith.cs.uow.edu.au
Organization: ITD/DSTO 
Newsgroups: aus.computers.linux