· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
À̰æÈÆ



Gentoo 1.4 installation on IBM X23

System Configuration


  • Pentium 3 866Mz
  • SDRAM 640M
  • 40G 5400rpm HDD (8G for Windows XP, 7G for shared data, 23G for GNU/Linux)
  • PCMCIA, CF slots
  • 2 usb 1.1 slots

Objective


  • Kernel2.6 + Python2.3 + udev + LVM2(?)(with reiserfs) + wireless + xserver(from freedesktop) + printing

  • update to 2.6.4-rc1(Feb 29,2004)
  • usb flash memory with hotplug and udev
  • compact flash memory slot
  • speed step (Kernel 2.6 support this feature, I guess.)
  • ACPI (without error!)
  • Framebuffer, Bootsplash & Grubsplash([http]http://forums.gentoo.org/viewtopic.php?t=49036)

Appls to install


  • Text Processing: Vim, LaTeX, hlatex, GhostScript, Adobe Acrobat, Kile
  • Office Suite: StarOffice 7.0, MS Office 2k (with crossover office)
  • Graph: gnuplot
  • Programming: Python
  • GUI toolkits: Qt 3.3(!)
  • Programming utilities: Umbrello, KDevelop3.0(?)
  • Multimedia: MPlayer, Juk
  • Scientific: Numerical Python, Scipy, matlab, matlibplot
  • Desktop: xfce4, gdesklets
  • System Utilities: apcid, acpi, ufed
  • Backup utilities: parted, partimage
  • Web browsing: MozillaFirefox
  • Email client: MozillaThunderbird
  • CD Burning: K3B
  • X input method: nabi(!)

Let's start, jump into Gentoo!

1. stage 1


  • boot: gentoo dopcmcia acpi
  • /sbin/ifconfig - check network device

  • fdisk /dev/hda
  • lvm configuration...(more writing for this is needed.)

Make file system(format)


  • mke2fs /dev/hda1 (/boot)
  • mkreiserfs /dev/hda5 (/)
  • mkreiserfs /dev/vg/home
  • mkreiserfs /dev/vg/opt
  • mkreiserfs /dev/vg/usr
  • mkreiserfs /dev/vg/var
  • mkreiserfs /dev/vg/tmp
  • mkswap /dev/vg/swap
  • swapon /dev/vg/swap

Partition Table(for personal use)


physical p/e FS size mount
/dev/hda1 primary ext2 15M /boot
/dev/hda2 primary NTFS 8G windows C:
/dev/hda3 primary FAT32 6.8G windows D: for shared data
/dev/hda4 primary N/A N/A N/A
/dev/hda5 extended reiserfs 150M /
/dev/hda6 extended LVM 22.85G /usr,/opt,/var,/tmp,/home
  • Be carefule not to specify CCACHE_DIR in your /root directory (It has ONLY 150M!). It does make .ccache directory below /root as a default. In that case, It may fill up /root rapidly when you emerge large packages like X. Thus, not to forget to specify default ccache directory in /etc/make.conf to somewhere else. (In my case, I prefer to make /home/ccache for ccache.)

LVM Partition


physical FS size mount
/dev/vg/usr reiserfs 8G /usr
/dev/vg/opt reiserfs 7G /opt
/dev/vg/var reiserfs 2.5G /var
/dev/vg/tmp reiserfs 500M /tmp
/dev/vg/home reiserfs 2.5G /home
/dev/vg/swap swap 512M swap
  • Usually, /var doesn't need such a large size like 2.5G except when it emerges huge size pakcages such as X,OpenOffice. To use limited HDD space more efficiently, it would be good to resize /var to a small size in moral cases. That's what LVM for!

Mount


'Make sure mount / partion first'.
  • mount /dev/hda5 /mnt/gentoo
  • mkdir /mnt/gentoo/boot
  • mount /dev/hda1 /mnt/gentoo/boot
  • mkdir /mnt/gentoo/usr
  • mount /dev/vg/usr /mnt/gentoo/usr
  • mkdir /mnt/gentoo/var
  • mount /dev/vg/var /mnt/gentoo/var
  • mkdir /mnt/gentoo/opt
  • mount /dev/vg/opt /mnt/gentoo/opt
  • mkdir /mnt/gentoo/home
  • mount /dev/vg/home /mnt/gentoo/home
  • mkdir /mnt/gentoo/tmp
  • mount /dev/vg/tmp /mnt/gentoo/tmp
  • mkdir /mnt/gentoo/proc
  • mount -t proc none /mnt/gentoo/proc

Fetch stage1 tarball


  • cd /mnt/gentoo
  • links2 www.gentoo.org/main/en/mirrors.xml
  • download releases/x86/1.4/stages/x86/stage1-x86-20030910.tar.bz2
  • tar -xvjpf stage1 (be carefule to tar options!).

Edit make.conf for compile


  • vi /etc/make.conf
  • CHOST="i686-pc-linux-gnu"
  • CFLAGS="-march=pentium3 -O3 -pipe"
  • CXXFLAGS="${CFLAGS}"
  • MAKEOPTS="-j2" for a regular 1cpu system

change root


  • mirrorselect -a -s4 -o >> /mnt/gentoo/etc/make.conf
  • cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
  • chroot /mnt/gentoo /bin/bash
  • env-update
  • source /etc/profile

get files for stage2


  • emerge sync

=> takes a while...

2. stage 2


  • /usr/portage/scripts/bootstrap-2.6.sh -f
  • /usr/portage/scripts/bootstrap-2.6.sh
  • emerge system -f
  • emerge system

3. stage 3


  • emerge development-sources (kernel 2.6.3)
  • cd /usr/src/linux
  • makemenuconfig
  • make && make modules_install
  • cp arch/i386/boot/bzImage /boot/kernel-2.6.3
  • cp System.map /boot/System.map-2.6.3
  • cp .config /boot/config-2.6.3

  • ln -sf /usr/share/zoneinfo/GMT /etc/localtime
  • nano -w /etc/fstab

  • echo spike > /etc/hostname
  • nano -w /etc/conf.d/net

=> dhcp ..
  • rc-update add net.eth0 default
  • emerge pcmcia-cs
  • rc-update add pcmcia default(x) <-- needed at 2.6??

  • emerge grub
  • grub

  • root (hd0,0)
  • setup (hd0)
  • quit
  • cp /boot/grub/grub.conf.example /boot/grub/grub.conf
  • nano -w /boot/grub/grub.conf

  • emerge syslog-ng
  • rc-update add syslog-ng default
  • emerge vixie-cron
  • rc-update add vixie-cron default
  • emerge reiserfsprogs
  • emerge lvm-user

  • passwd (root password)
  • useradd aeronova -m -G users,wheel,audio -s /bin/bash
  • passwd aeronova

  • etc-update
  • exit
  • cd /
  • umount /mnt/gentoo/boot /mnt/gentoo/proc /dev/vg/usr,var,opt,tmp,home /mnt/gentoo
  • vgchange -a n
  • reboot

Problems: addressed

1. it says this kernel does not have devfs support while booting.

I intentionally leave out devfs support option at kernel configuration to use udev instead of devfs. Howerver, due to that, I cannot even go through boot process 'cause gentoo system use devfs in default. Thus, I recompiled kernel after enabling devfs support. (Fortunately, we can select which to use between devfs and udev after udev setting. take a look at below udev section.)

2. LVM error

It looks like it fails to mount LVM partions. I typed vgscan to locate volume group, but it says there is no lvm module(lvm_mod). This is really weird 'cause I obviously enalbed LVM options while configuring kernel options. After searching gentoo forums, I found there are two versions of LVM - LVM1 and LVM2, and the LVM in kernel 2.6 is version 2 and the package I emerged, lvm-user, is a tool for LVM1. So, I unmerge lmv-user and then emerged lvm2 package(device-mapper also installed by dependancy). ... and guess what? It works well!

  • Device Drivers

  • ->Multi-device support(RAID and LVM)

  • -->Device mapper support
  • -->ioctl interface version 4

Problems: sitil exist...

UDev


  • [http]http://webpages.charter.net/decibelshelp/LinuxHelp_UDEVPrimer.html#UDEV
  • kernel configuration:

  • Bus options (PCI,PCMCIA,EISA,MCA,ISA)

  • Support for hot-pluggable devices
  • File system

  • Pseudo filesystem

  • /proc file system support
  • /dev/ file system support(OBSOLETE)
  • /dev/pts file system for Unix98 PTYs
  • virtual memmory file system support (former shm fs)

  • I enabled devfs due to boot problem (without this, gentoo cannot wake up!). If devfs option is active, we need to select which to use at lilo or grub before booting.
  • enable devfs to support both udev & devfs
  • udev-018-r2
  • rc-update add hotplug boot
  • what do I need to comment out in /etc/fstab? ÀÏ´Ü ¾È°Çµå¸®°í ±×³É µÒ.
  • baselayout-1.8.6.13 was already installed.
  • edit /etc/init.d/halt.sh and /sbin/rc not to use devices.tar.bz2
  • edit grub to select between udev and devfs

Python


  • default version of python is 2.3.3, so don't need to upgrade it.

after...


  • emerge gentoolkit
  • emerge ufed to set USE setting
  • emerge ccache: to expedite compiling process!

  • edit /etc/make.conf

  • CCACHE_DIR="/home/ccache"
  • CCACHE_SIZE="2G"
  • emerge xfree

need todo


  • enable dri with radeon module...
  • how to use usb flash memeroy seamlessly? (in udev)
  • how to use swsusp
  • which do I use to control CPU speed(speedfreq or cpufreqd?)

  • message after emerging "speedfreq"

  • A sample script for powercontrol has been placed in /etc/acpi/battery.sh To use it add the following lines to your /etc/acpi/default/events,

events = battery.* action = /etc/acpi/battery.sh %e Note that this only supports one battery at the time. Configuration should be done in /etc/conf.d/speedfreq. Make sure that you have sysfs mounted on /sys
  • If I run "speedfreqd", I got error message that relates to sys mount.
  • gpm configuration
  • switch to mm-sources for kernel rather than development-sources(for laptop-mode)

acpid


  • rc-update add acpid boot
  • if you run ''acpid,

  • all events such as lid closing, ac adapter pluggin in/out are written at /var/log/acpid
  • thus, if we can parse this log, we can handle all events by acpid!
  • acpid listens for events through /proc/acpi/events, and logs on /var/log/acpid, and takes action written in /etc/acpi/action.sh (if this action.sh is specified at /etc/acpi/events.)
  • change kernel to "mm-sources" to use laptop-mode and acpi script from gentoo forum.

hlatex


(ÆÐ½º¿öµå¸¦ ¹°À¸¸é ±×³É ¿£Å͸¸ Ä¡¸é µÈ´Ù)
  • #> cvs -z3 -d :pserver:anonymous@cvs.ktug.or.kr:/home/cvsroot co hlatex-texmf
  • modify texmf/web2c/texmf.cnf

  • % A place for local additions to a "standard" texmf tree. For example:
  • HLATEXTEXMF = /usr/local/share/hlatex-texmf %%%%% ÀÌ ÁÙÀ» Ãß°¡ÇÑ´Ù. %%%%%

x font configuration


xpdf


  • to have even nicer results add these lines to your ~/.xpdfrc

  • include /etc/xpdfrc
  • t1libControl high
  • freetypeControl high

alsa sound configuration


  • refer to ALSA user documentation on gentoo website.
  • enable ALSA sound module options in 2.6 kernel configuration
  • emerge alsa-tools ( to use alsamixer, amixer ...)
  • edit /etc/modules.d/alsa to configure my "intel8x0" sound card.

  • add below two lines only.

  • ## ALSA portion
  • alias snd-card-0 snd-intel8x0
  • ## OSS/Free portion
  • alias sound-slot-0 snd-card-0
  • # modules-update
  • # rc-update add alsasound boot
  • set volume with alsamixer, but still has no sound, thus typed in below two lines

  • # amixer set Master 100 unmute
  • # amixer set PCM 100 unmute
  • alsactl store (to store current setting)
  • now it works!

Blueglass Xcursor theme


  • edit ~/.Xdefaults as below.

  • Xcursor.theme: Blue
  • Xcursor.size: 48 (this size can be changable.)
  • To globaly use,

  • change "Inherits" in this file, /usr/share/cursors/xfree/default/index.theme

  • Inherits=Blue
  • If there is flickering, add below to XF86Config,

  • Option "HWcursor" "false"

KDE appls problem


  • There was an error setting up inter-process communications for KDE. The message returned by the system was:
Could not read network connection list. /root/.DCOPserver_gentoo__0 Please check that the "dcopserver" program is running!

  • a kind of dcopserver problem, I can use kde appls as root, but cannot as a normal user
  • emerge -k fam

  • follow the instructions after emerging it
  • rc-update add famd default
  • /etc/init.d/famd start
  • other suggestion:

  • drwxrwx--- 16 root users 824 Mar 8 01:49 tmp
  • chown root:users /tmp
  • chmod 770 /tmp

Enable DRI but this cause GLUT problem! (3/31/2004)


  • Firstly, I finally succeed to use dri module in X.
  • My graphic card is "Radeon Mobility M6" and what I did is just compile an "radeon.o" module in kernel 2.6.x.

(Because I cannot emerge xfree-drm package, for it only works for kernel 2.4.x, so I have to use dri module in kernel source.)
  • After run "make && make modules_install", then edit XF86Config as follows.

  • Load "dir"
  • Section "DIR" mode 0666 EndSection
  • Since 24 bit Depth exceeds limit of my graphic card, I have to set default color depth to 16 to use DRI module.
  • After that, it works, but causes another problem: GLUT.
  • When I tried to run GLUT example in PyOpenGL, it says,

  • GLUT: Fatal Error in lesson1: visual with necessary capabilities not found.
  • So, I googled it, and find solution: use 24 bit depth at least!

  • "You should use 24 for the depth and try again."
  • Hence, I have to reset color depth in XF86Config file to use GLUT with sacrifice of DRI module.

Run problems in KDE appls, gedit, and firefox (03/31/2004)


  • The problem is, I can run whatever I want as a superuser, but I cannot as a normal user.
  • all error msgs said it cannot wirte to /tmp directory due to a sort of permission,
  • so, I changed the permission of /tmp to enable all users can write in /tmp.

  • before: drwxr-xr-x => after: drwxrwxrwx
  • However, I'm not sure what other problems related to security can be caused because of this change.

HLaTeX ps, pdf conversion problems (04/01/2004)


  • I can compile a hangul latex file using HLaTeX package, but I cannot convert it to ps and pdf files.
  • to fix it, add a below line to /usr/share/texmf/web2c/udpmap.cfg

  • Map uhc-down.map
  • and run updmap to update it.

Things to be backup


  • all stuffs below /usr/local

Install ms-fonts (04/04/2004)


  • mkdir /usr/share/fonts/ttf/korean/ms-fonts
  • cp gulim.ttc and batang.ttc to the above directory.
  • run 'ttmkfdir' at /usr/share/fonts/ttf/korean/ms-fonts, it generate 'fonts.scale'
  • run 'mkfontdir' at the above directroy, it generates 'fonts.dir'
  • cd .. and run 'fc-cache' to update 'fonts.cache-1'
  • edit XF86Config to add installed fonts path

  • FontPath "/usr/share/fonts/ttf/korean/ms-fonts"

before emerging...


  • /etc/init.d/xdm stop
  • /etc/init.d/xfs stop
  • rc-update del xdm
  • rc-update del xfs
  • quickpkg xfree (for backup xfree in cases)
  • emerge -C xfree
  • env-update
  • ACCEPT_KEYWORDS="~x86" emerge xorg-x11

after emerging...


  • etc-update
  • env-update
  • cp /etc/X11/XF86Config /etc/X11/xorg.conf
  • ACCEPT_KEYWORDS="~x86" emerge corefonts

  • add corefonts path to xorg.conf
  • FontPath "/usr/share/fonts/corefonts"
  • add to /etc/fonts/local.conf
  • <dir>/usr/share/fonts/corefonts</dir>
  • run 'fc-cache -vf'
  • give it a try to check:

  • /etc/init.d/xfs start
  • opengl-update xorg-x11

Additional...


  • emerge --inject x11-base/xfree-4.3.0-r5

  • !!! BAD COUNTER in 'x11-base/xfree-4.3.0-r5' <= it's ok.
  • glx, dri, ati module problem...
  • emerge ati-drivers
  • opengl-update ati => not successful
  • in /etc/make.conf, VIDEO_CARDS="fglrx radeon" => not helpful
  • ln -s /usr/lib/opengl/xorg-x11 /usr/lib/opengl/xfree
  • emerge ati-drivers-extra
  • ACCEPT_KEYWORDS="~x86" emerge ati-drivers
  • take out pie, hardend in user flag => this solves the problem!

Biborb


  • install apache, php, mod_php
  • edit /etc/conf.d/apache2

  • APACHE2_OPTS="-D SSL -D PHP4"
  • edit /etc/apache2/conf/apache2.conf

  • uncomment "ServerName localhost"
  • /etc/init.d/apache2 start
  • rc-update add apache2 default
  • mkdir ~/public_html
  • decompress biborb into public_html
  • chmod 705 ~/
  • chgrp -R apache ~/public_html ( as a root )
  • chmod -R 770 ~/public_html
  • type [http]http://localhost/~aeronova to see it!

ldd


  • show dynamic links to libraries.
  • ldd executable file
  • how can put libraries and binary file together without recompiling as a static?

xprint config


  • how? to enable pdf output in firefox?

gdesklets


  • install gdesklets-core 0.26.1
Starterbar

  • install desklet-starterbar 0.3 (get 0.3 ebuild from bugs.gentoo.org)
  • how to run

  • $ gdesklets
  • $ gdesklets /usr/share/gdesklets/Display/Starterbar/starterbar.display
ff







sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-03-10 06:04:42
Processing time 0.1842 sec