Hack 97 Keep Your Custom Disc Up to Date

 < Day Day Up > 

figs/moderate.gif figs/hack97.gif

After you customize your Knoppix disc, make sure it has the latest and greatest packages .

"Release early and release often" has been the mantra for many open source projects. Debian unstable has over 13,000 packages now, so there's a good chance that every day or two there will be an update to some package you are using on your CD. When the time comes to remaster, it's a good time to also update all of the packages on your system. With Debian, this process is pretty easy.

The first step to updating the packages on your system is to grab the most current list of packages your package repositories have to offer. Inside your remastering chroot environment [Hack #94] , run:

 root@ttyp0[/]#  apt-get update  

By default Knoppix uses a mixed repository of Debian stable, testing, and unstable packages. Be sure when you upgrade that you use apt-get upgrade and not apt-get dist-upgrade , or otherwise , all of the stable packages on the system are upgraded to testing. Also, even if you are running a complete Debian unstable system, apt-get dist-upgrade should still be avoided, as it installs all packages that have been held back temporarily, even if installing the packages results in removing other essential files on the system.


As this command runs, you can watch as package lists are downloaded from each repository. If you have trouble connecting to one of the repositories, exit the program with Ctrl-C and rerun the command. If you still have trouble connecting, you might need to wait until the repository is responding before you update. Once the program completes, it's time to upgrade all of the packages on your system:

 root@ttyp0[/]#  apt-get upgrade  Reading Package Lists... Done Building Dependency Tree... Done The following packages have been kept back: . . . The following packages will be upgraded: . . . 397 upgraded, 0 newly installed, 0 to remove and 21 not upgraded. Need to get 275MB of archives. After unpacking 21.1MB of additional disk space will be used. Do you want to continue? [Y/n] 

A good general rule of thumb is to use apt-get upgrade , and use apt-get install to install individual packages that have been held back. Running apt-get install alerts you to the reasons the package is held back (whether it wants to remove an old dependency or possibly install a new one) so that you can decide whether you want to install the package.


When you run this program, you are presented with a full list of packages apt-get intends to download and install, told how large the files are, and told how much disk space is used after they install. Pay extra attention to the additional disk space this upgrade uses before you continue. If your CD is already tight on space, you must figure out ways to trim it down after the upgrade [Hack #95] . Once you tell apt-get that you want to continue, it downloads each new package from its respective repository along with any dependencies it needs, and then, after all of the packages have finished, apt-get upgrades each one.

While apt-get is downloading, it is safe to stop the program by hitting Ctrl-C. Any partial downloads that result from the program exiting prematurely resume the next time you run apt-get . Also, if for some reason a package does not download, or the server doesn't respond, you can simply stop the process and resume a bit later.

After apt-get has moved past the downloading phase and is going through the process of upgrading your packages, do not stop the program unless absolutely necessary, as there is a chance that a program might be installed incorrectly if its install is stopped halfway through.

After you update all of the packages, remember to run the following command to delete all the cached packages from the /var/cache/apt/archives directory:

 root@ttyp0[/]#  apt-get clean  

As you can see, keeping your system up to date is pretty simple. The challenge comes when trying to fit all of the updates on a single CD. After you are finished making your changes, unmount the / proc filesystem with:

 root@ttyp1[/]#  umount /proc  

Then press Ctrl-D to exit chroot . Now you are ready to pick up with the Section 9.2.4 section of [Hack #94] .

 < Day Day Up > 


Knoppix Hacks. 100 Tips and Tricks
Knoppix Hacks. 100 Tips and Tricks
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 166

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net