LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 09-12-2006, 10:47 AM   #1
five0_4tluv
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Rep: Reputation: 0
Angry RHEL4, compile nfsroot into kernel fails


I need to compile a new kernel. I've grabbed the latest kernel-src using up2date and ran a rpmbuild -bp --target x86_64 /usr/src/redhat/SPECS/kernel-2.6.spec. now i'm trying to build some stuff into the kernel and one of them is nfsroot boot. the make is failing with

CHK include/linux/compile.h
CC fs/nfs/nfsroot.o
fs/nfs/nfsroot.c:163: error: `Opt_acl' undeclared here (not in a function)
fs/nfs/nfsroot.c:163: error: initializer element is not constant
fs/nfs/nfsroot.c:163: error: (near initialization for `tokens[30].token')
fs/nfs/nfsroot.c:163: error: initializer element is not constant
fs/nfs/nfsroot.c:163: error: (near initialization for `tokens[30]')
fs/nfs/nfsroot.c:164: error: `Opt_noacl' undeclared here (not in a function)
fs/nfs/nfsroot.c:164: error: initializer element is not constant
fs/nfs/nfsroot.c:164: error: (near initialization for `tokens[31].token')
fs/nfs/nfsroot.c:164: error: initializer element is not constant
fs/nfs/nfsroot.c:164: error: (near initialization for `tokens[31]')
fs/nfs/nfsroot.c:165: error: initializer element is not constant
fs/nfs/nfsroot.c:165: error: (near initialization for `tokens[32]')
make[2]: *** [fs/nfs/nfsroot.o] Error 1
make[1]: *** [fs/nfs] Error 2
make: *** [fs] Error 2

any help is appreciated.
 
Old 09-12-2006, 11:01 AM   #2
five0_4tluv
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Original Poster
Rep: Reputation: 0
and fails when removing nfsroot

fs/built-in.o(.text+0x5b260): In function `nfs3_xdr_setaclargs':
fs/nfs/nfs3xdr.c:691: undefined reference to `nfsacl_encode'
fs/built-in.o(.text+0x5b28e):fs/nfs/nfs3xdr.c:695: undefined reference to `nfsacl_encode'
fs/built-in.o(.text+0x5c94e): In function `nfs3_xdr_getaclres':
fs/nfs/nfs3xdr.c:1078: undefined reference to `nfsacl_decode'
fs/built-in.o(.text+0x5c97f):fs/nfs/nfs3xdr.c:1083: undefined reference to `nfsacl_decode'
make: *** [.tmp_vmlinux1] Error 1

again, this is just a rpmbuild source of the latest downloadable source with the supplied patches. i've enabled some Ethernet drivers, loopback device, megaraid_sas and turned off nfs server support
 
Old 09-15-2006, 08:57 AM   #3
paulgnyc
LQ Newbie
 
Registered: Feb 2006
Posts: 10

Rep: Reputation: 0
is there any specific reason why you're trying to compile it in instead of using modules and pivot_root?
 
Old 09-16-2006, 09:12 AM   #4
five0_4tluv
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Original Poster
Rep: Reputation: 0
not certain i understand completely

which module are you referring to? according to Redhat Documentation, to build an NFS root boot kernel you must compile in loopback support, NIC driver, kernel-level autoconfiguration and root over nfs at a minimum. what is pivot-root?
 
Old 09-18-2006, 01:40 PM   #5
paulgnyc
LQ Newbie
 
Registered: Feb 2006
Posts: 10

Rep: Reputation: 0
I've worked with a lot of redhat systems that pxe boot from a central server, and then nfs root mount their fs from a NAS or nfs server. This functionality is available with the standard kernel and nfs compiled as modules.

Check out the man page for pivot_root(8) (not pivot-root). There should be a pretty good example of the nfs mount in the man page. If you're looking to pxe boot these systems, you should check out the pxelinux docs, or maybe even consider using a system like openqrm.
 
Old 09-18-2006, 02:09 PM   #6
five0_4tluv
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Question thanks, but...

I have over 700 machines PXE booting and mounting root over NFS using FC3. I don't really want to get into a chroot configuration. I just want to make a custom kernel just like the ones I used from kernel.org to make my other clients boot. Why can't I download the source kernel, do an rpmbuild -bp, do my 'make menuconfig' and select the modules I want to build into the kernel? This should work, period.

Thanks.
 
Old 09-18-2006, 04:23 PM   #7
paulgnyc
LQ Newbie
 
Registered: Feb 2006
Posts: 10

Rep: Reputation: 0
Should work, I agree. But as a question of maintainability for your 700+ servers, I wouldn't want to recompile every time an update became available. Keep in mind, once you chroot (which is pivot_root'ing and chroot'ing from the initrd, anyway) you're unmounting that file system. You're not mounting a local disk, and then chrooting with that original file system still accessible in some way. I've run this same setup in diskless systems on AS2.1, 3 and 4 without recompiling. Worst case scenario, you may have to add specific NIC drivers into your initrd, which will probably be a lot less painful than recompiling.
 
Old 09-18-2006, 04:53 PM   #8
five0_4tluv
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Original Poster
Rep: Reputation: 0
agreed.

but we don't apply updates unless we have hit a bug that is fixed and we only recompile the kernel when we need to add support for newer devices, we don't update versions. this is my first crack at doing this on RHEL. looking back at the kernel.org changelogs, it looks like some of my pain was fixed way back in 2.6.10 ish. but i'm not sure how i'm going to get around this one. the app that will run on this may only be supported on the release kernel from RHEL. there is no root on the local disk, we only use them for /tmp and swap.

how can i get someone to fix the make on this old kernel. i can get it to compile if i remove the 'acl,noacl' stuff from nfsroot.o. but i'm nervous about doing that.
 
Old 10-12-2006, 04:29 PM   #9
JatMan
LQ Newbie
 
Registered: Oct 2006
Location: Plano, Texas
Distribution: RHEL AS 4 Update 4
Posts: 4

Rep: Reputation: 0
NFS error

I am PXE booting my diskless Intel ATCA board from an NFS mount on another Intel ATCA board with disk. OS is Red Hat EL SMP AS 4 Update 4. While booting, the board hangs at this error and does nothing afterwards. I did a rsync on the NFS server (Damascus Intel Board)to copy the file system to /diskless/i386/RHEL4-AS/.

Appreciate any clue.

Error

....
....
....
ACPI: PCI interrupt 0000:03:02.1[B] -> GSI 51 (level, low) -> IRQ 233
e1000: 0000:03:02.1: e1000_probe: (PCI-X:133MHz:64-bit) 00:0e:0c:73:69:8f
e1000: eth4: e1000_probe: Intel(R) PRO/1000 Network Connection
nfs: Unknown symbol nfsacl_decode
nfs: Unknown symbol nfsacl_encode

Last edited by JatMan; 10-19-2006 at 09:48 AM.
 
Old 10-18-2006, 01:27 AM   #10
bassman4805
LQ Newbie
 
Registered: Oct 2006
Posts: 1

Rep: Reputation: 0
I had the same problem in CentOS 4. Instead of removing the Opt_acl and Opt_noacl from the tokens array in nfsroot.c, add them to the enum just above it. Make sure you add them in the same position they appear in the array.

It looks like someone goofed up on the patch for nfs acls (linux-2.6.9-nfs-acl.patch). I've submitted a bug to the CentOS bug tracker; maybe someone can look at it and submit it to Red Hat.

I spent a few days trying to get an initrd-based pivot_root working. I had to statically recompile dhclient, create an initrd, tear it open, customize the modules and init script, add dhclient, then repackage the initrd by hand. No offense to paulgnyc, but it was easier for me to just recompile the kernel.
 
Old 10-19-2006, 09:50 AM   #11
JatMan
LQ Newbie
 
Registered: Oct 2006
Location: Plano, Texas
Distribution: RHEL AS 4 Update 4
Posts: 4

Rep: Reputation: 0
Thanks bassman4805. I will try and recompile my kernel after making changes to nfsroot.c and see what happens.
 
Old 10-20-2006, 01:30 PM   #12
jmulligan
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Rep: Reputation: 1
Question undefined symbols after kernel rebuild

I also encountered undefined symbols nfsacl_decode, nfsacl_encode after attempting to compile a reconfigured kernel using the latest centOS source rpm (2.6.9-42.0.3).

I tracked down these symbols to fs/nfs_common/nfsacl.c...
The Makefile in this directory contains this line:

obj-$(CONFIG_NFS_ACL_SUPPORT) += nfs_acl.o

and so I expected to find CONFIG_NFS_ACL_SUPPORT set equal to 'n' in my .config...
But it wasn't there at all? And when I tried adding it by hand, it got removed during the build process.

This looks to me like an error in the config specification?

-jeff
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to restore out-of-box kernel settings if my kernel compile fails? brgr88 Slackware 8 04-18-2006 06:51 AM
How to compile kernel on RHEL4 (ES) ERBRMN Linux - Enterprise 1 03-15-2006 12:48 AM
kernel compile on x86_64 fails acidjuice Linux - Software 1 05-06-2005 04:30 PM
Mandrake 10 off. 2.6.3 kernel fails to compile... why???? Samppa72 Mandriva 1 07-23-2004 08:55 PM
compile kernel with nfsroot option zael Linux - Networking 0 07-09-2004 09:11 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 03:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration