Zir Blazer
2013-Dec-14 06:49 UTC
Xen black screens while booting in Arch Linux with UEFI GRUB
I posted this on Arch Linux Forums but didn''t received any help, and due to the fact that I don''t know if its an OS-related or Xen-related issue, I prefer to ask in both places to see if I can get an answer.https://bbs.archlinux.org/viewtopic.php?id=174184 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, it starts to boot but suddently black screens right after saying how many CPUs it has detected. If on xen.conf I limit the amount of RAM for Dom0 then generate a grub.cfg file with the changes, it black screens after the Scrubbing RAM step, which is an extra step right after the CPU detection. Some days ago I managed to get Xen working relatively well on my current machine (I didn''t manage to do VGA passthrough - that will come at a later stage. But could install WXP on a LVM partition and the GPLPV Drivers), however, at that time I partitioned using MBR and my Boot Loader was Syslinux. As most examples on Internet for the Xen Boot Loader configuration are for GRUB, not Syslinux, I decided to reinstall from scratch and do a proper installation in UEFI mode and GPT partitioned. After several fresh and fully documented installations, I didn''t manage to get Xen working since then. Due to the fact that I''m still new on Linux (Less than two weeks using Arch Linux) and still didn''t learned how to properly use debugging tools, logs and such, I can''t really put a log of actual issue unless someone explains me how to do so. So for a first Post, until further instructions about what I can do to provide more info, the most data that I can give you is just a step-by-step of what I do after a fresh install of Arch Linux and Xen that causes the issue, to see if anyone can notice if I missed something which isn''t on the wikis and not easy to google without the proper keywords. HARDWAREProcessor: Xeon E3-1245 V3 (Haswell)Motherboard: Supermicro X10SAT (Chipset C226)RAM: 32 GB (4 * 8 GB) AMD Performance Edition RP1866 Unbuffered/Non-ECCHD: Seagate Desktop HDD.15 4 TBVideo Card: Both integrated Intel HD Graphics 4600 and a Radeon 5770 intended for GPU passthrough on Xen, will add a second 5770 laterPower Supply: Seasonic S12II-520Monitors: Samsung SyncMaster 2370H (DVI) and 932N+ (VGA), both currently plugged on the Intel HD Graphics 4600 Any option that the BIOS allows me to choose between Legacy-only or UEFI-only, is configured as UEFI-only. This applies to PCI Express Slots Option ROMs.Video Card order is IGP first, so the Radeon shouldn''t have video output unless after an OS is loaded.All common-sense options (VT-x, VT-d, Hyper Threading, etc) I recognized are enabled.Additional controllers like the ASMedia for SATA-3 Ports or Intel NIC booting ROM are disabled. SOFTWAREarchlinux-2013.12.01-dual.iso (Latest)I wrote the ISO to a Pendrive with dd following these instructions here to make it boot with UEFI modehttps://wiki.archlinux.org/index.php/USB_Flash_Installation_Media#Using_dd_.28Recommended_method.29 xen package from Arch User Repository (Should be 4.3.1-2)Some misc packages. I do a fresh installation of Arch Linux following their wiki instructionshttps://wiki.archlinux.org/index.php/Beginners%27_Guide efivar -l gives output after booting from the UEFI Pendrive, confirming I''m running on UEFI mode.Partitioned the HD with gdisk. Reelevant partitions are a 512 MiB EFI System Partition, a 9.5 GiB for Dom0 Arch Linux with Xen, and some bigger unformatted partitions for LVM.Formatted only the ESP and next-to-be Dom0 partitions with FAT32 and EXT4 respectivel, using mkfs.fat and mkfs.ext4Mounted /dev/sda2 to /mnt and /dev/sda1 to /mnt/boot.Installed Arch Linux to /mnt via pacstrap, with both base and base-devel packages.Used genfstab to generate /etc/fstab. Contents are the two mounted partitions.Chrotted into /mnt with /bin/bash parameters.Some basic configuration: /etc/vconsole.conf, uncommenting some lines on locale.gen, using locale-gen then using export on one. Symlinked appropiate timezone.Enabled DHCP service with systemctl to have Internet ready on next boot (Wired, comes via NIC).Used pacman to install grub, efibootmgr and dosfstools.Installed GRUB with grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheckModified /etc/default/grub to add GRUB_DISABLE_SUBMENU=y line to fix some errors that were popping out with grub-mkconfig and latest Arch Linux ISO.Generated grub.cfg with grub-mkconfig -o /boot/grub/grub.cfgExited, umounted both partitions, rebooted. On the Boot tab, BIOS sees UEFI:arch_grub. It boots fine.After first boot from the Arch Linux installation, I resume preparing for Xen: Modified /etc/pacman.conf to uncomment the [multilib] and its include line, then did pacman -SyyuManually installed package-query and yaourt packages (curl -O, tar, makepkg) from the AUR repository. No issues to install eitherUsed yaourt to download xen. It downloads xen and its dependancies with no issues, compiles and install them Then, I follow the instruccions here:https://wiki.archlinux.org/index.php/XenUse grub-mkconfig to add Xen to the GRUB menu options. It recognizes Xen image and completes sucessfully.Create the Network Bridge xenbr0 with netctl. It works.Use systemctl to enable xenstored.service, xenconsoled.service and xendomains.serviceReboot Now I have the Arch Xen option in the GRUB menu. Choosing it loads the images, loads the RAMDisk, then changes my Monitor to 640x480 (Or it seems like), and starts to boot until it reachs the CPU detected step and black screens. One of the things I managed to test was editing /etc/xen/grub.cfg, by decommenting the XEN_HYPERVISOR_CMDLINE line with xsave=1 and adding dom0_mem=2048M. After remaking grub.cfg with grub-mkconfig, it does an extra step after CPU detection where it says "Scrubbing RAM", after it finishes it black screens. Several tries, fresh installations fully documented (A bit more detailed than above), I didn''t manage to make it work.The standalone Arch stills work fine. Booting with it, I checked the xenconsoled service status and it complains that it failed to start because ConditionPathExist=/proc/xen was not met. The only other place where I saw /proc/xen was on a line that is recommended to be added to fstab for xenfs, which I also tried. After rebooting, Arch Linux throws me to maintenance mode for as long as that line is there, and Arch Xen keeps black screening on the same step. I suppose it could be because /proc/xen depends on booting with the Xen image, which is what I wasn''t able to do, so that error is consequence of that.Additionally, I also did a manual install of Syslinux for UEFI. I could get it working with Arch Linux, but as soon as I choose the Xen option, it instantly crashes. I''m using the parameters from Arch Linux wiki Xen article:https://wiki.archlinux.org/index.php/xen#Modification_of_the_bootloader After googling a lot, I got stuck in this point and didn''t really manage to go beyond it. I wasn''t able to use Xen with UEFI. However, I''m not sure if Xen can or can''t be used, at least for the 4.2 version I found this:http://www.youtube.com/watch?v=-XFyPo7PacM...but not sure if it applies to 4.3+. The only ideas I have: 1 - Parameters that I can try for xen menu option in grub.cfg2 - I heared that Xen can be compiled as a .efi file to be used with UEFI, but don''t know if its mandatory or not. I would need a detailed guide about how to do so. I could post more data or logs if you tell me how to get them. Thanks for reading. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Ian Campbell
2013-Dec-16 10:49 UTC
Re: 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. (BTW, you didn''t say what version of Xen you are using, not too relevant this time, but please remember next time). Ian.
Ian Campbell
2013-Dec-18 08:40 UTC
Re: Xen black screens while booting in Arch Linux with UEFI GRUB
On Wed, 2013-12-18 at 04:03 -0300, Zir Blazer wrote:> GRUB UEFI-GPT: [...] > Syslinux UEFI-GPT: [...] > Gummiboot UEFI-GPT + EFI file: [...]> Due to the fact that I tested three different Boot LoadersAs I said in my original reply xen.efi is supposed to be booted directly from the EFI shell, not via a bootloader. Whether or not that is your problem I don''t know, but that is what I believe is supposed to work, whereas all these others are unknowns, so please try that. (this is because Xen needs to be called EFI Boot Services still available and bootloaders tend to call ExitBootServices before calling the kernel) If it still doesn''t work then I think you should report to the -devel list as a potential bug. According to the MAINTAINERS the relevant maintainer to CC is Jan Beulich <jbeulich@suse.com>.> 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...)Yes, please, VGA passthrough is an entirely different can of worms.> Its 4.3.1-2. I actually mentioned it in previous mail, but you > probabily missed it due to my amazing wall of text :DYes I did, sorry. Ian.