Systemadministration
* smxi (früher du-fixes-h2.sh) Sidux Maintenance, Schweizer-Messer fuer Sidux.
* get-sidux-binary-gfx Holen von install-binary-gfx aus dem Netz.
* install-binary-gfx: Automatisches Installieren von Grafikkarten-Binaer-Treibern von nvidia bzw. ati.
* sidux-networkconfig Konfiguration von LAN und WLAN
Anwendungen
* sidux-irc: Starten eines Chats mittels konversation.




http://www.debian.org/doc/manuals/apt-howto/index.en.html
Useful apt-get commands:
Code:
Commands:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
purge - Remove and purge packages
source - Download source archives
build-dep - Configure build-dependencies for source packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
Options:
-h This help text.
-q Loggable output - no progress indicator
-qq No output except for errors
-d Download only - do NOT install or unpack archives
-s No-act. Perform ordering simulation
-y Assume Yes to all queries and do not prompt
-f Attempt to continue if the integrity check fails
-m Attempt to continue if archives are unlocatable
-u Show a list of upgraded packages as well
-b Build the source package after fetching it
-V Show verbose version numbers
-c=? Read this configuration file
-o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
purge - Remove and purge packages
source - Download source archives
build-dep - Configure build-dependencies for source packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
Options:
-h This help text.
-q Loggable output - no progress indicator
-qq No output except for errors
-d Download only - do NOT install or unpack archives
-s No-act. Perform ordering simulation
-y Assume Yes to all queries and do not prompt
-f Attempt to continue if the integrity check fails
-m Attempt to continue if archives are unlocatable
-u Show a list of upgraded packages as well
-b Build the source package after fetching it
-V Show verbose version numbers
-c=? Read this configuration file
-o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
sidux ist ein Betriebssystem, das auf dem Linux kernel, Debians modernster Version ("Sid" genannt) sowie vielen freien und quelloffenen Anwendungen basiert.
Die sidux-dvd beinhaltet die Desktop Umgebungen KDE, XFCE, Fluxbox und IceWM und eine möglichst umfassende Auswahl an Programmen hauptsächlich aber nicht nur für den KDE Desktop. Pakete für die folgenden Sprachen wurden integriert:
en-AU, en_GB, da_DK, de_DE, es_ES, en_US, fr_FR, hr_HR, ja_JP, nl_NL, pt_BR, pt_PT, ro_RO, ru_RU.
Auf der DVD ist ein jeweils ca. 2 GB grosses Image für die 32-bit und die 64-bit Plattform.
Die sidux-dvd wird nicht zum Download angeboten sondern ist nur im sidux Webshop zu bestellen. Eine Liste der vorhandenen Programme kann man im Webshop einsehen. Mit dem Erwerb der sidux-dvd unterstützt Ihr den sidux e.V.
sidux ist eine umfassende Debian sid basierte Live-CD mit besonderem Augenmerk auf Festplatteninstallationen, einem sauberen Upgradepfad innerhalb sids und zusätzlichem Hard- und Softwaresupport.
Das ISO basiert vollständig auf Debian sid, angereichert und stabilisiert mit sidux eigenen Paketen und Skripten.
Handbuch des sidux™ GNU/Linux-Betriebssystems
Handbuch Sidux Link
Liste wichtiger Dateien, Verzeichnisse und Anwendungen:
unpack
configure
/etc/dpkg/dpkg.cfg
/var/lib/dpkg/*
/etc/apt/apt.conf
/etc/apt/sources.list
dpkg
dselect
dpkg-reconfigure
apt-get
alien
Debian-Paketverwaltung
Neben dem RPM-Paketmanagement gibt es noch eine große Paketverwaltung von Debian. Die Debian-Installationspakete enden auf *.deb und weisen folgendes Namensschema auf:
Programmname_Versionsnummer_Architektur.deb
Die komplette Debian-Paketverwaltung erfolgt im Verzeichnis /var/lib/dpkg, welches quasi die Datenbank mit allen benötigten Informationen über die Software-Pakete auf dem System darstellt. Hier die wichtigsten Verzeichnisse:
/var/lib/dpkg/available = Liste aller zur Verfügung stehender Pakete
/var/lib/dpkg/status = Installationstatus der Pakete
/var/lib/dpkg/info/ = Verzeichnis, in denen sich u.a. die (De-)Installations-Skripte (*.preinst, *.postinst, *.prerm, *.postrm) für jedes Programm befinden
dpkg
Das Programm dpkg wird dazu genutzt, um *.deb-Pakete manuell zu installieren. Hier die wichtigsten Paramater im Überblick:
dpkg -i xyz.deb = Installiert das Paket xyz
dpkg -r xyz = Deinstalliert das Paket xyz (ohne Entfernung der Konfigurationsdateien)
dpkg -P xyz = Deinstalliert das Paket xyz komplett
dpkg -p xyz = Informationen zum installierten Paket xyz
dpkg -l = Anzeigen der installierten Pakete
dpkg -L xyz = Anzeigen aller Dateien eines Paketes
dpkg -s xyz = Status eines Paketes
dselect
Ist ein so genanntes Front-End von dpkg, also ein aufbereitetes und menügesteuertes Programm, mit dem man Programm-Pakete auf dem System verwalten (installieren, deinstallieren, etc) kann. deselect verwaltet hierbei auch die Abhängigkeiten der Pakete, so dass es letztendlich einfacher ist, Programme zu installieren.
Festlegen der Installationsquellen:
cdrom = Installiert von einer Debian-CDROM
nfs = Installiert über einen NFS-Server. Die Paketbeschreibungsdateien (Packages.gz) muss vorhanden sein.
harddisk = Installiert von einer Festplattenpartition. Die Paketbeschreibungsdateien (Packages.gz) muss vorhanden sein.
mounted = Installation von einem bereits gemounteten Dateisystem.
floppy = Installation über einen Stapel Disketten.
apt = Installation über ein Netz (ftp/http) oder über das Dateisystem (file).
Es gibt folgende Möglichkeiten:
Zugriff (access) = Auswahl der Zugriffsmethode.
Erneuern (update) = Erneuert die Liste der verfügbaren Pakete,.
Auswählen (select) = Menügeführte Auswahl aller zu installierender oder zu entfernender Pakete.
Install = Installiert die Pakete, die angewählt wurden.
Konfig = Konfiguriert Pakete, die bei der letzten Installation nicht vollständig konfiguriert wurden.
Löschen (remove) = Entfernt die zum Löschen markierten Pakete.
apt-get
Die sehr verbreitete Möglichkeit, die Software auf einem Debian-System zu verwalten, ist das Program apt. Dieses verwaltet die Abhängigkeiten und entfaltet seine vollen Möglichkeiten, wenn als Quellen offizielle Debian-Server im Internet eingetragen sind. Dann kann das System immer auf dem aktuellsten Stand gehalten werden. Die Quellen werden in der Datei /etc/apt/sources.list eingetragen. Hier die wichtigsten Befehle:
apt-get update = Aktualisiert die Paketbeschreibungen in /etc/apt/sources.list.
apt-get install Paketname = Installiert das angegebene Paket.
apt-get remove Paketname = Das angegebene Paket wird deinstalliert.
apt-get source Paketname = Das Quellcode-Paket des angegebenen Paketes wird installiert.
alien
Alien konvertiert Pakete in gewünschte Zielformate:
alien --to-deb = Es wird ein Debian-Paket erstellt
alien --to-rpm = Es wird ein RedHat-Paket erstellt
alien --to-tgz = Es wird ein Slackware-Paket erstellt
alien --to-slp = Es wird ein Stampede-Paket erstellt
Software unter einem Debian-System verwalten:
Link zum Paketmanagement im debiananwenderhandbuch
Tweaking Sidux for Speed
SPEED UP BOOT:
1) Use dash as /bin/sh (this is the default as of Erebos Pre 1)
apt-get install dash
dpkg-reconfigure dash
2) Use concurrent booting. Note that there are two ways to do this--the "safe" way and the "unsafe" way. Kelmo has made the "unsafe" way workable on a default sidux install, but trying it on an older install or one with changed start up scripts might not work.
The "Safe" way: change CONCURRENCY=none to CONCURRENCY=shell in /etc/init.d/rc
The "Unsafe" way: See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot∞ for more information
apt-get install insserv
dpkg-reconfigure insserv
echo "CONCURRENCY=startpar" >> /etc/default/rcS
3) Use daemons. The results of this are quite mixed. Some people find that they work, others do not find that they have any improvement at all and in some cases result in regression. There are three services to note:
a. Prelink: DO NOT use this. Craigevil has reported that it causes segfaults, and others have found it to actually slow down programs loading.
b. Preload: This is recommended by some, and I use it. It seems to add no overhead, but it also seems to add a negligible speed increase (on a 1Ghz bootup was 1 second faster, on a Core 2 Duo there was no difference at all).
apt-get install preload
c. Readahead: Probably the best of the bunch. Enabled by default in ubuntu, this profiles your boot and speeds up loading of programs. However, a recent post on the debian mailing list suggested that it slows down the boot on some machines. Test it out for yourself.
apt-get install readahead
4) Reprofile your boot. This is a simple, one-time fix: add "profile" to the end of your "kernel" line when booting with grub. This will cause it to boot slower as it reorders files, but subsequent boots should be faster.
SPEED UP SIDUX (GENERIC TWEAKS)
1) Remove extra ttys: This can save about 1.5MB of ram, which may or may not be relevant to you. Go into /etc/inittab and change the following lines by adding "#s"
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/getty 38400 tty1
2:2345:respawn:/sbin/getty 38400 tty2
# 3:2345:respawn:/sbin/getty 38400 tty3
# 4:2345:respawn:/sbin/getty 38400 tty4
# 5:2345:respawn:/sbin/getty 38400 tty5
# 6:2345:respawn:/sbin/getty 38400 tty6
2) Turn down swappiness: Edit /etc/sysctl.conf and add the line "vm.swappiness = 1". This will cause your kernel to swap less aggressively, reducing drive spin ups and using RAM, which is faster. Set swappiness to a higher value if you have less RAM, but the default of 60 should almost always be too high.
3) Filesystem tweaks for ext3: You can easily change ext3 to be more efficient in how it handles data with the writeback journal. Note: This change makes ext3 less reliable - use on stable systems:
tune2fs -o journal_data_writeback -O dir_index /dev/sdaX
For journal_data_writeback to work properly on your root partition (/), you will have to do one more thing (as per man 8 mount). You need to add rootflags=data=writeback to # defoptions in /boot/grub/menu.lst and then run update-grub as root.
For dir_index to be truly effective you must run fsck -fD on your drives. It is easiest to do this in single user mode:
init 1
umount -a
fsck -fD /dev/sdaX
reboot
You should also edit /etc/fstab and add the "noatime" flag to your ext3 partitions. This is now the default on Sidux. This will keep writes lower, as meaningless writes just waste time and power.
4) Font fixes:from http://kdemonkey.blogspot.com/2008/04/magic-trick.html∞
Magic trick for Kubuntu users:
1. Make an empty new directory ~/.compose-cache
2. Start a KDE application which has a text input widget (anything with a line edit or editable combo box will do)
3. Check ~/.compose-cache, it should now have a file in it whoose name is a long string of numbers
All being well, your Qt/KDE/Gtk applications should now start up 50-150ms faster.
Users of other distros are welcome to give it a try, I have only been able to test directly on Kubuntu. If you have a non-empty /var/cache/libx11/compose folder (eg. SuSE users) then this optimization is already enabled so you don't need to do anything.
For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily on startup applications read input method information from /usr/share/X11/locale//Compose. This Compose file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. !libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache in /var/cache/libx11/compose or create a new one in ~/.compose-cache if the directory already exists.
You can also try:
fc-cache -f -v
5. Prioritize application cache over filesystem cache:
sysctl -w vm.vfs_cache_pressure=25
To make this permanent, append the 'option=value' to /etc/sysctl.conf
SPEED UP INTERNET:
1) Edit /etc/sysctl.conf. You can do a lot with this file to both secure your internet connection and to speed it up. I recommend using the following extra file:
wget -c http://www.rubyringtechnologies.com/files/sysctl.conf.txt -O ~/sysctl.conf
sed -i 's/\(net\.core\.hot_list_length\ =\ 256\)/\#\1/' ~/sysctl.conf
cat < ~/sysctl.conf >> /etc/sysctl.conf
sysctl -p
2) Use OpenDNS. Once again, OpenDNS allows you to safely and quickly surf the internet. You can route your traffic through their DNS servers, which is a round-robin setup that will route your information more efficiently. To do this, all you have to do is:
echo "prepend domain-name-servers 208.67.220.220, 208.67.222.222;" >> /etc/dhcp3/dhclient.conf
dhclient
3) Disable IPv6: IPv6 is the future, because ipv4? has hard limits on the number of IP addresses it can handle. In the meantime, however, a lot of your internet apps will waste time search for IPv6? when it doesn't exist. To solve this, do the following:
perl -pi -e 's/ipv6/off/' /etc/modprobe.d/aliases
perl -pi -e 's/^ipv6\n//' /etc/modules
echo "KDE_NO_IPV6=TRUE" >> /etc/environment
reboot
FIXING BREAKAGE OF DEBIAN PACKAGES
Disclaimer: Many of the tricks in this would probably be considered "dirty hacks". In almost all cases, it is better to WAIT until the next mirror sync, and then try to dist-upgrade and install -f. However, if you absolutely need a program before the next mirror sync, or if you have serious breakage that will break apt, some of this might come in handy.
THE FIRST STEP: The first step should almost always be the same: Try again.
Code:
apt-get update
apt-get install -f
apt-get dist-upgrade
apt-get install -f
apt-get dist-upgrade
This is will fix the vast majority of problems for you, or it will at least give you more information such that you can better diagnose the issue.
At times, you can also try:
Code:
dpkg --configure -a
This should only be necessary if you manually interrupted dpkg during the install procedure.
If need be, you can also try reinstalling a package. Note that apt-get install --reinstall does not seem to be very reliable. Instead, you should do:
Code:
dpkg -P
apt-get install PACKAGE
apt-get install PACKAGE
If you accidentally delete the configuration files for a package, you can run the following command. It will only regenerate config files if you delete the ones in question.
Code:
apt-get -o DPkg::Options::="--force-confmiss" --reinstall install
If you want to debug packages, apt has the ability to do this too. From the APT-HOWTO (http://www.us.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html)
Code:
To know what's keeping or removing a package you may use:
# apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Starting
Starting 2
Investigating python1.5
Package python1.5 has broken dep on python1.5-base
Considering python1.5-base 0 as a solution to python1.5 0
Holding Back python1.5 rather than change python1.5-base
Investigating python1.5-dev
Package python1.5-dev has broken dep on python1.5
Considering python1.5 0 as a solution to python1.5-dev 0
Holding Back python1.5-dev rather than change python1.5
Try to Re-Instate python1.5-dev
Done
Done
The following packages have been kept back
gs python1.5-dev
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
This way, it's easy to notice that the python1.5-dev package cannot be installed because of an unsatisfied dependency: python1.5.
# apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Starting
Starting 2
Investigating python1.5
Package python1.5 has broken dep on python1.5-base
Considering python1.5-base 0 as a solution to python1.5 0
Holding Back python1.5 rather than change python1.5-base
Investigating python1.5-dev
Package python1.5-dev has broken dep on python1.5
Considering python1.5 0 as a solution to python1.5-dev 0
Holding Back python1.5-dev rather than change python1.5
Try to Re-Instate python1.5-dev
Done
Done
The following packages have been kept back
gs python1.5-dev
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
This way, it's easy to notice that the python1.5-dev package cannot be installed because of an unsatisfied dependency: python1.5.
APT-GET UPDATE PROBLEMS (thanks to Craigevil for pointing this out)
If you receive a message that looks like the one below when trying to run apt-get install package...
Code:
Reading Package Lists... Done
Building Dependency Tree... Done
W: Couldn't stat source package list 'http://people.debian.org unstable/ Packages' (snip) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these missing files
E: Couldn't find package penguineyes
Building Dependency Tree... Done
W: Couldn't stat source package list 'http://people.debian.org unstable/ Packages' (snip) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these missing files
E: Couldn't find package penguineyes
You forgot to run apt-get update after your last change to the /etc/apt/sources.list.d/*.list file.
If the error looked like:
Code:
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
When trying any apt-get method other than source, you don't have root permission, that is, you're running as a normal user.
If you get other apt-get update errors from certain repositories but still want to use apt, you can try the following:
Code:
apt-get update --fix-missing
This will cause apt to silently hold packages from repositories that you couldn't get information from.
If you receive the error "E: Dynamic MMap ran out of room" when running apt-get update, add the following line to /etc/apt/apt.conf:
Code:
APT::Cache-Limit 10000000;
FIXING ACCIDENTAL PACKAGE REMOVAL OR BROKEN DEPENDENCIES
A lot of package errors in Sid will be due to the careless upload of a package that has version mismatches with its dependencies. This can be manifested in a couple of ways: either dist-upgrade will remove a lot of programs you need (e.g. a version mismatch of the kdelibs and kdebase will cause konqueror, etc. to be removed) or it will prevent you from installing a program. In such a case, you will get errors like (PACKAGE depends on PACKAGE2 >= 1.5.0, but 1.4.5 is going to be installed).
The best way to fix problems like this is normally to just wait. The errors should be fixed in the next mirror upload, and then you can just reinstall the missing packages. However, if you need the fix NOW, you have three ways out:
1) Install From Testing
http://manual.sidux.com/en/sys-admin-ap ... -downgrade
Note that sometimes you will have to play around a bit with this method, since it might give you dependency errors the first time. You will probably have to reinstall both packages with version mismatches. For example, if gimp mismatches with gimp-data, it may remove gimp. You will have to reinstall both gimp and gimp-data from testing.
This is the preferred method, because testing should be stable and you can just remove the hold when the package is safely back in sid. However, if this is a core system package, or if the version mismatch is more problematic, testing might remove too many packages or just fail altogether. NOTE: slam now says that updates from testing are not reliable, since the packages may be too old to function. However, I have found that at times testing is the simplest and most debian-supported way to fix broken packages.
2) Use Debian Incoming
incoming.debian.org is a staging area for packages that haven't been synced to the mirrors yet. This can come in handy for simple breakage. A simple example should be easiest:
When audacious-1.5.0 was uploaded, audacious-plugins-1.5.0 did not make it into the sync. Thus, any attempt to install audacious failed because it needed audacious plugins >= 1.5.0, but only 1.4.5 was present in the repository. In this case, downgrading to testing failed as well.
There is a solution: If you went to debian.incoming.org, you would see audacious-plugins-1.5.0-0_i386.deb sitting there. You can grab it and install it:
Code:
wget -c http://incoming.debian.org/audacious-plugins-1.5.0-0_i386.deb
dpkg -i audacious-plugins-1.5.0-0_i386.deb
install -f
dpkg -i audacious-plugins-1.5.0-0_i386.deb
install -f
Note that install -f is needed, because this will pull in the newest version of audacious for you and everything should be working. This example is perfect evidence of the virtues of patience: If you just wait, the package will be uploaded to the mirrors and you won't have to go through this. Slam explains:
Quote:
You should not install from Testing, what you get is nothing else than aged Sid without security and care. The correct solution is usually somewhere else (or simply not available yet). Personally I have wiped the Testing lines in my sources 2 years ago and never regretted it. The same is true for debian-snapshots and incoming, those very rare cases where they are needed are usually handled by the sidux team much faster than you could type a help request in this forum.
FIXING OVERWRITE ERRORS:
Sometimes, an attempt to install a package will give the following error:
Code:
Preparing to replace kdelibs-data 4:3.2.3-2 (using .../kdelibs-data_4%3a3.3.0-99_all.deb) ...
Unpacking replacement kdelibs-data ...
dpkg: error processing /var/cache/apt/archives/kdelibs-data_4%3a3.3.0-99_all.deb (--unpack):
trying to overwrite `/usr/share/apps/knewstuff/types', which is also in package korganizer
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/kdelibs-data_4%3a3.3.0-99_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Unpacking replacement kdelibs-data ...
dpkg: error processing /var/cache/apt/archives/kdelibs-data_4%3a3.3.0-99_all.deb (--unpack):
trying to overwrite `/usr/share/apps/knewstuff/types', which is also in package korganizer
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/kdelibs-data_4%3a3.3.0-99_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Normally, this will be fixed by a normal mirror sync. However, if you need the newest package NOW, you can fix this problem by manually install:
Code:
dpkg -i --force-overwrite /var/cache/apt/archives/kdelibs-data_4%3a3.3.0-99_all.deb
apt-get install -f
apt-get install -f
REMEMBER: no breakage resulting from the usage of force-overwrite will be supported by the sidux devs. Slam explains:
Quote:
Never, NEVER, never use --force-overwrite! There is ALWAYS a better solution. We will not support any problem resulting of --force-overwrite usage here, except telling you to do clean re-install of sidux.
FIXING LIBC6 BREAKAGE
Breakage of libc6 is an absolute disaster. This is a core system library, and in many cases you can't even chroot into the broken system to try to fix it. I don't make any claims to know all the ways to fix a broken libc6. The way that has worked for me twice in the past (oh I am so lucky to have 2 libc6 breakages) is the following:
Code:
1. Boot up a LiveCD.
2. mount /dev/YOUR-ROOT-PARTITION /mnt
3. cp --parents $(dpkg -L libc6 | xargs) /mnt
4. chroot /mnt and try to check that everything is working
2. mount /dev/YOUR-ROOT-PARTITION /mnt
3. cp --parents $(dpkg -L libc6 | xargs) /mnt
4. chroot /mnt and try to check that everything is working
Articel from http://sidux.com/PNphpBB2-viewtopic-t-9449.html