9997 Updating from source and custom kernel - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Installing & Upgrading

Installing & Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1  
Old May 26th, 2012, 01:45
gpatrick gpatrick is offline
Member
 
Join Date: Jul 2009
Posts: 247
Thanks: 55
Thanked 15 Times in 10 Posts
Default Updating from source and custom kernel

The steps I have for updating from source (from the 6 or 7 release timeframe):
Code:
# csup -g -L 2 standard-supfile
# cd /usr/src
# make cleanworld && make cleandir
# make buildworld
# make buildkernel KERNCONF=CUSTOM
# make installkernel KERNCONF=CUSTOM
# nextboot -o "-s" -k kernel
# reboot
# fsck -p
# mount -u /
# mount -a -t ufs
# swapon -a
# mergemaster -p
# cd /usr/src
# make installworld
# make delete-old
# mergemaster -Ui
# portsnap fetch update
# portmaster -Da
# reboot
# cd /usr/src
# make delete-old-libs
In the handbook I read these are the current steps:
Code:
# cd /usr/src
# make buildworld
# make buildkernel KERNCONF=MYKERNEL
# make installkernel KERNCONF=MYKERNEL
# shutdown -r now
(boot -s from loader prompt)
# mount -u /
# mount -a -t ufs
# adjkerntz -i
# mergemaster -p
# cd /usr/src
# make installworld
# mergemaster
# reboot
As you can see they are mostly the same except for some slight differences, such as,

1) I run a swapon and handbook doesn't say to.
2) After the first reboot into single user mode, the handbook has mergemaster without any options, whereas I use -Ui
3) I run a make delete-old and the handbook doesn't.
4) After a reboot I run a make delete-old-libs but the handbook doesn't.
5) Why adjkerntz -i after updating?

Can someone explain these differences to me and if my method needs to be updated to change those few steps?

Last edited by gpatrick; May 26th, 2012 at 01:53.
Reply With Quote
The Following User Says Thank You to gpatrick For This Useful Post:
MNIHKLOM (December 22nd, 2012)
  #2  
Old May 26th, 2012, 09:24
kpa kpa is offline
Senior Member
 
Join Date: Jul 2010
Location: People's Technocratic Republic of Finland
Posts: 1,980
Thanks: 44
Thanked 460 Times in 390 Posts
Default

2) the -U option updates all files that have not been user modified automatically, the manual page says that this can be dangerous if there are major changes to the files that require changes to configuration. I use the -F flag instead that leaves files that have really changed or have my own modifications for my review, files that differ only by their version control ids are updated automatically with the -F flag. If run without any flags mergemaster(8) will ask about every single file if you want to update them.

3) and 4) are optional in most cases but required if you upgrade to a higher major version, for example from 8.x to 9.0 or 9-STABLE.

5) is needed to set the system time correctly, it's best run as the first step in single user mode even before mounting the filesystems.

Last edited by kpa; May 27th, 2012 at 11:18.
Reply With Quote
The Following User Says Thank You to kpa For This Useful Post:
MNIHKLOM (December 22nd, 2012)
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
Requires Kernel Source taggedzi Installation and Maintenance of FreeBSD Ports or Packages 10 November 3rd, 2012 23:20
[Solved] updating kernel source razixx Installing & Upgrading 2 January 30th, 2011 23:21
How to get source for kernel, world to match currently running kernel? Time2IPL Installing & Upgrading 4 March 3rd, 2010 18:28
Custom Kernel iic2 Installing & Upgrading 15 May 27th, 2009 21:48
Building kernel modules without kernel source code holycow General 5 April 2nd, 2009 09:18


All times are GMT +1. The time now is 00:52.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0