Date: Wed, 02 Jan 2013 14:55:34 -0600 From: Paul Schmehl <pschmehl_lists@tx.rr.com> To: andreas scherrer <ascherrer@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: freebsd-update patches custom /boot/kernel/kernel which it should not Message-ID: <DFFB3126BC86145F5BBC43C1@utd71538.campus.ad.utdallas.edu> In-Reply-To: <A6B0D20B3328291202ED5FF3@utd71538.campus.ad.utdallas.edu> References: <50E4724E.9050706@gmail.com> <FE07BE5C4AC64D520798F214@utd71538.campus.ad.utdallas.edu> <50E4880E.8030105@gmail.com> <A6B0D20B3328291202ED5FF3@utd71538.campus.ad.utdallas.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--On January 2, 2013 1:46:25 PM -0600 Paul Schmehl <pschmehl_lists@tx.rr.com> wrote: > --On January 2, 2013 8:18:38 PM +0100 andreas scherrer > <ascherrer@gmail.com> wrote: > >> on 2.1.13 19:15 Paul Schmehl said the following: >>> --On January 2, 2013 6:45:50 PM +0100 andreas scherrer >>>> And from experience this is what it will do: replace >>>> /boot/kernel/kernel which is my custom kernel with a GENERIC kernel. >>>> >>>> As it seems that freebsd-update works by comparing a hash of >>>> /boot/kernel/kernel with the GENERIC kernel's hash I checked the md5 >>>> and sha1 hash of /boot/kernel/kernel and /boot/GENERIC/kernel. They >>>> differ (see [3]). >>>> >>>> So why is freebsd-update going to overwrite my custom kernel? And how >>>> can I prevent it from doing so? >>>> >>> >>> Read man (5) freebsd-update.conf. Particularly the COMPONENTS portion >>> that explains how to update world without changing kernel. >> >> Thanks for pointing this out. I might change my freebsd-update.conf to >> not update the kernel. But still I believe this to be more of a kludge >> than a solution: in my opinion the handbook suggests that a custom >> kernel should be detected and left alone. But at the same time a GENERIC >> kernel in /boot/GENERIC should be patched. >> >> http://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html >> ----- > > That needs to be updated. > >> However, freebsd-update will detect and update the GENERIC kernel in >> /boot/GENERIC (if it exists), even if it is not the current (running) >> kernel of the system. >> ----- >> >> Furthermore if I remove the kernel option from the COMPONENTS in >> freebsd-update.conf I think I will not get the kernel source patches >> anymore, right? Which in turn means I have to get them via some other >> mechanism, no? >> > > See UpdateIfUnmodified in the man page. You can specify a regex pattern > that prevents the kernel from being modified but still downloads the > sources. > I wasn't thinking when I wrote this. Freebsd-update pulls *binary* copies of files, so you're not ever going to get the src files to rebuild your kernel from freebsd-update. You need to pull those in using svn. -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson "There are some ideas so wrong that only a very intelligent person could believe in them." George Orwell
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DFFB3126BC86145F5BBC43C1>