Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Mar 2003 16:55:32 EST
From:      BelletJr@aol.com
To:        freebsd-current@FreeBSD.org
Subject:   Can't boot from hard drive (5.0)
Message-ID:  <65.cf505b7.2bab92d4@aol.com>

next in thread | raw e-mail | index | archive | help
Hello!

Here is a summary of a thread I started on comp.unix.bsd.freebsd.misc to no 
avail. I hope someone will be able to give me some advice here

I've installed FreeBSD 5.0 on the second disk of my PC where I had an old 4.5 
working.
Unfortunately the install process failed to write the MBR correctly and with 
the current BootMgr, I can not boot on the FreeBSD disk.

I've booted with a floppy and re-run sysinstall. I've tried to mark ad2s2 as 
bootable but just got:
ERROR: Unable to write data to disk ad2!
Disk partition write returned an error status!

I think it is related to what is written in the "FreeBSD
 5.0-RELEASE Errata" about disklabel -B:

"The geom(4)-based disk
 partitioning code in the kernel will not allow an open
 partition to be overwritten. This usually prevents the use
 of disklabel -B to update the boot
 blocks on a disk because the a partition overlaps the space where the boot 
blocks are
 stored. A suggested workaround is to boot from an alternate
 disk, a CDROM, or a fixit floppy."

But the workaround does not seem to be efficient with my box. I don't get the 
previous error message when I  mark the second disk as "bootable" with 
sysinstall/fdisk, but I still can not boot from it.

The output of fdisk ad2 is as follows: 
-----------------------------------------------------------------
>******* Working on device /dev/ad2 *******
>parameters extracted from in-core disklabel are:
>cylinders=19852 heads=16 sectors/track=63 (1008 blks/cyl)
>
>Figures below won't work with BIOS for partitions not in cyl 1
>parameters to be used for BIOS calculations are:
>cylinders=19852 heads=16 sectors/track=63 (1008 blks/cyl)
>
>Media sector size is 512
>Warning: BIOS sector numbering starts with sector 1
>Information from DOS bootblock is:
>The data for partition 1 is:
>sysid 5 (0x05),(Extended DOS)
>    start 16065, size 4176900 (2039 Meg), flag 0
>   beg: cyl 15/ head 15/ sector 1;
>   end: cyl 1023/ head 10/ sector 63
>The data for partition 2 is:
>sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
>    start 4192965, size 15807960 (7718 Meg), flag 80 (active)
>   beg: cyl 1023/ head 255/ sector 63;
>   end: cyl 1023/ head 2/ sector 63
>The data for partition 3 is:
><UNUSED>
>The data for partition 4 is:
><UNUSED>
-----------------------------------------------------------------

The problem seems that the number of cylinders is not equal to the one
displayed in the BIOS setup: 16320.
If I force this geometry value with fdisk via sysinstall, will I have to 
reinstall completely the system?

Here is the output from boot0cfg -v ad0:
-----------------------------------------------------------------
>#   flag     start chs   type       end chs       offset         size
>1   0x80      0:  1: 1   0x06    618: 63:63           63      2495745
>
>version=1.0  drive=0x80  mask=0xf  ticks=182
>options=nopacket,update,nosetdrv
>default_selection=F1 (Slice 1)
-----------------------------------------------------------------

and the output from boot0cfg -v ad2:
-----------------------------------------------------------------
>#   flag     start chs   type       end chs       offset         size
>1   0x00     15: 15: 1   0x05   1023: 10:63        16065      4176900
>2   0x80   1023:255:63   0xa5   1023:  2:63      4192965     15807960
>
>version=1.0  drive=0x82  mask=0xf  ticks=182
>options=nopacket,update,nosetdrv
>default_selection=F5 (Drive 1)
-----------------------------------------------------------------

According to the manual, I may use the 'packet' option of boot0cfg since I 
have
to boot above cylinder 1023, but my BIOS does not seem to be compatible with
this option.

What can I do? Do I have to go through the process of creating a
"dangerously-dedicated" slice?
I had no problem to boot on this disk with FreeBSD 4.x.


BTW, here's the ouput of disklabel ad2s2:
-----------------------------------------------------------------
># /dev/ad2s2c:
>type: ESDI
>disk: ad2s2
>label: 
>flags:
>bytes/sector: 512
>sectors/track: 63
>tracks/cylinder: 16
>sectors/cylinder: 1008
>cylinders: 19852
>sectors/unit: 20010816
>rpm: 3600
>interleave: 1
>trackskew: 0
>cylinderskew: 0
>headswitch: 0      # milliseconds
>track-to-track seek: 0 # milliseconds
>drivedata: 0 
>
>8 partitions:
>#        size   offset    fstype   [fsize bsize bps/cpg]
>  a:   524288        0    4.2BSD     2048 16384 32776  # (Cyl.    0 -
520*)
>  b:   362176   524288      swap                       # (Cyl.  520*- 879*)
>  c: 15807960        0    unused        0     0        # (Cyl.    0 -15682*)
>  d:   524288   886464    4.2BSD     2048 16384 32776  # (Cyl.  879*-1399*)
>  e:   524288  1410752    4.2BSD     2048 16384 32776  # (Cyl. 1399*-1919*)
>  f: 13872920  1935040    4.2BSD     2048 16384 28512  # (Cyl. 1919*-15682*)
>Warning, partition c doesn't cover the whole unit!
>Warning, An incorrect partition c may cause problems for standard system
utilities
-----------------------------------------------------------------

and with the -r option, disklabel -r ad2s2:
-----------------------------------------------------------------
># /dev/ad2s2c:
>type: ESDI
>disk: ad2s2
>label: 
>flags:
>bytes/sector: 512
>sectors/track: 63
>tracks/cylinder: 16
>sectors/cylinder: 1008
>cylinders: 19852
>sectors/unit: 20010816
>rpm: 3600
>interleave: 1
>trackskew: 0
>cylinderskew: 0
>headswitch: 0      # milliseconds
>track-to-track seek: 0 # milliseconds
>drivedata: 0
>
>8 partitions:
>#        size   offset    fstype   [fsize bsize bps/cpg]
>  a:   524288  4192965    4.2BSD     2048 16384 32776  # (Cyl. 4159*-679*)
>  b:   362176  4717253      swap                       # (Cyl. 4679*- 5039*)
>  c: 15807960  4192965    unused        0     0        # (Cyl. 4159*-19842*)
>  d:   524288  5079429    4.2BSD     2048 16384 32776  # (Cyl. 5039*-5559*)
>  e:   524288  5603717    4.2BSD     2048 16384 32776  # (Cyl. 5559*-6079*)
>  f: 13872920  6128005    4.2BSD     2048 16384 28512  # (Cyl. 6079*-19842*)
>Warning, partition c doesn't start at 0!
>Warning, partition c doesn't cover the whole unit!
>Warning, An incorrect partition c may cause problems for standard system
utilities
-----------------------------------------------------------------

Thanks in advance!

Jerome

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?65.cf505b7.2bab92d4>