dcw
2007-May-21 00:52 UTC
[CentOS] recompiling kernel results in error: .../linux-2.6.18.i686/arch//Makefile: No such file or directory
I have installed CentOS 5 with all updates. Also I have 2 ne2000 isa cards. In recompiling the kernel, I have been trying to follow the instructions on this URL: http://wiki.centos.org/HowTos/Custom_Kernel The complete error message I get is: Makefile:403: /home/cs/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/arch//Makefile: No such file or directory I have the following kernel and rpm packages installed: kernel-2.6.18-8.1.4.el5 kernel-headers-2.6.18-8.1.4.el5 kernel-devel-2.6.18-8.1.4.el5 rpm-devel-4.4.2-37.el5 rpm-4.4.2-37.el5 rpm-python-4.4.2-37.el5 redhat-rpm-config-8.0.45-17.el5.centos rpm-build-4.4.2-37.el5 rpm-libs-4.4.2-37.el5 uname -r gives 2.6.18-8.1.4.el5 The .rpmmacros file has the following: %_topdir /home/cs/redhat %packager cs <dwoody1 at charter.net> The script I am using from a user login is: rpm -i /home/packages/kernel-2.6.18-8.1.4.el5.src.rpm rpmbuild -bp --target=`uname -m` kernel-2.6.spec cd /home/cs/redhat/BUILD/kernel-2.6.18/linux-2.6.18.`uname -m` cp /home/cs/redhat/SOURCES/kernel-2.6.18-`uname -m`.config .config # enter 'y' for isapnp, isa and 'm' for ne2000 support make xconfig cp .config /home/cs/redhat/SOURCES/kernel-2.6.18-`uname -m`.config cd /home/cs/redhat/SPECS # change the release to: # %define release 8.1.4.1.ne2000%{?dist} vi kernel-2.6.spec cd /home/cs/redhat/SPECS rpmbuild -ba --target=`uname -m` kernel-2.6.spec After the patches are applied during the last rpmbuild command I get the error message at the top of this email. Searching the web has not provided any useful information. According to the documentation in make xconfig, isa and isapnp support have to be compiled into the kernel. I know that I have either not set a parameter, doing commands in the wrong order or I have missed a step, but I have not been able to determine what. I have even tried to change the order of the commands without luck. Any help will be greatly appreciated, David
Akemi Yagi
2007-May-21 06:03 UTC
[CentOS] recompiling kernel results in error: .../linux-2.6.18.i686/arch//Makefile: No such file or directory
On 5/20/07, dcw <dwoody1 at charter.net> wrote:> I have installed CentOS 5 with all updates. Also I have 2 ne2000 isa cards. > > In recompiling the kernel, I have been trying to follow the instructions on this URL: > http://wiki.centos.org/HowTos/Custom_Kernel > > The complete error message I get is: > Makefile:403: /home/cs/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/arch//Makefile: No such file or directoryHi, Makefile is expected to be in .../arch/i686/ not .../arch// . I could reproduce the problem. I don't know where the source of the problem is, but I am sure we will hear from experts on this mailing list. At the risk of getting reprimanded by KB, I will share my quick and dirty solution. Look at the first line of SOURCES/kernel-2.6.18-`uname -m`.config It's supposed to be # i686 (or in my case # x86_64). ARCH is defined by this line (around line 1917) of .spec: Arch=`head -1 .config | cut -b 3-` (.config comes from the above file) But the .config file has only a # on the first line. Therefore, ARCH ends up with an empty string leading to an empty directory for Makefile. This means that the initial .config file in the BUILD directory was already wrong. So, a quick (temporary) solution is to change the # to # i686. Not the right way, but if you must build your kernel now, you may need to resort to the manual editing method. Otherwise, wait for real help. Akemi
dcw
2007-May-22 00:35 UTC
[CentOS] recompiling kernel results in error: .../linux-2.6.18.i686/arch//Makefile: No such file or directory
The compile finished with no apparent errors. When I ran 'make xconfig' I selected 'm' for ne2000 support so that it would create a module. I used the find command to search in /home/cs/redhat for ne.ko and it was not found. I greped the .config file for the relevant lines: The command I used and the output are as follows: grep ISA /home/cs/redhat/SOURCES/kernel-2.6.18-`uname -m`.config | grep -v HISAX | grep -yv disable CONFIG_GENERIC_ISA_DMA=y # Bus options (PCI, PCMCIA, EISA, MCA, ISA) CONFIG_ISA_DMA_API=y # CONFIG_ISA is not set # CONFIG_EISA is not set # CONFIG_ISAPNP is not set CONFIG_NET_ISA=y # Wireless 802.11b ISA/PCI cards support # CONFIG_ISDN_DRV_AVMB1_B1ISA is not set # CONFIG_ISDN_DRV_AVMB1_T1ISA is not set # ISA-based Watchdog Cards CONFIG_I2C_ISA=m # CONFIG_I2C_PCA_ISA is not set # ISA devices I also greped for NE2000 in the same file: CONFIG_NE2000=m I am 99% sure that I entered 'y' for ISAPNP and ISA support and 'm' for ne2000. The above shows that ISAPNP is not set. In my research I read that it should be selected. Does it need to be? I am more than willing to recompile again and double check the settings after I have run 'make xconfig'. But before doing that, is there a way to limit which kernels in the i686 group are compiled? If it can be limited to one (ie. exclude xen, PAE etc.), then the compile will not take nearly as long. Thanks, David On Monday 21 May 2007 1:42 pm, Akemi Yagi wrote:> On 5/21/07, Akemi Yagi <amyagi at gmail.com> wrote: > > On 5/21/07, dcw <dwoody1 at charter.net> wrote: > > > When I use the i386 the compile continues. > > > However, I had to edit the SOURCE config file after running make > > > xconfig. That command altered the first line of the config file. > > > > Yes, I was about to say the same thing. In fact, the arch name (i386) > > gets deleted twice. First, when rpmbuild -bp is run. But this is not > > a problem by itself, because in the next step .config is copied from > > SOURCE which has the correct first line. Then the second time is when > > make menuconfig (or xconfig) is run as you noted. This is the > > problem. At this point, arch needs to be added back manually to > > .config as just you did. > > > > I really want to why menuconfig does not do it right. > > I have done a bit of a search regarding this issue. Turns out the > same problem was reported as early as Feb 2005 on a Fedora list. So > this is not something new, nor CentOS specific. Bad news is that I > have yet to find an answer for this. The only thing I saw in the > search was the same manual editing of .config as we already did as a > temporary solution. > > http://linux.derkeiler.com/Mailing-Lists/Fedora/2005-05/0405.html > > I am still trying to figure out why rpmbuild -bp messes up the first > line of .config. And of course this problem never surfaces if you run > rpmbuild -ba in the beginning because the incorrect version of .config > is created but *not* used in this operation. > > Akemi > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos--
From: "Brent L. Bates"> If you really want separate partitions for all of those directories, > why > you would I don't know, create separate partitions on each drive and RAID > the > partitions as needed. (...) >/boot / /home /swap /tmp /var As far as I know, that kind of partitioning scheme is fairly common with servers. You wouldn't want your users filling up the whole disk and bringing the system to a crawl or halt, or the log files from the web server doing the same, would you? So, give them separate spaces that cannot be trespassed! Some distributions of Linux automatically create this partitioning scheme when you choose Instalation Type=Server.
dcw
2007-May-24 19:47 UTC
[CentOS] recompiling kernel results in error: .../linux-2.6.18.i686/arch//Makefile: No such file or directory
On Thursday 24 May 2007 1:37 pm, Akemi Yagi wrote:> On 5/24/07, dcw <dwoody1 at charter.net> wrote: > > > (1) prepare .spec by removing lines from %prep > > > (2) rpmbuild -bp kernel-2.6.spec > > > (3) go to BUILD (where .config is) > > > (4) make xconfig > > > (5) add # i386 to .config as the first line > > > (6) copy this .config back to SOURCES (using the original name > > > xxx.config) (7) rpmbuild -ba kernel-2.6.spec > > > > > > Or, instead of steps (5) to (7), just run: > > > > I did 5 and 6 anyway, assuming that in the worst case they were not > > needed and would do no harm. I then did 'rpmbuild -bc ...' as below.Does the rpmbuild -bc work only in the BUILD directory? Or does it work in the SOURCE directory? Will doing step 5 and 6 cause any problems?> > It was working until gpg had a segfault. From some of the emails I have > > been reading this is a known problem that has not been fixed yet. > > > > Other emails I have read indicated that signmodule should be set to 0. > > What is the down side risk of doing this? > > All I can tell you is that 'signmodules' is set to 0 in my spec file. > I did not change it, so that must have been CentOS's default (?).There is sigmodules in several places in the SPEC file. The first one is set to '0' but the others are not. I prefer not setting singmodules to '0' unless I know what the risks are. The last time I recompiled a kernel was when it was at 2.4.x. Is there a way to compile the kernel without using rpmbuild?> By the way, Johnny Hughes has kindly checked the above procedure and > said, "that's what I do." This is a big assurance. I agree that your > goal is almost there.This is good, but what does he do to avoid segfaults? Thanks, David> Isn't Linux fantastic? Imagine trying this in Windows... > > Akemi > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos-- RD Woodyard, Inc. -------------------------------------------------------