From owner-freebsd-questions@FreeBSD.ORG Sun Jan 14 21:07:01 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71DF216A40F for ; Sun, 14 Jan 2007 21:07:01 +0000 (UTC) (envelope-from dino_vliet@yahoo.com) Received: from web51102.mail.yahoo.com (web51102.mail.yahoo.com [206.190.38.144]) by mx1.freebsd.org (Postfix) with SMTP id 1DA8013C428 for ; Sun, 14 Jan 2007 21:07:00 +0000 (UTC) (envelope-from dino_vliet@yahoo.com) Received: (qmail 12477 invoked by uid 60001); 14 Jan 2007 21:07:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=GoZMXs/GgYeGBiV5bRyJAnLv5wdjrEVSHUYNL2cru6sciRuu04BimrdoOKmrxW42TK1dsXOwEIXyRCMi2BIDXTBMMNE9ij9NkjX4q/yuEZxNcy0boqGmoqka67p8Cod5i2GRNtExbSgb9G1jPS0djCZko0BOH68greJ54aE7GdY=; X-YMail-OSG: oEFk.QIVM1mg.2JfjI0Hij9Z9PjzqazSXm_So3fEJLGpM4vZYmuJsOzX42lrwTbeVB_lIzLNfk_UM1P2FWVQxPD_xWg.8uPGgaHNz1.iq0pU7qLiGAU0NF5wNNQ.CImvsiJs8PoEzbOtbhB2eUWHjEAV Received: from [82.170.181.144] by web51102.mail.yahoo.com via HTTP; Sun, 14 Jan 2007 13:07:00 PST Date: Sun, 14 Jan 2007 13:07:00 -0800 (PST) From: Dino Vliet To: Giorgos Keramidas In-Reply-To: <20070114202517.GA3404@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <153656.11016.qm@web51102.mail.yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: advice on compiling a new kernel & upgrading to the latest sources X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jan 2007 21:07:01 -0000 --- Giorgos Keramidas wrote: > On:56, Dino Vliet > wrote: > > Hi folks, > > from different sources I have written my steps to > compile a new kernel > > & upgrade to the latest sources. > > Your instructions, however, are different from what > /usr/src/UPDATING > contains. > > Please, make *sure* you read `/usr/src/UPDATING' > very carefully. > Especially the commands of the section ``To upgrade > in-place ...'' > and *all* the footnotes they reference. > > > Can anyone have a look into them and tell me if I > won't run into > > troubles or if there are better ways to achieve > the same? > > > > Upgrade procedure to the newest freebsd kernel and > userland. > > > > 1.Make sure that the cvsup file (src-supfile) is > adjusted in the right > > way. > > That's ok. > > > 2. Cd /usr/src/sys/amd64/conf which contains the > file MYKERNEL > > No it doesn't. CVSup will delete the files it > doesn't know about, so > you should *SAVE a copy* of your favorite kernel > config file outside of > the source tree and *copy* it into > `/usr/src/sys/amd64/conf' after CVSup > finishes updates the sources. > > > 3.MYKERNEL is then adjusted, if necessary and > copied to > > root/kernels/MYKERNEL > > Nice :) > > > 4.Copy everything under /etc to /root/etc > > Why? This isn't mentioned in `/usr/src/UPDATING' > and it doesn't really > help much if you manage to trash your /lib and > /usr/lib trees. A better > suggestion is to ``make sure you have good level 0 > dumps'', as suggested > by ``/usr/src/UPDATING''. > > > 5.cvsup -g -L 2 src-supfile > > You've deleted "MYKERNEL" here. > > > 6. cd /usr/src > > 7. make cleanworld > > The ``make cleanworld'' command is unnecessary if > you haven't been > building stuff manually inside the tree. > > > 8. make buildworld > > 9. make buildkernel KERNCONF=MYKERNEL > > You can do both at the same time, with: > > # cd /usr/src > # make KERNCONF=MYKERNEL buildworld buildkernel > > > 10. Go into single user mode > > You forgot to install the new kernel *before* > rebooting here. This > should be done with: > > # cd /usr/src > # make KERNCONF=MYKERNEL installkernel > > > 11. If the new kernel doesn't boot reboot and hit > the space bar at the > > boot prompt and boot kernel.old If the new kernel > boots OK mount -a > > No, "mount -a" is not enough. Please read the > `UPDATING' file. The > full sequence of commands would be something like: > > (escape to loader prompt) > (at the OK prompt of the boot loader, type): > > boot -s > > Then, when the system starts a /bin/sh shell > instance, type: > > # adjkerntz -i > # fsck -p > # mount -u / > # mount -a > > > 12. cd /usr/src > > 13. make installkernel KERNCONF=MYKERNEL > > It is too late to install a new kernel here, if you > didn't do it > *before* rebooting into single user mode. The whole > 'exercise' of > installing the new kernel and booting into single > user mode is meant to > provide a level of testing for the new kernel. > > If you haven't installed it and booted into the old > kernel, some things > may fail to install later on, you don't know if the > new kernel actually > works, etc. > > > 14. Go into single user mode > > You *ARE* in single-user mode already. > > > 15. cd /usr/src > > 16. mergemaster -p > > 17. make installworld > > 18. mergemaster -i > > 19. exit and reboot > > These look fine. > > > Is this ok? Or have I forgot about something? I'm > running a freebsd > > 6.1 machine on a amd64 system with an adjusted > kernel called MYKERNEL. > > Please read ``/usr/src/UPDATING''. Then read it > again. Let the text > and all its footnotes sink in, and if you don't > understand *why* a > particular step exists, or what a specific step is > supposed to do, feel > free to ask. > > We are here to help you update the system, but we > are *also* here to > help you understand the why, when, how and what for > of each step of the > process :-) > > - Giorgos > > Thanks for your help! I am glad I asked before doing it, so now I can check out the resources given and try to learn why things are they way they are. Your post gave me a lit of valuable insights and I will have to print everything out and read it carefully. I really like the FreeBSD way though (have just donated to the foundation because of the nice way people like you treat this cry for help:-) Thanks again! Dino ____________________________________________________________________________________ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html