TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Debian Tips (was Re: [TCLUG:13440] Getting to know Debian)



On Mon, Feb 07, 2000 at 12:01:33PM -0600, Eric Hillman wrote:
> I've just finished getting CheapBytes' 'Official Debian 2.1' set up on my
> home PC.  

Gratzies!

> First and foremost, I seem to recall there being some way to have Debian
> automatically update itself from the net with the latest set of packages.
> If someone can clue me in on how to do this, I'd appreciate it.  the manpage
> for dpkg didn't seem to mention anything about this.

OK.  Welcome to apt-get 101.  This course will familiarize you with your
new Debian package manager and how to get the best bang for your
buck...wait...you didn't pay for it.  Well, you're going to have the use
of an awesome tool, none-the-less.

Now, we must acquaint you with the configuration of the apt-get utility.
You can find the config files under /etc/apt, just where you'd expect it
on a Debian system -- the maintainers of which are pretty strict about
where you find your system files.  Just remember this, all configuration
files should be found under /etc.  If they are not, then it's a poorly
designed package or a "roll-your-own" setup.

Now, you will find a file in this directory called "sources.list".  This
file contains a configuration string that contains a URI (similar to URL,
just more generic).   This points to the location of the desired packages.
This uri is prefixed with either a "deb" or a "deb-src" to specify whether
you wish to retrieve the binary packages or the source packages.  The URI
is then followed by the distribution name and a space delimted set of
directories: main contrib non-free.  Put together, it should look
something like this:

deb http://www.us.debian.org/debian stable main contrib non-free
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free

Now, here is where you'll learn a trick from good ol' ^chewie.  Create a
series of files named after the distribution of debian and it's source.
For example, I have one file named stable.http to contain the two lines
illustrated above.  I have another called frozen.http that contains
similar lines, but replaces the "stable" word for "frozen".  When you wish
to retrieve a package from the stable source tree, delete the existing
/etc/apt/sources.list file and replace it with a soft link to the desired
source file:

	# rm /etc/apt/sources.list
	# ln -s /etc/apt/frozen.http /etc/apt/sources.list

Now, apt-get will use the linked configuration and you don't have to edit
your sources files every time you want to change a distribution tree.
This comes in handy when you want to add another custom package tree from
some other source like kde...  Here's my kde.ftp file:

# KDE stuff
deb ftp://ftp.us.kde.org/pub/kde/stable/latest/distribution/deb/potato/ i386/

My directory looks a little like this:

root@chewie:/etc/apt[508]# ls -F
apt.conf     kde.ftp        stable.cdrom  unstable.http
frozen.http  sources.list@  stable.http   x-strike-force.ftp

On to the cron job!  If you're connected to the Internet via dedicated
connection, this next one is easy.  Just create a small script in your
/etc/cron.daily directory that contains the lines:

#!/bin/sh
# apt-get script
# * Get new package list
# * List and download all upgrades, but do not install
# * Email output to <recipient> -- needs mailx program

apt-get update &> /tmp/apt-get.log
mailx chewie < /tmp/apt-get.log

apt-get dist-upgrade -d -u -y &> /tmp/apt-get.log
mailx chewie < /tmp/apt-get.log

If you use a ppp connection to get to the internet, place this same script
inside the /etc/ppp/ip-up.d/ directory.  Then create a simple script to
dial up the internet at a very early time in the morning, when you're
supposedly sleeping.  You will probably want the apt-get update and
dist-upgrade to only happen once a day or once a week, so add something
like a "file existance" test to see if the ppp script should run or not...

[ -f /etc/apt/get-on-dialup ] || exit 0

Of course, the last line of your dialup script should remove this file...

rm /etc/apt/get-on-dialup

Now, place a "touch" job in the crontab scripts to create this file at a
given interval.  You could add this line before your dialup activation
script.  Let's say you place this script in /etc/cron.daily so that it is
executed at the same time each day (default is somewhere around 6am).

#!/bin/sh
# apt-get dialup helper
# depends upon ip-up.d/apt-get script

# Active the ip-up.d script
touch /etc/apt/get-on-dialup

# Execute dialup -- must be configured
pon

> Second, if anybody has recommendations for websites or books to help me get
> up to speed on the system, I'd love to hear 'em.  I'm not looking for
> something that explains how to login or use "ls" here, I want something with
> some power tips for system operation, optimization and customization.

# apt-get install debian-guide debian-history debian-policy doc-base \
doc-debian doc-linux-html doc-linux-text sysadmin-guide

> Audio is just plain not working, and my mouse works under XFree86 but not
> gpm or svgalib.  I can probably figure these out with enough time and
> bloodshed, but thought I'd ask if anybody had tips regarding the SB128 or MS
> IntelliEye PS/2.

Follow the suggestions about using update-modules.  You should almost
always compile your sound support as modules.  Look at setting up the
parameters under /etc/modutils/modconf.  For example:

options 3c59x debug=1 
options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330

Your mouse should be imps2 for your gpmconfig options.  If your test
hangs, just hit ^C and enter your stuff in manually.  Be sure to increase
the responsiveness to at least 15 or 25 with Intellimouse devices.  It
makes a difference.

Good luck!

-- 
Chad Walstrom                         mailto:chewie@wookimus.net 
a.k.a ^chewie, gunnarr               http://wookimus.net/~chewie

PGP signature