From nobody Thu Apr 04 16:34:13 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 4V9Rz03Q1pz5FY62 for ; Thu, 4 Apr 2024 16:34:20 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4V9Ryz3Hnpz4bK0 for ; Thu, 4 Apr 2024 16:34:19 +0000 (UTC) (envelope-from guru@unixarea.de) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of guru@unixarea.de designates 178.254.4.101 as permitted sender) smtp.mailfrom=guru@unixarea.de Received: from [62.216.207.221] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rsQ2Y-00Ea2R-Gn; Thu, 04 Apr 2024 18:34:14 +0200 Received: from localhost.my.domain (c720-1400094 [127.0.0.1]) by localhost.unixarea.de (8.17.1/8.14.9) with ESMTP id 434GYEPr030587; Thu, 4 Apr 2024 18:34:14 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.17.1/8.14.9/Submit) id 434GYDWI030558; Thu, 4 Apr 2024 18:34:13 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Thu, 4 Apr 2024 18:34:13 +0200 From: Matthias Apitz To: Paul Mather , "Edward Sanford Sutton, III" , freebsd-questions@freebsd.org Subject: Re: changing ext. USB disk to UEFI boot Message-ID: Reply-To: Matthias Apitz Mail-Followup-To: Paul Mather , "Edward Sanford Sutton, III" , freebsd-questions@freebsd.org References: <9E39CC23-F507-428E-9B03-C0BE482BAE84@gromit.dlib.vt.edu> 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD 14.0-CURRENT r1400094 (amd64) X-message-flag: Mails in HTML will not be read! Please, only plain text. X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 62.216.207.221 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.80 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MID_RHS_NOT_FQDN(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:178.254.4.101]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[unixarea.de]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_TO(0.00)[gromit.dlib.vt.edu,hotmail.com,freebsd.org]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; HAS_XAW(0.00)[]; ASN(0.00)[asn:42730, ipnet:178.254.0.0/19, country:DE]; HAS_REPLYTO(0.00)[guru@unixarea.de]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; HAS_XOIP(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; REPLYTO_EQ_FROM(0.00)[] X-Rspamd-Queue-Id: 4V9Ryz3Hnpz4bK0 El día jueves, abril 04, 2024 a las 02:40:54p. m. +0200, Matthias Apitz escribió: > First, I will do one last test and copy also /boot/boot1.efi into the > efi partition as /EFI/BOOT/BOOT1.efi because the man page of > boot1.efi(8) says that some system can not use loader.efi(8) directly. This didn't helped either. At the end I did with the new USB disk: # gpart delete -i 1 da0 # gpart destroy da0 # gpart create -s gpt da0 # gpart add -t efi -s 260M -l freebsd-efi da0 # gpart add -t freebsd-ufs -l extrootfs -s 256g da0 # newfs_msdos -F 32 -c 1 /dev/da0p1 # mount -t msdosfs /dev/da0p1 /mnt # mkdir -p /mnt/EFI/BOOT # cp /boot/loader.efi /mnt/EFI/BOOT/BOOTX64.efi # umount /mnt # newfs -U -L FreeBSD /dev/da0p2 # mount /dev/da0p2 /mnt # mkdir /mnt/boot # cp -Rp /boot/* /mnt/boot # umount /mnt With this the USB disk was presented in the laptop as boot device and also the FreeBSD boot menue came up. I've still to fill the /dev/da0p2 with the system. I wanted to do this with: # mount /dev/da0p2 /mnt # cd /mnt # dump -0Lauf - /dev/da1p2 | restore -rf - but this take 24++ hours. So I will do in with: # cd /usr/src # make installworld DESTDIR=/mnt # make installkernel DESTDIR=/mnt # make distrib-dirs DESTDIR=/mnt # make distribution DESTDIR=/mnt # .... The produced layout is now: # gpart list da0 Geom name: da0 modified: false state: OK fwheads: 255 fwsectors: 63 last: 1953458135 first: 40 entries: 128 scheme: GPT Providers: 1. Name: da0p1 Mediasize: 272629760 (260M) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 efimedia: HD(1,GPT,d7321d02-f295-11ee-ab68-9cd21e857279,0x28,0x82000) rawuuid: d7321d02-f295-11ee-ab68-9cd21e857279 rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b label: freebsd-efi length: 272629760 offset: 20480 type: efi index: 1 end: 532519 start: 40 2. Name: da0p2 Mediasize: 274877906944 (256G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e1 efimedia: HD(2,GPT,ed085ae9-f295-11ee-ab68-9cd21e857279,0x82028,0x20000000) rawuuid: ed085ae9-f295-11ee-ab68-9cd21e857279 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: extrootfs length: 274877906944 offset: 272650240 type: freebsd-ufs index: 2 end: 537403431 start: 532520 Consumers: 1. Name: da0 Mediasize: 1000170586112 (931G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e2 Thanks for all hints matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub