From owner-freebsd-questions@FreeBSD.ORG Fri Nov 26 12:17:58 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDFB916A4CE for ; Fri, 26 Nov 2004 12:17:58 +0000 (GMT) Received: from charm.daemonsecurity.com (FW-182-254.go.retevision.es [62.174.254.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34B3443D5A for ; Fri, 26 Nov 2004 12:17:58 +0000 (GMT) (envelope-from norgaard@locolomo.org) Received: from [192.168.0.32] (charm.daemonsecurity.com [192.168.0.32]) by charm.daemonsecurity.com (Postfix) with ESMTP id 7866C17004 for ; Fri, 26 Nov 2004 13:17:54 +0100 (CET) Message-ID: <41A71EEB.4090301@locolomo.org> Date: Fri, 26 Nov 2004 13:17:47 +0100 From: Erik Norgaard User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041114 X-Accept-Language: en, en-us, da, it, es MIME-Version: 1.0 To: "freebsd-questions@freebsd.org" Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Diskgeometry - sysinstall bug? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 12:17:58 -0000 Hi, I have problems making sysinstall behave, interactive or scripted. The disk is 60GB Hitachi Travelstar, on boot the kernel FreeBSD 5.3-STABLE identifies the geometry as: 116280/16/63, but sysinstall refuses these values as insane, and tries to rewrite the disk geometry to 7296/255/63. Using all disk for slice 1 sysinstall writes the disklabel, but it fails to initialize the swap partition claming no such device /dev/ad0s1b, or I get write errors when I try to install. On reboot (pxe), even though the new partition table and geometry was written, the kernel identifies the disk with the original geometry. It appears that I should go with the geometry the kernel thinks. How do I get my disk sliced up from here? Thanks, Erik I have found the following code in disks.c which seems to be responsible: if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) { Sanitize_Bios_Geom(d); } I have previously had FreeBSD 4.10 on the disk, installed from CD with no problems. On my laptop (40GB), the disk geometry is 77520/16/63 which should also fail in the above check I have 6.0-CURRENT, installed originally as 5.2.1 but upgraded with cvsup. Running fdisk manually, I get the following output: parameters extracted from in-core disklabel are: cylinders=116280 heads=16 sectors/tracks=63 (1008 blks/cyl) Figures below won't work with BIOS for partions not in cyl 1 parameters to be used for BIOS calculations are cylinders=116280 heads=16 sectors/tracks=63 (1008 blks/cyl) Information from DOS bootblock is: 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 117210177 (57231 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 567/ head 15/ sector 63 2: 3: 4: Confirming to write disk, fdisk prints the following summary: /dev/ad0: 116280 cyl 16 hd 63 sec Part Start Size Type Flags 1 63 117210177 0xa5 0x80 This all looks OK, just like the kernel likes it... -- Ph: +34.666334818 web: www.locolomo.org S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt Subject ID: A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9 Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2