Bug 264697 - FreeBSD 13 AWS AMI can not use free tier because t2 instance cannot use UEFI boot
Summary: FreeBSD 13 AWS AMI can not use free tier because t2 instance cannot use UEFI ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.1-RELEASE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-virtualization (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-06-15 22:57 UTC by Tomoyuki Asakawa
Modified: 2023-07-01 21:42 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback? (cperciva)


Attachments
create t3 instance chage to t2 instance type was error (12.60 KB, image/png)
2022-06-15 22:57 UTC, Tomoyuki Asakawa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoyuki Asakawa 2022-06-15 22:57:46 UTC
Created attachment 234711 [details]
create t3 instance chage to t2 instance type was error

AWS FreeBSD-13 AMI is can not use free tier because t2 instance cannot use uefi boot
FreeBSD12 AMI is BIOS boot 
FreeBSD13 AMI is UEFI boot
Comment 1 Colin Percival freebsd_committer freebsd_triage 2022-06-16 00:47:31 UTC
This is the expected behaviour.  But t3.micro is part of the free tier, I think?
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2022-06-17 05:38:12 UTC
(In reply to Colin Percival from comment #1)
It seems we can build an image which supports both UEFI and BIOS boot, that what I did for Azure. Or the issue is that we cannot set the attribute of an AMI to able to be boot on both UEFI and BIOS VM?
Comment 3 Colin Percival freebsd_committer freebsd_triage 2022-06-17 05:43:56 UTC
(In reply to Li-Wen Hsu from comment #2)
Yes, our disk images support both boot modes, but the EC2 API only allows us to
specify one or the other when we register AMIs.  I have made Amazon very aware
that this has an impact on the user experience, but when I polled FreeBSD/EC2
users prior to making the change, there was almost unanimous consensus that if
we could only support one, UEFI (which much faster booting) was preferable to
BIOS.
Comment 4 Mina Galić freebsd_triage 2023-06-15 12:25:29 UTC
copying the commit hook from the wrong bug here:

A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=bcf9147144f3499976a623f92712ecd0aca71912

commit bcf9147144f3499976a623f92712ecd0aca71912
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2023-06-07 22:17:12 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2023-06-14 18:31:10 +0000

    EC2: Default to "uefi-preferred" boot mode

    In EC2, UEFI boots faster than BIOS, but not all amd64 instance types
    support UEFI.  AMIs need to have their boot mode designated, which
    created a dilemma: Faster boots, or wider compatibility?

    The recently added "uefi-preferred" option solves this: AMIs can be
    marked to use UEFI where it's available, but fall back to BIOS on
    instance types which do not support UEFI.

    This uses bsdec2-image-upload 1.4.6, which recently landed in the
    ports tree.

    PR:             265697
    Reviewed by:    delphij, imp
    MFC after:      1 week
    Sponsored by:   https://www.patreon.com/cperciva
    Differential Revision:  https://reviews.freebsd.org/D40470

 release/Makefile.ec2 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

maybe on MFC we can target the right bug ;)
Comment 5 Colin Percival freebsd_committer freebsd_triage 2023-06-25 21:12:29 UTC
(In reply to Mina Galić from comment #4)
> maybe on MFC we can target the right bug ;)

You'd think so, but apparently I can't remember things like this for a week at a time.  Sorry!
Comment 6 Mina Galić freebsd_triage 2023-07-01 21:42:21 UTC
and another one

A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=1178acf46604c54e2661284af17452c4db6b2f6f

commit 1178acf46604c54e2661284af17452c4db6b2f6f
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2023-06-07 22:17:12 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2023-06-21 19:26:00 +0000

    EC2: Default to "uefi-preferred" boot mode

    In EC2, UEFI boots faster than BIOS, but not all amd64 instance types
    support UEFI.  AMIs need to have their boot mode designated, which
    created a dilemma: Faster boots, or wider compatibility?

    The recently added "uefi-preferred" option solves this: AMIs can be
    marked to use UEFI where it's available, but fall back to BIOS on
    instance types which do not support UEFI.

    This uses bsdec2-image-upload 1.4.6, which recently landed in the
    ports tree.

    PR:             265697
    Reviewed by:    delphij, imp
    MFC after:      1 week
    Sponsored by:   https://www.patreon.com/cperciva
    Differential Revision:  https://reviews.freebsd.org/D40470

    (cherry picked from commit bcf9147144f3499976a623f92712ecd0aca71912)

 release/Makefile.ec2 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)