From owner-freebsd-questions@FreeBSD.ORG Tue Dec 2 07:56:33 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 2B90B16A4CE for ; Tue, 2 Dec 2003 07:56:33 -0800 (PST) Received: from rdsnet.ro (smtp.rdsnet.ro [62.231.74.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AE1243FBD for ; Tue, 2 Dec 2003 07:56:29 -0800 (PST) (envelope-from itetcu@apropo.ro) Received: (qmail 8182 invoked from network); 2 Dec 2003 15:56:27 -0000 Received: from unknown (HELO it.buh.cameradicommercio.ro) (81.196.25.19) by mail.rdsnet.ro with SMTP; 2 Dec 2003 15:56:27 -0000 Date: Tue, 2 Dec 2003 17:57:16 +0200 From: Ion-Mihai Tetcu To: Jerry McAllister Message-Id: <20031202175716.31743db3.itetcu@apropo.ro> In-Reply-To: <200312021510.hB2FAZ707002@clunix.cl.msu.edu> References: <20031202125044.574ca489.itetcu@apropo.ro> <200312021510.hB2FAZ707002@clunix.cl.msu.edu> X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: questions@freebsd.org 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 15:56:33 -0000 On Tue, 2 Dec 2003 10:10:34 -0500 (EST) Jerry McAllister 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: > > The basic and general answer to most of this is that nowdays with > modern disks, the Cylinder/Head/Sector values are essentially fiction. > They are based on values that can no longer be used with larger > disks and the system just generates values to make things happy. > The controllers are able to map the "absolute" sector number to > the correct place on the disk - which, bny the way, might even be > remapped due to sector errors and you don't even know it; it doesn't > tell you about those until there are more bad sectors than it has > spares for remapping. I know (end even with SMART I don't like it - You usally find out about it when nothing can be done). > Just go by the total number of sectors. Let fdisk do its thing. > It does it right. Do not try to set any Cylinder/Head/Sector > values. Ignore that part of things. For all practical purposes, > that part of things is obsolete. Even though some parts of the > system still fiddle with it, nothing really happens with it. About > the only thing it might want is for slices to begin and end on > cylinder boundaries and since you really can't control those, just use > the numbers it gives you as a divider to make sure your proposed slice > > size comes out even and then go with it. What I fail to see is the corespondence between sector and capacity in something like MB or KB. > So, choose the slice sizes you want by total number of blocks/sectors > and then use the -t switch to see what happens just to make sure the > sizes work out the way you want and then trust fdisk to do what is > right. > > > it# fdisk ad0 > > Try doing" > "fdisk -s ad0" > > To read the disk information. It gives you all the information that > is usually meaningful and is less confusing. I did: it# fdisk -I ad0 ******* Working on device /dev/ad0 ******* it# fdisk -s ad0 /dev/ad0: 232578 cyl 16 hd 63 sec Part Start Size Type Flags 1: 63 234438561 0xa5 0x80 So: 234438561+63 = 234438624 If I add the sizes in sectors from the previous I get sysinstall 234436545 fdisk-by-hand 234436482 The difference is exactly 63 and none match with this new one. Why ? > > 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 > > The data for partition 2 is: > > sysid 6 (0x06),(Primary 'big' DOS (>= 32MB)) > > start 498015, size 41929650 (20473 Meg), flag 0 > > beg: cyl 31/ head 0/ sector 1; > > end: cyl 1023/ head 254/ sector 63 > > 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 > > We haven't changed the partition table yet. This is your last > > chance. parameters extracted from in-core disklabel are: > > cylinders=232578 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=232578 heads=16 sectors/track=63 (1008 blks/cyl) > > > > Information from DOS bootblock is: > > 1: sysid 0 (0000),(unused) > > start 0, size 497952 (243 Meg), flag 80 (active) > > beg: cyl 0/ head 0/ sector 1; > > end: cyl 493/ head 15/ sector 63 > > 2: sysid 6 (0x06),(Primary 'big' DOS (>= 32MB)) > > start 498015, size 41929650 (20473 Meg), flag 0 > > beg: cyl 31/ head 0/ sector 1; > > end: cyl 1023/ head 254/ sector 63 > > 3: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > > start 42427665, size 192008880 (93754 Meg), flag 0 > > beg: cyl 106/ head 15/ sector 1; > > end: cyl 127/ head 14/ sector 63 > > 4: > > Should we write new partition table? [n] y -- IOnut Unregistered ;) FreeBSD user