[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Xen black screens while booting in Arch Linux with UEFI GRUB



> On Sat, 2013-12-14 at 03:49 -0300, Zir Blazer wrote:
> > Basically, the issue I have goes like this: After installing Arch
> > Linux in UEFI mode, I install Xen on top of it following Arch Linux
> > wiki instructions for Xen. GRUB allows me to choose to load Xen Arch,
>
> I don't know if this is related but AFAIK Xen does not currently support
> being launched under UEFI via a bootloader.
>
> Instead xen.efi is a UEFI application which can be launched from the EFI
> shell directly (i.e. instead of grub.efi).
>
> http://xenbits.xen.org/docs/4.3-testing/misc/efi.html has some details
> of the config file used here.
>
> People are working on launching Xen via bootloaders under UEFI but I
> don't think it is complete/available yet in any released (or unreleased
> ror that matter) version of Xen.

There was a guy that posted recently a guide of how to build the xen.efi file on Arch Linux Forums, here:

I followed his instructions modifying binutils for x86_64-pep support, and also when building Xen, I uncommented a PKGBUILD line that was for a Radeon passthrough patch. It builded sucessfully and I got my hands on the xen-4.3.1.efi file, that I tried to use with Gummiboot, but it also failed to boot. 

So far, I tested the following combinations:

GRUB UEFI-GPT: Black screens after either "Dom0 detected maximum 4 vCPUs" (It should be 8, not 4), or "Scrubbing RAM" if I modify /etc/xen/grub.conf to add a limit to Dom0 visible RAM to make a new grub.cfg. After choosing it from the boot menu, by default it uses what looks like a DOS VGA 640x480 mode. Arch Linux manages to boot fine.
Syslinux UEFI-GPT: Crashes as soon as I choose Xen from the menu - doesn't even says that it loaded the images or made the RAMDisk. Arch Linux manages to boot fine with this one, too.
Gummiboot UEFI-GPT + EFI file: Goes a bit further than with GRUB, but ultimately fails. It detects 8 vCPUs, and throws in 4 more lines than when I try to boot with GRUB (Too fast to look what they say). By default it uses some text-based video mode with very large letters that looks quite bad when compared to VGA 640x480. Arch Linux also works fine when booted from Gummiboot.

Due to the fact that I tested three different Boot Loaders on the same base Arch Linux installation and touched a lot of things trying to make Xen work, there are chances that I screwed something in the process (This includes some obscure BIOS setting, for that matter). So maybe the last combination COULD work if I do it with a fresh install, as this is supposed to be the proper way to do it and there is already a guy claiming sucess doing this. However, I would love to know if there is anything else that I could test before starting from scratch again, as there seems to be too many variables involved and I need a miracle to hit all the correct ones at the same time. I have been ramming my head to the wall for the last two weeks and I feel tired already of trying tons of things to no avail.


Additionally, this is what it worked for me:

Syslinux BIOS-GPT: This is the only one I managed to get working, also building xen with the Radeon patch uncommented in PKGBUILD. At the moment, I'm running a sort of hybrid combination, as Syslinux wrote on the HD MBR to make booteable the partition where that Arch Linux + Xen installation is located, yet I can also choose from the BIOS to launch Gummiboot and from it, boot to my everyday Arch Linux installation.


Albeit it seems that Xen plays nice in this fashion, I *STILL* didn't managed to get my Radeon 5770 passthroughed properly (I think I should leave this for another mail with a proper topic, but...). Steps I did:

- Connecting second VGA Monitor on the Radeon DVI-I port with a DVI-I to VGA adapter. Should work, it used to do so in my old computer with Windows XP.
- I used xl pci-assignable-add to hide the Radeon from Xen, but my later test had them included in /boot/syslinux/syslinux.cfg. Xen option looks like this:

LABEL xen
    MENU LABEL Xen
    KERNEL mboot.c32
    APPEND ../xen-4.3.1.gz --- ../vmlinuz-linux console=tty0 root=/dev/sda5 rw xen-pciback.hide=(01:00.0)(01:00.1) --- ../initramfs-linux.img

- Making sure both devices (GPU and HDMI sound device) appears when using xl pci-assignable-list.
- Making sure the VM .cfg file is correctly set with these devices. VM's .cfg is this:

name = "wxpmain"
kernel = "/usr/lib/xen/boot/hvmloader"
builder = 'hvm'
memory = 1536
boot = "c"
vcpus = 4
vif = ['bridge=xenbr0']
device_model = 'qemu-xen-traditional'
serial = 'pty'
pae = 1
acpi = 1
apic = 1
disk = ['file:/root/wxp_sp3.img,hda,w']
opengl = 1
sdl = 0
vnc = 1
vnclisten = ""
vncpasswd = ""
stdvga = 0
gfx_passthru = 0
pci = ['01:00.0','01:00.1']

Its using less than 2 GB of RAM just to make sure that I'm not hitting the old 2 GB memory wall bug when using VGA passthrough, and qemu-xen-traditional instead of qemu-dm because I heared that last qemu-vm version had issues with VGA passthrough, too.
I'm using a IMG disk image, not a LVM partition this time.
I NEVER managed to get it working with gfx_passthru = 1 because xl create throws libxl errors and doesn't creates the VM.

- Create the VM using xl create, and accessing it using vncviewer. Also tested a bit with sdl = 1.
- Windows XP was installed without the devices passed to it, I think I also did the installation with the Cirrus Logic VGA (stdvga = 0). I installed the GPLVM Drivers too, before stopping and recreate the VM to pass the Radeon. When I create the VM with the Radeon included, it also complains that it detects a "xen pci device #0" that it doesn't have Drivers for, through by googling a bit seems to be normal behaviator.
- After installing Catalyst, testing both full CCC or Driver-only, I didn't managed to get it working properly. Usually, it sees the Radeon 5770 with a yellow exclamation mark and says it throws a Code 12 error in Device Manager (Not enough resources). I googled the error, supposedly a possible solution was using qemu-xen-traditional as I am doing (Heck, you Ian, and Gordan too, appear on pretty much all of those Mailing List Threads!).
- I tried with both Cirrus Logic and Standard VGA. If I disable Cirrus Logic from Safe Mode and reboot to force Windows to use the Radeon, it takes around one or two minutes after the WXP splash screen for the Monitor to finally turns on instead of being in standby, but it displays yet another black screen, and on vncviewer I see a BSOD complaining about a file of ATI Drivers (ati2dvag if I recall correctly) some seconds after the Monitor turns on. Monitor never display neither image or garbage, its just a black screen.
- Due to the Radeon issue when rebooting VMs due to no Soft Device Reset or something like that, I tried rebooting the computer everytime I was going to create the VM to test if it worked or not. Actually, the Monitor stays turned on with a black screen after each failed try until I reboot the machine, which I suppose that is the lack of Soft Device Reset in action.
- There was only ONE time I actually saw an image on the Monitor connected to the Radeon, and it was the first time I tried Xen with Syslinux BIOS-GPT before messing with Xen and UEFI two weeks ago. It displayed a screen where white pixel lines were filling in, like what it usually does with vncviewer or SDL when the VM changes its VGA mode (Like when it goes from DOS like boot to Windows loading screen). Crashed after doing that if I recall correctly, and couldn't reproduce it again.



> (BTW, you didn't say what version of Xen you are using, not too relevant
> this time, but please remember next time).

Its 4.3.1-2. I actually mentioned it in previous mail, but you probabily missed it due to my amazing wall of text :D


Thanks for reading.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.