From owner-freebsd-virtualization@freebsd.org Mon Jan 9 06:28:23 2017 Return-Path: Delivered-To: freebsd-virtualization@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 ED470CA646B for ; Mon, 9 Jan 2017 06:28:23 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 7DEDE103D for ; Mon, 9 Jan 2017 06:28:23 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id 22AB52011484 for ; Mon, 9 Jan 2017 16:28:02 +1000 (AEST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 106892809CC for ; Mon, 9 Jan 2017 16:28:02 +1000 (AEST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id D4rDuW19yG2O for ; Mon, 9 Jan 2017 16:28:01 +1000 (AEST) Received: from Peters-MacBook-Pro-2.local (c-67-180-92-13.hsd1.ca.comcast.net [67.180.92.13]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 56F4D280991; Mon, 9 Jan 2017 16:27:59 +1000 (AEST) Subject: Re: Arch Linux UEFI Bhyve Setup To: Vincent Olivier References: <680F62F7-9FD7-4FB3-A60A-DED3C784BE7F@up4.com> <8D5F1A67-DC29-4443-8128-B590CCC4B219@up4.com> From: Peter Grehan Cc: freebsd-virtualization@freebsd.org Message-ID: <850ef0cd-131a-8c18-ee0a-fe044293360d@freebsd.org> Date: Sun, 8 Jan 2017 22:28:16 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <8D5F1A67-DC29-4443-8128-B590CCC4B219@up4.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=YJDv8VOx c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=5eVCmCvhg37cu/pjidAGzw==:17 a=IkcTkHD0fZMA:10 a=IgFoBzBjUZAA:10 a=GqK1-ANopE_QyggxADoA:9 a=QEXdDO2ut3YA:10 wl=host:3 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 06:28:24 -0000 Hi Vincent, > Nothing works with UEFI console for me so I think I=E2=80=99m going to = stick > with BIOS-MBR-GRUB for now, unless you have an idea I can try=E2=80=A6 The live ISO can be repacked to work with a serial console. The only=20 complication is that the systemd-boot (aka gummiboot, Arch's UEFI=20 loader) are embedded in a FAT filesystem image. The repack steps are: 1. Install the cdrtools-devel package to get mkisofs 2. Extract the contents of the Arch iso into a working directory # cd /path/to/work_dir # tar xf /path/to/archlinux-2017.01.01-dual.iso 3. Find the label of the ISO (to be used in the repack) # isoinfo -d -i /path/to/archlinux-2017.01.01-dual.iso | grep=20 ^Volume\ id Volume id: ARCH_201701 4. Set up a vnode-backed md for the FAT boot image and mount it # mdconfig -f EFI/archiso/efiboot.img # mount_msdosfs /dev/md0 /mnt 5. Edit the config file, adding serial console lines to the 'options' lin= e # vi /mnt/loader/entries/archiso-x86_64.conf .... options archisobasedir=3Darch archisolabel=3DARCH_201701 console=3Dtt= y0=20 console=3DttyS0 6. Unmount the filesystem (updating the FAT filesystem image) and=20 cleanup the md # umount /mnt # mdconfig -d -u 0 7. Repack the ISO, using the volume ID from step 3. Change the name of the repacked iso to whatever is suitable with the '-o' parameter. # mkisofs \ -iso-level 3 \ -V "ARCH_201701" \ -J -joliet-long \ -b isolinux/isolinux.bin -no-emul-boot -c isolinux/boot.cat \ -boot-load-size 4 -boot-info-table \ -eltorito-alt-boot -eltorito-platform 0xEF \ -eltorito-boot EFI/archiso/efiboot.img \ -no-emul-boot \ -o ../arch_repack.iso . The system can now be booted with a serial console. An example command=20 line with serial output on the nmdm device is bhyve \ -c 2 \ -s 0,hostbridge \ -s 3,ahci-cd,/path/to/arch_repack.iso \ -s 10,virtio-net,tap0 \ -l bootrom,/path/to/BHYVE_UEFI_20160526.fd \ -l com1,/dev/nmdm0A \ -s 31,lpc \ -m 2G -H -w \ arch later, Peter.