DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Installation and Upgrading

FreeBSD Installation and Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 24th June 2008
FWS FWS is offline
New User
 
Join Date: Jun 2008
Location: Netherlands
Posts: 8
Thanked 0 Times in 0 Posts
Default Kernel configuration file ignored?

Hello all,

I've just tried to compile and install a new kernel in FBSD 7.0.

However, the /boot/kernel.old/kernel and boot/kernel/kernel files are exactly the same size: 9219468 bytes.

This is what I did:

I edited a copy of the GENERIC kernel configuration file and named it P200MMX. It is in /usr/src/sys/i386/conf . (BTW, are numbers allowed in the configuration file name?)

Then I used the following commands:

Quote:
cd /usr/src

make buildkernel KERNCONF=P200MMX

make installkernel KERNCONF=P200MMX
I rebooted and the GENERIC kernel appeared to be used, not P200MMX.

Quote:
uname -i
...shows: GENERIC.

I didn't notice any error messages in the whole process. The pc boots normally, but apparently not using P200MMX.

Any help is appreciated.

Thanks,
Frits
Reply With Quote
  #2   (View Single Post)  
Old 24th June 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Thanked 16 Times in 14 Posts
Default

It appears you made a copy of GENERIC without changing anything. You need to open the file P200MMX in your favorite editor, and change the "ident" line to whatever you want your kernel to identify itself as. As far as the kernel and kernel.old being the same size, that's expected as you haven't change any configuration at all.

I suspect that if you type "uname -a", you'll see generic, but you'll also see towards the end something like:

Code:
root@<your hostname here>:/usr/obj/usr/src/sys/P200MMX
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
  #3   (View Single Post)  
Old 24th June 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,068
Thanked 198 Times in 156 Posts
Default

You might also want to post the kernel config you used...
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #4   (View Single Post)  
Old 24th June 2008
FWS FWS is offline
New User
 
Join Date: Jun 2008
Location: Netherlands
Posts: 8
Thanked 0 Times in 0 Posts
Default

Hi,

Thanks for your swift reply.
Quote:
Originally Posted by cajunman4life View Post
It appears you made a copy of GENERIC without changing anything. You need to open the file P200MMX in your favorite editor, and change the "ident" line to whatever you want your kernel to identify itself as. [/CODE]
I've done exactly what you describe above. I did copy GENERIC to P200MMX, and then edited a lot in P200MMX. (I also changed the ident line to P200MMX, and finally I didn't forget to save the file P200MMX.)

Quote:
Originally Posted by cajunman4life View Post
I suspect that if you type "uname -a", you'll see generic, but you'll also see towards the end something like:

Code:
root@your hostname:/usr/obj/usr/src/sys/P200MMX
uname -a shows:

Code:
root@<my hostname here>:/usr/obj/usr/src/sys/GENERIC i386
At the moment I'm unable to show you the kernel configuration file, because I don't know yet how to transfer it to my Win PC, which I'm using now. However I used the directions in 8.5 The Configuration File only. (I used conservative settings intended for a simple workstation, not a server or anything fancy). As said, there were no error warnings during the whole process.

(I don't know whether it is of any importance, but I just noticed that I forgot to add the "machine i386" line to P200MMX. It wasn't in GENERIC either though.)

Thanks again for your suggestions.
Reply With Quote
  #5   (View Single Post)  
Old 24th June 2008
FWS FWS is offline
New User
 
Join Date: Jun 2008
Location: Netherlands
Posts: 8
Thanked 0 Times in 0 Posts
Default

Hello,

Just a thought: did I have to move P200MMX from /usr/src/sys/i386/conf to another directory before using the commands "make buildkernel KERNCONF=P200MMX" and "make installkernel KERNCONF=P200MMX"?

Cheers
Reply With Quote
  #6   (View Single Post)  
Old 24th June 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,068
Thanked 198 Times in 156 Posts
Default

No, /usr/src/sys/i386/conf is where the file should be.

In any case, if you specify a kernel config that does not exist the build process will halt:
Code:
[/usr/src]# make kernel KERNCONF=adasda
ERROR: Missing kernel configuration file(s) (adasda).
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
Exit 1
[/usr/src]#
Is the KERNCONF argument actually being passed correctly? What is the output of:
# make -V KERNCONF kernel KERNCONF=P200MMX
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #7   (View Single Post)  
Old 24th June 2008
FWS FWS is offline
New User
 
Join Date: Jun 2008
Location: Netherlands
Posts: 8
Thanked 0 Times in 0 Posts
Default

The output is: P200MMX
Reply With Quote
  #8   (View Single Post)  
Old 24th June 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,068
Thanked 198 Times in 156 Posts
Default

Hm, should work fine ... Maybe you accidently types KERNCONf or something?

If you build the kernel, you can immediatly see which config file it's using, just press CTRL+C after ~1-2 seconds:

Code:
[/usr/src]# make buildkernel KERNCONF=PHONG

--------------------------------------------------------------
>>> Kernel build for PHONG started on Wed Jun 25 00:58:47 CEST 2008
--------------------------------------------------------------
===> PHONG
mkdir -p /usr/obj/usr/src/sys

--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/src/sys/i386/conf;  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  config  -d /usr/obj/usr/src/sys/PHONG  /usr/src/sys/i386/conf/PHONG
Kernel build directory is /usr/obj/usr/src/sys/PHONG
Don't forget to do ``make cleandepend && make depend''

--------------------------------------------------------------
>>> stage 2.1: cleaning up the object tree
--------------------------------------------------------------
^C
[/usr/src]#
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #9   (View Single Post)  
Old 24th June 2008
FWS FWS is offline
New User
 
Join Date: Jun 2008
Location: Netherlands
Posts: 8
Thanked 0 Times in 0 Posts
Default

I started "make buildkernel KERNCONF=P200MMX" again. And stopped it using Ctrl-C.

It is showing : "Kernel build directory is /usr/obj/usr/src/sys/P200MMX"

And also: "Kernel build for P2000MMX started on Wed Jun 25 01:04:48 CEST 2008"
Reply With Quote
Old 24th June 2008
FWS FWS is offline
New User
 
Join Date: Jun 2008
Location: Netherlands
Posts: 8
Thanked 0 Times in 0 Posts
Default

Well, it is compiling again. Maybe it works this time. Previously, the compiling process took about 9 hours on this machine... I've also added the "machine i386" line to P200MMX, BTW.

Currently I see a lot of references to P200MMX passing over the screen. This wasn't the case the previous time. Looks promising :-)

Thank you for your help,

Frits

Last edited by FWS; 24th June 2008 at 11:20 PM.
Reply With Quote
Old 24th June 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,068
Thanked 198 Times in 156 Posts
Default

9 hours O.o
You know you can build the kernel on a faster i386 machine and then transfer it to this machine?
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 24th June 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Thanked 16 Times in 14 Posts
Default

Also, IIRC the MMX was i586-class, so you should be able to remove i386 and i486 from your config file. I have a P-MMX 200MHz myself, unfortunately it's disconnected from KVM/network/etc, and I don't have the energy to connect it right now (read: I'm being lazy). However, I didn't build a custom kernel on this machine (as it would take forever to build). I used freebsd-update to make sure I had the latest security patches, and left it at that.
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
Old 24th June 2008
FWS FWS is offline
New User
 
Join Date: Jun 2008
Location: Netherlands
Posts: 8
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Carpetsmoker View Post
9 hours O.o
You know you can build the kernel on a faster i386 machine and then transfer it to this machine?
Yes, I read about it, but I don't have a faster PC running FreeBSD available at the moment. Anyway, it is bedtime for me here in Europe. The compiling will be ready in the morning.

Cheers,
Frits
Reply With Quote
Old 24th June 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,068
Thanked 198 Times in 156 Posts
Default

Quote:
Also, IIRC the MMX was i586-class, so you should be able to remove i386 and i486 from your config file.
MMX is a CPU instruction set, it can be implemeted on any CPU and says nothing about the CPU class.
But his machine is indeed probably a i586.

You can check with:
Code:
 % dmesg | grep CPU
CPU: AMD Athlon(tm) XP (1252.85-MHz 686-class CPU)
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Old 25th June 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Thanked 16 Times in 14 Posts
Default

Quote:
Originally Posted by Carpetsmoker View Post
MMX is a CPU instruction set, it can be implemeted on any CPU and says nothing about the CPU class.
You are correct, but given my assumption that by his naming the config "P200MMX" he had a Pentium MMX 200MHz, which is exactly the same as I have on one of my machines.

I should have worded better I guess

When making my above comment, I was referring to what I imagine is the CPU he was using (see my previous statement).
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
Old 25th June 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Quote:
Originally Posted by FWS View Post
(I don't know whether it is of any importance, but I just noticed that I forgot to add the "machine i386" line to P200MMX. It wasn't in GENERIC either though.)
This line is not needed, and the build system really should have complained about it being included twice. The FreeBSD 7.0 kernel build system automatically includes the contents of /usr/src/sys/<arch>/conf/DEFAULTS into the kernel config file. "machine i386" is in the DEFAULTS file. Anything in that file, does not need to (and should not) be in the kernel config file.

Also, with any CPU newer than an i386, you should remove the cpu i386 line. For any CPU newer than an i486, you should remove the cpu i386 and cpu i486 lines.

But, for all other x86 CPUs (Pentium, PPro, P2, P3, P4, Athlons, etc), you should keep the cpu i586 line (and add cpu i686 if appropriate). There are a bunch of memory operations that are included by the i586 option that speed things up on everything since the Pentium.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 26th June 2008
FWS FWS is offline
New User
 
Join Date: Jun 2008
Location: Netherlands
Posts: 8
Thanked 0 Times in 0 Posts
Default

Hello,

The P200MMX kernel is installed successfully now. The kernel has shrunk to 3464821 bytes, which is nice compared to GENERIC's original 9219468 bytes. The PC is running fine. I still don't know what went wrong at the first try though.

Cheers,
Frits
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP read file contents - Maximum file size cksraj Programming 1 21st September 2009 11:38 AM
kernel file from 6.3 to 7.2 l2fl2f FreeBSD Installation and Upgrading 3 14th September 2009 06:53 PM
k3b, configuration. maxrussell FreeBSD Ports and Packages 4 3rd March 2009 04:23 AM
Unable to build custom kernel [Wrong configuration?] jrick FreeBSD General 3 31st July 2008 01:53 PM
Constant Kernel Panics, Corupted file system reboots over and over pseudonym FreeBSD General 24 14th July 2008 03:12 AM


All times are GMT. The time now is 06:38 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick