Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2011 13:20:10 GMT
From:      Warren Block <wblock@wonkity.com>
To:        freebsd-sysinstall@FreeBSD.org
Subject:   Re: bin/161720: bsdinstall(8): partition editor does not put partitions on even 4K boundaries
Message-ID:  <201110251320.p9PDKAbX031181@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/161720; it has been noted by GNATS.

From: Warren Block <wblock@wonkity.com>
To: Dennis Yusupoff <dyr@smartspb.net>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110251320.p9PDKAbX031181>