Poinstalační typy

From ArchWiki

Jump to: navigation, search

As a new Archer, some tasks needed to be accomplished after the fresh install. Here are some performance tweaks and other useful information for Arch Linux newbies.

Contents

Hardware

Auto-Recognition

  • lshwd is your hardware auto-recognition tool. It will inform you which module you need to load and set.
  • Or you can use hwdetect. In my experience it detects more and faster than hwd.

Lilo Boot Process Speed Up

  • to speed up lilo boot process, add the following command to /etc/lilo.conf:
 compact

Harddrive Performance

  • to boost HDD performance, tweak using hdparm. The best place to put it (IMHO) is in /etc/rc.sysinit, as the 1st line... my hdparm parameters are:
    • -a1024 = sets read_ahead buffer to 1024 bytes
    • -c3 = sets io support to 32bit with sync
    • -d1 = turn on dma
    • -m16 = sets multile buffers count to 16 (my hd max. find it using hdparm -i)

example:

 hdparm -a1024 -c3 -d1 -m16 /dev/hda

(Note: if you get something like /dev/hda not found place above line at end of /etc/rc.sysinit. UDEV have to be loaded before you can set /dev/hda with hdparm.)


Pausing at End of Boot Process

  • to pause at the end of the boot process before getting the login prompt (usually used for for debugging your boot messages...), add at the end of /etc/rc.local:
 read KEY

or else remove the 1st character in /etc/issue file, which is a "clear screen" escape code.

Enabling mouse support in console (gpm)

  • You can enable mouse support in console by installing gpm:
pacman -S gpm
  • If you see mouse flickering and it doesn't work properly, you will need to change /etc/conf.d/gpm.

For PS/2 mouse replace the existing line with:

GPM_ARGS="-m /dev/psaux -t ps2"

For USB mouse replace the existing line with:

GPM_ARGS="-m /dev/input/mice -t imps2"
  • When it works, you can add gpm into DAEMONS array in /etc/rc.conf to have it started at boot.

Enabling sound (ALSA)

Start X at boot

Building your own Kernel

  • When building your own kernel (Kernel/Hardware Issues), following options must be set and linked statically and NOT as modules :
      • Code maturity level options
      • Prompt for development and/or incomplete code/drivers = on
      • Device Drivers
      • File systems
      • Pseudo filesystems
      • /dev file system support = on
      • Automatically mount at boot = on
    • to be able to tweak hd performance using hdparm, set the followings :
      • Device Drivers
      • ATA/ATAPI/MFM/RLL support = on
      • Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support = on
      • Generic PCI bus-master DMA support = on
      • Intel PIIXn chipsets support = on
      • <and your IDE hdw...> = on
  • Also, to speed kernel loading time a bit, make sure you statically link ALL your hardware specific drivers (which you load anyway using /etc/modprobe.conf or otherwise) instead of linking them as modules.

ABS to build your own packages

  • If you use abs to build your own packages, remember to copy 1st your target package dir to /var/abs/local/<pkgname> to avoid your files and configuration getting overwritten at next abs update...

Optimizing mkpkg packages

Note: With pacman 3, setting CARCH other than i686 or x86_64 will result in errors

  • For optimizing the packages you build using makepkg (kernel is a good example) set your gcc preferred settings in /etc/makepkg.conf:
 (example for athlon cpu)
 export CARCH="athlon"
 export CHOST="athlon-pc-linux-gnu"
 export CFLAGS="-march=athlon -O2 -pipe -fomit-frame-pointer"
 export CXXFLAGS="-march=athlon -O2 -pipe -fomit-frame-pointer"

Kernel Updates

  • Remember to execute lilo after each kernel update (ie, each time you replace your boot image, usually named /boot/vmlinuzXX, etc).
    • If you forgot and need to rescue back from the CD, here are the rescue steps:
 modprobe xfs
 mount -t xfs /dev/discs/discX/partY /mnt
 mount -t xfs /dev/discs/discV/partW /mnt/boot (if you have it)
 mount -t devfs none /mnt/dev
 mount -t proc none /mnt/proc
 chroot /mnt /sbin/lilo

Personal Command-aliases

  • You can create your own commands-aliases using <homedir>/.bashrc or /etc/profile. Both can be used to define your own aliases:
 #alias ls="ls --color=auto" not necessary in Arch Linux
 alias ll="ls -lh"
 alias la="ls -a"
 alias exit="clear; exit"
 alias x="startx"

Reduce Sleeping time on shutdown

  • You can reduce system sleeping time on shutdown by changing the sleep parameter in /etc/rc.shutdown and /etc/rc.single.

Set timezone

  • To set your timezone (so local time shows properly) look at /usr/share/zoneinfo/ for your timezone, and change the TIMEZONE variable in /etc/rc.conf:
TIMEZONE=Asia/Jerusalem

PDF file viewer (kghostview)

  • To fix PDF files viewer (kghostview), install ghostscript using:
pacman -S ghostscript
  • and change the Ghostscript section in <homedir>/.kde/share/config/kghostviewrc to:
  Antialiasing arguments=-sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=<2 -dMaxBitmap=10000000
  GS Version=
  Interpreter=/usr/bin/gs
  Non-antialiasing arguments=-sDEVICE=x11
  Redetection Counter=2 

Useful Commands & Programs

  • grep - searches for files by its contents. (example: grep -i syslog /etc/* will search all files in /etc for files containing the word "syslog", NOT case sensitive (using the -i parameter))
  • killall <process_name> - kills processes by name (example: killall kdm)
  • ps - display process status (example: ps -xau will display all active processes)
  • locate - quickly locates files on your hd (use locate -u 1st to create/update the files db...) (example: locate Xservers will find all files named Xservers)

Pacman

An automated tool for managing your packages - locally and via the web. It will auto-solve dependencies among packages, which is the biggest headache in the linux-packaging-distribution-world(-as-we-know-it-:) ).

makepkg

An automated tool to create packages - it actually automates the ./configure && make && make install procedure. it uses a file named PKGBUILD which must exists in the same directory you will build your package. view a PKGBUILD file and read the installation document to learn more how to work with makepkg.

abs

An automated tool which allows you to rebuild any of pacman's packages (so you may provide your own compiler and linker settings, for better optimization, debugging info, etc). Simply executing abs will synchronize all your PKGBUILD scripts from the CVS repository into /var/abs.

File Descriptions

  • <homedir>/.xinitrc - controls which programs X11 will load on startup; the last line must be your preferred windows manager and should be prefixed with exec
  • /etc/profile - system profiling file; loads environment configuration per profile. (kernel must support profiling)
  • /etc/rc.conf - main configuration file, something like config.sys on steroids...
  • /etc/rc.sysinit - this is like the main autoexec.bat file, which takes care of loading and setting up the system
  • /etc/rc.single - script file for single user system level
  • /etc/rc.multi - script file for multiple users system level
  • /etc/rc.local - script file for local-multi users system level
  • /etc/rc.shutdown - script file for shutdown system level
  • /etc/rc.d/* - configured daemons for the system.

Extracting compressed files

 file.tar : tar xvf file.tar
 file.tgz : tar xvzf file.tgz
 file.tar.gz : tar xvzf file.tar.gz
 file.bz : bzip -cd file.bz | tar xvf -
 file.bz2 : tar xvjf file.tar.bz2 OR bzip2 -cd file.bz2 | tar xvf -
 file.zip : unzip file.zip
 file.rar : unrar x file.rar

WikiMigration & Rewrite--dlanor 15:36, 23 Jul 2005 (EDT)

Personal tools