From owner-freebsd-questions@FreeBSD.ORG Tue Dec 2 05:59:25 2003 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 32DCD16A4CE for ; Tue, 2 Dec 2003 05:59:25 -0800 (PST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6146343F85 for ; Tue, 2 Dec 2003 05:59:23 -0800 (PST) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp136-184.lns1.adl2.internode.on.net [150.101.136.184])hB2DxFEq001047; Wed, 3 Dec 2003 00:29:15 +1030 (CST) Content-Type: text/plain; charset="iso-8859-1" From: Malcolm Kay Organization: At home To: Ion-Mihai Tetcu , freebsd-questions@freebsd.org Date: Wed, 3 Dec 2003 00:29:14 +1030 User-Agent: KMail/1.4.3 References: <20031202125044.574ca489.itetcu@apropo.ro> In-Reply-To: <20031202125044.574ca489.itetcu@apropo.ro> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200312030029.14531.malcolm.kay@internode.on.net> Subject: Re: fdisk question (long) 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: Tue, 02 Dec 2003 13:59:25 -0000 On Tue, 2 Dec 2003 21:20, Ion-Mihai Tetcu wrote: > Hope someone will have the pacince to read all this ... > > I have a 120G HDD, in the BIOS is set as LBA. I've RTFM as much as I > could, but there still are some things I clearly don't understand. I > want to be sure that I can move this disk to another machine with > anouter BIOS and the system still boots up. > > I've used sysinstall to make partitions and the result is bellow: > > > it# fdisk ad0 > ******* Working on device /dev/ad0 ******* > parameters extracted from in-core disklabel are: > cylinders=3D232578 heads=3D16 sectors/track=3D63 (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=3D232578 heads=3D16 sectors/track=3D63 (1008 blks/cyl) > These figures are just figures that will probably work -- and are unlikely to have any connection to the physical disk structure. > 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 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 63, size 497952 (243 Meg), flag 0 > beg: cyl 0/ head 1/ sector 1; > end: cyl 30/ head 254/ sector 63 Having sthe geometry set to 23578/16/63 (that is sixteen heads) it is rather strange to address head number 254. Maximum head=20 number should then be 15. However it is also quite common to define large disk geometries as nnnnnn/255/63 which allows a maximum head number of 254. > The data for partition 2 is: > sysid 6 (0x06),(Primary 'big' DOS (>=3D 32MB)) > start 498015, size 41929650 (20473 Meg), flag 0 > beg: cyl 31/ head 0/ sector 1; > end: cyl 1023/ head 254/ sector 63 The CHS descriptor has overflowed -- nolonger meaningful. LBA works with the 498015/41929650 figures. > The data for partition 3 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 42427665, size 192008880 (93754 Meg), flag 0 > beg: cyl 1023/ head 255/ sector 63; > end: cyl 1023/ head 254/ sector 63 > The data for partition 4 is: > > > Q1: How can the partition 3 end up before beginning ? > The CHS entries are limited to 1023/255/63 which does not come anywhere near the disk capacity -- so once C reaches 1023 the CHS recording capaci= ty=20 has been exceeded. Or to put it another way the CHS entries are somewhat meaningless on large disks. But the absolute start sector number and slic= e=20 size is also recorded in the slice/partition table and this is used in LB= A=20 mode. > Q2: What is the Warning: BIOS sector numbering starts with sector 1 > trying to say ? The cylinders=3D232578 heads=3D16 sectors/track=3D63 sh= ows the > same as in teh BIOS screen. > Cylinder and head numbering starts at 0; sectors start at 1. A quirk of history that you need to know when using CHS. > Q3: The in-core parameters and those for BIOS calculation are the same; > this normal (from my experince) / when they won't mach ? > > So i decided to make it by hand (note that sysid 0 for the first > partition is a typo - it should be 165 and I'll want the / slice on it, > and I want to reserve the second partition for a winXP, and the 3rd wil= l > be for the other slices). > =2E.. > Q4: I've supplied the start and size parameters by reading those > provided by the sysinstall partitioning. How can I calculate them ? > Work with absolute sector numbers but chosen so that a slice always=20 starts at sector 1 in the CHS scheme. > Q5: Why the new parameters are different from those of sysinstall ? > Possibly a change of assumed CHS geometry > Q6: Is this schema OK and will I be able to use this disk in an other > computer and access all the partitions and slices ? Probably but I would feel happier with sysinstall generated values. Malcolm