From owner-freebsd-current@freebsd.org Fri Mar 18 21:48:19 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96854AD503C for ; Fri, 18 Mar 2016 21:48:19 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BB701215; Fri, 18 Mar 2016 21:48:19 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by mail-ob0-x22c.google.com with SMTP id fp4so129020021obb.2; Fri, 18 Mar 2016 14:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=UafUQu7IH19b4TBcrDexdAvnDVmybErZtUQBfR/8mDM=; b=d6jqWWNWIaLfmgPqTRo/Q77YWXFQdetL6POPK5PgW5/9Y2R/FAaXkjKcT1S8yDEfMn Vjk9EyCbyYYjDLOlYfZBezLT38xw+d8KQ/smz4Y2LMI6Ho9JXCUfPKfx9yf18ThL6SUc wm5JuT5wDhs+1L4dFhyDJbeLmlpnm00fX6hYrfOshrpG3irX5uAF7Y3LHAJERZxa+nJw znBQG6Yzqqp9my1EqJuzXAfhenHoCMxIgVrqS+FZy9ljeAhaK8Fw2WpAKLl8dXRPn8JQ wcjQycX6kDoInz5A83T74nnCOwsLhnuCbi/cc/DCUersrwQxNyMyFi1kPjHtumbspON7 AqjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=UafUQu7IH19b4TBcrDexdAvnDVmybErZtUQBfR/8mDM=; b=XebjkYBtOK3tVtxOW9hEVqObJr94/mf33x8qvIramfpa12b0J7rL5CGHLKn1PQA716 rY7YZNpGhrKgEYAGfYhmvESLqMHx2/vd1ncj3aZ4G8rPoAeLLdxAk1Zudj+B/U6iyvX2 Cm7p5m/AVmVyS6q5SsX63FHS7/SwZlhUYVmhcrtHMZ8jf4vPOQ1F7UeQ9xFEbhCExzXn fhVWoe0dUBxo5HL/DbPkYel8ZgYURXJysxDACSMR2iAYztM5RDxhjjrgsNzPV0+T3eUL 0/X4moAV0W/wxW3tU7Rm0TMBAGUTO2vUfqnOf/DUs+Mngv26p04nFMsKNIMXhXj5uSWm sF8w== X-Gm-Message-State: AD7BkJI5Hs+zxe0BrS5DtLCIzqfzUGvlccElXgqffu/m3TtzWOu9VJZABF0md8HJ2x/LxKgmrBrDuXkHsTdFbA== MIME-Version: 1.0 X-Received: by 10.60.54.170 with SMTP id k10mr11162251oep.63.1458337698755; Fri, 18 Mar 2016 14:48:18 -0700 (PDT) Received: by 10.76.82.193 with HTTP; Fri, 18 Mar 2016 14:48:18 -0700 (PDT) In-Reply-To: <56EC76F3.9030906@freebsd.org> References: <56EC2DD3.6050803@madpilot.net> <56EC34CE.1000002@freebsd.org> <56EC76F3.9030906@freebsd.org> Date: Fri, 18 Mar 2016 14:48:18 -0700 Message-ID: Subject: Re: boot loaders got fatter in the last few days From: Freddie Cash To: Allan Jude Cc: cem@freebsd.org, freebsd-current Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2016 21:48:19 -0000 On Fri, Mar 18, 2016 at 2:45 PM, Allan Jude wrote: > On 2016-03-18 17:41, Freddie Cash wrote: > >> >> On Fri, Mar 18, 2016 at 10:39 AM, Conrad Meyer > > wrote: >> >> On Fri, Mar 18, 2016 at 10:03 AM, Allan Jude > > wrote: >> > On 2016-03-18 12:33, Guido Falsi wrote: >> >> >> >> Hi, >> >> >> >> I have just update one of my machines and noticed the booloaders >> files >> >> got quite fat in the last few days, some by a big margin. >> >> >> >> on an updated machine(r296993): >> >> >> >> -r--r--r-- 1 root wheel 85794 Mar 18 16:47 /boot/gptboot >> >> >> >> from a machine I still have not updated(r296719): >> >> >> >> -r--r--r-- 1 root wheel 16059 Mar 13 21:01 /boot/gptboot >> >> So the loader grew 70 kB. How big are your disks? >> >> >> I noticed because mu gpt boot partition is 64K and gptzfsboot ju= st >> >> passed 100K. >> > >> > This is a side effect of the loader gaining the ability to boot >> from GELI >> > encrypted partitions. >> > >> > ... >> > >> > Maybe we should be putting the GELI enabled boot blocks in a >> different >> > filename? I generally wanted to avoid creating a new version of >> each >> > bootcode with GELI support. >> >> >> I think we should just suggest that boot partitions be much larger >> than 64kB (1MB is still <0.1% of any disk sold today) and not worry >> about it too much. Embedded applications can disable GELI loader >> support to save a few bytes. >> >> >> =E2=80=8BThe boot partition doesn't necessarily need =E2=80=8B >> =E2=80=8Bto be 1 MB (and can't due to some issues with the assembler use= d right >> now, or something like that). We just need to make sure people have >> slack space in their partition table to expand into in the future. >> >> Using "-a 1M" in your gpart command to create your first data partition >> gives you that slack space. >> >> gpart create -s gpt ada0 >> gpart add -t freebsd-boot -s 256K -l boot ada0 >> gpart add -t freebsd-ufs -s 10G -l root -a 1M ada0 >> >> That leaves ~756 KB of free space between the end of the boot partition >> and the start of the first data partition. Increasing the size of the >> boot partition in the future is as easy as (no formatting of disks >> required): >> >> gpart delete -i 1 ada0 >> gpart add -t freebsd-boot -s 512K -l boot ada0 >> gpart bootcode -b ... -p ... ada0 >> >> It's a handy pattern I've gotten used to over the years, ever since the >> first 4K sector harddrives were advertised (as alignment of filesystems >> was/is *very* important)=E2=80=8B. >> >> Even on disks that will be used solely for ZFS I've taken to creating >> GPT partitions starting at 1 MB. And it's saved me from having to >> reformat disks when moving from a separate root filesystem (no USB >> sticks) to root-on-ZFS as there was 1 MB of free space at the start of >> every disk for creating boot partitions. :) >> >> -- >> Freddie Cash >> fjwcash@gmail.com >> > > This also has the handy side effect of allowing you to switch to booting > with UEFI, which currently uses an 800kb fat file system =E2=80=8BAnd I'm pretty sure I read somewhere that the 10.x installer defau= lts to using "-a 1M" when partitioning new disks, although I haven't installed =E2= =80=8B =E2=80=8Bany 10.x systems from scratch yet (just upgrades from 9.x).=E2=80= =8B --=20 Freddie Cash fjwcash@gmail.com