ASUS M5200AE
はじめに
ASUS M5200AE を購入しインストールしました。
- 色
- 白
- CPU
- Intel® Celeron® M Processor 360J
- Chipset
- Intel 915GM+ICH6-M
- Video Chip
- Intel Graphics Media Accelerator 900
- Memory
- Onboard 512M
- ドライブ
- コンボドライブ、2層DVDドライブ、DVDマルチドライブをサポート
- HDD
- Toshiba 100GB
起動
22 を選択
パーティション
- /dev/hda1
- 512MB Linux
- /dev/hda2
- 512MB Linux Swap
- /dev/hda3
- 20GB Linux
- /dev/hda4
- 60GB Linux
- 残り
- 約20GB
インストール
# mkswap /dev/hda2
# mkreiserfs /dev/hda3
# mkreiserfs /dev/hda4
# swapon /dev/hda2
# mount /dev/hda3 /mnt/gentoo
# cd /mnt/gentoo/
# rm -rf *
# mkdir boot
# mount /dev/hda1 boot
# rm -rf boot/*
# links http://gentoo.oregonstate.edu/releases/x86/2005.1-r1/
stages > pentium3 > stage3-pentium3-2005.1-r1.tar.bz2 をダウンロード
# mirrorselect -i -o -a >> etc/make.conf
# cp /etc/resolv.conf etc/
# mount -t proc /proc/ proc/
# chroot . /bin/bash
# env-update
# source /etc/profile
# emerge --sync
# emerge poxrtage
# ln -sf /usr/share/zoneinfo/Japan /etc/localtime
# nano -w /etc/fstab
# emerge -k gentoo-sources
# emerge -k genkernel
# genkernel --no-clean all
root=/dev/ram0 real_root=/dev/hda3 init=/linuxrc ramdisk_size=8192 vga=791 splash=silent
# emerge syslog-ng
# rc-update add syslog-ng default
# emerge vixie-cron
# rc-update add vixie-cron
# emerge hotplug
# rc-update add hotplug default
# emerge coldplug
# rc-update add coldplug default
# emerge dhcpcd
# rc-update add domainname default
# emerge -k reiserfsprogs
# passwd
# useradd tasuku -m -G users,audio.wheel -s /bin/bash
# passwd tasuku
# echo gentoo > /etc/hostname
# echo linux-life.net > /etc/dnsdomainname
# nano -w /etc/hosts
# nano -w /etc/conf.d/keymaps
KEYMAP="jp106"
SET_WINDOWKEYS="yes"
# nano -w /etc/conf.d/net
iface_eth0="dhcp"
# nano -w /etc/modules.autoload.d/kernel-2.6
8139too
# rc-update add net.eth0 default
# emerge grub
# grub
grub > root (hd0,0)
grub > setup (hd0)
grub > quit
# nano -w /boot/grub/grub.conf
timeout 5
splashimage=(hd0,0)/grub/splash.xpm.gz
title = Gentoo Linux(2.6.14-r5)
root (hd0,0)
kernel /kernel-genkernel-x86-2.6.14-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk_size=8192 real_root=/dev/hda3 udev initrd /initramfs-genkernel-x86-2.6.14-gentoo-r5
# exit
# cd /
# umount /mnt/gentoo/boot/ /mnt/gentoo/proc/ /mnt/gentoo/
# reboot
再起動後
USE フラグ
色々インストールしながら色々変更しているんですが、とりあえずこんな感じ
acpi -apm symlink sql kdeenablefinal immqt examples java nsplugin browserplugin mozilla doc ruby -gnome -gtk cjk nls postgres
Xorg
# ln -s /dev/input/mice /dev/mouse
# Xorg -configure
# X -config xorg.conf.new
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/lib/X11/rgb"
ModulePath "/usr/lib/modules"
FontPath "/usr/share/fonts/misc/"
FontPath "/usr/share/fonts/TTF/"
FontPath "/usr/share/fonts/Type1/"
#FontPath "/usr/share/fonts/CID/"
FontPath "/usr/share/fonts/75dpi/"
FontPath "/usr/share/fonts/100dpi/"
EndSection
Section "Module"
Load "record"
Load "extmod"
Load "dbe"
Load "dri"
Load "glx"
Load "xtrap"
Load "freetype"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "jp106"
Option "XkbLayout" "jp"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "Auto"
Option "Device" "/dev/mouse"
Option "ZAxisMapping" "4 5"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "ShadowFB" # [<bool>]
#Option "DefaultRefresh" # [<bool>]
Identifier "Card0"
Driver "vesa"
VendorName "Intel Corp."
BoardName "Unknown Board"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
KDE
/etc/make.conf に LINGUAS="ja" を追加。
# rc-update add dbus default
# rc-update add hald default
# rc-update add ivman default
/etc/rc.conf を変更
DISPLAYMANAGER="kdm"
# /etc/init.d/xdm start
# emerge -avt kdesdk-meta
# emerge -avt kdevelop
# emerge -avt koffice-meta
ネットワーク
- ネットワークの起動を自動で判断する
-
ノートPCなのでLANに繋がってない事もあるので
起動時に net.eth0 は起動したくないけど、
LANに繋がってる時にいちいち起動するのもめんどくさいので、
ifplugdをインストール。
# emerge -avt ifplugdとすると、線が繋がると自動でネットワークを起動してくれる。
# rc-update add ifplugd default
# /etc/init.d/ifplugd start
カーネルの設定
gentoo-souce-2.6.14-r5 の設定を色々変えてみます。
取り合えず色々変えるので
でいちいちクリーンしないようにする。
- Kernel panic
-
デフォルトの状態でカーネルをコンパイルしても起動しなかった。
VFS: Cannot open root device "ram0" or unknown-block(0,0)となるので、livecd から立ち上げ直してカーネルの再構築。
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)Device Drivers --->
Block devices --->
<*> Loopback device support
<*> RAM disk support - Kernel panic 2
-
上記のようにすると下記のようなエラーになった。
UDF-fs: No partition found (1)
Kernel panic - not syncing: VFS Unable to mount root fs on unknown-block(0,0)Device Drivers --->
Block devices --->
[*] Initial RAM disk (initrd) support
File systems --->
<*> Reiserfs support - PCカード
-
Air Edgeを使いたいので設定を追加。
Loadable module support --->
[*] Module unloading
Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
PCCARD (PCMCIA/CardBus) support --->
<M> PCCard (PCMCIA/CardBus) support
<M> CardBus yenta-compatible bridge support
Device Drivers --->
Network device support --->
PCMCIA network device support --->
[*] PCMCIA network device support# cardctl identyenta_socket がモジュールとして読み込まれ、カードが認識された。
Socket 0:
product info: "HONDA ELECTRON", "AH-H407P"
manfid: 0xc036, 0x001a
function: 2 (serial)Device Drivers --->serial_cs がモジュールとして読み込まれるようになった。
Character devices --->
Serial drivers --->
[*] Console on 8250/16550 and compatible serial port
<M> 8250/16550 PCMCIA device supportDevice Drivers --->kppp から接続ができるようになった。
Network device support --->
<M> PPP (point-to-point protocol) support
<M> PPP support for async serial ports
<M> PPP support for sync tty ports
<M> PPP Deflate compression
<M> PPP BSD-Compress compression - ALSA
-
カーネルではやらないことにする。
Device Drivers --->
Sound --->
<M> Sound card support
Advanced Linux Sound Architecture --->
< > Advanced Linux Sound Architecture
Open Sound System --->
< > Open Sound System (DEPRECATED)# emerge -avt alsa-driver alsa-utils
# alsaconf
# amixer set PCM 70% unmute
# rc-update add alsasound boot - ACPI
-
Power management options (ACPI, APM) --->
ACPI (Advanced Configuration and Power Interface) Support --->
[*] ACPI Support
<*> AC Adapter
<*> Battery
<*> Button
<*> Video
< > Generic Hotkey (EXPERIMENTAL)
<*> Fan
<*> Processor
<*> Thermal Zone
< > ASUS/Medion Laptop Extras
<*> IBM ThinkPad Laptop Extras
< > Toshiba Laptop Extras# emerge acpid
# /etc/init.d/acpid start
# rc-update add acpid default
# cd /etc/runlevels
# cp -a default battery/etc/acpi/switch_runlevel.sh
#!/bin/bash
RUNLEVEL_AC="default"
RUNLEVEL_BATTERY="battery"
function on_ac () {
if which on_ac_power &> /dev/null
then
on_ac_power
else
grep --quiet on-line /proc/acpi/ac_adapter/*/state
fi
}
function SwitchRunlevel () {
if [ ! -d "/etc/runlevels/${RUNLEVEL_AC}" ]
then
logger "${0}: Runlevel ${RUNLEVEL_AC} does not exist. Aborting."
exit 1
fi
if [ ! -d "/etc/runlevels/${RUNLEVEL_BATTERY}" ]
then
logger "${0}: Runlevel ${RUNLEVEL_BATTERY} does not exist. Aborting."
exit 1
fi
if on_ac
then if [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_AC}" ]]
then
logger "Switching to ${RUNLEVEL_AC} runlevel"
/sbin/rc ${RUNLEVEL_AC}
fi
elif [[ "$(cat /var/lib/init.d/softlevel)" != "${RUNLEVEL_BATTERY}" ]]
then
logger "Switching to ${RUNLEVEL_BATTERY} runlevel"
/sbin/rc ${RUNLEVEL_BATTERY}
fi
}/etc/acpi/events/pmg_ac_adapter
event=ac_adapter.*
action=/etc/acpi/actions/pmg_ac_adapter.sh %e/etc/acpi/events/pmg_battery
event=battery.*
action=/etc/acpi/actions/pmg_battery.sh %e/etc/acpi/actions/pmg_ac_adapter.sh
#!/bin/bash
source /etc/acpi/switch_runlevel.sh
SwitchRunlevel/etc/acpi/actions/pmg_battery.sh
#!/bin/bash
source /etc/acpi/switch_runlevel.sh
SwitchRunlevel# emerge powermgmt-base
# chmod +x /etc/acpi/switch_runlevel.sh
# chmod +x /etc/acpi/actions/pmg_*
# /etc/init.d/acpid restart/etc/conf.d/local.start
# バッテリーで起動中にacpiイベントをだましランレベルを切り替える
/etc/acpi/actions/pmg_battery.sh "battery/battery"Power management options (ACPI, APM) --->ASUSのラップトップなんだけど、上記の設定をすると
ACPI (Advanced Configuration and Power Interface) Support --->
<*> ASUS/Medion Laptop Extras
< > IBM ThinkPad Laptop ExtrasAsus ACPI: Error reading LCD statusが大量にシステムログに記録された。
モジュールにして読み込むとシステムログには出ない。なんでだろ。# modprobe asus_acpiKDE の電源管理ソフトをインストール
Asus Laptop ACPI Extras version 0.29
unsupported, trying default values, supply the developers with your DSDT# emerge -avt klaptopdaemon - タッチパッドでスクロール
-
# emerge -avt synapticsQSynaptics - X11 touch pad driver configuration utility
# ACCEPT_KEYWORDS="~x86" emerge -avt ksynaptics - ホットキー
-
# echo "app-laptop/acpi4asus ~x86" >> /etc/portage/package.keywordsカーネルモジュールが
# emerge -avt acpi4asus
/lib/modules/`uname -r`/acpi/asus_acpi.ko
にコピーされるが、ちょっと上で試したカーネルで作ったものと同じバージョンだった。
起動時に読み込まれないので /etc/modules.autoload.d/kernel-2.6 に下記を追加asus_acpi/usr/share/doc/acpi4asus-0.29/README.gz を参考に色々設定。$ mkdir ~/.asus_acpiKDEのログイン時にも起動されるように ~/.xprofile に以下の行を追加
$ cp -r /usr/share/acpi4asus/sample/* .asus_acpi/
$ cd .asus_acpi/
$ chmod +x hotk*.sh mute.pl
$ asus_acpidasus_acpid~/.asus_acpi/log を見ながら色々設定してみる。
~/.asus_acpi/hotk0.shkontact~/.asus_acpi/hotk1.shkonqueror - CPUの周波数を調整する
-
バッテリーで動作しているときは周波数をなるべく低くします。
Power management options (ACPI, APM) --->
CPU Frequency scaling --->
[*] CPU Frequency scaling
Default CPUFreq governor (userspace) --->
<*> 'performance' governor
<*> 'powersave' governor
<*> 'ondemand' cpufreq policy governor
<*> 'conservative' cpufreq governor
<M> Intel Enhanced SpeedStep
[*] Use ACPI tables to decode valid frequency/voltage pairs
[*] Built-in tables for Banias CPUs (NEW)
<M> Intel Speedstep on ICH-M chipsets (ioport interface)
<M> Intel SpeedStep on 440BX/ZX/MX chipsets (SMI interface)
<M> Intel Pentium 4 clock modulation
[*] Relaxed speedstep capability checks# emerge cpufreqd
# rc-update add cpufreqd default
# rc-update add cpufreqd battery# watch -n 1 "grep MHz /proc/cpuinfo"更新されない。Processor type and features --->
[ ] Symmetric multi-processing support# watch -n 1 "grep MHz /proc/cpuinfo"更新された。
なんか動作がきびきびしたような気がする。 - ハードディスクの調整
-
/etc/init.d/pm.hda
#!/sbin/runscript
start() {
ebegin "Activating Power Management for Hard Drives"
hdparm -q -S12 /dev/hda
eend $?
}
stop () {
ebegin "Deactivating Power Management for Hard Drives"
hdparm -q -S253 /dev/hda
eend $?
}# chmod +x /etc/init.d/pm.hda
# /sbin/depscan.sh
# rc-update add pm.hda battery# emerge -avt laptop-mode-tools
# rc-update add laptop_mode battery - USBの調整
-
Device Drivers --->
USB support --->
[*] USB suspend/resume (EXPERIMENTAL) - swsusp
-
デフォルトで使えそうな swsusp を使ってみる。
Power management options (ACPI, APM) --->grub.conf に以下のパラメータを追加
[*] Software Suspend
(/dev/hda2) Default resume partitionresume=/dev/hda2動作未確認! - swsusp2
-
swsusp2 を試してみる。
# emerge -avt suspend2-sourcesgentoo-sources 同様に色々変更し、その上Power management options (ACPI, APM) --->
[*] Suspend2 --->
[*] File Writer
[*] Swap Writer
(swap:/dev/hda2) Default resume device name
Cryptographic options --->
<M> LZF compression algorithm - フレームバッファ
-
Device Drivers --->grub.conf に以下のパラメータを追加
Graphics support --->
<*> Support for frame buffer devices
<*> VESA VGA graphics support
VESA driver type (vesafb-tng) --->
(1024x768@70) VESA default mode (NEW)
Console display driver support --->
<*> Framebuffer Console supportvga=791 - 無線LAN
-
Networking --->
< > Generic IEEE 802.11 Networking Stack
Device Drivers --->
Network device support --->
Wireless LAN (non-hamradio) --->
<M> Intel PRO/Wireless 2200BG and 2915ABG Network Connection (NEW)
Cryptographic options --->
<M> AES cipher algorithms (i586)
<M> ARC4 cipher algorithm
<M> Michael MIC keyed digest algorithm# /bin/sh /usr/portage/net-wireless/ieee80211/files/remove-old /usr/src/linux/etc/conf.d/net に以下の行を追加
# emerge -avt ipw2200iface_eth1="dhcp"# cd /etc/init.d/
# ln -s net.lo net.eth1 - ジョイスティック
-
Device Drivers --->
Input device support --->
<M> Joystick interface
[*] Joysticks --->
<M> Classic PC analog joysticks and gamepads# modprove joydev - USBカメラ
-
Logitech QuickCam 3000 Pro を使ってみる。
Device Drivers --->
Multimedia devices --->
<M> Video For Linux
USB support --->
<M> USB Philips Cameras# emerge usb-pwc-reUSE フラグに v4l を追加# emerge xawtvビルドに失敗する。# emerge mplayer小さいけどカラーで表示された。
$ mplayer tv:// -tv driver=v4l:width=176:height=144:device=/dev/video0:noaudio# emerge gqcam上3分の1に3つ白黒で表示される。
HOWTO Install a webcam HOWTO logitech quickcam on 2.6.x kernel
その他の設定
- スプラッシュスクリーン
-
Gentoo 2005.0のロゴでブートアップより。
# emerge -avt splash-themes-libecdgrub.conf に以下のパラメータを追加video=vesafb:1024x768-32@72 splash=silent,theme:livecd-2005.1 quiet CONSOLE=/dev/tty1
- Prelink
-
Gentoo Linux Prelink ガイドより。
# emerge -avt prelinkUSE フラグに pic を追加# emerge -uDavt --newuse world/etc/env.d/99kde-env の KDE_IS_PRELINKED=1 を有効に。
# env-update
# prelink -amR - Epson PM-G720
-
Avasys Download Service for Linux より PM-G720 のソースアーカイブ pipsg720-2.6.2.tar.gz をダウンロード。
$ tar zxf pipsg720-2.6.2.tar.gzとエラーになる。
$ cd pipsg720-2.6.2
$ ./configure
$ make
../lib/libdtr.a(imgdetect_pips.o): In function `OutputMemAtBmp':
imgdetect_pips.cc:(.text+0xc8): undefined reference to `__builtin_new'
imgdetect_pips.cc:(.text+0x3e4): undefined reference to `__builtin_delete'
imgdetect_pips.cc:(.text+0x3f4): undefined reference to `__rethrow'
../lib/libdtr.a(imgdetect.o): In function `FUNC006::~FUNC006(void)':
imgdetect.cc:(.text+0x39e): undefined reference to `__builtin_delete'
collect2: ld returned 1 exit status
pips830-2.5.2のコンパイルが通りません(kernel2.6,gcc3.3.4) を参考に# emerge -avt lib-compatをして、dtrfilter/Makefile.am を変更dtrfilter_LDADD = -ldl -lm $(top_srcdir)/lib/libdtr.a -lstdc++-3-libc6.2-2-2.10.0$ ./configureCUPSでプリンタを設定し、印刷しようとすると Unable to convert file 0 to printable format と言われ失敗したので ghostscript を入れ直す
$ make
$ sudo make install# emerge -avt ghostscriptドライバの設定をすると印刷されるようになった。 - Audio CD/DVD
- ユーザーを cdrom グループに追加することで可能になった。
- MS SD MMC
- うんともすんとも言わないので保留。
- gcc のアップグレード
-
# gcc-config i686-pc-linux-gnu-3.4.4
# source /etc/profile
# emerge --oneshot -av libtool
# emerge -e system
# emerge -e world - NPTL
-
USE フラグに nptl を加える。
# emerge -avt glibc
# emerge -e system
# emerge -e world - PostgreSQL
-
# emerge -avt postgresqlUSE フラグに postgresql を追加。
# emerge --config =postgresql-8.0.4
# /etc/init.d/postgresql start
# rc-update add postgres default
# su - postgres
$ createuser -W tasuku
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
Password:
CREATE USER# emerge -uDavt --newuse worldGUI のツールを試してみる。# emerge -avt kpogre - Apache
-
USE フラグに apache2 を追加。
# emerge -uDavt --newuse apachehttp://localhost/ で Apache のテストページ(英語)が表示された。
# /etc/init.d/apache2 start
# rc-update add apache2 default
設定ファイルは /etc/apache2/httpd.conf
ドキュメントのルートは /var/www/htdocs/ のようだ。
その他のカーネルの設定
適当に気づいたものを変えてみます。
- Local APIC support on uniprocessors
-
シングルCPUで使えるAPICで遅くならないらしい。
Processor type and features --->
[*] Local APIC support on uniprocessors
[*] IO-APIC support on uniprocessors - DRM
-
Device Drivers --->xorg-x11-6.8.99.15 をインストール
Character devices --->
<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
<M> Intel 830M, 845G, 852GM, 855GM, 865G
<M> i915 driver# echo "=x11-base/xorg-x11-6.8.99.15-r4 ~x86" >> /etc/portage/package.keywordsxorg.confの設定を変更
# echo "x11-base/xorg-x11" >> /etc/portage/package.unmask
# emerge -avt xorg-x11
[ebuild U ] x11-base/xorg-x11-6.8.99.15-r4 [6.8.2-r6] -3dfx +bitmap-fonts +cjk -debug +doc -font-server -insecure-drivers +ipv6 -minimal +nls -nocxx +opengl +pam -sdk -static +truetype-fonts +type1-fonts (-uclibc) -xprint +xv
# Xorg -configure
# X -config ~/xorg.conf.newSection "Device"
Identifier "Card0"
Driver "i810"
VendorName "Intel Corporation"
BoardName "Mobile 915GM/GMS/910GML Express Graphics Controller"
BusID "PCI:0:2:0"
Option "DisplayInfo" "False"
Option "DRI" "True"
Option "MonitorLayout" "CRT,LFP"
Option "Clone" "True"
EndSection
Section "Device"
Mode 0666
EndSection - 透明化
-
xorg.confの設定を変更
Section "Extension"KDEのコントロールセンター > デスクトップ > ウィンドウの挙動 > 透光性 で色々設定。
Option "Composite" "Enable"
EndSection
ちょっとかっこいいけど、重くなった。 - BacklightとLCD
-
Device Drivers --->うーん、モジュールはできるけど、使われていないっぽい。
Graphics support --->
[*] Backlight & LCD device support --->
<M> Lowlevel Backlight controls (NEW)
<M> Lowlevel LCD controls (NEW) - Support for the framebuffer splash
-
Device Drivers --->
Graphics support --->
[*] Support for the framebuffer splash