1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589
|
<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head>
<META NAME="generator" CONTENT="lgazmail v1.1D.l">
<TITLE>The Answer Guy 34:
Updates: Risks and Rewards
</TITLE>
<!-- ORIGINAL SUBJECT:
Keeping my RH5.0 system up to date
JTD SUBTITLE:
-->
</head>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
ALINK="#FF0000">
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H1 align="center"><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="" border="0" align="middle">
<a href="../index.html">The Answer Guy</a>
<img src="../../gx/dennis/bbubble.gif" alt="" border="0" align="middle">
</A></H1>
<BR>
<H4 align="center">By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a>
<BR>Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H4>
<p><hr><p>
<!--endcut ========================================================= -->
<H3><img src="../../gx/dennis/qbub.gif" alt="(?)"
width="50" height="28" align="left" border="0"
>Updates: Risks and Rewards</H3>
<p><strong>From Frits Hoogland on 08 Oct 1998 </strong></p>
<!-- begin body -->
<p><strong>Hi almighty answerguy!
</strong></p>
<p><strong>I'm a bit confused by all the updates of various system components (like
the <tt>libc</tt>, <tt>gcc</tt>, etc, etc). Is it advisable to loop at <a href="ftp://ftp.redhat.com/">ftp.redhat.com</a> for
updates of my 5.0 system? Is it advisable to download a new kernel? Can
I install let say kernel 2.0.35 (which, as I noticed, nearly everyone
uses) or are there things I have to consider, things I have to check,
etc.?
</strong></p>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)" height="28" width="50" align="bottom">That's an excellent question. Using <A HREF="http://www.redhat.com/">Red Hat</A>'s package
management system (RPM) does make it faster and easier for
most "mere mortals" (myself included) to upgrade most
packages and install most new ones.
</blockquote>
<blockquote><A HREF="http://www.debian.org/">Debian</A> package management is allegedly at least as good
--- but it doesn't seem to be documented nearly as well
so it's harder to learn than RPM. (Hey, Debian dudes
if you write a DPKG/APT Guide for RPM users --- you might
win more converts!).
</blockquote>
<blockquote>Even <A HREF="http://www.slackware.org/">Slackware</A>'s <tt>pkgadd</tt> (or is that <tt>pkg_add</tt>, it's been
so long) is somewhat easier than the old "manly" way of
upgrading your software (downloading the sources,
and building them yourself).
</blockquote>
<blockquote>Indeed, even <EM>that</EM> approach (building from sources) has
improved quite a bit over the years, for most packages.
The mark of a good modern package is that you can
install it, from source with the following sequence
of commands:
</blockquote>
<pre>tar tzf /usr/local/from/foo.tar.gz
# look at contents, insure that it creates
# it's own directory tree and puts everything
# in there:
tar xzf ....
cd /usr/local/src
# extract the sources into our local source
# tree. (Might need to do a mkdir and cd into
# that if your package extracts to the "current"
# directory).
cd $package_source_top_level_dir
view README
# or 'more' or 'less' -- maybe different README's
# This should have some basica instructions
# which ideally will amount to:
./configure
# possibly with options like --prefix=/usr/local
make install
</pre>
<blockquote>... Note that the really important parts of this are
'<tt>./configure</tt>' and '<TT>make install</TT>' After that a good
source package should be ready to configure and run.
</blockquote>
<blockquote>(Note that the "configure" command in my examples is a
script generated to perform a set of local tests and
select various definitions that are to be used by the
make file. This, in turn, tells the local system how to
"make" the program's binaries, libraries, man pages and
other files in a way that's suitable for your system ---
and (with the commonly implemented "install" option or
"target" in "makefile" terms) tells the '<TT>make</TT>' command
where to put things. There is a difference between
"<tt>./configure</tt>"-ing the sources to be build and "configuring"
the resulting package).
</blockquote>
<blockquote>In any event, with RPM's you get the package (for your
plattform: x86, Alpha, SPARC, PowerPC, etc) and type:
</blockquote>
<blockquote>
<blockquote><code>rpm -i foo-$VERSION.$PLATFORM.rpm
</code></blockquote></blockquote>
<blockquote>... or whatever the file's name is. To upgrade a
source package you follow mostly the same procedure for
sources (usually saving any configuration files and/or
data from the previous versions, and maybe moving or
renaming all of the old libs and bins and other files).
It would be nice if source package maintainers make
upgrades easier by detecting their prior installed version
and suggesting a "make upgrade" command --- or something
like that).
</blockquote>
<blockquote>To upgrade a typical RPM you just type:
</blockquote>
<blockquote><blockquote><code>rpm -U foo.....rpm</code>
</blockquote></blockquote>
<blockquote>There are similar commands for Debian, but I don't know
them off the top of my head and they aren't handy to
look up from this <A HREF="http://www.suse.com/">S.u.S.E.</A> (RPM) system.
</blockquote>
<blockquote>(I'm sure I'll get flamed for the perceived slight ---
oh well. Comes with the territory. Please include
techie info and examples with the flames).
</blockquote>
<blockquote>Now, when it comes to major system upgrades (like
<tt>libc5</tt>
to <tt>glibc</tt>, and from a 1.x kernel to a 2.x kernel) it's a
different matter.
</blockquote>
<blockquote>If you have a libc5 system and you just install glibc
unto it; there's no real problem. The two will co-exist.
All of your existing libc5 programs will continue to load
their shared libraries, and all your glibc2 (a.k.a. libc6)
linked programs should find the new library. Running a
mixture of "typical" programs from both libraries will
have not important effects (although you'll be using more
memory than you would if all you binaries are linked
against the same libraries.
</blockquote>
<blockquote>Notice I said "typical" --- when it comes to system
utilities, like the '<TT>login</TT>' command there are some
interactions that are significant and even incompatible.
I've heard that the format of the "utmp" and "wtmp"
records are different (these are user and "who" log
files) which are accessed by a whole suite of different
utilities (like the '<TT>who</TT>' and 'w' commands, the 'login'
and '<TT>xdm</TT>' commands, '<tt>screen</tt>' and other utilities).
</blockquote>
<blockquote>So, it's best to upgrade the whole system to glibc
at once. (The occasional application, one that is not
part of the base "system" and isn't "low level" that
uses a different version/set of libraries won't be a
problem).
</blockquote>
<blockquote>With most recent kernels you can install the sources
under <tt>/usr/src/linux</tt> and running the following command:
</blockquote>
<blockquote><blockquote><code>make menuconfig
</code></blockquote></blockquote>
<blockquote>(go through a long list of options to customize the
kernel to your system and preferences)... or copy
in your old <tt>.config</tt> file and type:
</blockquote>
<blockquote><blockquote><code>make oldconfig
</code></blockquote></blockquote>
<blockquote>... to focus on just the differences between the
options listed/chosen for your previous kernel and
the new one.
</blockquote>
<blockquote>Then you'd type something like:
</blockquote>
<blockquote><blockquote>
<code>make clean dep install modules modules_install
</code></blockquote></blockquote>
<blockquote>... and wait awhile.
</blockquote>
<blockquote>I've done kernel upgrades that were that easy. Usually
I read the "changelog" and other text files, and the
help screens on most of the new options (I usually also
have to refresh my memory on a couple dozen old options).
</blockquote>
<blockquote>These are major upgrades because they can affect the
operation of your whole system.
</blockquote>
<blockquote>Recently my father (studying Mathematica) needed a better
video card. This was an old VLB (VESA Local Bus) 486
running Red Hat 4.1. So I decided to build a new system
(Pentium 166, PCI video card, new 6Gb UDMA hard disk)
and upgrade his system to Red Hat 5.1.
</blockquote>
<blockquote>So, here's how I did that:
</blockquote>
<blockquote>Build new hardware, boot from a customized copy of Tom
Oehser's "root/boot" diskette (<A HREF="http://www.toms.net/rb">http://www.toms.net/rb</A>)
and connect to the LAN using a temporary IP address that
we have reserved for this purpose.
</blockquote>
<blockquote>I then run fdisk on the new drive and issue a command
like:
</blockquote>
<blockquote><blockquote>
<code>for i in 1 3 5 6 7; do mk2efs -c /dev/hda$i; done
</code></blockquote></blockquote>
<blockquote>(to make filesystems all all of the partitions, root,
rescue root, <tt>/usr</tt>, <tt>/home</tt> and <tt>/usr/local</tt>). I go away
and answer e-mail and get some coffee, getting thoroughly
side tracked.
</blockquote>
<blockquote>A day or so later I remember to finish work on that (he
reminds me that he has some homework to do).
</blockquote>
<blockquote>Now I mount all of these filesystems they way I want
them to be later (when I reboot from the hard disk).
So I mount the new rootfs under <tt>/mnt/den</tt> (the machine's
name is Deneb --- an obscure star) and the new usr
under <tt>/mnt/den/usr</tt> and the new <tt>/usr/local</tt> under
<tt>/mnt/den/usr/local</tt> (etc).
</blockquote>
<blockquote>Then I copy his old <tt>/etc/passwd</tt> and
<tt>/etc/group</tt> file
into the ram disk (see below) and issue a command
like the following:
</blockquote>
<blockquote><blockquote>
<code>rsh deneb "cd / && find . | cpio -o0BH crc " \
<br>| ( cd /mnt/den && cpio -ivumd )
</code></blockquote></blockquote>
<blockquote>... this copies his <EM>entire</EM> existing system to the new
system.
</blockquote>
<blockquote>When that's done (doesn't take long, but I don't time it
--- it runs unattended until I get back to it), I
edit the <tt>/mnt/den/etc/fstab</tt>, run a chroot command
(cd <tt>/mnt/den && chroot . /bin/sh</tt>) fix up the
<tt>lilo.conf</tt>
file and run <tt>/sbin/lilo</tt>, and reboot (with the root/boot
diskette removed.
</blockquote>
<blockquote>Now I've replicated his whole system (and accidently
knocked his off of our LAN because I forgot to reset
the IP address of this box). So, I fix that.
</blockquote>
<blockquote>I make a last check to make sure that everything *really*
did copy over like I wanted:
</blockquote>
<blockquote><blockquote>
<code>cd / ; rsh den " cd / && tar cf - . " | tar df -
</code>
</blockquote>
</blockquote>
<blockquote>... this copies <EM>all</EM> of his file back over the net
again (this time using '<TT>tar</TT>' instead of cpio), but the
receiving copy just compares (diffs) the incoming file
"archive" (from it's standard input, a.k.a. the pipelined
data) rather than extracting them and writing them into
place.
</blockquote>
<blockquote>This reports a few differences among some log files,
the <tt>/etc/</tt> files that I modified, and it gives some errors
about "sockets" (Unix domain sockets show up in your
file tree as little filenames with the "s" as the
leading characters in an '<tt>ls -l</tt>' output; there are
about five or six of these on a typical system, one for
your printer, one for you syslog and one or two for any
copies of X Windows or '<TT>screen</TT>' you may have run. These
should not be confused with "internet domain" sockets
which only exist in memory and go through your IP interfaces).
</blockquote>
<blockquote>I presume that the tar diff feature simply doesn't support
Unix domain sockets, it's probably a bug, but not a
significant one to me.
</blockquote>
<blockquote>A different bug in '<TT>cpio</TT>' is a bit irritating and I have
to report it to their maintainer. Remember how I copied over
my old passwd and group files before the transfer? There's
*supposed* to be an option to "use the numeric UID and GID"
(<tt>-n</tt> or <tt>--numeric-uid-gid</tt>) in '<TT>cpio</TT>' (and a similar one in
newer versions of '<tt>tar</tt>'). However, my copies (on several
machines from several distributions around the house) all
just give an error if I try to use that switch. Not a
<em>reasonable</em> error message like: "option not supported"
or "don't do that you moron" --- just a stubborn insistence
on printing the "usage" summary which clearly shows these
options as available!
</blockquote>
<blockquote>The quickest workaround is to just copy of the passwd
and group files to the local system before attempting
the "restore" (replication). One time when I failed to
do this (using a version of '<TT>tar</TT>' that didn't support the
feature) it squashed the ownership of <EM>every</EM> file to
'<tt>root</tt>' --- resulting in a useless system. Luckilly I was
just playing around that other time, so I learned to
watch out for that.
</blockquote>
<blockquote>So, now I just slip in my Red Hat 5.1 CD (courtesy of the
IBM booth at last week's ISPCon in San Jose --- where they
were giving them out). I think IBM's booth got them from
the BALUG (Bay Area Linux Users Group) which is still trying
to scrape up a few hundred bucks to pay for the '<TT>free</TT>' booth
they were offered. (Free means no fees to the convention
co-ordinators; we went out of pocket for "renting" tables
and chairs and paying for a power extension for the demo
computer).
</blockquote>
<blockquote>From there I just let the RH 5.1 upgrade process run its
course.
</blockquote>
<blockquote>What!?! All that work just to let run the upgrade?
</blockquote>
<blockquote>Yep!
</blockquote>
<blockquote>I spent years in technical support (MS-DOS and Windows
markets). I consider vendor and OS upgrades to be the most
dangerous thing you can do on your computer. I'm sure
they've caused more downtime and lost data than failed
hard drives, virus infections, stupid users (other than
the stupidity of blind updates), and disgruntled employees.
</blockquote>
<blockquote>So, I like to make sure that I can get back to where I
started. For me, that means "start with a copy of the
system or a restore of the system's backups" I've been
known to take a hard drive out of a system, install a
new one, restore the backup to <EM>that</EM> and then to the
restore to the "new" system. (The old hard drive stays
on a shelf until the data on it is so out of date it
would be worth copying back in --- then gets rolled into
some other system, or the same one, as "extra disk space").
</blockquote>
<blockquote>Now, please don't take this as a personal attack on Linux
or Red Hat. So far they haven't failed me. I have yet to
see an "upgrade" destroy one of my systems. However, my
professional experience as proven to me that this is
the right approach even for one of my home systems.
</blockquote>
<blockquote>In this case the upgrade was silky smooth. I had to
fuss a little to get in a new X server (different
video card, remember) and the new system really didn't
like the PS/2 mouse that I have it (which was of
no consequence, since my father uses a serial port
trackball, so the mouse that I had in <tt>/dev/psaux</tt> was
just a temporary one anyway).
</blockquote>
<blockquote>Oh, yeah, I had to compile a new kernel to support
the ethernet card I'm using (a Tulip based Netgear).
There was probably a module laying around the CD
for it somewhere --- but so what. It's a good
test for the system.
</blockquote>
<blockquote>At this point the old computer sitting in the living
room, and the new one is in his room running Mathematica.
In a week or so (when we're really convinced that everything
is really O.K with the new box) I'll prep that old 486
up as a server (my colocated server is do for an upgrade
--- so this one will go in for it, and that one will become
the spare and test bed).
</blockquote>
<blockquote>I can understand how most users don't want to have whole
systems around as spares. However, these days, it's
not too expensive to keep an extra 6Gb hard drive laying
around for these sorts of "major" upgrades. It's also
a good way to insure that your backups are working (if
you use the "restore" method rather than a network
"replication" trick).
</blockquote>
<blockquote>Note that this whole process, as complicated as it
sounds, only takes a little more "human" time than
just slipping in the CD and doing it blindly. The
system keeps pretty busy --- but I don't wait for it,
I only issued 10 commands are so (I have a couple of
scripts for "tardiff" and "replicate" to save some
of the typing).
</blockquote>
<blockquote>For the daring you can run a program called
'<tt>rpmwatch</tt>'
(or Red Hat or other RPM based systems) or "<tt>autoup.sh</tt>"
(Debian). You point these at your favorite mirror and
they will automatically update new packages.
</blockquote>
<blockquote>Of course this is "daring" --- I personally wouldn't
consider it from any public mirror site. I have
recommended it to corporate customers, where they
point their client systems at an internal server and
their staff posts rpm's after testing (limited automated
deployment). This is a little easier for some sorts
of upgrades than using '<TT>rdist</TT>' and home brewed scripts.
</blockquote>
<blockquote>In terms of upgrades --- my main "gateway" (router,
server, mailhost, uucp hub, and internal web server) is
an old 386/33 --- it's about a decade old, has 32Mb
of RAM and single, full SCSI chain with a few Gig of disk
space). It runs an old copy of RH 4.2, which is an upgrade
(disk replication/swap method) from 3.03, which is an
upgrade from Slackware 1.(something), which was an upgrade
(wipe and re-install from scratch) from SLS something
(running a 0.99p10 kernel).
</blockquote>
<blockquote>I used to use that machine (antares) for everything
(even X --- it has a 2mb STB Powergraph video card
that cost more than a new motherboard would have).
However, these days I mostly use '<TT>canopus</TT>' -- a S.u.S.E.
5.1 upgraded to 5.3 (blindly --- I was feeling lazy!)
My wife mostly uses her workstation, '<TT>betelgeuse</TT>' ---
which came from VA Research with some version of Red Hat
(read the review I wrote for Linux Journal if you're
really curious) --- and was upgraded (new installation
on new drive, copy the data) to S.u.S.E. 5.2.
</blockquote>
<blockquote>So, you can see that we've used a variety of upgrade
strategies around the house over the years.
</blockquote>
<blockquote>As for installing a new kernel. Do a good backup.
Now ask: Can I afford a bit of down time if I break
the system (while I restore it)? If the answer is
"Yes" than go get a 2.1.124 (or later) kernel and try
that. We're getting <EM>really</EM> close to 2.2 and only
a few thousand people have tried the new kernels. So
we want <EM>lots</EM> of people to at least <em>try</em> the current
releases before we finally go to 2.2.
</blockquote>
<blockquote>(Linus doesn't want to have 36 "fix" releases to
the next kernel series).
</blockquote>
<blockquote>The new kernel should be much faster in TCP/IP performance
(already one of the fastest on the platform) and much, much
faster in filesystem performance (using the new dcache
system).
</blockquote>
<blockquote>So, try the new kernel. Be sure to get a new copy of pppd
if you use that --- the kernel does change some structure
or interface that the old version trips on.
</blockquote>
<blockquote>This upgrade will not be nearly as big a deal as the
1.2 to 2.0 shift (which was the most disruptive in the
history of Linux as far as I can tell --- the formats
of entries under /proc changed, so it broke the whole
procps suite of utilities, like the '<TT>ps</TT>' and '<tt>top</tt>'
commands). I haven't seen any such problems from the
2.0 to 2.1 kernels (I'm running a 2.1.123 at the
moment, on canopus. antares is running on 2.0.33 or so
--- it is least frequently upgraded because it is the
server.
</blockquote>
<p><strong><IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)" height="28" width="50" align=""bottom">Looking forward to your answer.
Frits.
</strong></p>
<!-- end body -->
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright ©</a> 1998, James T. Dennis <BR>
Published in <I>Linux Gazette</I> Issue 34 November 1998</H5>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<P align="center">
<table width="98%"><tr valign="center" align="center">
<td rowspan="3"><A HREF="../lg_answer34.html"><IMG
SRC="../../gx/dennis/answernew.gif"
ALT="[ Answer Guy Index ]"></A></td>
<td><A HREF="./apache.html">apache</a>
<td><A HREF="./current.html">current</a>
<td><A HREF="./digi.html">digi</a>
<td><A HREF="./ether.html">ether</a>
<td><A HREF="./goodtimes.html">goodtimes</a>
<td><A HREF="./intlX.html">intlX</a>
<td><A HREF="./largedisk.html">largedisk</a>
</tr><tr valign="center" align="center">
<td><A HREF="./maybe.html">maybe</a>
<td><A HREF="./numlock.html">numlock</a>
<td><A HREF="./quota.html">quota</a>
<td><A HREF="./recovery.html">recovery</a>
<td><A HREF="./script.html">script</a>
<td><A HREF="./serial.html">serial</a>
<td><A HREF="./session.html">session</a>
</tr><tr valign="center" align="center">
<td><A HREF="./sound.html">sound</a>
<td><A HREF="./tape.html">tape</a>
<td><A HREF="./testsuite.html">testsuite</a>
<td><A HREF="./w95ie.html">w95ie</a>
<td><A HREF="./w95ras.html">w95ras</a>
<td><A HREF="./w95virus.html">w95virus</a>
<td><A HREF="./xdm.html">xdm</a>
</tr></table>
</P>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<A HREF="../index.html"><IMG SRC="../../gx/indexnew.gif"
ALT="[ Table Of Contents ]"></A>
<A HREF="../../index.html"><IMG SRC="../../gx/homenew.gif"
ALT="[ Front Page ]"></A>
<A HREF="../lg_bytes34.html"><IMG SRC="../../gx/back2.gif"
ALT="[ Previous Section ]"></A>
<A HREF="../izquierdo.html"><IMG SRC="../../gx/fwd.gif"
ALT="[ Next Section ]"></A>
</body>
</html>
<!--endcut ========================================================= -->
|