From owner-freebsd-virtualization@freebsd.org Tue Jan 17 22:47:51 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 2C419CB5686 for ; Tue, 17 Jan 2017 22:47:51 +0000 (UTC) (envelope-from vincent@up4.com) Received: from smtp109.iad3a.emailsrvr.com (smtp109.iad3a.emailsrvr.com [173.203.187.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A4E11AF9 for ; Tue, 17 Jan 2017 22:47:50 +0000 (UTC) (envelope-from vincent@up4.com) Received: from smtp6.relay.iad3a.emailsrvr.com (localhost [127.0.0.1]) by smtp6.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 6D0B355A3 for ; Tue, 17 Jan 2017 17:47:47 -0500 (EST) X-Auth-ID: vincent@up4.tv Received: by smtp6.relay.iad3a.emailsrvr.com (Authenticated sender: vincent-AT-up4.tv) with ESMTPSA id 45595558E for ; Tue, 17 Jan 2017 17:47:47 -0500 (EST) X-Sender-Id: vincent@up4.tv Received: from un.up4.com ([UNAVAILABLE]. [69.55.244.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:465 (trex/5.7.12); Tue, 17 Jan 2017 17:47:47 -0500 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Arch Linux UEFI Bhyve Setup From: Vincent Olivier In-Reply-To: <850ef0cd-131a-8c18-ee0a-fe044293360d@freebsd.org> Date: Tue, 17 Jan 2017 17:47:46 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <680F62F7-9FD7-4FB3-A60A-DED3C784BE7F@up4.com> <8D5F1A67-DC29-4443-8128-B590CCC4B219@up4.com> <850ef0cd-131a-8c18-ee0a-fe044293360d@freebsd.org> To: freebsd-virtualization@freebsd.org X-Mailer: Apple Mail (2.3124) 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: Tue, 17 Jan 2017 22:47:51 -0000 Hi Peter, It works! Thanks so much to everyone who helped me! I will see about the = stability of this thing in the next few days. If it is as stable as the = MBR/GRUB VMs, I will redo them all. Regards, Vincent > Le 9 janv. 2017 =C3=A0 01:28, Peter Grehan a = =C3=A9crit : >=20 > Hi Vincent, >=20 >> 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 >=20 > The live ISO can be repacked to work with a serial console. The only = complication is that the systemd-boot (aka gummiboot, Arch's UEFI = loader) are embedded in a FAT filesystem image. >=20 > The repack steps are: >=20 > 1. Install the cdrtools-devel package to get mkisofs >=20 > 2. Extract the contents of the Arch iso into a working directory >=20 > # cd /path/to/work_dir > # tar xf /path/to/archlinux-2017.01.01-dual.iso >=20 > 3. Find the label of the ISO (to be used in the repack) >=20 > # isoinfo -d -i /path/to/archlinux-2017.01.01-dual.iso | grep = ^Volume\ id > Volume id: ARCH_201701 >=20 > 4. Set up a vnode-backed md for the FAT boot image and mount it >=20 > # mdconfig -f EFI/archiso/efiboot.img > # mount_msdosfs /dev/md0 /mnt >=20 > 5. Edit the config file, adding serial console lines to the 'options' = line >=20 > # vi /mnt/loader/entries/archiso-x86_64.conf > .... > options archisobasedir=3Darch archisolabel=3DARCH_201701 = console=3Dtty0 console=3DttyS0 >=20 > 6. Unmount the filesystem (updating the FAT filesystem image) and = cleanup the md >=20 > # umount /mnt > # mdconfig -d -u 0 >=20 > 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. >=20 > # 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 . >=20 > The system can now be booted with a serial console. An example command = line with serial output on the nmdm device is >=20 > 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 >=20 > later, >=20 > Peter. >=20 >=20