Arch Linux UEFI Bhyve Setup
Vincent Olivier
vincent at up4.com
Tue Jan 17 22:47:51 UTC 2017
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 à 01:28, Peter Grehan <grehan at freebsd.org> a écrit :
>
> Hi Vincent,
>
>> Nothing works with UEFI console for me so I think I’m going to stick
>> with BIOS-MBR-GRUB for now, unless you have an idea I can try…
>
> 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.
>
> 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 ^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' line
>
> # vi /mnt/loader/entries/archiso-x86_64.conf
> ....
> options archisobasedir=arch archisolabel=ARCH_201701 console=tty0 console=ttyS0
>
> 6. Unmount the filesystem (updating the FAT filesystem image) and 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 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.
>
>
More information about the freebsd-virtualization
mailing list