Friday, May 9, 2008

Slackware 12.0 to 12.1 Upgrade HOWTO Chinese Translation

Slackware 12.0 to 12.1 Upgrade HOWTO
Slackware 12.0 到 12.1 升级指南

This document explains how to upgrade from Slackware 12.0 to Slackware 12.1.
这篇文章是Slackware 12.0 到 12.1的升级说明。
----------------------------------------------------------------------------

For details of important changes from Slackware 12.0 to 12.1, see the file
'CHANGES_AND_HINTS.TXT'. Thanks to Robby Workman for help with this.
关于从Slackware 12.0 到 12.1的重大变化,请参考CHANGES_AND_HINTS.TXT。感谢Robby Workman在这上的帮助。

Before you begin, I would strongly recommend making a backup of your
system, or, if not the entire system, at least the /etc directory. You
might find that you need to refer to a few things after the upgrade
process is complete. Back it up, or take your chances.
开始之前,我强烈建议你备份你的系统。就算不备份整个系统,至少要备份/etc目录。因为升级完成后你可能需要查(目录)里的一些东西。要么备份要么博一下。

OK, now that everything is safely backed up, let's proceed. :-)
好了,如果都备份好了,就开始吧。

To do this, you'll need the Slackware 12.1 packages. If these are on a CD,
create a new directory to mount the CD on so that it doesn't get in the way
during the upgrade:
升级需要Slackware 12.1 的软件包。如果它们在CD上,建一个新目录来挂载CD,以免它们在升级过程中碍事。

mkdir /packages
mount /dev/cdrom /packages

The packages don't have to be on a CD-ROM, as an alternative you could
copy the slackware directory (the one with the various package
subdirectories in it, basically the "slackware" directory from the install
CD) to someplace like /root/slackware/. The important thing is that you
know where the slackware packages directory is. We'll use /root/slackware
in the following examples.
软件包不一定要在CD-ROM上。另一个方法是把slackware目录拷贝到某个地方,比如/root/slackware/。你需要知道软件包的目录在哪里。在以下的例子中我们假设是/root/slackware。

0. Put your machine in single-user mode:
0. 让你的机器进单用户模式:
telinit 1


1. Upgrade your glibc shared libraries. This is important, or things
might go haywire during the first part of the upgrade:
1. 升级glibc共享库。这很重要。不然的话第一部分的升级会搞糟:
upgradepkg /root/slackware/a/glibc-solibs-*.tgz


2. Upgrade your package utilities:
2. 升级软件包管理工具:
upgradepkg /root/slackware/a/pkgtools-*.tgz


3. Upgrade everything else (and install new packages):
3. 升级其他所有的软件包 (包括安装新的软件包):
upgradepkg --install-new /root/slackware/*/*.tgz

If you wish to upgrade everything except for the KDEI language
packs for KDE (these take a lot of space and can be dealt with
after the main upgrade more quickly and easily), running this
script in the "slackware" directory will do the trick:
如果你想要升级除了KDEI语言包(这些会用掉很多空间,而且系统升级完成后升级它们很容易)之外的所有软件包的话,在slackware目录下运行这个脚本:

#!/bin/sh
for dir in a ap d e f k kde l n t tcl x xap y ; do
( cd $dir ; upgradepkg --install-new *.tgz )
done


4. Make sure your system will boot. First, be sure your initrd is up
to date (if you use one). If you use LILO, make sure the paths in
/etc/lilo.conf point to a valid kernel and then type 'lilo' to
reinstall LILO. If you use a USB memory stick to boot, be sure to
copy the new kernel to it in place of the old one.
4. 确保你的系统可以引导进slackware。首先,确定你的initrd是最新的。如果你用LILO, 确保/etc/lilo.conf里的路径都指向有效的内核,然后打'lilo'重新安装LILO到引导区。如果你用USB闪存来引导,一定要把新内核拷贝过去覆盖旧的。

5. Remove obsolete packages. The CHANGES_AND_HINTS.TXT file should have a
list of these. You may also wish to go into /var/log/packages and take
a look at the package list:
5. 卸载已废弃的软件包。CHANGES_AND_HINTS.TXT里有一个列单。你也可以到/var/log/packages看一看:
ls -lt | less

You may spot some old, obsolete, or discontinued packages. If so,
you can remove these using 'removepkg'.
你可能会发现一些旧的,已废弃的,或者已停止支持的软件包。可以用'removepkg'卸载它们。

6. Fix your config files. Some of the config files in /etc are going to
need your attention. You'll find the new incoming config files on
your system with the ".new" extension. You may need to fill these in
with information from your old config files and then move them over.
6. 修正你的配置文件。需要注意/etc目录下的一些配置文件。新安装的配置文件以".new"为扩展名。你需要把旧的配置文件里的东西移到新的里面。

Feel brave? You can use this little script to install all of the
.new config files in /etc. If you've made any local changes you'll
need to add them to the newly installed files. Your old config files
will be copied to *.bak. Anyway, it might be an easier starting
point. Here it is:
如果你勇敢的话,可以用下面这个小脚本安装所有的.new配置文件。如果你以前改过某些配置文件的话,你要在新的配置文件里再做一遍你的改动。旧的配置文件会被备份成.bak扩展名。无论如何,可能这样做来开始比较容易。脚本如下:

#!/bin/sh
cd /etc
find . -name "*.new" | while read configfile ; do
if [ ! "$configfile" = "./rc.d/rc.inet1.conf.new" \
-a ! "$configfile" = "./group.new" \
-a ! "$configfile" = "./passwd.new" \
-a ! "$configfile" = "./shadow.new" ]; then
cp -a $(echo $configfile | rev | cut -f 2- -d . | rev) \
$(echo $configfile | rev | cut -f 2- -d . | rev).bak 2> /dev/null
mv $configfile $(echo $configfile | rev | cut -f 2- -d . | rev)
fi
done


7. If you use a non-en_US language pack for KDE and you already have it
installed, then you may upgrade it by moving into the slackware/kdei
directory and using this command:
7. 如果你已经安装使用了非美国英语的KDE语言包的话,可以进入slackware/kdei目录用下面这个命令升级它:
upgradepkg --install-new k**tgz

To have upgradepkg cycle through all of the available packages, and
see which ones need to be upgraded, use this in slakckare/kdei:
在slackware/kdei里用如下命令来升级所有需要升级的语言包:
upgradepkg *tgz

If your language has been added to KDE since Slackware 12.0, you'll
need to install it using installpkg, or upgradepkg --install-new.
如果你的语言是Slackware 12.0后才加入的。你要用installpkg,或者upgradepkg --install-new来安装它。
Typically you'll need to make sure that you have installed the
slackware/kdei packages for kde, koffice, and k3b (if you use those).
通常你要保证安装了kde, koffice, 和k3b的语言包(如果你有用它们的话)。

8. Return to multi-user mode:
8. 回到多用户模式:
telinit 3


At this point you should be running Slackware 12.1. :-)
到这里有已经在运行Slackware 12.1了 :-)
I wish everyone good luck with this!
我祝愿每个人升级时好运!

---
Patrick Volkerding
volkerdi@slackware.com

No comments: