1 |
Updating Information for MidnightBSD users |
2 |
|
3 |
Items affecting the ports and packages system can be found in |
4 |
/usr/ports/UPDATING. |
5 |
|
6 |
20060909: |
7 |
OpenNTPD was added to MidnightBSD. Run make delete-old to remove |
8 |
the old ntpd daemon. |
9 |
|
10 |
cat has a new option -D which allows you to timestamp output |
11 |
on a per line basis. |
12 |
|
13 |
The kernel has a keyboard mux which allows you to have multiple |
14 |
keyboard connected simultaneously. USB keyboard support was also |
15 |
improved with this patch. |
16 |
|
17 |
The Intel em driver was updated. Network performance was greatly |
18 |
increased on many systems. Additional models are supported. |
19 |
|
20 |
The ATA driver was patched to fix a potential deadlock. |
21 |
|
22 |
Bind was patched to fix a potential denial of service condition. |
23 |
|
24 |
20060817: |
25 |
ksh has been added to the base system. If you previously had |
26 |
the port installed, it will be overwritten on the next buildworld. |
27 |
|
28 |
|
29 |
|
30 |
To build a kernel |
31 |
----------------- |
32 |
If you are updating from a prior version of MidnightBSD (even one just |
33 |
a few days old), you should follow this procedure. With a |
34 |
/usr/obj tree with a fresh buildworld, |
35 |
make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE |
36 |
make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE |
37 |
|
38 |
To test a kernel once |
39 |
--------------------- |
40 |
If you just want to boot a kernel once (because you are not sure |
41 |
if it works, or if you want to boot a known bad kernel to provide |
42 |
debugging information) run |
43 |
make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel |
44 |
nextboot -k testkernel |
45 |
|
46 |
To just build a kernel when you know that it won't mess you up |
47 |
-------------------------------------------------------------- |
48 |
This assumes you are already running a 6.X system. Replace |
49 |
${arch} with the architecture of your machine (e.g. "i386", |
50 |
"alpha", "amd64", "ia64", "pc98", "sparc64", etc). |
51 |
|
52 |
cd src/sys/${arch}/conf |
53 |
config KERNEL_NAME_HERE |
54 |
cd ../compile/KERNEL_NAME_HERE |
55 |
make depend |
56 |
make |
57 |
make install |
58 |
|
59 |
If this fails, go to the "To build a kernel" section. |
60 |
|
61 |
To rebuild everything and install it on the current system. |
62 |
----------------------------------------------------------- |
63 |
# Note: sometimes if you are running current you gotta do more than |
64 |
# is listed here if you are upgrading from a really old current. |
65 |
|
66 |
<make sure you have good level 0 dumps> |
67 |
make buildworld |
68 |
make kernel KERNCONF=YOUR_KERNEL_HERE |
69 |
[1] |
70 |
<reboot in single user> [3] |
71 |
mergemaster -p [5] |
72 |
make installworld |
73 |
make delete-old |
74 |
mergemaster [4] |
75 |
<reboot> |
76 |
|
77 |
|
78 |
To cross-install current onto a separate partition |
79 |
-------------------------------------------------- |
80 |
# In this approach we use a separate partition to hold |
81 |
# current's root, 'usr', and 'var' directories. A partition |
82 |
# holding "/", "/usr" and "/var" should be about 2GB in |
83 |
# size. |
84 |
|
85 |
<make sure you have good level 0 dumps> |
86 |
<boot into -stable> |
87 |
make buildworld |
88 |
make buildkernel KERNCONF=YOUR_KERNEL_HERE |
89 |
<maybe newfs current's root partition> |
90 |
<mount current's root partition on directory ${CURRENT_ROOT}> |
91 |
make installworld DESTDIR=${CURRENT_ROOT} |
92 |
cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd |
93 |
make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT} |
94 |
cp /etc/fstab ${CURRENT_ROOT}/etc/fstab # if newfs'd |
95 |
<edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition> |
96 |
<reboot into current> |
97 |
<do a "native" rebuild/install as described in the previous section> |
98 |
<maybe install compatibility libraries from src/lib/compat> |
99 |
<reboot> |
100 |
|
101 |
|
102 |
To upgrade in-place from 5.x-stable or higher to 6.x-stable |
103 |
----------------------------------------------------------- |
104 |
<make sure you have good level 0 dumps> |
105 |
make buildworld [9] |
106 |
make kernel KERNCONF=YOUR_KERNEL_HERE [8] |
107 |
[1] |
108 |
<reboot in single user> [3] |
109 |
mergemaster -p [5] |
110 |
make installworld |
111 |
make delete-old |
112 |
mergemaster -i [4] |
113 |
<reboot> |
114 |
|
115 |
Make sure that you've read the UPDATING file to understand the |
116 |
tweaks to various things you need. At this point in the life |
117 |
cycle of current, things change often and you are on your own |
118 |
to cope. The defaults can also change, so please read ALL of |
119 |
the UPDATING entries. |
120 |
|
121 |
Also, if you are tracking -current, you must be subscribed to |
122 |
freebsd-current@freebsd.org. Make sure that before you update |
123 |
your sources that you have read and understood all the recent |
124 |
messages there. If in doubt, please track -stable which has |
125 |
much fewer pitfalls. |
126 |
|
127 |
[1] If you have third party modules, such as vmware, you |
128 |
should disable them at this point so they don't crash your |
129 |
system on reboot. |
130 |
|
131 |
[3] From the bootblocks, boot -s, and then do |
132 |
fsck -p |
133 |
mount -u / |
134 |
mount -a |
135 |
cd src |
136 |
adjkerntz -i # if CMOS is wall time |
137 |
Also, when doing a major release upgrade, it is required that |
138 |
you boot into single user mode to do the installworld. |
139 |
|
140 |
[4] Note: This step is non-optional. Failure to do this step |
141 |
can result in a significant reduction in the functionality of the |
142 |
system. Attempting to do it by hand is not recommended and those |
143 |
that pursue this avenue should read this file carefully, as well |
144 |
as the archives of freebsd-current and freebsd-hackers mailing lists |
145 |
for potential gotchas. |
146 |
|
147 |
[5] Usually this step is a noop. However, from time to time |
148 |
you may need to do this if you get unknown user in the following |
149 |
step. It never hurts to do it all the time. |
150 |
|
151 |
[8] In order to have a kernel that can run the 5.x binaries |
152 |
needed to do an installworld, you must include the COMPAT_FREEBSD5 |
153 |
option in your kernel. Failure to do so may leave you with a system |
154 |
that is hard to boot to recover. A similar kernel option COMPAT_FREEBSD5 |
155 |
is required to run the 5.x binaries on more recent kernels. |
156 |
|
157 |
Make sure that you merge any new devices from GENERIC since the |
158 |
last time you updated your kernel config file. |
159 |
|
160 |
[9] When checking out sources, you must include the -P flag to have |
161 |
cvs prune empty directories. |
162 |
|
163 |
If CPUTYPE is defined in your /etc/make.conf, make sure to use the |
164 |
"?=" instead of the "=" assignment operator, so that buildworld can |
165 |
override the CPUTYPE if it needs to. |
166 |
|
167 |
MAKEOBJDIRPREFIX must be defined in an environment variable, and |
168 |
not on the command line, or in /etc/make.conf. buildworld will |
169 |
warn if it is improperly defined. |
170 |
|
171 |
Copyright information: |
172 |
|
173 |
Copyright 1998-2005 M. Warner Losh. All Rights Reserved. |
174 |
|
175 |
Redistribution, publication, translation and use, with or without |
176 |
modification, in full or in part, in any form or format of this |
177 |
document are permitted without further permission from the author. |
178 |
|
179 |
THIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR |
180 |
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
181 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
182 |
DISCLAIMED. IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT, |
183 |
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
184 |
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
185 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
186 |
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
187 |
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
188 |
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
189 |
POSSIBILITY OF SUCH DAMAGE. |
190 |
|
191 |
If you find this document useful, and you want to, you may buy the |
192 |
author a beer. |
193 |
|
194 |
Contact Warner Losh if you have any questions about your use of |
195 |
this document. |
196 |
|
197 |
$FreeBSD: src/UPDATING,v 1.416.2.18 2006/02/22 11:51:57 yar Exp $ |
198 |
$MidnightBSD$ |