*BSD News Article 17872


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!agate!doc.ic.ac.uk!uknet!strath-cs!cs.stir.ac.uk!lorne.stir.ac.uk!bmb1
From: bmb1@stirling.ac.uk (Mr Brian M Bullen)
Newsgroups: comp.os.386bsd.questions
Subject: Re: NetBSD and Maxtor harddrive.
Date: 2 Jul 1993 17:23:38 GMT
Organization: University of Stirling
Lines: 103
Message-ID: <211quq$qv1@lorne.stir.ac.uk>
References: <C9Houq.Ds9@cs.psu.edu>
NNTP-Posting-Host: lorne.stir.ac.uk
X-Newsreader: TIN [version 1.1 PL9]

God(someday (sun@champs.physci.psu.edu) wrote:
   ^        ^                         ^
		on an off day and mismatched his parentheses !
		not only that champs.physci.psu.edu does not receive mail ?

anyway, a valid question which was

: I understand that NetBSD cannot handle disk geometry translations, so I called up
: maxtor and asked about my disk. It turns out that my disk geometry is translated.
: But, it has five(!) zones, each with a different sec/track!

Here is a very useful posting:

From: barrett@lucy.ee.und.ac.za (Alan Barrett)
Newsgroups: comp.os.386bsd.questions
Subject: Re: [NetBSD] installing with DOS
Message-ID: <1uvm7l$mdt@lucy.ee.und.ac.za>
Date: 7 Jun 93 19:18:13 GMT

This sort of problem happens when you try to install NetBSD in a
partition of a disk whose controller does geometry translation.  I have
not had time to find the bug that causes the problem.  One option is to
disable the geometry translation:  Use ide_conf to find the true
geometry, use the CMOS setup program to tell your BIOS about the true
geometry, and reformat everything.  I successfully did that on one of
my systems.

If you are not able to, or do not wish to, disable the geometry
translation then the following workaround might work for you.  This
requires that the disk have unused space on {cylinder 0, head 0}, from
sector 2 to sector 16.  Almost all DOS disks that I have ever seen
satisfy this condition, because they usually start the DOS partition in
{cylinder 0, head 0, sector 1}, leaving most of {cylinder 0, head 0}
unused apart from the partition sector in {cylinder 0, head 0, sector
1}.  However, many partitioning programs like to hide this fact from
you, and pretend that the DOS partition starts at the front of the
disk; don't believe them until you have checked with a raw disk
editor.

0.  Make sure you have adequate backups.

1.  Use a partition sector editor (fdisk, pfdisk, os-bs, booteasy,
    norton utilities, whatever) to mark the partition that you want
    for NetBSD as bootable with type 0xA5 (decimal 165).

2.  Halt the system.  Boot the NetBSD kernel copy floppy.  When it asks
    you to insert the floppy for the root file system, switch to the
    Install-1 floppy and press enter.

3.  Answer all the installation prompts, using numbers based on the
    translated geometry.  When it asks if you really want to label the
    disk, be brave and say yes.

4.  Halt the system.  Boot to DOS.  Run a disk editor program, such as
    norton utilities.

5.1.  Verify that the partition sector in {cyl 0, head 0, sec 1} is
      undamaged.  Verify that the disklabel program run as part of the
      NetBSD install has written the NetBSD primary boot block to
      {cylinder xx, head 0, sector 1}, written the disk label to {cyl
      xx, head 0, sec 2}, and written the secondary boot program to
      {cyl xx, head 0, sectors 3 to 16}.  ("xx" represents the
      translated cylinder number you chose for the start of the NetBSD
      partiton.  You did choose to start on a cylinder boundary, I
      hope.)

5.2.  Verify that the space in {cyl 0, head 0, sectors 2 to 16} is
      still available.  Copy the fifteen sectors containing the NetBSD
      disk label and secondary boot block from {cyl xx, head 0, sectors
      2 to 16} to {cyl 0, head 0, sectors 2 to 16}.

5.3.  Edit the partition table in {cyl 0, head 0, sec 1}.  Change the
      system ID of the NetBSD partition from 0xA5 (decimal 165) to
      something else (I use 0xA4, decimal 164), but keep it flagged as
      bootable.  This will let you boot to the NetBSD primary boot
      block.

5.4.  Edit one of the previously unused partition table
      entries (I hope you have one), to contain the following
      information: {sys id = 0xA5, boot flag = 0, start
      cylinder/head/sector = 0/0/1, end cylinder/head/sector =
      anything, initial offset = 0, total size = anything}.  
      This will tell the NetBSD primary boot block, or a NetBSD
      system booted from a floppy, that it should look for the
      NetBSD disk label in {cyl 0, head 0, sec 2}.

6.  Halt the system.  Boot the NetBSD kernel copy floppy.  When it asks
    you to insert the floppy for the root file system, just press enter
    without changing disks.

7.  Copy the kernel, and proceed with the rest of the installation as
    per the instructions provided with NetBSD.  It should now work
    because of the trickery with the partition table etc.

--apb
Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
RFC822: barrett@ee.und.ac.za

P>S>
I used the install1 floppy to run fdisk to set up the initial partition 
table, not having any norton utilities to hand. 

Brian.