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

[Xen-users] Advice on compiling Xen 4.1.2 on Debian 6.0.4 Kernel 3.1.12

Just for a quick background:
I have tried to get Xen to compile and function on Ubuntu 10.04 last year but never could so gave up. I built a new computer to act as a server and started messing with Xen again about 3 weeks ago and have tried to compile kernel and xen a dozen times but still having problems loading Xen. I have read ever post i can find about this and the steps don't seem very hard in general and I think i have most of the steps down, but still missing something. So, as a result i gave in and figured i ask for some advice on my procedure to get it all working.

I am also still very new to Linux and Xen and so far i find Linux very finicky and quirky. Once simple example is i downloaded the ATI Catalyst drivers as a zip file for Linux86_64 for my card, copied file to FAT32 formatted SD Flash card, later copied the file back to Debian desktop, extracted it, double clicked on "amd-driver-installer.run" file, selected "run", type in password for root access, and than it kept giving me a pop-up message about "You must be logged in as SUPER-USER to run this file" (did that 6 different times). But, once i re-downloaded the file from the ATI website, the file ran fine without that message.

My first message here i will explain things in gory detail, hope no one minds or kills me for it.. :)

Main Goal:
I really just want a server running the latest stable Xen Hypervisor so i can remotely log into it, create VM images of Windows 7, XP, and different Linux flavors, install on Windows VM programs and games to run remotely. This way if i change my server hardware, i don't need to reinstall windows again, all drivers, all programs all over again, each and every time. Done that way too much. It is also important that i get VGA Passthru to work so i can get full video card acceleration and features in things like AutoCAD or games.

I have looked into XCP (Xen Cloud Platform) and it is very promising, but don't seem to be very up to date with xen. Very much like XenServer but they have XenCenter/XenDesktop to manage it, which seems quite a nice program. However, it is not free and can't find a free version of XenCenter to manage XCP. I am sure there are others but still learning. For now just wanted to try a Dom0 with Xen compiled. Finally, i don't even know how VGA Passthru works on XCP or if it even does.

Hardware Setup:
Mobo: AMD Asrock Fatal1ty 990FX Professional
CPU: AMD Phenom II X3 720 Black Edition (Unlocked to x4)
RAM: 16GB DDR3-16000 (4x 4GB)
HDD1: Corsair Force3 60GB SSD
HDD2: Seagate Momentus XT 500GB
Video: ATI FirePro V7900 - Driver name, propitiatory (non-free),  "FirePro_8.911.3.1_Linux_X32X64_132092.xip". Latest on ATI website

- All hardware tested for 3-4 days and all seem very stable

- I choose the ATI FirePro V7900 card as it seemed quite a bad-ass card for AutoCAD and similar, but also has very good support for Linux drivers, so gets rid of my headache of trying to make other Video cards to work.

- HDD1 only has Debian 6.0.4 AMD64 and partitioned as:
/             - 50GB
/tmp      - 4GB
swap    - 1GB

-HDD2 is later going to have LVM volume for VM images (not gotten to it)

- I wanted to RAID0 two Seagate Momentus XT hard drives to speed up loading VM images, but from what i read, setting up RAID in linux is quite a pain. It is better to get a dedicated SATA RAID card, but those are expensive and spent enough on this setup (video card being the most expensive).

Software Install Procedure:
- Installed Debian 6.0.4 CD1 from USB
- Selected to install Kernel 2.6.32-5-amd64
- Remove CD-ROM from repository source list

Installed dependent packages
- sudo apt-get install bcc bin86 binutils bison bridge-utils build-essential bzip2 coreutils debootstrap dkms e2fslibs-dev fakeroot flex gawk gcc git-core grep gzip iasl initramfs-tools iproute kernel-package libbz2-dev libc6-dev libconfig-inifiles-perl libcurl3 libcurl4-openssl-dev libfile-slurp-perl libjpeg62-dev libncurses5-dev libsdl1.2-dev libtext-template-perl libvncserver-dev libx11-dev make mercurial mawk module-init-tools ocaml ocaml-findlib patch pciutils-dev python python-dev python-twisted subversion texinfo texlive-fonts-extra texlive-fonts-recommended texlive-latex-base texlive-latex-recommended tgif transfig uuid-dev zlib1g-dev

Needed for "xconfig"
- sudo apt-get install qt4-dev-tools

For 64bit version of Debian/Ubuntu you need these
- sudo apt-get install gcc-multilib xz-utils

I read on one site that if using version "kernel-package 12.036+nmu1", have to install a patch "linuxv3.diff". Don't know anything about it, but was following it here: http://users.wowway.com/~zlinuxman/Kernel.htm
- sudo cp ./Desktop/KERNEL_BUILD/linuxv3.diff /usr/share/kernel-package
- cd /usr/share/kernel-package
- sudo patch -p1 <linuxv3.diff
- sudo rm linuxv3.diff

Downloaded linux-3.2.12.tar.bz2 from Kernel.org
- cd ./Desktop/KERNEL_BUILD/Kernel
- tar xjf linux-3.2.12.tar.bz2
- cd linux-3.2.12

Make config for new kernel
- make menuconfig (just ran that, saved and exited)

I read that even if you use xconfig should at least run menuconfig as it needs to create something.
- make xconfig

Than edited the config to include these changes: (I just used gedit as it seemed faster to use search function for all of these)


QUESTION1: None of the kernel config files i have looked at had CONFIG_FRONTSWAP in there. Not 3.2.12, 3.2.11, 3.1.10, 3.0.25, going back to Where can you find that option and do you really need it? I read this link, http://www.phoronix.com/scan.php?page=news_item&px=MTA0MjM, and said "Cleancache was merged into the Linux kernel last May for the 3.0 release, but the Frontswap support is still missing in action as the work is more controversial..etc". BUT i can't find any kernel config that even has it.


QUESTION2: I noticed that 4 items above are set to compile as module "=m", do they really must be set to "=m" or can they be set to "=y". I read on a few sites that they started to compile all XEN options into kernel instead of module. I have done that a few times during my trial and error, but don't understand if it MUST be "=m" or "=y".

First time around i had config exactly as listed above. Everything else i left alone as menuconfig generated.

Compile Kernel
- make-kpkg clean
- sudo fakeroot make-kpkg -j5 --initrd kernel_image kernel_headers

Install Kernel
- cd ..
- sudo dpkg -i linux-headers-
- sudo dpkg -i linux-image-

Edit "/etc/default/grub"
- Uncomment #GRUB_DISABLE_LINUX_RECOVERY="true" to disable generation of recovery mode menu entries. (Only did that as there were too many menuentries generated after xen was installed)
- Added GRUB_DISABLE_OS_PROBER=true to the end of file

- sudo update-grub2


At this point, it boots into kernel 3.2.12 just fine, nothing i can tell comes up on screen, gets into login screen and all seems perfectly ok, SO onto compiling Xen.

Download current stable Xen 4.1.2
- cd ./Desktop/KERNEL_BUILD/Xen
- tar xf xen-4.1.2.tar.gz
- cd xen-4.1.2

Make Xen
- make -j5 xen
- make -j5 tools
- make -j5 stubdom

Install Xen
- sudo make install-xen
- sudo make install-tools PYTHON_PREFIX_ARG=
- sudo make install-stubdom

Updated /etc/modules to read
# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

loop max_loop=64

#The following itmes were added for Xen to run

Update contents of file /etc/grub.d/40_custom
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'Debian Linux 3.2.12 with XEN 4.1.2' --class debian --class gnu-linux --class gnu --class os --class xen {
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    search --no-floppy --fs-uuid --set=root b465ee5c-d6ab-4475-a15f-9115a0799b17
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root b465ee5c-d6ab-4475-a15f-9115a0799b17   
    echo    'Loading Linux upd3.2.12 ...'
    multiboot /boot/xen-4.1.2.gz placeholder
    module    /boot/vmlinuz-3.2.11 placeholder root=UUID=b465ee5c-d6ab-4475-a15f-9115a0799b17 dom0_mem=1024M ro nomodeset
    echo    'Loading initial ramdisk ...'
    module    /boot/initrd.img-3.2.12
Update Grub
- sudo update-grub2

QUESTION3: When you run update-grub2, WHY does xen create SO many menuentries? For xen.gz, xen4.gz, xen4.1.gz, xen4.1.2.gz and syms-xen4.gz or something like that? DO YOU really need all of those? Can you get rid of them or hide them from "update-grub2" adding them to the boot menu?

REBOOTED INTO "Debian Linux 3.2.12 with XEN 4.1.2"

Computer loads grub, i select that menuentry above, it loads the linux part, but when it gets to the xen, i get a black screen. The only thing i can see on there is a cursor at the top left hand corner blinking rapidly, barely visible.

NOW, throughout all of this, i never installed any additional drivers for my ATI Video card. However, when i start to install it at different times in the above process, i get different results. Once i get the black screen with blinking cursor, i reboot into Kernel 3.2.12, install ATI drivers, than reboot into Xen again, BUT THIS time i get nothing on the screen, just all black. I have done this several times, even with Kernel 3.2.11 and still black. I have not messed with Serial Console Output for debugging, as i have no cable to second computer, nor would I know how to read the output messages.

I have installed ATI drivers right after a fresh install of Debian 6.0.4, than i apt-get install all above packages, than ATI drivers seem to no longer provide 3D acceleration as the graphics seems sluggish. I re-run the ATI installer, reboot and it is all fine again. Yet, if i still compile kernel and xen, Xen still wont load.

I did get xen to load just ONCE, with Kernel 3.2.11 when i got the rapidly blinking cursor screen, i rebooted into plain Kernel 3.2.11, installed the previously mentioned ATI driver, than xen loaded. But, i wanted to redo it again, and could never reproduce what i did and Xen so far has not loaded for me.

All steps seem OK and reasonable to follow, but I am missing something(s), not doing something in the right order, etc. I have read the WIKI pages and many others, and keep compiling and trying.

I know this was a LONG description, but hopefully someone can advice or give input on anything i wrote here. See what i missed and need to do different. Thank you very much to any and all.

Xen-users mailing list



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