DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th July 2010
Greg_Morgan Greg_Morgan is offline
Port Guard
 
Join Date: May 2009
Posts: 13
Thanked 0 Times in 0 Posts
Default Kernel size: Why no change after patching?

Hi.

I am newbie on OpenBSD and am learning things as I go.

I observed something about Kernel size. As I could not reason it out, I am presenting it to this forum. I would appreciate if you could please help me understand.

I bought 4.7 CD and installed 4.7 on my home desktop.
/bsd has a size of 7582622

Yesterday, I checked out the stable branch of 4.7 and rebuild the kernel as per FAQ.
/bsd (after stable build) also has the same size of 7582622.

I checked the size of bsd on the CD-1. It has the above size too.

From the patch list posted, I know that reliability fixes have been made. My questions are:
a) Why does the kernel size not change between release and stable build even after reliability fixes?
b) Did I not build the kernel correctly?

During research, I found one post:
http://screamingelectron.org/forum/s...ad.php?p=14496

Thanks.
Reply With Quote
  #2   (View Single Post)  
Old 25th July 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

The binary size changing isn't guaranteed after a patch (..the compiler may produce only slightly different code), it all depends on the extent of the change.

Check the build string near the top of the kernel dmesg, it'll show information about the build.. also an MD5/SHA256 sum will help verify the binary has changed.

Make sure you checked out OPENBSD_4_7 not OPENBSD_4_7_BASE from a CVS tree, there haven't been a lot of changes in stable, and I only see 3 kernel patches on the errata page, 2 of these were single line patches.

Also, after building the kernel, make sure you install it..
Reply With Quote
  #3   (View Single Post)  
Old 25th July 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by Greg_Morgan View Post
Yesterday, I checked out the stable branch of 4.7 and rebuild the kernel as per FAQ.
/bsd (after stable build) also has the same size of 7582622.
Post the output from the following command:

$ sysctl kern.version
Reply With Quote
  #4   (View Single Post)  
Old 25th July 2010
Greg_Morgan Greg_Morgan is offline
Port Guard
 
Join Date: May 2009
Posts: 13
Thanked 0 Times in 0 Posts
Default

ocicat, BSDfan666,

Thanks for taking the time to reply to my post.


I am using a script to re-build the kernel/ follow stable. I shall post the code.

Here is sysctl kern.version' contents:

kern.version=OpenBSD 4.7-stable (GENERIC) #0: Sat Jul 24 22:02:41 EDt 2010
root@bullfrog.myhome.westell.com:/usr/src/sys/arch/i386/compile/GENERIC.

I shall post dmesg in a subsequent reply.
Reply With Quote
  #5   (View Single Post)  
Old 25th July 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,888
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by Greg_Morgan View Post
kern.version=OpenBSD 4.7-stable (GENERIC) #0: Sat Jul 24 22:02:41 EDt 2010
root@bullfrog.myhome.westell.com:/usr/src/sys/arch/i386/compile/GENERIC.
One reason for running -stable is to avoid having to apply individual (or a litany of) patches, but this comes at the cost of maintaining a local CVS tree & rebuilding the system.

From the above, we now know that you are running a self-built -stable kernel. We can only assume that you are also looking at the timestamps of the resulting kernels when comparing one to another size-wise. While BSDfan666 is correct stating that patching/updating is not guaranteed to change kernel sizes, it is not entirely clear how you are making these kernel comparisons. If the tree which is downloaded/updated is the same content, then the resulting size of the kernel should be the same as well. When was building done relative to the announcement of patches on the errata page?

http://www.openbsd.org/errata47.html

Quote:
I am using a script to re-build the kernel/ follow stable.
This concerns me given that the project does not provide a build script. You must have found it somewhere or written it yourself, so this raises two questions:
  • Is the script correct?
  • Have you had enough experience manually building the kernel/system using the information found in Section 5.3 of the FAQ to discern possible problems?
While I have developed some scripts to take care of other commonly repeated tasks, building the kernel/system is important/fundamental enough that I don't advocate scripting the process until it is well understood. I certainly would be suspicious of scripts found in the wild.
Quote:
I shall post dmesg in a subsequent reply.
This will not necessarily provide much illumination, however, have you tweaked GENERIC before building at any point?
Reply With Quote
  #6   (View Single Post)  
Old 25th July 2010
Greg_Morgan Greg_Morgan is offline
Port Guard
 
Join Date: May 2009
Posts: 13
Thanked 0 Times in 0 Posts
Default

ocicat,

I have not made any changes to the Generic kernel. I am not building any custom kernel.

The scripts that I referred are enclosed as attachments. They were taken from the FAQ. If I have picked up the wrong statements, the fault is mine. I would appreciate if you could tell me where I went wrong.

I seek your advise. I appreciate you taking the time to help a newbie.

Thanks in advance.
Attached Files
File Type: txt step_01__fetch_source_code.txt (934 Bytes, 12 views)
File Type: txt step_02__build_kernel.txt (417 Bytes, 10 views)
File Type: txt step_03__build_userland_and_X.txt (520 Bytes, 10 views)
File Type: txt dmesg_after_compile.txt (5.7 KB, 14 views)
Reply With Quote
  #7   (View Single Post)  
Old 25th July 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

There is no problem here, you've successfully built a stable kernel, and I confirm that it's the same size in this case.

I do agree with ocicat, scripting the build only leads to problems, the errata releases are made infrequently enough that automation is unnecessary, build it manually and install it manually.
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
How to change the font size? atop xterm, aterm, etc jb_daefo General software and network 12 13th July 2010 10:42 AM
patching or updating ? dennky OpenBSD Installation and Upgrading 12 14th January 2010 07:17 PM
CLI font size idefix FreeBSD General 3 7th February 2009 11:19 AM
Negative partition size? giga FreeBSD General 1 2nd January 2009 09:02 PM
Change the Size of a Slice kienjakenobi FreeBSD General 9 27th June 2008 03:01 PM


All times are GMT. The time now is 01:17 AM.


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