Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 1999 01:57:35 +0200 (SAT)
From:      Robert Nordier <rnordier@nordier.com>
To:        asami@FreeBSD.ORG (Satoshi Asami)
Cc:        bde@zeta.org.au, freebsd-current@FreeBSD.ORG
Subject:   Re: How to Build & Run ELF Kernel
Message-ID:  <199901062357.BAA03690@ceia.nordier.com>
In-Reply-To: <199901062306.PAA47473@silvia.hip.berkeley.edu> from Satoshi Asami at "Jan 6, 99 03:06:52 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Satoshi Asami wrote:

>  * disklabel -B -b /boot/boot1 -s /boot/boot2 <disk>
> 
> I did this and one of my machines have trouble reading the
> bootblocks.  It just says "read error"  after OS-BS selects the disk.
> 
> I tried it with
> 
>   disklabel -B /dev/rsd0s2c
>   disklabel -B -b sd0s2
>   disklabel -B -b /boot/boot1 -s /boot/boot2 sd0s2
> 
> etc.  It's always the same, disklabel exits without an error but it
> fails during reboot.
> 
> Any ideas?

The new boot1 will report a "Read error" on any of the following:

    o  Can't get the disk geometry from the BIOS
    o  The disk geometry would cause division by zero
    o  The derived cylinder number exceeds 1023
    o  BIOS fails to read a sector on five consecutive attempts

I'd check particularly whether the FreeBSD slice entry is 100%
correct.

The old bootblocks use the CHS value (257/1/1 below) to determine
the slice offset, whereas the new bootblocks use the start value
(4128768 below) and the disk geometry reported by the BIOS to derive
a CHS:

    [Sample fdisk output]
    sysid 165,(FreeBSD/NetBSD/386BSD)
        start 4128768, size 4305357 (2102 Meg), flag 80 (active)
            beg: cyl 257/ sector 1/ head 1;
            end: cyl 524/ sector 63/ head 254

    sector = 4128768 % 63 + 1    = 1
    head   = 4128768 / 63 % 255  = 1
    cyl    = 4128768 / 63 / 255  = 257

-- 
Robert Nordier

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901062357.BAA03690>