From owner-freebsd-questions@FreeBSD.ORG Thu Dec 25 14:32:21 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A298C309 for ; Thu, 25 Dec 2014 14:32:21 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2368364BC4 for ; Thu, 25 Dec 2014 14:32:21 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id n12so13015673wgh.8 for ; Thu, 25 Dec 2014 06:32:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=B6BIY3AL+LQLdW0p/qI0NGtUwl/U4ZUTMS7vamKds+I=; b=DBLsfEMVDAqkaDthhsezWG7Y3v/WHopQszL8pZYcNwnXvg+vc3tZITQkis1aypIoep yURWnwvvfZLkZJlNWm+8y1s8m+fX4GI7FrsyUKQG6uSFlGB8P0xAZu7pzyI3/oJ37tsy ySH2+hTshw5s1Yg+ZKXRTMCAzp1ufPJPcudd1nTlQuBW0p1WAVeRZ3zI53X+S19nMPFo vJEhJLYwY+6B1RDQpQFEB74dY7v9IksUbs2j6WiplNs4yfsNphYLDG+cKyJzRS4Zrx3y Plmweygpcshz/Y+NOz73s4BhBbHcmUqyIM3fsWlOPh4cn3g2/t2HRQGo5qQOyeptRWnL SkuQ== MIME-Version: 1.0 X-Received: by 10.180.88.165 with SMTP id bh5mr61432171wib.77.1419517939521; Thu, 25 Dec 2014 06:32:19 -0800 (PST) Received: by 10.217.46.132 with HTTP; Thu, 25 Dec 2014 06:32:19 -0800 (PST) Date: Thu, 25 Dec 2014 15:32:19 +0100 Message-ID: Subject: FreeBSD 10.1-STABLE: UEFI booting from USB flash drive + FBSD system on HDD From: Julien Meister To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 14:32:21 -0000 Hello everybody, I've been trying to make UEFI booting work on my Thinkpad T420. My goal is (as I had previously done with BIOS) to boot FreeBSD from a USB flash drive with my laptop hard drive encrypted. The T420 is able to boot using UEFI if the /boot partition is on the same disk as the other partitions. So installing FreeBSD on a USB flash drive OR on the HDD works fine with UEFI. (I haven't tested encryption yet) However, when trying to boot from USB and then access the ROOT partition on the HDD (which will be the case later when my HDD will be encrypted), I get the following panic: *>> FreeBSD EFI boot block* *Loader path: /boot/loader.efi* *File /boot/loader.efi not found* *panic: Load failed* =3D> USB flash drive contains: EFI partition + /boot =3D> HDD contains the rest (which will be encrypted) Here are the commands I used (without encryption for the moment): *# gpart destroy -F ada0* *# gpart destroy -F da0* *# gpart create -s gpt ada0* *# gpart create -s gpt da0* Create the EFI and /boot partition on the USB flash drive: *# gpart add -t efi -a 4K -l bootefi -s 800K da0* *# gpart add -t freebsd-ufs -l usbboot -s 768M da0* Prepare the EFI partition: *# dd if=3D/boot/boot1.efifat of=3D/dev/gpt/bootefi* Partition the HDD. For this example, I will only use one big / partition. *# gpart add -t freebsd-ufs -a 4K -l gprootfs ada0* Newfs and mount everything: *# newfs /dev/gpt/usbboot* *# newfs /dev/gpt/gprootfs* *# mkdir /tmp/mnt* *# mount /dev/gpt/gprootfs /tmp/mnt* *# mkdir /tmp/mnt/boot* *# mount /dev/gpt/usbboot /tmp/mnt/boot* Install FreeBSD: *# sh* *# for file in kernel.txz base.txz lib32.txz; do * *untar --unlink -xpvJf ${file} -C /tmp/mnt done* chroot into the new system and create /etc/fstab and /boot/loader.conf *#chroot /tmp/mnt* =3D> Edit /boot/loader.conf *#echo 'vfs.root.mountfrom=3D"ufs:/dev/gpt/gprootfs"' > boot/loader.conf* =3D> Edit /etc/fstab *#echo '/dev/gpt/gprootfs / ufs rw 1 1' > etc/fstab* Unmount everything and reboot *#exit* *#cd /* =3D> Unmount usb flash drive *#umount /tmp/mnt/boot * =3D> Unmount hdd *#umount /tmp/mnt* *#reboot* And I get a panic (as shown above) *>> FreeBSD EFI boot block* *Loader path: /boot/loader.efi* *File /boot/loader.efi not found* *panic: Load failed* Any idea on how to make this work with UEFI? From what I understood, EFI tries to boot on the first ufs partition found. It should be therefore [FILE]da0p2[/FILE] ... but it isn't. Thank you very much =E2=80=8B Julien