How to build Ubuntu 8.04 openvz kernel without PAE support

Asked by Harry Metske

Hi all,

I have successfully built and run an openvz kernel (Ubuntu 8.04) after following instructions in bugreport 210672.
Now today I tried to copy this to another PC without PAE support, and the kernel does (of course) not boot .

I have built from source already, and have run make menuconfig, disabled PAE, but after building it still has PAE support.
I noticed that the following .config files are overwritten during the 'AUTOBUILD=1 NOEXTRAS=1 /usr/bin/fakeroot debian/rules custom-binary-openvz' :
./debian/linux-headers-2.6.24-17-openvz/usr/src/linux-headers-2.6.24-17-openvz/.config
./debian/build/custom-build-openvz/.config

any help would be appreciated.

regards,
Harry Metske

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Harry Metske
Solved:
Last query:
Last reply:
Revision history for this message
Harry Metske (harry-metske) said :
#1

Well, I found https://help.ubuntu.com/community/Kernel/Compile very useful.
I had to use "debian/rules updateconfigs" after modifying the .config file.

Sorry for bothering the list.
Harry

Revision history for this message
shawn ning (zxning) said :
#2

Can you explain it a little bit in detail?

This is very similar to my problem. I am trying to have ubuntu 8.04 and openvz working on my laptop, which is Petium M processor. I followed the Bug #210672 (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/210672) and failed. Both soluctions, the ready to use deb from Will Nowak, or the deb created by "fakeroot debian/rules custom-binary-openvz" shows the same error when I boot into the new kernel, something like this kernel soesn't support my cpu.

So I guess I have to change the config and rebuild the kernel. My questions are
1. which config should I use? I try to copy openvz/debian/binary_custom.d/openvz/config.i386 to openvz/.config, and then make menuconfig, change the processor type to pentium M. and then run debian/rules updateconfigs. But after that, I can not build the kernel, It asks me to run make mrproper but still refuse to complie even after I did.

2. when I run make menuconfig, I can not de-select PAE. It seems be default.

OK, let me re-phrase it, the questions are, where is the default config for openvz and how I change it?

Thanks a lot

Revision history for this message
shawn ning (zxning) said :
#3

the exactly error message when i boot into the new kernel is:
-----------------
Starting up
This kernel require the following features not present on the CPU:
0:6
unable to boot, please use a kernel apprppriate for your CPU
---------------------------

Revision history for this message
Harry Metske (harry-metske) said :
#4

I kept a log of the complete install of the new servers on my wiki : http://www.computerhok.nl/JSPWiki/Wiki.jsp?page=Inrichten%20Ubuntu%20Hardy%20OpenVZ%20Servers#section-Inrichten+Ubuntu+Hardy+OpenVZ+Servers-KernelCompile

There is a lot of info you dont need, but also a few words on changing the kernel config and compile.
To be honest I have to add to this that I have not really tested on my Intel Mobile because it's harddisk collapsed and I have replaced it with an (older) Intel P4 which had the PAE feature :-).

So currently I cannot test anymore if the kernel runs on a non-PAE cpu :-(

regards,
Harry

Revision history for this message
Assid (assid) said :
#5

I am remaking this without PAE functionality. if it works. Do you guys want me to post a link to the deb ?

Revision history for this message
Assid (assid) said :
#6

Okay i tried to recompile, and disabled PAE. Still no help. Anyone want to give it a shot and give up the debs? I got a Pentium M Centrino 1400mhz (Dell D600). The last compilation took just too much time for me.

Revision history for this message
shawn ning (zxning) said :
#7

Any luck? I have none.
I manage to build a deb with PAE=n, But the boot error message still same.

The step I build my deb is,
1. git-clone git://kernel.ubuntu.com/ubuntu/ubuntu-hardy.git openvz
2. AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules custom-binary-openvz
3. manually change the .config under build folder, change CONFIG_X86_PAE=n
4. run AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules custom-binary-openvz again, and build the new deb.
5. dpkg -i ../linux-image-2.6.24-19-openvz_2.6.24-19.33_i386.deb
I check the /boot/config-2.6.24-19-openvz and confirmed the CONFIG_X86_PAE=n but still can not boot into the new kernel

should I run debian/rules updateconfigs after step 3? if I do, it seems overwrite the .config and change the PAE back to y. Is this the correct way to build the kernel? where can I find a "how to change config and build kernel in ubuntu" document?

another question, can someone confirm that "features not present on the CPU:0:6" means PAE support?

Revision history for this message
Harry Metske (harry-metske) said :
#8

I checked my logs and I think I have the same problem as you have, you think you have built a non-pae kernel (looking at the config-2.6.24.....).
But during boot on a non-pae cpu still gives you the "This kernel requires the following features not present on the CPU: 0:6 Please use a kernel that is compatible with your system."
Fortunately for me but unfortunately for you I switched hardware and now I only have pae CPU's.
I am not experienced enough to know what the exact order and way is to change config and build the kernel. For me this was also less or more trial and error and Googleing. Hopefully the real experts can help you out here.

About you last question: I found this one less or more confirming that non-pae was the cause of the error: https://bugs.launchpad.net/ubuntu/+bug/222253
Ans also given the fact that it boots well on a pae cpu I think pae is the problem.

regards,
Harry

Revision history for this message
shawn ning (zxning) said :
#9

Finally got this thing working,
1. The config file is debian/binary-custom.d/openvz/config.i386
2. just change CONFIG_X86_PAE=n only, will not work. These are items I changed
CONFIG_X86_PAE=n
CONFIG_HIMEM64G=n
CONFIG_HIMEM4G=y
CONFIG_PARAVIRT=n
CONFIG_PARAVIRT_GUEST=n
CONFIG_XEN=n
CONFIG_VMI=n

It shows the power of open source, everything is there, you just need time to digg into it. I happen to have a fight with my wife last night and stop talking to each other, then had two extra hours to figure this thing out....

Revision history for this message
Harry Metske (harry-metske) said :
#10

Well Shawn thanks for finding this out, last night I also recompiled my kernel successfully (2.6.24-19) and although I can't really test if I have a non-PAE kernel, I do see different values in my /boot/config* files.
I hope you live in peace again with your wife again now :-)

regards,
Harry

Revision history for this message
Kuno (kuno-ammann) said :
#11

I did install VMware Server on my Toshiba Notebook and did also get the same error message:
This kernel require the following features not present on the CPU:
0:6
unable to boot, please use a kernel apprppriate for your CPU

The solution I found at http://www.tjansson.dk/?p=125 in the section "Installing Ubuntu server on a Thinkpad T40"

Revision history for this message
Betta Sharma (bettadapura-s-sharma) said :
#12

This is indirectly related to this question:

When I followed these instructions given in https://help.ubuntu.com/community/Kernel/Compile

cp -vi /boot/config-`uname -r` .config

...
make menuconfig # or "make xconfig" if you prefer

If you re-used the existing configuration, note that Ubuntu kernels build with debugging information on, which makes the resulting kernel modules (*.ko files) much larger than they would otherwise be. To turn this off, go into "Kernel hacking"; then, under "Kernel debugging", turn OFF "Compile the kernel with debug info".

I found that "make menuconfig" command created a 'bad' config file that resulted in the kernel built with it to hang after "Checking 'hlt' instruction... OK" but before "SMP alternatives... switching to UP code"

When I compared the before/after "make menuconfig" , I see that the original config file mentions "splitconfig.pl". So, is there something missing in these instructions?

Revision history for this message
Betta Sharma (bettadapura-s-sharma) said :
#13

More to add to previous post:

I see this:

Q: The page says that I should copy the .config and customize it before doing a make-kpkg. However make-kpkg seems to overwrite the .config within a minute of starting. What gives?

A: make-kpkg normalises the .config. If your additions to the .config specify features that are not in the tree, then they will be removed. (E.g. you may have enabled options in .config, but forgot to patch the kernel to add support for those options to the kernel)

But I started with existing config files. So, the generic kernel sources (ubuntu-hardy) may not have the correct patches.