From owner-freebsd-stable@freebsd.org Sun Dec 18 00:39:25 2016 Return-Path: Delivered-To: freebsd-stable@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 33FB3C718BF for ; Sun, 18 Dec 2016 00:39:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 0980C1D4F for ; Sun, 18 Dec 2016 00:39:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x244.google.com with SMTP id 75so6757328ite.1 for ; Sat, 17 Dec 2016 16:39:24 -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=ySXg3PYbDOrYXyQAY0iYbOFGogOiboi0uj3awoKxn0I=; b=A1jY7nHdz7yp2e+XOE7YWl+TuFyVikZbFyUz4SHhNbbJFbF+vQ7jVry5u80KuwlK+3 R3yLrNski0ZDemA1obvxgC5HJEQiLuYLSUABBV/zzzmTCPVZnMwuHH2yOZuYpkPQ3w92 zWiBFE4ae6d42WsngyMwe8hBRDf0pJ77P96OBU/EoqZe5neebCNS3B994yaNckzeF3TI 5lYS/n5kBC2YwQEU+C5oF3nfpcaHDzdI2oJOWNorXeIGZBnrG8GOs9XxJI5owoDodBVN 953sq8BSINc9mnkPRDn+zmMk4pzOjgVgsk5Xls3Q2ORLwIhQocFkPa89V8yddL5Yriai Gdew== 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=ySXg3PYbDOrYXyQAY0iYbOFGogOiboi0uj3awoKxn0I=; b=lGymEBB1U6zWXmzbaNG+O6Bc5w3SB76S5sKD5GtAk055kPrPwrqBxuAYT6bMW36FQJ Gy1zC6iBFIn/gt2dj5oELxWOrR0f6hzrBENPsPJI4xoRK7sjfljLIoof7pVMkP2xmHx9 YHOMbxr0tjD0N3s0fjiEAqqy8hmWYPN3sTrn1aYItYl3QNwV0i5mmzqSMLmk70x4cAFl NRSNgRCZH813jL5qRSwkc8AIxcqLcvFpA1E3ehhfjgr8DnBlvYSZV+i+dr5daPbsutiw 0JLzQE7i2MuYt674fyN1M2PxRgb38AMcWoV8WWFyAY/acvt4mlaaFMMWwiJRH8h3ScJc LePA== X-Gm-Message-State: AKaTC02iXGsfjLM0T//aMfXoYrb/NJDBsIKquY8o8gDBSM/GBloH/EBtK9iAHdbvNdMG+ySo9r0pBf00e/9U9Q== X-Received: by 10.36.61.207 with SMTP id n198mr10660693itn.60.1482021564161; Sat, 17 Dec 2016 16:39:24 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.22.135 with HTTP; Sat, 17 Dec 2016 16:39:23 -0800 (PST) X-Originating-IP: [216.9.110.9] In-Reply-To: <2720DE76-B524-4AEA-ACC0-1EBD8813547D@FreeBSD.org> References: <20161216173930.GD90401@zxy.spb.ru> <85F3F813-D821-439B-B700-DCE51C53E035@FreeBSD.org> <2720DE76-B524-4AEA-ACC0-1EBD8813547D@FreeBSD.org> From: Warner Losh Date: Sat, 17 Dec 2016 16:39:23 -0800 X-Google-Sender-Auth: VYDYVjPaqgwDCKIZ4_pDM58KTRA Message-ID: Subject: Re: Upgrading boot from GPT(BIOS) to GPT(UEFI) To: Dimitry Andric Cc: Antony Uspensky , =?UTF-8?Q?Fernando_Herrero_Carr=C3=B3n?= , Eric van Gyzen , freebsd-stable , Slawa Olhovchenkov Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2016 00:39:25 -0000 On Sat, Dec 17, 2016 at 6:38 AM, Dimitry Andric wrote: > On 16 Dec 2016, at 23:56, Warner Losh wrote: >> >> On Fri, Dec 16, 2016 at 11:00 AM, Dimitry Andric wrote: > ... >>> Yes, this is almost exactly what I have done on a machine that was >>> originally installed with gptzfsboot on the first partition, which was >>> 512K. Since all the partitions on this SSD were aligned to 1M, I >>> reduced the size of the first partition to 224K, freeing up a hole of >>> exactly 800K for an EFI partition: > ... >> You likely want to carve out more like 50MB instead of 800k for UEFI >> partition. 800k is the minimum, but it also precludes many things you >> may need to do with UEFI applications down the line. > > Well, this is the default boot1.efifat size. If you think 50MB is more > reasonable, the boot1.efifat size should have a corresponding size. We shouldn't have a boot1.efifat at all. We should make the fat based on what the size of the partition is. boot1.efifat is an ugly hack to make the installers happy when we should have fixed the installers. The standard suggests an even larger 200MB. On most modern drives, the delta this usage is tiny, though on SD card-based systems 200MB takes up too large a percentage. > That said, as long as there are almost no such UEFI applications, I'm > not bothering. Besides, even if there were, I don't have any interest > in the UEFI "ecosphere" as-is. I see it as an ugly-but-necessary > pre-bootloader environment only. At work we get programs to run from time to time that upgrade BIOS that's in different cards in our system, or to dump diagnostics. It's helpful to have the space space when you need it, because when you need it, you really need it. It's also used to deploy "capsules" that have the upgrades for the BIOS (there's a standard now, but we don't implement it all yet). There are secure boot things you need space for as well. If you judge from today's, barely enough to boot a single partition w/o the other features of our traditional pre-/boot/loader environment, I can see how you might think there's nothing but 'waste' here. However, as we flesh out things, I think we'd be doing our users a disservice from doing anything less than ~50MB by default. Warner