From nobody Wed Apr 03 13:28:53 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V8lvm3YMrz5GpDd for ; Wed, 3 Apr 2024 13:29:08 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from gromit.dlib.vt.edu (gromit.dlib.ipv6.vt.edu [IPv6:2001:468:c80:a103:2:5000:5555:5555]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4V8lvm1J4Lz4TSf for ; Wed, 3 Apr 2024 13:29:08 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (unknown [IPv6:2601:5cf:407e:55c1::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gromit.dlib.vt.edu (Postfix) with ESMTPSA id B6C6A7A716; Wed, 3 Apr 2024 09:29:04 -0400 (EDT) Content-Type: text/plain; charset=utf-8 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: changing ext. USB disk to UEFI boot From: Paul Mather In-Reply-To: Date: Wed, 3 Apr 2024 09:28:53 -0400 Cc: "Edward Sanford Sutton, III" , freebsd-questions@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Matthias Apitz X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:1312, ipnet:2001:468:c80::/48, country:US] X-Rspamd-Queue-Id: 4V8lvm1J4Lz4TSf On Apr 3, 2024, at 4:29=E2=80=AFAM, Matthias Apitz = wrote: > El d=C3=ADa mi=C3=A9rcoles, abril 03, 2024 a las 12:23:57 -0700, = Edward Sanford Sutton, III escribi=C3=B3: >=20 >>> How can I modify the partition da0p1 to UEFI without touching the = already >>> installed da0p2? Is it enough to carry out the creation of the = MS-DOS >>> file system in da0p1 and copy the boot loader /boot/loader.efi to = it? >>=20 >> If it was bigger it would have worked. With such a small da0s1, = consider >> deleting the swap partition, make a UEFI partition from part of its = space, >> then make a swap partition from what remains. You would then have = both UEFI >> and legacy booting available while avoiding a reformat. Manpages for >> loader.efi(8) and uefi(8) explain where it can go and what to name = it. >=20 > Thanks, this is a nice idea. I never used this swap partition on this > external disk. As I said, it is only for testing a new FreeBSD or > compiled ports tree (with poudriere) before installing it. >=20 > So, I will delete the da0p3 and recreate it as -t efi, perhaps in > smaller size of 40M. The da0p4 is used for backup purpose. > Is it a problem that the efi partition is not the first one, or does > this no matter? FWIW, here is the partition table that got created via a default = ZFS-on-root install of a FreeBSD 13 system I use: # gpart show ada0 =3D> 40 1953525088 ada0 GPT (932G) 40 532480 1 efi (260M) 532520 1024 2 freebsd-boot (512K) 533544 984 - free - (492K) 534528 4194304 3 freebsd-swap (2.0G) 4728832 1948794880 4 freebsd-zfs (929G) 1953523712 1416 - free - (708K) Note the default size of 260 MB for the EFI partition. Cheers, Paul.