Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2017 17:47:46 -0500
From:      Vincent Olivier <vincent@up4.com>
To:        freebsd-virtualization@freebsd.org
Subject:   Re: Arch Linux UEFI Bhyve Setup
Message-ID:  <A4832DD5-F2DE-4A16-ACF8-E57AD107CA6D@up4.com>
In-Reply-To: <850ef0cd-131a-8c18-ee0a-fe044293360d@freebsd.org>
References:  <E37D5989-6675-4EF9-937C-54E29766DAC3@up4.com> <680F62F7-9FD7-4FB3-A60A-DED3C784BE7F@up4.com> <dc972f59-db08-132a-7d60-f813ee9a79e1@freebsd.org> <A360F436-D9C6-4731-8C54-07134970CFDF@up4.com> <8D5F1A67-DC29-4443-8128-B590CCC4B219@up4.com> <850ef0cd-131a-8c18-ee0a-fe044293360d@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <grehan@freebsd.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A4832DD5-F2DE-4A16-ACF8-E57AD107CA6D>