From owner-freebsd-current Mon Dec 10 14:20:20 2001 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id F03EA37B417 for ; Mon, 10 Dec 2001 14:20:03 -0800 (PST) Received: from peter3.wemm.org ([12.232.27.13]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20011210222003.PVDV5859.rwcrmhc51.attbi.com@peter3.wemm.org> for ; Mon, 10 Dec 2001 22:20:03 +0000 Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id fBAMK3s35882 for ; Mon, 10 Dec 2001 14:20:03 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 4391539F0; Mon, 10 Dec 2001 14:20:03 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Ian Dowse Cc: Joerg Wunsch , freebsd-current@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern subr_diskmbr.c In-Reply-To: <200112101150.aa33241@salmon.maths.tcd.ie> Date: Mon, 10 Dec 2001 14:20:03 -0800 From: Peter Wemm Message-Id: <20011210222003.4391539F0@overcee.netplex.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ian Dowse wrote: > In message <20011210004350.6703C3810@overcee.netplex.com.au>, Peter Wemm writ es > : > >The problem is, that you **are** using fdisk tables, you have no choice. > >DD mode included a *broken* fdisk table that specified an illegal geometry. > ... > >This is why it is called dangerous. > > BTW, I presume you are aware of the way sysinstall creates DD MBRs; > it does not use the 50000 sector slice 4 method, but sets up slice > 1 to cover the entire disk including the MBR, with c/h/s entries > corresponding to the real start and end of the disk, e.g: > > cylinders=3544 heads=191 sectors/track=53 (10123 blks/cyl) > ... > The data for partition 1 is: > sysid 165,(FreeBSD/NetBSD/386BSD) > start 0, size 35885168 (17522 Meg), flag 80 (active) > beg: cyl 0/ head 0/ sector 1; > end: cyl 1023/ head 190/ sector 53 > The data for partition 2 is: > > The data for partition 3 is: > > The data for partition 4 is: > > > Otherwise the disk layout is the same as disklabel's DD. I suspect > that this approach is much less illegal than disklabel's MBRs > although I do remember seeing a HP PC that disliked it. I wonder > if a reasonable compromise is to make disklabel use this system for > DD disks instead of the bogus 50000 sector slice? Obviously, it > should also somehow not install a partition table unless boot1 is > being used as the MBR, and the fdisk -I method should be preferred. Yes, that is much safer, however there are certain bioses that have interesting quirks that the MBR has to work around. The problem when overlapping mbr and boot1 into the same block is that we no longer have the space to do that. boot1.s has got *3* bytes free. For example, we dont have space to fix the case where the drive number is passed through incorrectly to the mbr. Some older Intel boards have this problem (Phoenix derived bios). See boot0's setdrv option. Also (and I think this is more likely to be the problem you ran into) many newer PC's are looking at the partition tables for a suspend-to-disk partition or a FAT filesystem with a suspend-to-disk dump file. For better or worse, PC architecture dictates that boot disk partitions start and end on cylinder boundaries (except for the first one which starts on the second head in the first cylinder). When we break those rules, we have to be prepared for the consequences. However, there is light at the end of the tunnel. EFI GPT is pretty clean. It supports up to something like 16384 partitions and it has all the useful stuff we could possibly want including unique ID's, no CHS (pure 64 bit LBA), volume tags (you can name partitions etc), and so on. It is clean enough that we could almost get away with doing away with disklabel as well. "Coming soon to a PC near you." (http://developer.intel.com/technology/efi/index.htm) Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message