Stuck compiling kernel for Ubuntu + Xen PVOPS

I'm following the below instructions to try to build a kernel for Ubuntu / Xen, but I'm getting stuck at 'sudo depmod 2.6.32.27'

the previous command compiles a config-2.6.32.36 that it sticks in the /boot folder, so I think its some disconnect there. sudo depmod 2.6.32.36 completes successfully, but the mkinitramfs on the following command does not complete with either version, as the only init* in the boot folder is the 2.6.32.27.

I think I need an initrd-2.6.32.36 or rebuild 'sudo make linux-2.6-pvops-build' that outputs a 2.6.32.27 kernel, but that is just my best guess.

Trying to reboot into any of these kernels results in panic.

I am not a Linux expert so please keep in mind I may be missing something blatantly obvious
wget "http://bits.xensource.com/oss-xen/release/4.0.1/xen-4.0.1.tar.gz"
tar xvzf xen-4.0.1.tar.gz
cd xen-4.0.1

make world
sudo make install 
sudo make install-xen install-kernels install-tools install-stubdom

make linux-2.6-pvops-config CONFIGMODE=menuconfig

make linux-2.6-pvops-build
sudo make linux-2.6-pvops-install
sudo depmod 2.6.32.27
sudo mkinitramfs -o /boot/initrd-2.6.32.27.img 2.6.32.27
sudo update-grub
sudo reboot

Open in new window

bV_Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Duncan RoeSoftware DeveloperCommented:
Where did you get these instructions? (URL if possible)
In make linux-2.6-pvops-config, did you change anything?
It certainly does seem to build a 2.6.32.36 kernel
0
Duncan RoeSoftware DeveloperCommented:
I think I have an answer for you, but I must caution that IMO mkinitramfs is not especially up to date. Or it may be that it tracks some other distribution than Slackware (that I use) and possibly Ubuntu (that you use). I suspect it actually tracks Suse, if it tracks anything.
So I updated mkinitramfs to take account of the following 2 issues:

1. Replace vol_id

vol_id has been superseded by blkid. The man page says one can make blkid output in a vol_id compatible form, but it gave me 2 lines so I dropped the second one. I have not tested whether the resultant line actually works.

2. Less udev commands

udevadm has replaced udevcontrol, udevtrigger and udevsettle. Therefore I changed the list of files to transfer from /sbin (I also changed the list because of vol_id)Here are the changes which you can apply with the patch utility, or implement by hand:
--- /usr/sbin/mkinitramfs.bu    2011-04-10 17:04:35.000000000 +1000
+++ /usr/sbin/mkinitramfs       2011-04-10 22:59:57.000000000 +1000
@@ -1,5 +1,5 @@
 #!/bin/bash
-
+#set -x
 ###########################################################################
 # Copyright (c) 2004-2006 Hai Zaar, Gil Ran and Alon Keren                #
 #                                                                         #
@@ -55,7 +55,7 @@
 [[ $SPLASH ]] && BINFILES="$BINFILES,fgconsole,chvt"
 [[ $CD ]] && BINFILES="$BINFILES,isoinfo"
 
-SBINFILES="insmod,modprobe,udevcontrol,udevd,udevsettle,udevtrigger,vol_id"
+SBINFILES="insmod,modprobe,udevadm,udevd,blkid"
 [[ $SPLASH ]] && SBINFILES="$SBINFILES,fbcondecor_helper,fbcondecor_ctl"
 [[ $EVMS ]] && SBINFILES="$SBINFILES,evms_activate,dmsetup"
 [[ $MDRAID ]] && SBINFILES="$SBINFILES,mdadm"
@@ -222,7 +222,7 @@
        # where to boot from
        MAJORMINOR=$(mountpoint -d . | tr : " ")
        mknod $IMAGEDIR/tmpnode b $MAJORMINOR || die
-       UUID=${UUID:-$(vol_id -u $IMAGEDIR/tmpnode)}
+       UUID=${UUID:-$(blkid -oudev -s UUID $IMAGEDIR/tmpnode|grep -v ENC)}
        rm -rf $IMAGEDIR/tmpnode
 
        # See if we were forced to use some console, or if we should not redirct at all

Open in new window

Don't worry about the commented-out set -x on line 2 - that was just me trying to figure out what was going on.

The Trick

Lastly I found there is something you have to do to make mkinitramfs use the kernel you just built, tather than what you have currently installed:
sudo echo 2.6.32.36>/boot/version

Open in new window

Now you should be fine to replace lines 13 and 14 of your instructions with
sudo depmod 2.6.32.36
sudo mkinitramfs -o /boot/initrd-2.6.32.36.img 2.6.32.36

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bV_Author Commented:
echo into version resolved the issue
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.