Brandon Lamb
2010-Mar-11 00:54 UTC
[Xen-users] Installing from source (git, hg) on a fresh debian box
Oye 3 days on this now, my head hurts. I have spent what seems like 40 hours in the last 3 or 4 days reading, and I realize xen is in the middle of this transition of getting into mainline kernel, issues with dom0 etc etc. Ok, so i have come across a few howtos/tutorials on installing xen dom0 kernel, using git to download a patched? kernel tree, and getting xen source from mercurial. Below is my steps for trying to install this, can someone tell me if I am missing something, have a step out of order or whats going on? 1) Clean install of debian squeeze, update apt-sources to include lenny and sid repos 2) apt-get install build-essential mercurial gawk zlib1g zlib1g-dev libzzip-dev libcurl4-openssl-dev xorg-dev gettext libncurses5-dev python2.5-dev texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended transfig bridge-utils uuid-dev easygit gitk bcc vim-full ssh chkconfig ntpdate openntpd kernel-package module-assistant pkg-config libgnutls-dev libpci-dev randomize-lines gcc gcc g++ make patch libssl-dev bzip2 gettext python libjpeg62-dev libx11-dev libgcrypt11-dev bin86 libsdl1.2-dev libc6-dev xen-linux-system-2.6.26-2-xen-amd64 dstat ifenslave vnc4server ethtool bison flex 3) git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen cd linux-2.6-xen git reset --hard git checkout -b xen/stable origin/xen/stable git pull make menuconfig make -j4 bzImage make -j4 modules make -j4 modules_install cp -a .config /boot/config-2.6-xen cp -a System.map /boot/System.map-2.6-xen cp -a arch/x86/boot/bzImage /boot/vmlinuz-2.6-xen I set ext2, ext3, ext4 to be included NOT modules. 4) Attempt to create initrd xen1:/usr/src/deb# mkinitramfs -o /boot/initrd.img-2.6-xen 2.6-xen W: kernel 2.6-xen too old for initramfs on W: not generating requested initramfs for kernel 2.6-xen This creates a 0 byte initrd-2.6-xen which I can delete, run update-grub2 and if I try to boot that kernel get a kernel panic, vfs cant mount root fs on unknown-blockdev (or something really close). I imagine that is because there is no initrd to load drivers for the hardware/fs or whatnot from? I dont understand why trying to run mkinitramfs says the kernel is too old. Is there perhaps something in the .config that I need to change or AHHHH... Anyway, thank you for any insight someone may be able to provide. I keep re-reading the same google results over and over with no help. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jamon Camisso
2010-Mar-11 01:57 UTC
Re: [Xen-users] Installing from source (git, hg) on a fresh debian box
On Wed, Mar 10, 2010 at 04:54:00PM -0800, Brandon Lamb wrote:> Ok, so i have come across a few howtos/tutorials on installing xen > dom0 kernel, using git to download a patched? kernel tree, and getting > xen source from mercurial. Below is my steps for trying to install > this, can someone tell me if I am missing something, have a step out > of order or whats going on?>From source, use http://wiki.xensource.com/xenwiki/XenParavirtOps> 1) Clean install of debian squeeze, update apt-sources to include > lenny and sid reposPlain squeeze should be fine, are you pinning your repositories?> 2) apt-get install build-essential mercurial gawk zlib1g zlib1g-dev > libzzip-dev libcurl4-openssl-dev xorg-dev gettext libncurses5-dev > python2.5-dev texinfo texlive-latex-base texlive-latex-recommended > texlive-fonts-extra texlive-fonts-recommended transfig bridge-utils > uuid-dev easygit gitk bcc vim-full ssh chkconfig ntpdate openntpd > kernel-package module-assistant pkg-config libgnutls-dev libpci-dev > randomize-lines gcc gcc g++ make patch libssl-dev bzip2 gettext python > libjpeg62-dev libx11-dev libgcrypt11-dev bin86 libsdl1.2-dev libc6-dev > xen-linux-system-2.6.26-2-xen-amd64 dstat ifenslave vnc4server ethtool > bison flexThose look like all the required packages. make will complain if it is missing something, so you should be ok there.> 3) git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git > linux-2.6-xen > cd linux-2.6-xen > git reset --hard > git checkout -b xen/stable origin/xen/stable > git pull > make menuconfig > make -j4 bzImage > make -j4 modules > make -j4 modules_install > cp -a .config /boot/config-2.6-xen > cp -a System.map /boot/System.map-2.6-xen > cp -a arch/x86/boot/bzImage /boot/vmlinuz-2.6-xen > > I set ext2, ext3, ext4 to be included NOT modules.No need for make bzImage, when you run make, do not use the arch/* bzImage. Instead, you''ll see a vmlinux file in the top of your kernel tree. That is your pv_ops enabled kernel.> 4) Attempt to create initrd > xen1:/usr/src/deb# mkinitramfs -o /boot/initrd.img-2.6-xen 2.6-xen > W: kernel 2.6-xen too old for initramfs on > W: not generating requested initramfs for kernel 2.6-xenAlso, when you do make modules/install, the kernel version is 2.6.31.6 e.g. you''ll find the modules in /lib/modules/2.6.31.6/ so specify that version and you should get a real initrd.> This creates a 0 byte initrd-2.6-xen which I can delete, run > update-grub2 and if I try to boot that kernel get a kernel panic, vfs > cant mount root fs on unknown-blockdev (or something really close). > > I imagine that is because there is no initrd to load drivers for the > hardware/fs or whatnot from? > > I dont understand why trying to run mkinitramfs says the kernel is too > old. Is there perhaps something in the .config that I need to change > or AHHHH... > > Anyway, thank you for any insight someone may be able to provide. I > keep re-reading the same google results over and over with no help.You''ve made it this far, and in just 3 short days, that''s no small feat. You''re 95+% there - one more shot at things and you should be all set :) Cheers, Jamon _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Brandon Lamb
2010-Mar-11 04:56 UTC
Re: [Xen-users] Installing from source (git, hg) on a fresh debian box
On Wed, Mar 10, 2010 at 5:57 PM, Jamon Camisso <jamonation@gmail.com> wrote:> On Wed, Mar 10, 2010 at 04:54:00PM -0800, Brandon Lamb wrote: >> Ok, so i have come across a few howtos/tutorials on installing xen >> dom0 kernel, using git to download a patched? kernel tree, and getting >> xen source from mercurial. Below is my steps for trying to install >> this, can someone tell me if I am missing something, have a step out >> of order or whats going on? > > From source, use http://wiki.xensource.com/xenwiki/XenParavirtOps > >> 1) Clean install of debian squeeze, update apt-sources to include >> lenny and sid repos > > Plain squeeze should be fine, are you pinning your repositories?Sorry for the ignorance, Im not sure what this means. I just copied and pasted what the wiki and various howtos said which was: git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen cd linux-2.6-xen git reset --hard git checkout -b xen/stable origin/xen/stable I see now after reading the wiki page you linked that xen/master is not the same as xen/stable (2.3.32.9), so I am rebuilding using xen/master and will give that a go.>> 2) apt-get install build-essential mercurial gawk zlib1g zlib1g-dev >> libzzip-dev libcurl4-openssl-dev xorg-dev gettext libncurses5-dev >> python2.5-dev texinfo texlive-latex-base texlive-latex-recommended >> texlive-fonts-extra texlive-fonts-recommended transfig bridge-utils >> uuid-dev easygit gitk bcc vim-full ssh chkconfig ntpdate openntpd >> kernel-package module-assistant pkg-config libgnutls-dev libpci-dev >> randomize-lines gcc gcc g++ make patch libssl-dev bzip2 gettext python >> libjpeg62-dev libx11-dev libgcrypt11-dev bin86 libsdl1.2-dev libc6-dev >> xen-linux-system-2.6.26-2-xen-amd64 dstat ifenslave vnc4server ethtool >> bison flex > > Those look like all the required packages. make will complain if it is > missing something, so you should be ok there. > >> 3) git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git >> linux-2.6-xen >> cd linux-2.6-xen >> git reset --hard >> git checkout -b xen/stable origin/xen/stable >> git pull >> make menuconfig >> make -j4 bzImage >> make -j4 modules >> make -j4 modules_install >> cp -a .config /boot/config-2.6-xen >> cp -a System.map /boot/System.map-2.6-xen >> cp -a arch/x86/boot/bzImage /boot/vmlinuz-2.6-xen >> >> I set ext2, ext3, ext4 to be included NOT modules. > > No need for make bzImage, when you run make, do not use the arch/* > bzImage. Instead, you''ll see a vmlinux file in the top of your > kernel tree. That is your pv_ops enabled kernel. > >> 4) Attempt to create initrd >> xen1:/usr/src/deb# mkinitramfs -o /boot/initrd.img-2.6-xen 2.6-xen >> W: kernel 2.6-xen too old for initramfs on >> W: not generating requested initramfs for kernel 2.6-xen > > Also, when you do make modules/install, the kernel version is > 2.6.31.6 e.g. you''ll find the modules in /lib/modules/2.6.31.6/ > so specify that version and you should get a real initrd.Since I was checking out xen/stable it is based on 2.6.32.9 so that may be another part of my problem. I am now rebuilding using xen/master>> This creates a 0 byte initrd-2.6-xen which I can delete, run >> update-grub2 and if I try to boot that kernel get a kernel panic, vfs >> cant mount root fs on unknown-blockdev (or something really close). >> >> I imagine that is because there is no initrd to load drivers for the >> hardware/fs or whatnot from? >> >> I dont understand why trying to run mkinitramfs says the kernel is too >> old. Is there perhaps something in the .config that I need to change >> or AHHHH... >> >> Anyway, thank you for any insight someone may be able to provide. I >> keep re-reading the same google results over and over with no help. > > You''ve made it this far, and in just 3 short days, that''s no small feat. > You''re 95+% there - one more shot at things and you should be all set :) > > Cheers, JamonI tried out the packages from debian lenny and within what seemed like 30 minutes had xen up and running with 2 guests, but then I started doing reading and seeing that people report stability issues and whatnot, and its not the "new way" of xen soo that lead me to doing this install from source method. I must say, it has been a good learning experience, its forced me to read a lot more articles on xen that I would have by just installing packages, got a bit of a history lesson, watched an interview of jeremy, etc. Thanks for the tips! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Boris Derzhavets
2010-Mar-11 12:12 UTC
Re: [Xen-users] Installing from source (git, hg) on a fresh debian box
Same procedure on Ubuntu 9.10 server runs smoothly : http://bderzhavets.wordpress.com/2010/03/08/set-up-xen-3-4-3-dom0-via-xenified-2-6-31-12-kernel-on-top-ubuntu-9-10-server/ Regardless posting is focused on xenified 2.6.31.12 kernel. Git checkout xen/stable and build 2.6.32.9 pvops ( including running "mkinitramfs") run with no problem. Boris. --- On Wed, 3/10/10, Brandon Lamb <brandonlamb@gmail.com> wrote: From: Brandon Lamb <brandonlamb@gmail.com> Subject: [Xen-users] Installing from source (git, hg) on a fresh debian box To: xen-users@lists.xensource.com Date: Wednesday, March 10, 2010, 7:54 PM Oye 3 days on this now, my head hurts. I have spent what seems like 40 hours in the last 3 or 4 days reading, and I realize xen is in the middle of this transition of getting into mainline kernel, issues with dom0 etc etc. Ok, so i have come across a few howtos/tutorials on installing xen dom0 kernel, using git to download a patched? kernel tree, and getting xen source from mercurial. Below is my steps for trying to install this, can someone tell me if I am missing something, have a step out of order or whats going on? 1) Clean install of debian squeeze, update apt-sources to include lenny and sid repos 2) apt-get install build-essential mercurial gawk zlib1g zlib1g-dev libzzip-dev libcurl4-openssl-dev xorg-dev gettext libncurses5-dev python2.5-dev texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended transfig bridge-utils uuid-dev easygit gitk bcc vim-full ssh chkconfig ntpdate openntpd kernel-package module-assistant pkg-config libgnutls-dev libpci-dev randomize-lines gcc gcc g++ make patch libssl-dev bzip2 gettext python libjpeg62-dev libx11-dev libgcrypt11-dev bin86 libsdl1.2-dev libc6-dev xen-linux-system-2.6.26-2-xen-amd64 dstat ifenslave vnc4server ethtool bison flex 3) git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen cd linux-2.6-xen git reset --hard git checkout -b xen/stable origin/xen/stable git pull make menuconfig make -j4 bzImage make -j4 modules make -j4 modules_install cp -a .config /boot/config-2.6-xen cp -a System.map /boot/System.map-2.6-xen cp -a arch/x86/boot/bzImage /boot/vmlinuz-2.6-xen I set ext2, ext3, ext4 to be included NOT modules. 4) Attempt to create initrd xen1:/usr/src/deb# mkinitramfs -o /boot/initrd.img-2.6-xen 2.6-xen W: kernel 2.6-xen too old for initramfs on W: not generating requested initramfs for kernel 2.6-xen This creates a 0 byte initrd-2.6-xen which I can delete, run update-grub2 and if I try to boot that kernel get a kernel panic, vfs cant mount root fs on unknown-blockdev (or something really close). I imagine that is because there is no initrd to load drivers for the hardware/fs or whatnot from? I dont understand why trying to run mkinitramfs says the kernel is too old. Is there perhaps something in the .config that I need to change or AHHHH... Anyway, thank you for any insight someone may be able to provide. I keep re-reading the same google results over and over with no help. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Boris Derzhavets
2010-Mar-11 23:21 UTC
Re: [Xen-users] Installing from source (git, hg) on a fresh debian box
> One last thing I had to do was add /proc/xen to fstab (i didnt build as a module).With the most recent Xen 3.4.3 i added nothing to /etc/fstab.> i didn''t build as module.Just rebuild the kernel [*] Xen memory balloon driver [*] Scrub pages before returning them to system <*> Xen /dev/xen/evtchn device [*] Backend driver support <*> Xen backend network device <*> Block-device backend driver <*> Block-device tap backend driver <*> Xen filesystem -> [*] Create compatibility mount point /proc/xen [*] Create xen entries under /sys/hypervisor <> userspace grant access device driver [*] Staging drivers ---> [*] X86 Platform Specific Device Drivers ---> What linux are you on ? Boris. P.S. Please cc: xen-users mailing list. I may be sometimes wrong guiding you --- On Thu, 3/11/10, Brandon Lamb <brandonlamb@gmail.com> wrote: From: Brandon Lamb <brandonlamb@gmail.com> Subject: Re: [Xen-users] Installing from source (git, hg) on a fresh debian box To: "Boris Derzhavets" <bderzhavets@yahoo.com> Date: Thursday, March 11, 2010, 4:08 PM Here to report SUCCESS on xen-3.4-testing.hg and using the xen/master (2.6.31.12). One last thing I had to do was add /proc/xen to fstab (i didnt build as a module). Im stoked! I may just mess with this for awhile now before attempting xen-unstable and the 2.6.32.9 branch. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Boris Derzhavets
2010-Mar-11 23:33 UTC
Re: [Xen-users] Installing from source (git, hg) on a fresh debian box
Next With the most recent 3.4.3 you can load 2.6.32.9 , no need upgrade Hypervisor. Just one CS required for compatibility was back ported a while ago. --- On Thu, 3/11/10, Boris Derzhavets <bderzhavets@yahoo.com> wrote: From: Boris Derzhavets <bderzhavets@yahoo.com> Subject: Re: [Xen-users] Installing from source (git, hg) on a fresh debian box To: "Brandon Lamb" <brandonlamb@gmail.com> Cc: xen-users@lists.xensource.com Date: Thursday, March 11, 2010, 6:21 PM> One last thing I had to do was add /proc/xen to fstab (i didnt build as a module).With the most recent Xen 3.4.3 i added nothing to /etc/fstab.> i didn''t build as module.Just rebuild the kernel [*] Xen memory balloon driver [*] Scrub pages before returning them to system <*> Xen /dev/xen/evtchn device [*] Backend driver support <*> Xen backend network device <*> Block-device backend driver <*> Block-device tap backend driver <*> Xen filesystem -> [*] Create compatibility mount point /proc/xen [*] Create xen entries under /sys/hypervisor <> userspace grant access device driver [*] Staging drivers ---> [*] X86 Platform Specific Device Drivers ---> What linux are you on ? Boris. P.S. Please cc: xen-users mailing list. I may be sometimes wrong guiding you --- On Thu, 3/11/10, Brandon Lamb <brandonlamb@gmail.com> wrote: From: Brandon Lamb <brandonlamb@gmail.com> Subject: Re: [Xen-users] Installing from source (git, hg) on a fresh debian box To: "Boris Derzhavets" <bderzhavets@yahoo.com> Date: Thursday, March 11, 2010, 4:08 PM Here to report SUCCESS on xen-3.4-testing.hg and using the xen/master (2.6.31.12). One last thing I had to do was add /proc/xen to fstab (i didnt build as a module). Im stoked! I may just mess with this for awhile now before attempting xen-unstable and the 2.6.32.9 branch. -----Inline Attachment Follows----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Brandon Lamb
2010-Mar-11 23:40 UTC
Re: [Xen-users] Installing from source (git, hg) on a fresh debian box
On Thu, Mar 11, 2010 at 3:21 PM, Boris Derzhavets <bderzhavets@yahoo.com> wrote:> > > One last thing I had to do was add /proc/xen to fstab (i didnt build as a module). > > With the most recent Xen 3.4.3 i added nothing to /etc/fstab. > > > i didn''t build as module. > > Just rebuild the kernel > > [*] Xen memory balloon driver > [*] Scrub pages before returning them to system > <*> Xen /dev/xen/evtchn device > [*] Backend driver support > <*> Xen backend network device > <*> Block-device backend driver > <*> Block-device tap backend driver > <*> Xen filesystem > -> [*] Create compatibility mount point /proc/xen > [*] Create xen entries under /sys/hypervisor > <> userspace grant access device driver > [*] Staging drivers ---> > [*] X86 Platform Specific Device Drivers ---> > > What linux are you on ? > > Boris. > P.S. Please cc: xen-users mailing list. I may be sometimes wrong guiding youYea I figured if I recompiled and made it a module then it would automount it, although this works so not a huge deal yet. I am using debian squeeze/sid with a local repo (2-4 weeks old since last rsync) and netinst _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users