This HowTo will show you an example of how to upgrade Slackware 12.0 to 12.1.
Note: This HowTo is just a guide and does
not cover all possible scenarios. Rather it attempts to expand on the great information carefully compiled in the
UPGRADE.TXT and
CHANGES_AND_HINTS.TXT through a practical example. Again, this HowTo is just a guide and may not be correct for your situation. Use your brain and adjust accordingly. If you have any questions, concerns, comments, or complaints please voice them through posting. This is a forum after all
Updates:
All of the most recent changes are in
RED.
2008-07-03- Note about Liberation Fonts overriding MS TTFs
- Link to Beautiful Fonts thread
2008-05-18- Split HowTo into two parts
- Expanded Updates section
- More kernel package information, patching sources for non-SMP, UTF8 console
- Added more to Miscellaneous Fixes section - mostly because I saw a few threads crop up recently about some of the issues I had not discussed (though were still in the CHANGES_AND_HINTS.TXT).
- Discussed Remote Control changes in Audacious
2008-05-08- Latest Slackpkg recommendations added
- Notes about rc.modules symlink, files under etc/modprobe.d
The sections of this HowTo are:
Part 1
Should You Upgrade?
Things You Need to Upgrade
Backup Computer
Getting 12.1 Sources
Create List of Non-Slackware Software
Begin Upgrade
Mass Upgrade
Alternative Mass Upgrade with slackpkg
Kernel Packages
Part 2 -
Skip to post #19
LILO and the Fancy Bootsplash
Get Rid of Obsolete Slackware Packages from 12.0
Merge Changes for Config Files
Update Your Graphics Drivers (if needed)
Miscellaneous Fixes
Rebuild/Upgrade any Non-Slackware Packages (as Needed)
Fix Other Random Problems
** Should You Upgrade? **
This should be the first thing you ask yourself. What's in it for
you? If you aren't sure, you should read the following docs:
ANNOUNCE.12_1
RELEASE_NOTES
CHANGES_AND_HINTS.TXT
How much work will it take? Well that depends on your system. If your system is in a state of disaster with software installed who knows where then it might be a better idea to backup and install a fresh Slackware 12.1 instead.
** Things You Need to Upgrade **
1) Slackware 12.1 sources – however you can get them: On a CD/DVD, local mirror, from a slackware mirror, network mount, etc
2) Slackware 12.0 installation – This is a HowTo on upgrading from 12.0 after all...
Quote:
Originally Posted by CHANGES_AND_HINTS.TXT
Note that upgrading from a Slackware version earlier than 12.0 is NOT supported at all and will almost certainly lead to breakage.
|
So, for instance, you can't directly upgrade (safely) from Slackware 9.0 to 12.1. You would probably need to upgrade incrementally to each version. After you're done you need to post a member success story
3) Time – This is not a one click upgrade process. It will require that you
think. Take your time and do it right the first time.
Please read the UPGRADE.TXT and CHANGES_AND_HINTS.TXT before attempting an upgrade! This HowTo does not cover everything included in those files.
4) (Newest Graphics Driver) – It might be a good idea, for instance, to grab the latest Nvidia driver now if you are going to need it later.
** Backup Computer **
This is without a doubt the first thing you should do before making any major system changes.
Quote:
Originally Posted by UPGRADE.TXT
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.
|
** Getting 12.1 Sources **
Most people will probably download the full iso, but if you have downloaded some sources from -current previously it might be more worth your while to simply mirror. In my case I had previously used
Alien Bob's mirror-slackware-current.sh to create a local mirror of -current and install cds. I had used these to test -current. Before using mirror-slackware-current.sh I recommend you create mirror-slackware-current.conf based upon the options that you want changed from the defaults (see beginning of mirror-slackware-current.sh).
An example
mirror-slackware-current.conf
Code:
BUILDER="shadowsnipes <email@youremail.com>"
SLACKROOTDIR="/mnt/path/to/Slackware_Mirror"
ISO="NONE"
EXCLUDEFILE="/home/USERNAME/scripts/mirror-slackware/mirror-slackware-excludes"
My
mirror-slackware-excludes contains
Code:
pasture/
source/
slackware/kdei/
Also, if you run the script with
-h you can see the runtime arguments available.
After -current became Slackware 12.1 all I had to do was
change my mirror folder names from
slackware-current to
slackware-12.1 and
slackware-current-iso to
slackware-12.1-iso.
Then run
Code:
mirror-slackware-current.sh -r 12.1
which mirrors the 12.1 release instead of -current. There were almost no changes between my latest copy of -current and 12.1.
Another tip for using this script: If you have to mirror onto a non-linux partition take out the '
p' from the actual rsync commands in the script so that they
don't try to preserve permissions. In my case I only had enough free space on an external NTFS drive, so that is what I used. There are two places I had to change the script, since the sync is done twice. I simply changed a line that looks like
Code:
$RSYNC --delete --delete-excluded -z -rlptD \
to
Code:
$RSYNC --delete --delete-excluded -z -rltD \
Also, for this to work correctly on a non-linux partition you must make sure the user running the script is the owner (mount using the
uid option).
** Create List of Non-Slackware Software **
Before you move on into the upgrade you need to properly assess where you are, and in particular, what non-slackware software you have installed.
By far the easiest way to do this is to use
slackpkg, which you can find in /extra (for alternate scripts see this thread about
Listing Non Stock Slackware Packages).
It is recommended that you download the latest stable slackpkg release in order to have all the features used in this HowTo (such as batch and default_answer support). Do note, that the latest release is likely to be a later version than the one in the latest stable Slackware release, so you should add slackpkg to your blacklist to prevent accidentally downgrading it. You should also check the
ChangeLog periodically to see if there are any crucial fixes.
Once you install it, be sure to edit blacklist, mirrors, and slackpkg.conf under /etc/slackpkg as desired (
set the mirror to one for 12.0 for now). Then to get your list you can simply do
Code:
slackpkg update
slackpkg -dialog=off -batch=on -default_answer=no clean-system > NonSlackwarePackages.txt
NonSlackwarePackages.txt now contains a list of packages that aren't a part of the Slackware tree.
Now is a good time to get rid of any of those non-slackware packages that you no longer need. There is a chance that you will have to rebuild some of your custom packages after the upgrade.
I suggest organizing this list. You might want to, for instance, group some packages together that should be rebuilt or updated. You might also want to add any notes about software installed that is not packaged.
It would be a good idea to refer to CHANGES_AND_HINTS.TXT again at this point.
** Begin Upgrade **
As root, go into runlevel 1.
Mount mirror or install medium.
If the files are on a cd then you will have to mount the other cd(s) in order to install the other packages. In my example, I was using a local mirror on my external hard drive (second partition).
Code:
mount -t ntfs-3g /dev/sda2 /mnt/externalNTFS
cd into the mirror's directory
Code:
cd /mnt/externalNTFS/Slackware_mirror/Slackware-12.1/
upgrade glibc-solibs
Quote:
Originally Posted by UPGRADE.TXT
Upgrade your glibc shared libraries. This is important, or things might go haywire during the first part of the upgrade:
|
Code:
upgradepkg slackware/a/glibc-solibs-*.tgz
upgrade package utilities
Code:
upgradepkg slackware/a/pkgtools-*.tgz
** Mass Upgrade **
The most basic way to upgrade/install all of the packages is to follow UPGRADE.TXT.
Quote:
Originally Posted by UPGRADE.TXT
3. Upgrade everything else (and install new packages):
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:
#!/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
|
Keep in mind that if you are using cds your packages will be split among them, so you will have to use more than one instance of upgradepkg. By the same token, the
for loop snippet given above should be altered to reflect which packages sections are actually on the cd.
If you need any non-en_US language packs for KDE please refer to
UPGRADE.TXT.
Also, if you
don't want to upgrade/install certain packages (ie. blacklist them), then you will have to write a slightly more complicated script, install those package sections manually, or use something like slackpkg to help you.
** Alternative Mass Upgrade with slackpkg **
The trick to using slackpkg to do this is to specify a mount point as the mirror in /etc/slackpkg/mirrors. Since it is just a mount point, it does not matter what kind of device the partition is on as long as you can read it. In my case I had a local mirror on a NTFS partition on an external hard drive. I simply added the following to /etc/slackpkg/mirrors
Code:
cdrom://mnt/externalNTFS/Slackware_mirror/Slackware-12.1/
Of course, you could also specify a regular, non-local, mirror and use slackpkg in the usual way.
Blacklisting packages
It is also important to make sure /etc/slackpkg/blacklist has all the packages listed you don't want to be messed with. For instance, I do special things with my firefox packages so I list mozilla-firefox in the blacklist. Some people like to blacklist the kernel packages.
A keen observer might note that by default a/aaa_elflibs is already blacklisted, while the instructions in UPGRADE.TXT clearly have you installing them. In general, yes, aaa_elflibs should be blacklisted because it will overwrite your core libraries. During a
full system upgrade, however, you can upgrade them, but you don't have to. The more important thing to realize is that this package is really only there to make sure you have the core libraries you need in case you do not do a full install of Slackware. As such, if you do a full install/upgrade of Slackware it is likely that you won't need that package anyways. If you aren't sure, simply check if all the files included are already installed (my
pkg-sanity script or these other
useful scripts may be of some help). In this upgrade, I found no libraries where missing from not installing it. If you do choose install it, for whatever reason, just make sure it is one of the first packages installed (which is probably why it has 'aaa' in the front).
Another post on aaa_elflibs
Once your slackpkg configuration is all set, update with the new mirror
and install the new packages
Code:
slackpkg install-new
Review the list and deselect any you are not ready to install at this point.
Note: By default, slackpkg will prompt you to handle new config files after installing/upgrading packages. If you need help on this skip down to the "Merge Changes for Config Files" section momentarily.
Upgrade all the packages
Code:
slackpkg upgrade-all
Again, review the list and deselect any you are not ready to install at this point. You might want to look at the kernel section of this HowTo before you upgrade them.
Since I was using fuse and ntfs-3g (both created via slackBuilds from slackBuilds.org) for my external NTFS partition, I decided not to upgrade those packages just to be safe. After all the other packages were installed I copied the packages to my hard drive, unmounted the external drive, stopped fuse (
/etc/rc.d/rc.fuse stop), and
then upgraded the fuse and ntfs-3g packages using
upgradepkg. After that I started fuse and remounted the drive.
If you need any non-en_US language packs for KDE please refer to
UPGRADE.TXT.
** Kernel Packages **
Keep in mind that the kernel image packages change the symlinks in /boot for System.map, config, and vmlinuz. This is important to note because a lot of people refer to vmlinuz in their boot manager's configuration. Which ever kernel image package is installed last (usually huge-smp) will have the symlinks pointing to its respective files. So, after upgrading your kernel packages you might have to fix these symlinks and modify your bootloader's configuration (/etc/lilo.conf for LILO) accordingly.
Also, if you ever modified your past kernel sources or built custom kernels, you should take a look in the following places to see if any clean up is necessary:
/usr/src
/lib/modules
/etc/rc.d/rc.modules*
In my case, I had a kernel sources folder and a module folder for a custom 2.6.21.5 kernel I had built that I needed to remove (I no longer intended to use them). I also had a rc.modules file for it that needed to be removed and the rc.modules symlink had to be fixed.
Please note that it is not recommended that you run the huge kernel for daily use (though it
may not cause problems). Also, if you have one of those machines that don't work well with a SMP kernel you will need to
patch your kernel sources.
Quote:
Originally Posted by CHANGES_AND_HINTS.TXT
As stated earlier, it is recommended that you use one of the generic kernels
rather than the huge kernels; the huge kernels are primarily intended as
"installer" and "emergency" kernels in case you forget to make an initrd.
For most systems, you should use the generic SMP kernel if it will run,
even if your system is not SMP-capable. Some newer hardware needs the
local APIC enabled in the SMP kernel, and theoretically there should not be
a performance penalty with using the SMP-capable kernel on a uniprocessor
machine, as the SMP kernel tests for this and makes necessary adjustments.
Furthermore, the kernel sources shipped with Slackware are configured for
SMP usage, so you won't have to modify those to build external modules
(such as NVidia or ATI proprietary drivers) if you use the SMP kernel.
If you decide to use one of the non-SMP kernels, you will need to follow the
instructions in /extra/linux-2.6.24.5-nosmp-sdk/README.TXT to modify your
kernel sources for non-SMP usage. Note that this only applies if you are
using the Slackware-provided non-SMP kernel - if you build a custom kernel,
the symlinks at /lib/modules/$(uname -r)/{build,source} will point to the
correct kernel source so long as you don't (re)move it.
If you decide to use one of the huge kernels anyway, you will encounter
errors like this:
kobject_add failed for uhci_hcd with -EEXIST, don't try to register
These occur because the respective drivers are compiled statically into the
huge kernels but udev tries to load them anyway. These errors should be safe
to ignore, but if you really don't want them to appear, you can blacklist the
modules that try to load in /etc/modprobe.d/blacklist. However, make sure you
remove them from the blacklist if you ever decide to use the (recommended)
generic kernels.
|
Also, if you need an initrd (you
do if running the generic kernel) you will need to set that up. Please see /boot/README.initrd for instructions on this if needed.
Stock Kernels use UTF8 conole now
If you find you have problems with the console after this upgrade you might need to add the following append line for each of your kernel images listed in your /etc/lilo.conf. Personally, I had no such problems, so this was not needed for me.
Quote:
Originally Posted by CHANGES_AND_HINTS.TXT
The new 2.6.24.x kernels default to use a UTF8 console. This might break some
things, so if you prefer the "old" default, you'll need to add this to your
kernel's lilo stanza: append = "vt.default_utf8=0"
|
Finally. since your kernels changed you will need to run
lilo (assuming you are not using another bootloader). Before you do that, make sure your /etc/lilo.conf is still pointing to the correct images, and you can also choose to add a bootsplash to your Lilo prompt. This is covered in the next section.
This HowTo is continued at Post #19