Quote:
nbhusain, could you help me compile xen on archlinux? the pkgbuild on aur fails for me for some reason on the stubdom.
Sure, here's my xen-4.1.4 pkg based on xen-4.2 AUR pkg, it contains patches for AMD vga passthrough, if you have an AMD card and you wish to enable these patches, you have to copy your bios file to vgabios-pt.bin on the root folder (replace mine), otherwise you can disable it by commenting out these lines:
- patch -Np1 -i ../xen-4.1.3.ati-passthrough.patch
- patch -Np1 -i ../loadbios.patch
- cp ../../vgabios-pt.bin tools/firmware/vgabios/vgabios-pt.bin
xen.zip 52k .zip file
Quote:
I'm also trying to mess with uefi for now. I just managed to make it boot with rEFInd, but how would I boot the xen kernel? I googled around and found that xen has a xen.efi, but how do I pass the kernel parameters?
Assuming you already installed arch on uefi mode, you can boot xen from grub by creating a grub cfg file on /etc/grub.d/
Here's mine:
Code:
cat /etc/grub.d/05_xen
Code:
#!/bin/sh
exec tail -n +3 $0
menuentry 'XEN' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-89ae0638-a44f-45be-b983-d65ac23e13b4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2 8f5355af-14eb-4f86-930a-de7ece6a8114
else
search --no-floppy --fs-uuid --set=root 8f5355af-14eb-4f86-930a-de7ece6a8114
fi
echo 'Loadin XEN'
multiboot /xen-4.1.4.gz xsave=1 dom0_max_vcpus=2 dom0_vcpus_pin noselfballooning dom0_mem=3850M cpuidle
echo 'Loading Linux core repo kernel ...'
module /vmlinuz-linux root=/dev/mapper/vg0-root ro xen-pciback.permissive xen-pciback.hide=(00:11.0)(00:12.0)(00:12.2)(00:16.0)(00:16.2)(04:00.0)(05:00.0)(06:00.0)(07:00.0)(07:00.1) nomce
echo 'Loading initial ramdisk ...'
module /initramfs-linux.img
}
Booting XEN on uefi at this point is kind of pointless, as xen provides its own memory map for dom0, and you cant access efivars from it.
EDIT:
This is how i got xen-4.2.1 efi to boot from grub2:
Code:
cat /etc/grub.d/04_xen
Code:
menuentry 'XEN' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-89ae0638-a44f-45be-b983-d65ac23e13b4' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd1,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2 8f5355af-14eb-4f86-930a-de7ece6a8114
else
search --no-floppy --fs-uuid --set=root 8f5355af-14eb-4f86-930a-de7ece6a8114
fi
echo 'Loadin XEN'
chainloader /xen-4.2.1.efi -cfg=xen.cfg
}
Code:
[global]
default=arch
[arch]
options=loglvl=all xsave=1 dom0_max_vcpus=2 dom0_vcpus_pin noselfballooning dom0_mem=3850M cpuidle
kernel=vmlinuz-linux root=/dev/mapper/vg0-root ro xen-pciback.permissive xen-pciback.hide=(00:11.0)(00:12.0)(00:12.2)(00:16.0)(00:16.2)(04:00.0)(05:00.0)(06:00.0)(07:00.0)(07:00.1) nomce
ramdisk=initramfs-linux.img
EDIT2: Quick update, you need to build binutils with "--enable-targets=x86_64-pep" for xen.efi to build, here's an edited binutils-multilib pkg:
binutils.zip 2k .zip file
Edited by nbhusain - 2/12/13 at 10:56pm