cyberhawk001@gmail.com
2012-Mar-23 18:16 UTC
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) CONFIG_DEBUG_INFO=n CONFIG_PARAVIRT=y CONFIG_XEN=y CONFIG_PARAVIRT_GUEST=y CONFIG_PARAVIRT_SPINLOCKS=y CONFIG_HVC_DRIVER=y CONFIG_HVC_XEN=y CONFIG_XEN_FBDEV_FRONTEND=y CONFIG_XEN_BLKDEV_FRONTEND=y CONFIG_XEN_NETDEV_FRONTEND=y CONFIG_XEN_PCIDEV_FRONTEND=y CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y CONFIG_XEN_FBDEV_FRONTEND=y CONFIG_XEN_XENBUS_FRONTEND=y CONFIG_XEN_SAVE_RESTORE=y CONFIG_XEN_GRANT_DEV_ALLOC=m CONFIG_XEN_TMEM=y CONFIG_CLEANCACHE=y CONFIG_FRONTSWAP=y CONFIG_XEN_SELFBALLOONING=y *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 2.6.32.59. 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. CONFIG_X86_IO_APIC=y CONFIG_ACPI=y CONFIG_ACPI_PROCFS=y CONFIG_XEN_DOM0=y CONFIG_PCI_XEN=y CONFIG_XEN_DEV_EVTCHN=y CONFIG_XENFS=y CONFIG_XEN_COMPAT_XENFS=y CONFIG_XEN_SYS_HYPERVISOR=y CONFIG_XEN_GNTDEV=y CONFIG_XEN_BACKEND=y CONFIG_XEN_NETDEV_BACKEND=m CONFIG_XEN_BLKDEV_BACKEND=m CONFIG_XEN_PCIDEV_BACKEND=m CONFIG_XEN_PRIVILEGED_GUEST=y CONFIG_XEN_BALLOON=y CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_DEV_EVTCHN=y CONFIG_XEN_GNTDEV=y *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-3.2.2.12_3.2.12-10.00.Custom_amd64.deb - sudo dpkg -i linux-image-3.2.2.12_3.2.12-10.00.Custom_amd64.deb 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 *REBOOTED INTO KERNEL 3.2.12* 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. firewire-sbp2 loop max_loop=64 #The following itmes were added for Xen to run xen-evtchn xen-gntdev xen-netback xen-blkback xenfs blktap -------------------------------------------------------------------------- Update contents of file /etc/grub.d/40_custom -------------------------------------------------------------------------- #!/bin/sh 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 { recordfail 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 Xen-users@lists.xen.org http://lists.xen.org/xen-users
Casey DeLorme
2012-Mar-23 19:04 UTC
Re: Advice on compiling Xen 4.1.2 on Debian 6.0.4 Kernel 3.1.12
We have similar objectives with different hardware. Going to share some of my results and answers to a couple of questions, someone else might be better suited or more experienced and knowledgeable. For the kernel flags "m" stands for module, "y" means built-in (to my understanding). The default Debian kernel flags for pciback are "m", but I had no luck getting those to work. If you are going through the hassle of compiling a kernel specially for Xen, you may as well set Xen related flags to "y". When compiling xen from source it creates a .gz file for booting, and three links to that file in the "/boot/" directory. The significance eludes me, perhaps different host systems require that. If you run "ls -l /boot/" you''ll see three of the files have no size, and point to the primary. You can reduce the grub boot options by deleting the links. If you are not modifying the source pre-compile, I have a suggestion that might be easier. Debian Wheezy (7.0) will be the new "stable" in less than four months. You can then install xen hypervisor via aptitude with no effort. If you make compiled a .deb of your kernel you can port it easily too. My tests started with an nVidia card, so Windows 7 HVM had a Code 53 in device manager. I tried patched & compiled source, but still BSOD in W7, since the patches are Windows XP only still. I bought an AMD card which worked with the default source, and package. However, my AMD card had a BSOD when I installed the drivers, which I believe was the fault of my motherboard, so I am waiting on a second test board to arrive. On Fri, Mar 23, 2012 at 2:16 PM, <cyberhawk001@gmail.com> wrote:> *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) > CONFIG_DEBUG_INFO=n > > CONFIG_PARAVIRT=y > CONFIG_XEN=y > CONFIG_PARAVIRT_GUEST=y > CONFIG_PARAVIRT_SPINLOCKS=y > CONFIG_HVC_DRIVER=y > CONFIG_HVC_XEN=y > CONFIG_XEN_FBDEV_FRONTEND=y > CONFIG_XEN_BLKDEV_FRONTEND=y > CONFIG_XEN_NETDEV_FRONTEND=y > CONFIG_XEN_PCIDEV_FRONTEND=y > CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y > CONFIG_XEN_FBDEV_FRONTEND=y > CONFIG_XEN_XENBUS_FRONTEND=y > CONFIG_XEN_SAVE_RESTORE=y > CONFIG_XEN_GRANT_DEV_ALLOC=m > CONFIG_XEN_TMEM=y > CONFIG_CLEANCACHE=y > CONFIG_FRONTSWAP=y > CONFIG_XEN_SELFBALLOONING=y > > *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 2.6.32.59. 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. > > CONFIG_X86_IO_APIC=y > CONFIG_ACPI=y > CONFIG_ACPI_PROCFS=y > CONFIG_XEN_DOM0=y > CONFIG_PCI_XEN=y > CONFIG_XEN_DEV_EVTCHN=y > CONFIG_XENFS=y > CONFIG_XEN_COMPAT_XENFS=y > CONFIG_XEN_SYS_HYPERVISOR=y > CONFIG_XEN_GNTDEV=y > CONFIG_XEN_BACKEND=y > CONFIG_XEN_NETDEV_BACKEND=m > CONFIG_XEN_BLKDEV_BACKEND=m > CONFIG_XEN_PCIDEV_BACKEND=m > CONFIG_XEN_PRIVILEGED_GUEST=y > CONFIG_XEN_BALLOON=y > CONFIG_XEN_SCRUB_PAGES=y > CONFIG_XEN_DEV_EVTCHN=y > CONFIG_XEN_GNTDEV=y > > *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-3.2.2.12_3.2.12-10.00.Custom_amd64.deb > - sudo dpkg -i linux-image-3.2.2.12_3.2.12-10.00.Custom_amd64.deb > > 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 > > *REBOOTED INTO KERNEL 3.2.12* > > 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. > > firewire-sbp2 > loop max_loop=64 > > #The following itmes were added for Xen to run > xen-evtchn > xen-gntdev > xen-netback > xen-blkback > xenfs > blktap > -------------------------------------------------------------------------- > > Update contents of file /etc/grub.d/40_custom > -------------------------------------------------------------------------- > #!/bin/sh > 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 { > recordfail > 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 > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
cyberhawk001@gmail.com
2012-Apr-11 15:56 UTC
Advice on compiling Xen 4.1.2 on Debian 6.0.4 Kernel 3.1.12
I am still trying to get Xen to run on my machine. This time around i did the following: 1.) installed a clean Debian Squeeze 2.) Compiled and installed Kernel 3.3.1 (Config was setup with all defaults using menuconfig AND all xen options were set to Y) 3.) Rebooted into Kernel 3.3.1 4.) Upgraded to Debian Wheezy 5.) Setup Serial output to a second PC using null-model cable and added the following to /etc/default/grub GRUB_CMDLINE_XEN="loglvl=all guest_loglvl=all com1=115200,8n1,0x3f8,4 console=com1,vga" GRUB_CMDLINE_LINUX="console=hvc0 earlyprintk=xen" 6.) Using Synaptic, installed *xen-hypervisor-4.1-amd64*, *xen-tools 4.2.1-1*, and it installed all additional dependent packages. 7.) Added the following to /etc/default/grub GRUB_CMDLINE_XEN="loglvl=all guest_loglvl=all com1=115200,8n1,0x3f8,4 console=com1,vga" GRUB_CMDLINE_LINUX="console=hvc0 earlyprintk=xen" The downside is that once i add those lines above, i can''t boot back into the normal non-Xen kernel anymore.... 8.) Rebooted into kernel 3.3.1 with Xen 4.1 AND recorded the trace log, which ended with a KERNEL PANIC I am not experienced with reading trace logs, SO i have attached it here as a TXT file. I am hoping someone can take a quick peek at it as it is not that long and see if it reveals anything of useful to why the kernel panics....... AS always thanks to all... ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Motiejus Jakštys
2012-Apr-11 16:24 UTC
Re: Advice on compiling Xen 4.1.2 on Debian 6.0.4 Kernel 3.1.12
On Wed, Apr 11, 2012 at 18:56, <cyberhawk001@gmail.com> wrote:> I am still trying to get Xen to run on my machine.Hi, I tried to port Xen-4.1 to Squeeze as well. Was tough, but I did it (without libvirt stack, anyway). Basically I built *testing* packages on squeeze using pbuilder and some hacks. Some info here: http://m.jakstys.lt/tech/2012/03/xen-saga-part3/ (most info here) http://m.jakstys.lt/tech/2012/02/xen-part-2/ http://m.jakstys.lt/tech/2012/02/xen_on_squeeze_laptop/ The hypervisor booted, I don't really remember did I made a VM. I used kernel from testing as well (3 something, 3.2? Don't remember now). After a while I gave up.. And now running Xen-4.0 from stable packages. Because it's just too much hassle. Tell us if you manage to run Xen 4.1 on Squeeze , and how :) -- Motiejus Jakštys _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Ian Campbell
2012-Apr-12 07:14 UTC
Re: Advice on compiling Xen 4.1.2 on Debian 6.0.4 Kernel 3.1.12
On Wed, 2012-04-11 at 16:56 +0100, cyberhawk001@gmail.com wrote:> I am still trying to get Xen to run on my machine. This time around i > did the following: > > 1.) installed a clean Debian Squeeze > 2.) Compiled and installed Kernel 3.3.1 (Config was setup with all > defaults using menuconfig AND all xen options were set to Y) > 3.) Rebooted into Kernel 3.3.1 > 4.) Upgraded to Debian Wheezy > 5.) Setup Serial output to a second PC using null-model cable and > added the following to /etc/default/grub > GRUB_CMDLINE_XEN="loglvl=all guest_loglvl=all com1=115200,8n1,0x3f8,4 console=com1,vga" > GRUB_CMDLINE_LINUX="console=hvc0 earlyprintk=xen" > 6.) Using Synaptic, installed xen-hypervisor-4.1-amd64, xen-tools > 4.2.1-1, and it installed all additional dependent packages. > > 7.) Added the following to /etc/default/grub > GRUB_CMDLINE_XEN="loglvl=all guest_loglvl=all com1=115200,8n1,0x3f8,4 console=com1,vga" > GRUB_CMDLINE_LINUX="console=hvc0 earlyprintk=xen" > > The downside is that once i add those lines above, i can''t boot back > into the normal non-Xen kernel anymore....Not sure what this issue is You might have wanted to use GRUB_CMDLINE_LINUX_XEN_REPLACE instead of GRUB_CMDLINE_LINUX since the options you have used there are not going to work with native, although I''d expect it to silently boot with no console and then become available on the network.> > 8.) Rebooted into kernel 3.3.1 with Xen 4.1 AND recorded the trace > log, which ended with a KERNEL PANICA bug was introduce into 3.1.12. A fix is in the pipeline for the next update but in the meantime you can try reverting: commit 73d63d038ee9f769f5e5b46792d227fe20e442c5 Author: Suresh Siddha <suresh.b.siddha@intel.com> Date: Mon Mar 12 11:36:33 2012 -0700 x86/ioapic: Add register level checks to detect bogus io-apic entries (I don''t seem to see anything newer than 3.1.10 in the git tree, how odd) Ian.> > I am not experienced with reading trace logs, SO i have attached it > here as a TXT file. I am hoping someone can take a quick peek at it as > it is not that long and see if it reveals anything of useful to why > the kernel panics....... > > AS always thanks to all... > > > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >
cyberhawk001@gmail.com
2012-Apr-12 12:46 UTC
Re: Advice on compiling Xen 4.1.2 on Debian 6.0.4 Kernel 3.1.12
On 4/12/2012 3:14 AM, Ian Campbell wrote:> On Wed, 2012-04-11 at 16:56 +0100, cyberhawk001@gmail.com wrote: >> I am still trying to get Xen to run on my machine. This time around i >> did the following: >> >> 1.) installed a clean Debian Squeeze >> 2.) Compiled and installed Kernel 3.3.1 (Config was setup with all >> defaults using menuconfig AND all xen options were set to Y) >> 3.) Rebooted into Kernel 3.3.1 >> 4.) Upgraded to Debian Wheezy >> 5.) Setup Serial output to a second PC using null-model cable and >> added the following to /etc/default/grub >> GRUB_CMDLINE_XEN="loglvl=all guest_loglvl=all com1=115200,8n1,0x3f8,4 console=com1,vga" >> GRUB_CMDLINE_LINUX="console=hvc0 earlyprintk=xen" >> 6.) Using Synaptic, installed xen-hypervisor-4.1-amd64, xen-tools >> 4.2.1-1, and it installed all additional dependent packages. >> >> 7.) Added the following to /etc/default/grub >> GRUB_CMDLINE_XEN="loglvl=all guest_loglvl=all com1=115200,8n1,0x3f8,4 console=com1,vga" >> GRUB_CMDLINE_LINUX="console=hvc0 earlyprintk=xen" >> >> The downside is that once i add those lines above, i can''t boot back >> into the normal non-Xen kernel anymore.... > Not sure what this issue is > > You might have wanted to use GRUB_CMDLINE_LINUX_XEN_REPLACE instead of > GRUB_CMDLINE_LINUX since the options you have used there are not going > to work with native, although I''d expect it to silently boot with no > console and then become available on the network.Ya, when i modified those those two lines above in the /etc/default/grub, i was just following the Wiki Page on enabling the Serial Console on Xen so i could view or troubleshoot why Xen was not booting. Just using the line GRUB_CMDLINE_XEN, adds all of those commands to the end of the multiboot line in the grub.cfg for only the XEN menuentries. If i also use the line GRUB_CMDLINE_LINUX, it adds those lines to just to the end of the kernel line for all non-Xen menuentries. Which in this case, prevents those kernels from booting. SO I don''t think those are important to use anyways so i just omit the changes to GRUB_CMDLINE_LINUX and it works just fine.>> 8.) Rebooted into kernel 3.3.1 with Xen 4.1 AND recorded the trace >> log, which ended with a KERNEL PANIC > A bug was introduce into 3.1.12. A fix is in the pipeline for the next > update but in the meantime you can try reverting: > > commit 73d63d038ee9f769f5e5b46792d227fe20e442c5 > Author: Suresh Siddha<suresh.b.siddha@intel.com> > Date: Mon Mar 12 11:36:33 2012 -0700 > > x86/ioapic: Add register level checks to detect bogus io-apic entries > > (I don''t seem to see anything newer than 3.1.10 in the git tree, how > odd) > > Ian.AHH ok i see, so this bug goes back that far in the Kernel revisions. So, the kernel that comes compiled with Debian Wheezy is Kernel 3.2.0.2, is that bug in that version as well or it has been patched / fixed. I have tried before to use Wheezy with the kernel they have for it, 3.2.0.2 and install Xen 4.1 from Synaptic and all that, still didn''t boot. BUT, that was before when i didn''t have the Serial Console Setup yet, so don''t know what the error messages where. IF Kernel 3.1.10 does not have those kind of bugs, i suppose i can just mess around with that version instead. Really do not know how much XEN options or etc have changed from kernel 3.1.10 to 3.3.1 as those are the only things i am concerned about, but if they haven''t, than Kernel 3.1.10 sounds perfectly ok for me REALLY, wish this was a bit easier, BUT all i want to find is just ONE stable kernel that perfectly plays nice with XEN and is in the 3.xx.xx range>> I am not experienced with reading trace logs, SO i have attached it >> here as a TXT file. I am hoping someone can take a quick peek at it as >> it is not that long and see if it reveals anything of useful to why >> the kernel panics....... >> >> AS always thanks to all... >> >> >> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ian Campbell
2012-Apr-12 14:16 UTC
Re: Advice on compiling Xen 4.1.2 on Debian 6.0.4 Kernel 3.1.12
(please don''t drop people from the CC line) On Thu, 2012-04-12 at 13:46 +0100, cyberhawk001@gmail.com wrote:> >> 8.) Rebooted into kernel 3.3.1 with Xen 4.1 AND recorded the trace > >> log, which ended with a KERNEL PANIC > > A bug was introduce into 3.1.12. A fix is in the pipeline for the next > > update but in the meantime you can try reverting: > > > > commit 73d63d038ee9f769f5e5b46792d227fe20e442c5 > > Author: Suresh Siddha<suresh.b.siddha@intel.com> > > Date: Mon Mar 12 11:36:33 2012 -0700 > > > > x86/ioapic: Add register level checks to detect bogus io-apic entries > > > > (I don''t seem to see anything newer than 3.1.10 in the git tree, how > > odd) > > > > Ian. > > > AHH ok i see, so this bug goes back that far in the Kernel revisions.Actually, I think I misspoke in a confusing way. A patch was recently added upstream which broke Xen support in the Linux kernel. It was unfortunately then backported to various stable (3.x.y) trees. If you go back one version from the latest on any of those then you should be ok. v3.4-rc1 was buggy but AFAIK v3.4-rc2 is OK. It seems that v3.3.1 and v3.2.14 both got the bad backport. However 3.3.0 and 3.2.13 should both be OK as far as I know. I expect that 3.3.2 and 3.2.15 will get the fix too.> So, the kernel that comes compiled with Debian Wheezy is Kernel 3.2.0.2,> is that bug in that version as well or it has been patched / fixed. I > have tried before to use Wheezy with the kernel they have for it, > 3.2.0.2 and install Xen 4.1 from Synaptic and all that, still didn''t > boot. BUT, that was before when i didn''t have the Serial Console Setup > yet, so don''t know what the error messages where.The last ".2" should be "-2" and is the Debian revision. The underlying kernel would be 3.2.0. I don''t think 3.2.0 has the bug mentioned above, but it may well have had some other. Wheezy right now has 3.2.12-2 which I think should be OK.> IF Kernel 3.1.10 does not have those kind of bugs,v3.1.10 doesn''t look to have the error in question. But actually I''m not sure where 3.1.10 comes from, the only mention of 3.1.y is 3.1.12 in your subject line (which is what confused me when I could only find 3.1.10, since 3.1.10 is actually the latest) but your text only refers to 3.3.1 anyway so the mention of 3.1.12 seem to be entirely spurious. As noted above 3.3.1 has the bug, while 3.3.0 does not. Ian.
Teck Choon Giam
2012-Apr-12 14:37 UTC
Re: Advice on compiling Xen 4.1.2 on Debian 6.0.4 Kernel 3.1.12
On Thu, Apr 12, 2012 at 10:16 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:> (please don''t drop people from the CC line) > > On Thu, 2012-04-12 at 13:46 +0100, cyberhawk001@gmail.com wrote: >> >> 8.) Rebooted into kernel 3.3.1 with Xen 4.1 AND recorded the trace >> >> log, which ended with a KERNEL PANIC >> > A bug was introduce into 3.1.12. A fix is in the pipeline for the next >> > update but in the meantime you can try reverting: >> > >> > commit 73d63d038ee9f769f5e5b46792d227fe20e442c5 >> > Author: Suresh Siddha<suresh.b.siddha@intel.com> >> > Date: Mon Mar 12 11:36:33 2012 -0700 >> > >> > x86/ioapic: Add register level checks to detect bogus io-apic entries >> > >> > (I don''t seem to see anything newer than 3.1.10 in the git tree, how >> > odd) >> > >> > Ian. >> >> >> AHH ok i see, so this bug goes back that far in the Kernel revisions. > > Actually, I think I misspoke in a confusing way. > > A patch was recently added upstream which broke Xen support in the Linux > kernel. It was unfortunately then backported to various stable (3.x.y) > trees. If you go back one version from the latest on any of those then > you should be ok. > > v3.4-rc1 was buggy but AFAIK v3.4-rc2 is OK. > > It seems that v3.3.1 and v3.2.14 both got the bad backport. However > 3.3.0 and 3.2.13 should both be OK as far as I know. I expect that 3.3.2 > and 3.2.15 will get the fix too.Yes, it is in stable queue tree and it currently under review/rc: http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob;f=queue-3.0/revert-x86-ioapic-add-register-level-checks-to-detect.patch;h=8918314741edb229d6fbaeb0b634753ad927fda1;hb=1c23e65fb052a6e31ac7fb67ceb9bdb3afda1dc3 http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob;f=queue-3.2/revert-x86-ioapic-add-register-level-checks-to-detect.patch;h=0b24a11689a78b410633bd67e8887957d2be747b;hb=1c23e65fb052a6e31ac7fb67ceb9bdb3afda1dc3 http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git;a=blob;f=queue-3.3/revert-x86-ioapic-add-register-level-checks-to-detect.patch;h=656fb3d8dc220dc57f7f0ad2fb7aeda290578dab;hb=1c23e65fb052a6e31ac7fb67ceb9bdb3afda1dc3 Thanks. Kindest regards, Giam Teck Choon> >> So, the kernel that comes compiled with Debian Wheezy is Kernel 3.2.0.2, > >> is that bug in that version as well or it has been patched / fixed. I >> have tried before to use Wheezy with the kernel they have for it, >> 3.2.0.2 and install Xen 4.1 from Synaptic and all that, still didn''t >> boot. BUT, that was before when i didn''t have the Serial Console Setup >> yet, so don''t know what the error messages where. > > The last ".2" should be "-2" and is the Debian revision. The underlying > kernel would be 3.2.0. I don''t think 3.2.0 has the bug mentioned above, > but it may well have had some other. > > Wheezy right now has 3.2.12-2 which I think should be OK. > >> IF Kernel 3.1.10 does not have those kind of bugs, > > v3.1.10 doesn''t look to have the error in question. But actually I''m not > sure where 3.1.10 comes from, the only mention of 3.1.y is 3.1.12 in > your subject line (which is what confused me when I could only find > 3.1.10, since 3.1.10 is actually the latest) but your text only refers > to 3.3.1 anyway so the mention of 3.1.12 seem to be entirely spurious. > As noted above 3.3.1 has the bug, while 3.3.0 does not. > > Ian. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users