Linux Tips Note

Note & Tips for Linux.

日本語入力がいい感じのバージョン

2006-05-26 07:24:19 | Ubuntu 5.10 Breezy
uim-anthy 0.4.7-1ubuntu1.1
uim-applet-gnome 0.4.7-1ubuntu1.1
uim-common 0.4.7-1ubuntu1.1
uim-gtk2.0 0.4.7-1ubuntu1.1
uim-utils 0.4.7-1ubuntu1.1
uim-xim 0.4.7-1ubuntu1.1
anthy 6724-1

apt-line
deb http://nl.archive.ubuntu.com/ubuntu/ breezy main restricted
deb-src http://archive.ubuntu.com/ubuntu/ breezy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://nl.archive.ubuntu.com/ubuntu/ breezy-updates main restricted
deb-src http://jp.archive.ubuntu.com/ubuntu/ breezy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://jp.archive.ubuntu.com/ubuntu/ breezy universe
deb-src http://jp.archive.ubuntu.com/ubuntu/ breezy universe

deb http://jp.archive.ubuntu.com/ubuntu/ breezy multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu/ breezy multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://jp.archive.ubuntu.com/ubuntu/ breezy-backports main
restricted universe multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu/ breezy-backports main
restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ breezy-security main restricted
deb-src http://security.ubuntu.com/ubuntu/ breezy-security main restricted

deb http://security.ubuntu.com/ubuntu/ breezy-security universe
deb-src http://security.ubuntu.com/ubuntu/ breezy-security universe

deb http://security.ubuntu.com/ubuntu/ breezy-security multiverse
deb-src http://security.ubuntu.com/ubuntu/ breezy-security multiverse

## PLF repositories, contains litigious packages, see
http://wiki.ubuntu-fr.org/doc/plf
deb http://antesis.freecontrib.org/mirrors/ubuntu/plf/ breezy free non-free
deb-src http://antesis.freecontrib.org/mirrors/ubuntu/plf/ breezy free
non-free

## Freecontrib, funny packages by the Ubuntu PLF Team
deb http://antesis.freecontrib.org/mirrors/ubuntu/freecontrib/ breezy
free non-free
deb-src http://antesis.freecontrib.org/mirrors/ubuntu/freecontrib/
breezy free non-free

## Ubuntu-ja
deb http://archive.ubuntulinux.jp/ubuntu-ja/ breezy/
deb-src http://archive.ubuntulinux.jp/ubuntu-ja/ breezy/
deb http://archive.ubuntulinux.jp/ubuntu-ja/ breezy-ja/
deb-src http://archive.ubuntulinux.jp/ubuntu-ja/ breezy-ja/

カーネルのコンパイルで最新カーネルに

2006-05-26 07:17:05 | Ubuntu 5.10 Breezy
カーネルを最適化因みにわたしの今のUbuntuは、
ubuntu-nori% uname -a
Linux ubuntu-customized 2.6.16-ck11 #1 SMP Wed May 24 03:01:51 CEST 2006 i686 GNU/Linux

1)必要なライブラリ
sudo apt-get install build-essential bin86 kernel-package
sudo apt-get install libqt3-headers libqt3-mt-dev

2)カーネルソースを落としてきて配置
sudo cp linux-2.6.16.tar.bz2 /usr/src
sudo tar -xvjf linux-2.6.16.tar.bz2
#最適化ぱっち当てるので http://members.optusnet.com.au/ckolivas/kernel/ からとってくる。
sudo mv linux-2.6.16/ linux-2.6.16ck3
sudo ln -s /usr/src/linux-2.6.16ck3 linux

3)ぱっちあてる。
sudo -s -H
bzcat /home/YOUR USERNAME/patch-2.6.16-ck3.bz2| patch -p1

4)カーネルのConfigをする
sudo cp /boot/config-2.6.14-ck1 .config
sudo make xconfig

In "General Setup" activate:

-Support for paging of anonymous memory (swap)
--Support for prefetching swapped memory

In "Processor type and features":

-Processor family Choose the model of your processor.

Activate:

-Preemption Model
--Voluntary Kernel Preemption (Desktop)

-High Memory Support
--off -if you have less than 1 GB of RAM
--1GB Low Memory Support -if you have 1GB of RAM
--4GB -if you have more than 1GB of RAM

-Timer frequency
--1000 Hz

In "Device drivers" go to "Block devices" and in "IO Schedulers" leave only the "CFQ I/O scheduler" activated, which provides the best performance.

In "Kernel hacking" uncheck "Kernel debugging".

5)コンパイル及びインストール
make-kpkg clean
make-kpkg -initrd --revision=ck3 kernel_image
sudo dpkg -i

Hard Disk性能チェック

2006-05-26 07:08:44 | Ubuntu 5.10 Breezy
HDアクセス遅い?

まずは性能確認
$ hdparm -tT /dev/hda

DMAオンにしてみたり。。
$ hdparm -t -d 1 /dev/hda
■代表的なオプション指定
DMA転送オン hdparm -d1 /dev/hdx
DMA転送オフ hdparm -d0 /dev/hdx
16ビットI/Oモード hdparm -c0 /dev/hdx
32ビットI/Oモード hdparm -c1 /dev/hdx

各種設定してみる
■hdparmオプションと使い方
オプション

内       容
-A
先読みを行う (「-A 0」:無効、「-A 1」:有効)
-a
先読みセクタ数のチェック
-c
32ビットI/O制御(「-b 0」:16ビット、「-b 1」:32ビット)
-d
DMA転送モード (「-c 0」:無効、「-c 1」:有効)
-f
バッファキャッシュのフラッシュを行う
-g
ディスクジオメトリの表示をする
-i
ディスク情報の表示をする
-m
マルチセクタI/Oサポート
-p
PIO転送モード制御 (「-p 0」から「-p 5」まで)
-t


転送スピードの測定を行う
-v
現在の設定を確認する
-X
各モード指定を行う。パラメータは以下の通り
「-X08」: PIOモード0
「-X09」: PIOモード1
「-X10」: PIOモード2
「-X11」: PIOモード3
「-X12」: PIOモード4
「-X16」: シングルワードDMAモード0
「-X17」: シングルワードDMAモード1
「-X18」: シングルワードDMAモード2
「-X32」: マルチワードDMAモード0
「-X33」: マルチワードDMAモード1
「-X34」: DMAモード2
「-X67」: UDMAモード3
「-X66」: UDMAモード2 (Ultra ATA33)
「-X68」: UDMAモード4 (Ultra ATA66)
「-X69」: UDMAモード5 (Ultra ATA100)
「-X70」: UDMAモード6 (Ultra ATA133)

USplashの変更

2006-05-26 07:05:42 | Ubuntu 5.10 Breezy
Grub起動後のカーネルロードなどの画面に画像設定します。


1)必要なライブラリ
sudo apt-get install gcc libbogl-dev


2)名前も重要
cp usplash-fix.png usplash-artwork.png
cp usplash-blue.png usplash-artwork.png
cp usplash-olive.png usplash-artwork.png

3)PNG画像を変換
pngtobogl usplash-artwork.png > usplash-artwork.c
gcc -Os -g -I/usr/include/bogl -fPIC -c usplash-artwork.c -o usplash-artwork.o
gcc -shared -Wl,-soname,usplash-artwork.so usplash-artwork.o -o usplash-fix.so

4)あるべきところにコピー
sudo cp usplash-fix.so /usr/lib/usplash/usplash-fix.so
sudo ln -sf /usr/lib/usplash/usplash-fix.so /usr/lib/usplash/usplash-artwork.so

5)カーネルへ組み込み
sudo dpkg-reconfigure linux-image-$(uname -r)

#詳しくは下記にも
https://wiki.ubuntu.com/USplashCustomizationHowto