Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jan 2017 11:04:41 -0800
From:      Ngie Cooper <yaneurabeya@gmail.com>
To:        Allan Jude <allanjude@freebsd.org>
Cc:        Warner Losh <imp@bsdimp.com>, Julian Elischer <julian@freebsd.org>, Toomas Soome <tsoome@me.com>, FreeBSD Current <current@freebsd.org>
Subject:   Re: gptzfsboot grew a lot after skein support was added; need knob to control bloat
Message-ID:  <CAGHfRMAR4XbJCae5K_XXYYzFrFjhfUVGscZ4gLhsALWouT26aw@mail.gmail.com>
In-Reply-To: <cea48de5-447c-bd84-c6b0-2803d00f50f9@freebsd.org>
References:  <A33154F2-70E1-4047-8496-7D4D85CFF292@gmail.com> <EF719374-BF9D-44EF-9F45-53B2B506047C@me.com> <CANCZdfrzOr3YdbAKRrwUXsFDhdQ3hErf1vbYSG7MdpV_m%2B=YRQ@mail.gmail.com> <EB309E42-BEA6-49DF-BF34-172076851891@gmail.com> <f251f193-0fcd-cb2d-0fff-c443c4ca49d6@freebsd.org> <CANCZdfqdZumJvRcHGmZR_9s-ULFWsvp7h91H39o4nPgyqPBooA@mail.gmail.com> <CAGHfRMBQNSgAUGZfZQ7gD-OU4q-5sW54bdCS%2B-9_3k1ZbLu-kw@mail.gmail.com> <cea48de5-447c-bd84-c6b0-2803d00f50f9@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 28, 2017 at 10:57 AM, Allan Jude <allanjude@freebsd.org> wrote:
> On 2017-01-28 13:56, Ngie Cooper wrote:
>> On Sat, Jan 28, 2017 at 8:56 AM, Warner Losh <imp@bsdimp.com> 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.

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.

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



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