Setting up yum on SUSE LINUX 10.0
Monday, October 17, 2005, 10:22 AM - Linux


Why?

Why should I use yum and not yast? Well, yast is nice, but has some disadvantages: It can#t check for gpg keys, you have to trust the mirrors you add. And, speaking about mirrors, yast has no real mirror management for one source. Especially in these times the most and best known SUSE mirrors are very slow or just closed down, so you have to add other sources in yast. But yast needs your clicks when a mirror is not reachable, and if you enter several sources just as mirrors, it checks every single source - that takes quite a long time!
A last reason (which is not important know because SUSE LINUX has a ugly workaround) is that yast is not able to handle packages for different architectures - it can only install packages for one architecture.

The advantages of yum

As you can imagine, yum can do it better: yum can install packages with the same name but for different architectures (which could be important for x86_64 users who sometimes can only install x86_32 packages), and it can check for the gpg keys.
But, at the moment the most important thing: yum can handle mirror lists. So, if a server times out, is unreachable or whatever, yum will automatically switch to another server - on the fly, without any user interaction, without the need of a new synchronization to the new server, and so on.

The (actual) disadvantages of yum

In a perfect world yum gets the original pgpg key and the mirror list from the main server but uses server from this list to download all the package information and the packages. Fedora Core has this perfect world already, but there are no mirror lists for yum on the suse servers.
And in the perfect world all important servers and directories are configured to be used by yum (there must be a "repodata" directory with the important information). But at the moment there are only the most important direcotries supported: inst-source, inst-source-java, GM and packman (only on the main mirror). The supplementary directories are not supported as well as the update direcotries which is quite important for security reasons! So: do not use yum only! You have to use yast to keep your system up2date for security reasons!

But I already filled in a bug report about these problems, check bug #128607 for more information.

A last thing: yum does not have a gui - but there are some good guis around. SUSE LINUX 10.0 provides kyum as a kde based gui, it's nice enough to work with it :-)

How to configure it

If you call yum, it first checks its configuration file /etc/yum.conf. This file was used to store repository information in former times, too, but with the newer yum versions you have the possibility (and you definitely should use this) to store all information about the repositories in /etc/yum.repos.d/.

A file in this directory looks like this:

[base]
name=SUSE LINUX 10.0 - Base
#baseurl=ftp://ftp.gwdg.de/pub/opensuse/distribution/SL-10.0-OSS/inst-source/suse
mirrorlist=/etc/yum.repos.d/base.mirrors
enabled=1
gpgcheck=1
gpgkey=ftp://ftp.gwdg.de/pub/opensuse/distribution/SL-10.0-OSS/inst-source/pubring.gpg


The first option shows the name - this must be unique because yum uses it to identify the repository and the cached data about it.
The second option, the name field, is for the user to know what he has configured.
baseurl gives the server and the directory where yum can find the packages. This is similar to the address of yast configured sources. But in this case its commented out because we use a powerfull feature: the often mentioned mirrorlists!
The url to the mirrorlist is part of the field mirrorlist - due to the fact the no server provides them, we have to make our own. I will show some mirrorlists later.

The other options are dealing with the actual status of the repository (if it is enabled and yum should use it, or not) and with the gpg key.
There are a lot of other options to specify, like excluding or including special packages, and so on, but we do not need them yet. Check the manpage or the given link to the susewiki or drop a note or contact me or whatever, if you are more interested.

Some useful repos and mirrorlists

Because of the fact that yum does not come preconfigured with SUSE, you have to do all by yourself (except the configuration of yum.conf).

I picked up the repositories and directories I use and which already supporting yast, and wrote my own mirror lists, which are locally stored in the same directory. So, greb these files, copy them to /etc/yum.repos.d/, check them (or believe that I am not evil), and start playing with yum.

The files:

* the SUSE LINUX 10.0 base files
* some german mirrors for the base files
* the java files
* some german mirrors for the java files
* packman files
* packman mirrors, at this moment only the server in Bremen
* the GM files (proprietary stuff)
* some mirrors for this stuff



How to use it

There is a lot of information around how to use yum - the most important commands are listed here:

* yum install foo - install package foo
* yum remove foo - remove package foo with dependencies
* yum search whatever - search for this string
* yum update foo - update only package foo
* yum update - update the whole system
* yum info foo - give the infos about this pacakge
* yum provides foolibrary - which pacakge has this library?



Extra: using local repositories

If you have a special repository which you really like, but which does not support yum, you can use a trick: make a local copy of the files via rsync or whatever, and use the directory of the files as a local repository:

You will need the small programm createrepo for this - you can get it - sure - with yum:
yum install createrepo

After this, copy all the rpm-files you want to use to a special place:

mv *.rpm /var/cache/myrepo
createrepo /var/cache/myrepo

In /var/cache/yum/myrepo will appear a new directory called repodata. Now place the *.repo file in /etc/yum.repos.d/:

[myrepo]
name=my cool repo
baseur=file:///var/cache/myrepo
enabled=1


The really cool people will use cron-jobs for synchronizing and the new creation of the repo-files - do it, if you like it. But I hope that the most SUSE-dealing repositories and directories will offer yum repodata soon. Or that yast will change its backend :-D

I hope this howto helped at least one person - if this is the case, please drop a note, it's always nice to get feedback besides the counter.
  |  permalink   |   ( 2.6 / 80 )

Making Windows 2000 run (rather well) on only 32MB RAM
Sunday, July 17, 2005, 05:42 PM - Windows



This is a short guide to show you how to run Windows 2000 on such old computers and maintain a fast perfroming system.

The computer I installed Windows 2000 on was a Toshiba Libretto 110 sub-notebook with 233 Mhz and 32 MB RAM.

FACTS
Before the tweaks in this document
Windows 2000 would startup/boot in 30 seconds and you would have between 3-4 MB RAM left for your applications. The system responsiveness is sluggish.

AFTER the tweaks in this document
Windows 2000 would startup/boot in 10 seconds (using hibernation) - which is faster than my 2.4Ghz/400MB laptop .. and you would have more than 10 MB RAM left for your applications. The system responsiveness is rather fast.
Performance post tweaks in this guide
Figure 1: The performance of my old subnotebook after tweaks

THE GUIDE
Install the plain Windows 2000 operating system oin the computer.
Keep in mind:

* DONT install an extra service pack (they can offer perfromance and reliability improvements on faster computers but on old computers with few tasks they are just a bloat). Make sure your Windows installation CD isn't already "slipstreamed" with a service pack.
* Don't install multiple languages (i.e. no multiple keyboard layouts) as it takes up precious resources... just stick with U.S. layout.
* DON'T upgrade from another version of windows. Lots of stuff will be left hanging over and the performance will suffer
* Keep (or choose) the (very fast for old computers) FAT file system during installation as opposed to the heavier and more secure NTFS filesystem

Removed cursor shadow
I know... maybe not the biggest resource saver (especially because the graphics card probablky handles this one.

Disable display effects incl color icons
You can run with 16bit color on the desktop (if that is what you graphics card supports best natively. Be aware though that some computers can run with higher color depth but the copmuter processor/CPU (as opposed to the graphics CPU) may have to do more... but usually 16bit is fine.
Then you disbale high-color icons, you disable fading effects, smooth fonts and "show window contents" when dragging - in other words, disable anything fancy ;)

removed sound theme and sound card
Playing sound takes CPU resources and getting sound files takes memory.. disable sound effects, and even disable the sound card... When you run on 32MB there are sacrifices that have to be made... I use my 32MB subnotebook for non-sound things so disabling sound card makes sense because the drivers take up resources.

Disabled (by setting them to "manual" (in case windows needs them)) unneeded services
This is probably the single-most important step after the installation. Windows loads lots of services you might not need and they take up LOTS of memory and CPU (considering we only have 32MB).

Disabling following services in the "Control Panel -> Administration -> Services" makes your computer able to act on the network, internet and other things while freeing up lots of memory;

* Remote Registry Service
* Task Scheduler
* RunAs Service
* TCP/IP NetBios Helper Service
* Print Spooler
* Event Log
* Computer Browser
* IPSEC Policy Agent
* Messenger
* Distributed Link Tracking Client
* System Event Notification


Install and use X-Setup from X-teq
This is probably the second most important step after installing windows and disabling the services.... This little tool can remove lots of hidden (and for you unneeded) applications and settings embedded deep inside windows.

Following changes has to be made using the X-Setup tool (trial version will do)

* disabke activedesktop
* use "Classic" Explorer style
* disallow file and printer sharing
* Shutdown can auto-end programs
* Service timout when system shutdown decreasde to 10sec
* Disable group policy objects
* Disable dr. watson just-in-time debugging
* Disable "last access" attribute of files
* disable "secure desktop" patch
* Disable windows file protection (this is VERY important)

Remove LPT/printer port
Chances are that you won't have a printer connected to the computer.. Removing the LPT port (in the control panel -> system -> device manager ) is a good idea ... you can still print over the network, albeit a bit slower (since we disabled the print spooler).. thats o.k. - it is all for the greater good/

Disable printer and file sharing
again - its about cutting down on whats running.. do this and connect to other computers instead of letting them connect to you.


Install and use Tweak UI
Tweak UI is an old but good fere application from Microsoft to tweak certain windows saettings.

Install it and use it as follows;

* remove all UI effects of windows
* remove active desktop
* remove "new documents added to documents on startmenu"
* renmove "beep on error"
* reomove most of the icons from the "new" tab


Use hibernation feature
Hibernation allows you to start your computer very fast. A typica boot process can be 40 seconds.. .resuming from hibernation only takes 10-15 seconds - very much worth doing!

Install network card
Install the network card in your computer... let windows detecdt the card and use the "browse" button to find the driver on your CD/floppy/folder... do NOT run the installation program that came with your netwoirk card as that will most likely install some resident helper application (that you don't really need)


How to use the computer on a daily basis

* Don't install a lot of application
* Only have 1 application open at a time if possible
* Don't work with big (1MB+) files (documents, images etc)
* Don't apply O/S patches for security stability or other things.


What now?
Next thing is to install office or whatever.. Office 2000 can run on this computer... make sure though you don't run a "pure/normal" isntall but just copy the files over from anbother installation... this limits bloatrs and drivers decreasing overall performance of your system.



- By Daniel Iversen, 16 July 2005
  |  permalink   |   ( 3 / 61 )

Did you know that you can get Live Bookmarks?
Friday, April 8, 2005, 04:47 PM - Farorbit
Did you know that you can get Live Bookmarks for farorbit.com and other interesting websites? A live bookmark is a bookmark folder that continually updates with new content from the web page that it is bookmarked for. It uses something called RSS.

RSS is a format for syndicating news and the content of news-like sites, including major news sites like Wired, news-oriented community sites like Slashdot, and personal weblogs. But it's not just for news. Pretty much anything that can be broken down into discrete items can be syndicated via RSS. Once information about each item is in RSS format, an RSS-aware program can check the feed for changes and react to the changes in an appropriate way.

Firefox is RSS aware and detects if there is an RSS feed available on a web site. Firefox will then display an icon in the lower right corner of the status bar, idicating that you can subsribe to content in that web site.



If you click on the icon, you see an option to receive the RSS 2.0 feed. To add the feed to your Firefox browser select an appropriate destination for the RSS bookmark:



Then you can view updates immediatley as a menu item in the shortcut bar. Each Update to this website will become a new bookmark under the farorbit.com bookmark.

RSS Feeds are also available from cnn.com , Dagens Nyheter , NPR , GP.se

Have fun!
Stephan
  |  permalink   |   ( 3 / 65 )

Microsoft Internet Explorer
Wednesday, April 6, 2005, 04:58 PM - Farorbit
For those of you that use Microsoft Internet Explorer, you may have noticed that some graphics on this site are displayed with a black border and background. Regarding *.PNG (Portable Network Graphics) images Microsoft has said:

Microsoft TAM:
“It will display the png file format correctly when it is in a 256 color format. They have identified it as a bug and have fixed it in Longhorn. I am still trying to see if they have fixed it for IE 7.0”

A workaround for this issue is to use a purely standards compliant web browser; these include: Mozilla, Firefox, Netscape, Konqueror, Safari etc. Mozilla and firefox can be downloaded from www.mozilla.com for free.

Farorbit recommends using Mozilla, Netscape, or Firefox for security reasons, and features like: built in pop up blocking, tabbed browsing, built in RSS, built in google features.

Cheers! Sysop.




  |  permalink   |   ( 2.7 / 70 )