From owner-freebsd-questions@FreeBSD.ORG Fri Jan 4 21:30:46 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4B3991B5 for ; Fri, 4 Jan 2013 21:30:46 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 0E335A1F for ; Fri, 4 Jan 2013 21:30:45 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.6/8.14.6) with ESMTP id r04LUiw4007960; Fri, 4 Jan 2013 14:30:44 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.6/8.14.6/Submit) with ESMTP id r04LUibu007957; Fri, 4 Jan 2013 14:30:44 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Fri, 4 Jan 2013 14:30:44 -0700 (MST) From: Warren Block To: Christian Weisgerber Subject: Re: bsdinstall misaligns partitions In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Fri, 04 Jan 2013 14:30:45 -0700 (MST) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 21:30:46 -0000 On Fri, 4 Jan 2013, Christian Weisgerber wrote: > Shouldn't bsdinstall attempt to align partitions on 4k boundaries > both for the benefit of 4k drives and flash storage? I think the latest version does. > I just installed 9.1R i386 for fun and practice, in fact I installed > it several times, and I played around with the partitioning options. > > * The modern GPT scheme reserves 34 sectors at the start of the disk. > Your newly created partitions will start at offset 34 and will > therefor be misaligned. I ended up configuring a 63 kB freebsd-boot > partition, which ensures that the following partitions are aligned. > > * The old MBR scheme is even worse. The FreeBSD slice will start > at sector 63, guaranteeing that any partitions contained within > will be misaligned. There is no way to fix this, unless you > shell out and run fdisk manually. Even worse news: you can't fix it manually. Both fdisk and gpart are slaves to the kernel code that deals with MBR layouts, and will align to the old CHS values. I have not found a way to use FreeBSD to create an MBR slice that starts at 1M, block 2048. The CHS alignment always forces it to block 2079, a multiple of 63. However, gpart's -a alignment flag will offset BSD partitions within the slice so they are aligned. > * Funnily enough, the ancient BSD "dangerously dedicated" scheme > is the only one that out of the box does not misalign partitions. The filesystems don't begin at the start of the slice anyway. There is a bsdlabel there. > I'm presumably not the first one to notice this issue, and yes, I'm > mostly just venting. A way to override the CHS alignment would be welcome.