From owner-freebsd-current@freebsd.org Sat Jan 28 19:35:41 2017 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 0F370CC67E7 for ; Sat, 28 Jan 2017 19:35:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id DD79716E7 for ; Sat, 28 Jan 2017 19:35:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id D9E08CC67E6; Sat, 28 Jan 2017 19:35:40 +0000 (UTC) Delivered-To: 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 D9829CC67E5 for ; Sat, 28 Jan 2017 19:35:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (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 9E4B916E4 for ; Sat, 28 Jan 2017 19:35:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x243.google.com with SMTP id c80so11074256iod.1 for ; Sat, 28 Jan 2017 11:35:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=SoLUGrl5WPiudEoQgvx0uGJIjlx4S+PyvvcZbhzAyBQ=; b=DnOEpXL1JNbTYRzTvqKqcOqK9ZFlDd5WVWmyuAbOqPytuejT0CiGkuNIQs6Q2xmOS6 fcQl+OSpiU/hDstodfdT0+7KCFHCKFbzpF5rGq182Xnkw3AVKwHC3oFGbQGkrahl76f2 EK62wu9FyP4pEMso48PhViF3xqRtHEzkfm2bp1C0d0IW4WTBAhnne47amfQcRg+zGxcU JYiifiOiIbICI1237A5dFVuf3pstlrwEG0GqcZByzpQL+wyrYiILV5GTj0oz0puwtUpv czXaa06I4pen5QRiYH7o6ZRw49Yd+EO02uG6b200MtDWUUsfl4+wZdr+/FCGHRAaxfvr +kuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SoLUGrl5WPiudEoQgvx0uGJIjlx4S+PyvvcZbhzAyBQ=; b=N4ymL3DFcoApUqYR6+b3SdTKybDS5BF6JN63EUCi5VBA7uaZm+Eo+V8xCOGYG9yjti LCBC1aNHKT6P/bIfYeWPno4Chkm9FOBtA+wQSrjvoF40j0EXYsQCZp3cna2gyw3TZx8G 4/ScHrMFnE8GmIqPQi5+TZH96GUTundJzSypMdQO95uUEakBQLzaF8Ig5G7ZQg1W8FTm vBmY+Nzjg1Qs0/Ji7IrI0K6S5lzi3+4JfHgtVD6E/AQw/sfFdnirOztQrIPO3sTy7jtA f2EQ2vj0YuFUUFvHXiBu11h97dzdWlRJitPQyli6HvLl+x0seLIFbB2pxQA1EGe3nFZY ALaQ== X-Gm-Message-State: AIkVDXL86tUBI7lkYfPKT9+HG/f9fa1Oq23mEkgkLcQU/jRqtVz1NBiN4NltioxO/UxpoOrMb5Wt1gysHP5NNw== X-Received: by 10.107.20.13 with SMTP id 13mr12671998iou.0.1485632139959; Sat, 28 Jan 2017 11:35:39 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.145.217 with HTTP; Sat, 28 Jan 2017 11:35:39 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: References: From: Warner Losh Date: Sat, 28 Jan 2017 12:35:39 -0700 X-Google-Sender-Auth: 2SKTWv2vlFRp8_6-bPoO23IkvoY Message-ID: Subject: Re: gptzfsboot grew a lot after skein support was added; need knob to control bloat To: Ngie Cooper Cc: Allan Jude , Julian Elischer , Toomas Soome , FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 28 Jan 2017 19:35:41 -0000 On Sat, Jan 28, 2017 at 12:04 PM, Ngie Cooper wrote: > On Sat, Jan 28, 2017 at 10:57 AM, Allan Jude wrote: >> On 2017-01-28 13:56, Ngie Cooper wrote: >>> On Sat, Jan 28, 2017 at 8:56 AM, Warner Losh wrote: >>> >>> ... >>> >>>> So? It literally doesn't matter where the freebsd-boot partition >>>> lives, or what it's number is. You can put it at the start or end of >>>> the swap partition after adjusting its size. I've done this on several >>>> systems... NanoBSD plays games with this stuff as well to be bootable >>>> on old / new systems. >>> >>> True. Hopefully my BIOS/disk controller isn't dumb enough to not >>> support large disks properly. >>> >>> *sigh* Unfortunately, in my infinity cleverness I only put 2 >>> partitions on the drive -- freebsd-boot and freebsd-zfs. I guess I'll >>> need to make backups of my workstation so I don't lose anything >>> critical. >> >> Did gptzfsboot not fall below 64kb when you used the >> LOADER_NO_GELI_SUPPORT knob? > > It did, but unfortunately that's still way too small for my > freebsd-boot partition (which apparently is only 44kB large :/..): > > Before: > > $ ls -l `make -V.OBJDIR`/gptzfsboot > -rw-r--r-- 1 ngie wheel 111662 Jan 28 11:00 > /usr/obj/usr/src/sys/boot/i386/gptzfsboot/gptzfsboot > > After: > > $ ls -l `make -V.OBJDIR`/gptzfsboot > -rw-r--r-- 1 ngie wheel 65371 Jan 28 11:05 > /usr/obj/usr/src/sys/boot/i386/gptzfsboot/gptzfsboot > > Time to do some more tricks to pare down the bootloader size. You can tweak the start of your boot loader partition to start at 2, which would give you 63.5k of space, which is 65024 bytes. Sadly, this is 300 bytes less space than you have. The end of the disk usually is a good place to look for space, but it looks like there's at most 17k there. > Sidenote to the folks who drive the release notes and upgrade > instructions for FreeBSD 12.x -- it needs to be clearly explained that > gptzfsboot has grown considerably in size and mitigation instructions > should be provided for updating gptzfsboot -- in particular with folks > who might be using freebsd-update, so don't have the luxury of the > choice of bootloader build options when upgrading. Upgrade scripts (including installworld) don't update the bootblocks ever. Just the files in /boot. Warner > Thanks, > -Ngie > > $ gpart list da0 > Geom name: da0 > modified: false > state: OK > fwheads: 255 > fwsectors: 63 > last: 250069646 > first: 34 > entries: 128 > scheme: GPT > Providers: > 1. Name: da0p1 > Mediasize: 45056 (44K) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 20480 > Mode: r0w0e0 > rawuuid: 29a79300-48b1-11e4-97ff-fc4dd43f2de9 > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f > label: (null) > length: 45056 > offset: 20480 > type: freebsd-boot > index: 1 > end: 127 > start: 40 > 2. Name: da0p2 > Mediasize: 128035593728 (119G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 65536 > Mode: r1w1e1 > rawuuid: 4416180d-48b1-11e4-97ff-fc4dd43f2de9 > rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b > label: (null) > length: 128035593728 > offset: 65536 > type: freebsd-zfs > index: 2 > end: 250069646 > start: 128 > Consumers: > 1. Name: da0 > Mediasize: 128035676160 (119G) > Sectorsize: 512 > Mode: r1w1e2