Operating System - HP-UX
1833828 Members
2120 Online
110063 Solutions
New Discussion

ERROR: The kernel build failed.

 
SOLVED
Go to solution
James.Z
Regular Advisor

ERROR: The kernel build failed.

hi all,

when i was modifying the kernel tunable parameters, the system reported me the following error, could anyone help me on this? thanks a lot!

# uname -a
HP-UX gsstaah1 B.11.31 U ia64 2800424092 unlimited-user license

-----------------------------------------------
Building a new kernel for the configuration to be used at next boot...ld: Mismatched machine types. Expected EM_IA_64 but found EM_PARISC in file /usr/conf/mod/afinet
Fatal error.
failed.
ERROR: The kernel build failed.
Command Unsuccessful
press enter Key to continue
23 REPLIES 23
Johnson Punniyalingam
Honored Contributor

Re: ERROR: The kernel build failed.

Mismatched Machine Types

The "Mismatched machine types" message indicates a file of the wrong architecture on the link line. This is most likely caused by the use of an incorrect directory on a -L option. For example:


% cc +DD64 -L/lib/pa20_64 -lm foo.c
ld: Mismatched machine types. Expected EM_IA_64 but found
EM_PARISC in file /lib/pa20_64/libm.sl
Fatal error.


The error message itself identifies the problem library. In this case /lib/pa20_64/libm.sl is the source of the problem. The correct version of the library for the architecture will need to be located
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: ERROR: The kernel build failed.

hope you suppose updates the location with

IA -64 file. in stud i suspect you may download the PARISC.

to shed more light, for information what actually you are trying do would be very helpful.

Problems are common to all, but attitude makes the difference
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

hi Johnson,

i have seen similar answer on this forum, but the problem is that i don't know how to fix it.

this error happens when i tune the kernel parameters.

so, can i just copy a correct file '/usr/conf/mod/afinet' from other system to the system that this error occurred.
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

i'm going to install a Oracle11g on this server, the installation process prompt me to adjust system kernel parameters. then, i got those error.
Johnson Punniyalingam
Honored Contributor

Re: ERROR: The kernel build failed.

>>>so, can i just copy a correct file '/usr/conf/mod/afinet' from other system to the system that this error occurred <<<<<

the above post
does its question you are asking me ?

why did you copied from other system ? other system may is not on PARISC.

Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: ERROR: The kernel build failed.

can do you this

# file /usr/conf/mod/afinet -> your output should like below


Example :-

# file /usr/conf/mod/afinet
/usr/conf/mod/afinet: ELF-64 relocatable object file - IA64
Problems are common to all, but attitude makes the difference
Dennis Handly
Acclaimed Contributor

Re: ERROR: The kernel build failed.

>Mismatched machine types. Expected EM_IA_64 but found EM_PARISC in file /usr/conf/mod/afinet

You have a PA kernel module on an Integrity server, remove it.
You may first want to see what fileset contains it:
swlist -l file | grep /usr/conf/mod/afinet

>can I just copy a correct file /usr/conf/mod/afinet from other system to the system that this error occurred?

Do they have the same architecture and patch levels?
What does "file /usr/conf/mod/afinet" on each?

>Johnson: This is most likely caused by the use of an incorrect directory on a -L option.

Yes but not for kernel modules.
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

for example:
the error system is:
# uname -a
HP-UX gsstaah1 B.11.31 U ia64 2800424092 unlimited-user license
# file /usr/conf/mod/afinet
/usr/conf/mod/afinet: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
#


now can i copy this file from a system as below, since i see this file on this system is a correct one:
system2->root$ uname -a
HP-UX sgdsy301 B.11.31 U ia64 1566365000 unlimited-user license
system2->root$ file /usr/conf/mod/afinet
/usr/conf/mod/afinet: ELF-64 relocatable object file - IA64
Johnson Punniyalingam
Honored Contributor

Re: ERROR: The kernel build failed.

Yes, you got the answer,

As per >Dennis << Quote are the server are in same patch level. they you go head .

finally,

D'not forget to assign points and close the thread, keeping the thread open can avoid too many repeated posting
Problems are common to all, but attitude makes the difference
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

# swlist -l file | grep /usr/conf/mod/afinet
Networking.NET2-KRN: /usr/conf/mod/afinet
PHNE_38680.NET2-KRN: /usr/conf/mod/afinet
#
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

>>>You have a PA kernel module on an Integrity server, remove it. <<<<

how to remove it? what should i do next? thanks
Johnson Punniyalingam
Honored Contributor

Re: ERROR: The kernel build failed.

swremove file set
Problems are common to all, but attitude makes the difference
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

thanks

on the correct server, i see the patch is:
sgdsy301->root$ swlist -l file | grep /usr/conf/mod/afinet
Networking.NET2-KRN: /usr/conf/mod/afinet
PHNE_36281.NET2-KRN: /usr/conf/mod/afinet

on the error server, the patch is:
# swlist -l file | grep /usr/conf/mod/afinet
Networking.NET2-KRN: /usr/conf/mod/afinet
PHNE_38680.NET2-KRN: /usr/conf/mod/afinet

so, i need to remove PHNE_38680 and install PHNE_36281, that right?
Dennis Handly
Acclaimed Contributor
Solution

Re: ERROR: The kernel build failed.

>PHNE_38680.NET2-KRN: /usr/conf/mod/afinet

Do you have this patch on both machines?
You could try installing the recommended patch PHNE_39203 on the bad machine.

>how to remove it?

You could just use rm(1) but you would probably have other problems. :-)
swremove of PHNE_38680 should work, if PHNE_39203 doesn't.
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

another problem occurred.

i got error:
Building a new kernel for the configuration to be used at next boot...ld: Mismatched machine types. Expected EM_IA_64 but found EM_PARISC in file /usr/conf/mod/echo
Fatal error.
failed.
ERROR: The kernel build failed.
Command Unsuccessful
press enter Key to continue


but on both machine, they have the same patch installed,

on the good one:
$ swlist -l file |grep /usr/conf/mod/echo
PHNE_37257.STREAMS2-KRN: /usr/conf/mod/echo
Streams.STREAMS2-KRN: /usr/conf/mod/echo
sgdsy301->root$ file /usr/conf/mod/echo
/usr/conf/mod/echo: ELF-64 relocatable object file - IA64

on the bad one:
# swlist -l file |grep /usr/conf/mod/echo
PHNE_37257.STREAMS2-KRN: /usr/conf/mod/echo
Streams.STREAMS2-KRN: /usr/conf/mod/echo
# file /usr/conf/mod/echo
/usr/conf/mod/echo: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)

could you tell me what the problem is?
Dennis Handly
Acclaimed Contributor

Re: ERROR: The kernel build failed.

>Mismatched machine types. Expected EM_IA_64 but found EM_PARISC in file /usr/conf/mod/echo

It appears you have massive corruption in /usr/conf/mod/. You might want to do "file /usr/conf/mod/*" to see how many are bad.

You might also look at the dates of these files and of the mod/ directory.

Since PHNE_37257 is on both of them, you might be able to copy /usr/conf/mod/echo but you better figure out how this system became corrupted.

Do you have an ignite backup?

A recent forum question was whether kernel regens should be done every so often. This seems like it would find your case sooner.
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

thanks dennis,

here is the output, there are many bad files:
# file /usr/conf/mod/*|grep PA
/usr/conf/mod/echo: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/ffs: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/hpstreams: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/pat_psm: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/pdc: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/pipemod: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/pm_ttrc: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/pstat: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/sad: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/sc: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/strlog: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/timod: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/tirdwr: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)
/usr/conf/mod/tlclts: ELF-64 relocatable object file - PA-RISC 2.0 (LP64)

i don't have backup!
Dennis Handly
Acclaimed Contributor

Re: ERROR: The kernel build failed.

>here is the output, there are many bad files:

You should use that swlist to find if any common patches caused this:
swlist -l file | grep -f bad-file-list

(Put each bad filename in your bad-file-list. This will find them all in one pass of swlist.)

Then do the same on your good system. If they match, you can copy them over.
If not, you can "extract" the modules from the appropriate patches.

>I don't have backup!

Did we learn any lessons? :-)
I'm not sure you'll be successful after fiddling with all of these modules. You may start thinking about a plan B if it fails.
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

thanks dennis,

since our servers are managed by IT guy, we don't have permissions to do things like a backup.

anyway, thanks for you help, i will try to copy all those problematic files from the good one to this server.
Dennis Handly
Acclaimed Contributor

Re: ERROR: The kernel build failed.

You might want to write down the dates from /stand/vmunix, the last good one.
The "ll -c" dates for each file in /usr/conf/mod/. This may capture the date ranges when these bad files were "restored"?
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

hi dennnis,

it seems work after copied all needed file from the good server, then change the kernel parameters, the error disappeared.

thanks
James.Z
Regular Advisor

Re: ERROR: The kernel build failed.

it seems work after copied all needed file from the good server, then change the kernel parameters, the error disappeared.
Dennis Handly
Acclaimed Contributor

Re: ERROR: The kernel build failed.

You could also use "swverify \*" to see how many files were/are bad.