My computer

I have been asked how I maintain my computer, and since I am rather happy with the way it works with kde, I will do that here. Recently I bought an hp nx5000 with suse 9.1 preinstalled. I will indicate the small changes I use to maintain that at the end.

Except for my laptop I have always used redhat because they produce a very stable basic system, but I have always had problems since redhat does not have a particular good version of kde. I have followed the series redhat 5.2 up untill redhat 9 and on to fedora 1, 2 and now 3. Suse has a good version kde, but I prefer maintaining with apt-get rather than the yast2 system, so I will describe this at the end.

I use apt-get and synaptic to maintain my computer, and I really like that. the computer.

Preparations

Save a copy of /etc/passwd, /etc/shadow and /etc/group. Since I am using IP-masquerading I also save a copy of /etc/sysctl.conf and /etc/rc.d/rc.local in which I open for IP-masquerading, but that is toot advanced for this little page. If somebody is interested I might add that in the future.

Partitioner

It is important to have a reasonable partitioning of the harddisk. I have 400 Gb, which is quite a lot, but no matter how much space you have, you should have /home and / on different partitions. That allows you to make an installation rather than an upgrading. Give 7-10 Gb til /, twice the amount of memory for swap, 100kb for /boot, and the rest for /home in the simplest possible setup. When I install redhat I always choose install not upgrade and at the suitable point I choose custom install, thus not leaving it to redhat to decide how my partitioning is. On one of the next pages you choose what you want to have installed, I used to spend quite somne time there, but since I have started using apt-get and synaptic this is less important. On the page where you setup the harddisk you should, if you are doing this for the first time, make a partitioning as described above, around 10Gb if you can afford it for /, a little bit maybe 100 Kb for /boot, twice the amount of memory for swap, and the rest for /home. Since I have two harddisks I make a few more partitions.

If you are installing on a machine on which you have installed before, you have to edit each partition, and give it the name it used to have, as suggested by the program. You also choose to format / and boot, and to not format the rest, so data stay where they are. The installation now continues with standard choices for the rest of the installation and it usually works easily. I choose not to add users since I intend to restor the earlier users using the saved copies of passwd, shadow and group.

After the installation

I log on as root and edit the saved part of the old passwd file, so that only the last part remains the part that has the local user names, let us call this file tailpasswd. Same thing with group and with shadow, and now the commands

cat tailpasswd >>/etc/passwd
cat tailgroup >>/etc/group
and finally since shadow is read-only
chmod 600 /etc/shadow
cat tailshadow >>/etc/shadow
chmod 400 /etc/shadow

This last step first makes shadow writable, then adds my users, and finally makes shadow read-only again. As one more customization I make sure that /etc/sysconfig/desktop has the two lines
DISPLAYMANAGER="KDE"
DESKTOP="KDE"
giving me kdm as my login program and having new users use kde as default.

Get apt-get to work

Now I go to http://dag.wieers.com/packages/apt/
and pick up the version of apt that fits what i am installing. As root you then write rpm -ivh apt...
I actually only write rpm -ivh apt, and press the Tab key to get the whole name written. This installs apt, but I want to customize the repositories I use as follows
cd /etc/apt/sources.list.d
here I change all the files, so all lines are commented away, i.e. all start with the character #
I then make a file, /etc/apt/sources.list with this content

### Dag Apt Repository for Red Hat Fedora Core 3
rpm http://apt.sw.be fedora/3/en/i386 dag
### Red Hat Fedora Core 3
rpm http://ayo.freshrpms.net fedora/linux/3/i386 core updates
rpm http://ayo.freshrpms.net fedora/linux/3/i386 freshrpms
## kde-redhat repository(s) for Red Hat Fedora Core 3
rpm ftp://apt.us.kde-redhat.org/linux/kde-redhat/apt/kde-redhat fedora/3/i386 stable
rpm ftp://apt.us.kde-redhat.org/linux/kde-redhat/apt/kde-redhat all stable


As you see I am using the mirror apt.us.kde-redhat.org. The various files in the directory /etc/apt/sources.list.d have information about other possible mirrors. It is important to keep the files in the directory /etc/apt/sources.list.d/ even though they are commented out since otherwise the next upgrade of apt will give other repositories.

I now want to update the installation with the new versions from the four repositores, kde-redhat, dag, frehsrpm, and os, the last one with fedoras standard upgrades. This can be done various ways, what i do is the following
apt-get update
upon which a lot of information is picked up. Then
apt-get upgrade
giving a long list of what apt-get will install, and what is kept back, maybe what is removed, or what needs to be removed. There may be some small conflict forcing me to remove things. This last time I had to start with
apt-get remove mozilla-mail kdebindings
Then repeat apt-get upgrade and say yes to the questions, but note what else may get removed. Once a lot of rpm's have been downloaded and installed I start looking at the ones that were kept back
apt-get install kdelibs kdebase
is a typical first step. After that run apt-get upgrade again and then
apt-get install kdegraphics, kdeedu ...
, the various standard kde packages. I interchange between installing some packages and use
apt-get upgrade
continuing a couple of packages at a time until everything is installed. This continues until apt-get upgrade says that everything is installed. There is a command, apt-get dist-upgrade, automating some of this, but I like this slow way. Finally I install the packages that were remnoved in this process, and then I install synaptic by
apt-get install synaptic
I now run this graphical frontend for apt-get, synaptic, and install various things I might want to add such as xmms-mp3, mplayer etc. At the very end I run
apt-get clean
which removes all the rpm'er that were downloaded to /var/cache/apt/archives. If I need to fix more than one machine, I copy all these files to /var/cache/apt/archives on the other machine, so they down have to be downloaded again.

Maintenance

is now completely trivial. Once in a while as root you have to write
apt-get update && apt-get upgrade
and beyond that use synaptic if you want to install more things (or remove things you don't use). You can of course also install programs that are not in the repositories. I for instans install skype for internettelephone, a flash-plugin, RealPlayer10GOLD and a program called snes, allowing my children to relive the nintendo games of their childhood. In synaptic such programs are seen as "legacy programs". You should also install a signature for the various repositories by picking up the signature and run the commando
rpm --import name_of_signaturefile
You find the signature files on the various home pages of the repositories.

Dangers

It is fun to experiment with repositories, but it can be dangerous. You can end up with a system that does not work, I have tried that, and is is not so easy to back out. An interesting place if you are interested in multimedie er http://ccrma.stanford.edu/planetccrma/software/, but it really is cutting edge. A very special thing to watch out for is when the apt program itself gets updated, then the repositories you use can be changed. My experience is that if you keep all the *.list files in /etc/apt/sources.list.d with everything commented away, and then make a /etc/sources.list containing the repositories you actually are using, the you are protected against this particualr problem.

Advanced

You can automate the process of staying up to date by putting a line with the content
15 4 * * * root /usr/bin/apt-get update && /usr/bin/apt-get upgrade
into the file /etc/crontab. Then the file /etc/apt.conf has to be edited so line 5 is
assume yes=true
and it might be a smart move to let line 6 be
Download-Only "true", og then install the rpm's that are picked up overnight manually. They will as mentioned above be in /var/cache/apt/archives. This of course assumes the computer is turned on on connected to the internettet overnight. You can also let Download-Only remain false, but then you really have to watch out when when the apt program itself gets updated, see above.

Suse

Here are the small changes needed to maintain the nx5000 laptop. It did cost me a lot of time to get to this conclusion so I hope it will help somebody.
Pickup apt for suse on ftp://nectar.math.uni-bielefeld.de/pub/linux/suse/apt/SuSE/9.1-i386/suser-rbos
Make a file /etc/apt/sources.list with content
#rpm ftp://nectar.math.uni-bielefeld.de/pub/linux/suse/apt/ SuSE/9.1-i386 base update security packman packman-i686 kde suser-rbos kde3-stable
rpm ftp://ftp.gwdg.de/pub/linux/suse/apt/ SuSE/9.1-i386 base update security packman packman-i686 kde suser-rbos kde3-stable
Each one line. The two repositories are supposed to contain the same, Bielefeld is a little faster than Göttingen, but not quite as complete, so I change abit between which one I comment out. Remember that every time you change it you have to run apt-get update.
If you have commentts to the content of this page, then write to me at the addressen below.
Most recent update: 2005-03-09 erik at binghamton dot edu