From owner-freebsd-sysinstall@FreeBSD.ORG Tue Oct 25 13:20:12 2011 Return-Path: Delivered-To: freebsd-sysinstall@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57AD610656B4 for ; Tue, 25 Oct 2011 13:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 112E98FC2B for ; Tue, 25 Oct 2011 13:20:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9PDKAs3031182 for ; Tue, 25 Oct 2011 13:20:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9PDKAbX031181; Tue, 25 Oct 2011 13:20:10 GMT (envelope-from gnats) Date: Tue, 25 Oct 2011 13:20:10 GMT Message-Id: <201110251320.p9PDKAbX031181@freefall.freebsd.org> To: freebsd-sysinstall@FreeBSD.org From: Warren Block Cc: Subject: Re: bin/161720: bsdinstall(8): partition editor does not put partitions on even 4K boundaries X-BeenThere: freebsd-sysinstall@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Warren Block List-Id: Sysinstall Work List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 13:20:12 -0000 The following reply was made to PR bin/161720; it has been noted by GNATS. From: Warren Block To: Dennis Yusupoff Cc: bug-followup@FreeBSD.org Subject: Re: bin/161720: bsdinstall(8): partition editor does not put partitions on even 4K boundaries Date: Tue, 25 Oct 2011 07:17:24 -0600 (MDT) On Tue, 25 Oct 2011, Dennis Yusupoff wrote: > While I agree with you in need of aligning [first] partition, I'd like > to behold, that gpart show size in blocks, not in megabytes, so to align > partition to 1 mbyte on 4K-align HDDs you might execute "gpart add -b > 2048 -s 64K -t freebsd-boot ada0" ( 2048 blocks * 4096 kbytes = 8 Mbyte, > in case of "plain" HDD 2048 blocks * 512 bytes = 1 Mbyte, which, I > think, is a pretty good). The -b option to 'gpart add' also accepts a size like "1M", so 'gpart add -t freebsd-ufs -b 1M ...' should work on any drive with a block size all the way up to 1M. Tested and works on 512-byte drives, but I have not tested it on a 4K drive. There's also the -a option, which attempts to align partitions to the value given. '-a 4096' should work on both 512-byte and 4k-byte drives. (bsdinstall's partition editor and wizard do not run gpart(8) but make lower-level calls to libgeom. Still, the functionality of the -a or -b options could be duplicated.) > Moreover, I don't see why freebsd-boot partition should be more than > 512K, if even 64K are currently just enough for FreeBSD. Looks like old > and famous Bill Gates's sentence, I know, but however :) FreeBSD bootcode has problems with a freebsd-boot partition larger than 512K, so that's the current limit. However, starting the first filesystem partition at 1M works for both alignment and compatibility with other systems. From the -current mailing list: http://lists.freebsd.org/pipermail/freebsd-current/2011-September/027547.html http://lists.freebsd.org/pipermail/freebsd-current/2011-September/027548.html http://lists.freebsd.org/pipermail/freebsd-current/2011-September/027550.html http://lists.freebsd.org/pipermail/freebsd-current/2011-September/027563.html http://lists.freebsd.org/pipermail/freebsd-current/2011-September/027626.html