2005-03-25

Using The IBM b/g Wireless Mini PCI Adapter in Fedora Core 3

Using The IBM b/g Wireless Mini PCI Adapter in Fedora Core 3

By default, not all the IBM x31 notebooks are Centrino architecture.

Centrino architecture includes:Pentium M processor, Intel's 855 chipset,
and Intel's Pro/Wireless 2100 wireless network card.

Unfortunately, my x31 2672-IV6 is not Centrino architecture.
It includes all the components except Intel's Pro/Wireless 2100.

The wireless card in my x31 is IBM b/g Wireless Mini PCI Adapter, which
vendor is Atheros (http://www.atheros.com/).

IBM b/g Wireless Mini PCI Adapter is not recognized by Fedora Core 3.

The good news is that there is a open source project for Atheros.
(http://sourceforge.net/projects/madwifi/)

It does not release any files now, but you can retrieve the source code via CVS.

There are 4 steps to make the Mini PCI Adapter works in Fedora Core 3:

A.download & compile kernel source
B.download MADWIFI source code via CVS
C.compile & install
D.setup wireless card

****** detail ******
A.download & compile kernel source

MADWIF needs kernel source to compile the modules and Fedora Core 3 does not
include default.

B.download MADWIFI source code via CVS

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi

use the command above to get MADwifi from CVS.

C.compile & install

in madwifi directory:

make;make install

The modules will be installed in /lib/modules/2.6.10/net (by my case)

D.setup wireless card

1.modprobe ath_pci
2.ifconfig ath0 up (yes, ath0)
3.iwlist ath0 scan (scan your AP)
4./etc/sysconfig/network-scripts/ifcfg-ath0:

DEVICE=ath0
ONBOOT=yes
BOOTPROTO=dhcp

5.dhclient ath0 (get ip from AP)

If everything is ok, /etc/modprobe.conf:

alias ath0 ath_pci

Then the Mini PCI Adapter will work after booting.

Re: printing in text mode

> a2ps -B -1 --border=no xxx.txt
> it will print a no border, one page per sheet document.

try this:
a2ps --left-title="" -4 README -o madwifi.ps

Use GRUB to boot FreeBSD

Use GRUB to boot FreeBSD:

method 1, in grub command prompt:

grub> root (hd0,a)
grub> kernel /boot/loader
grub> boot


method 2, in menu.lst:

/boot/grub/menu.lst:
...
title FreeBSD 5.3
root (hd0,a)
kernel /boot/loader

Apple Boot Key Combos

http://www.jacsoft.co.nz/Tech_Notes/Mac_Keys.shtml

Bypass startup drive and boot from external (or CD).... CMD-OPT-SHIFT-DELETE
Boot from CD (Most late model Apples) ................. C
Boot from a specific SCSI ID #.(#=SCSI ID number)...... CMD-OPT-SHIFT-DELETE-#
Zap PRAM .............................................. CMD-OPT-P-R
Disable Extensions .................................... SHIFT
Rebuild Desktop ....................................... CMD-OPT
Close finder windows.(hold just before finder starts).. OPT
Boot with Virtual Memory off........................... CMD
Trigger extension manager at boot-up................... SPACE
Force Quadra av machines to use TV as a monitor........ CMD-OPT-T-V
Boot from ROM (Mac Classic only)....................... CMD-OPT-X-O
Force PowerBooks to reset the screen................... R
Force an AV monitor to be recognized as one............ CMD-OPT-A-V
Eject Boot Floppy...................................... Hold Down Mouse Button
Select volume to start from............................ OPT
Start in Firewire drive mode........................... T
Startup in OSX if OS9 and OXS in boot partition........ X or CMD-X
Hold down until the 2nd chime, will boot into 9?....... CMD-OPT
OSX: Watch the status of the system load............... CMD-V
OSX: Enter single-user mode (shell-level mode)......... CMD-S

Bootable DOS NTFS reader

DOS NTFS boot disk to access NTFS partitions in Windows XP 2000 or NT
http://www.ntfs.com/boot-disk.htm

Sony handycam advertisement in Discovery

I have posted it on sayya bbs :)

http://www.ecat.sony.com.tw/images/tvcf/pc350_0412.wmv

The song in the advertisement:
http://public.thehazelnut.com/Mongolian_song.mp3

A mongolia singer who lives in Germany now.This is her website:
http://www.urna.com/

This is the ninth song:
http://www.urna.com/cd/talnutag.html

The slogan in the advertisement:

It takes 3 seconds to fall in love;
but 3 decades to get along.

3 centuries to preserve a tradition;
but 3 minutes to embrace another.

3 colours to paint the world;
and 3 million pixels to capture it all.

[FreeBSD] chinese in more/less (ssh/telnet)

in order to remind, too.
when you ssh/telnet in Freebsd, use:

more -r xxx.txt
less -r xxx.txt

to read file that include chinese.

[FreeBSD] chinese in ls (ssh/telnet)

in order to remind.
/etc/bashrc:
alias ls="gnuls --color=auto --show-control-chars"

printing in text mode

a2ps -B -1 --border=no xxx.txt

it will print a no border, one page per sheet document.

Using wep in Linux (wireless)

ascii key:
iwconfig eth0 essid default key s:12345
--------
key

[FreeBSD] Set the default boot selection to slice

you can use "boot0cfg" command to set the default boot selection to slice.

for example:
boot0cfg -s 2 ad0

ad0s2 will be the default selected entry.

Using Linux to build your own Soft-AP (Access Point)

Yuo have to choice a wireless card with Intersil Prism chipset.

3Com 3CRWE154G72 (pcmcia)
&
PCI GW-DS54G (pci)
are good choice, because i have tested these two cards, and they do work.

1.mkdir -p /usr/lib/hotplug/firmware
2.cd /usr/lib/hotplug/firmware
3.mount /mnt/cdrom (your wireless card driver)
4.cp /mnt/cdrom/Driver/3CRWE154G72/3C154G72.arm isl3890
(cp /mnt/cdrom/Drivers/XP&2K/WLANDCB.arm isl3890) for GW-DS54G
5.chkconfig pcmcia on (for 3CRWE154G72)
6. /etc/rc.d/rc.local:

modprobe prism54 # only GW-DS54G needed
iwconfig eth1 essid Linux-3Com
iwconfig eth1 channel 7
iwconfig eth1 mode Master
ifconfig eth1 10.1.1.1 netmask 255.255.255.0 broadcast 10.1.1.255 up

7.setup your NAT & DHCP server to privide your clients to get ip
8.reboot
9.test from your wireless client

this is a snapshot of my PDA:
http://www.wretch.cc/album/show.php?i=ywwang&b=3&f=1096222587.jpg&p=1

3Com 802.11g pcmcia on Fedora core 2 success

OS: Fedora Core 2

3Com 3CRWE154G72:
http://www.3com.com/products/en_US/detail.jsp?tab=features&
pathtype=purchase&sku=3CRWE154G72

bought it in Nova/Taipei NT:1600

i also bought Bufallo WLI-PCM-L11GP AirStation PCI Adapter Card:
http://www.buffalotech.com/products/product-detail.php?productid=
68&categoryid=9

because there is no pcmcia slot on my notebook (iBook), i have to
use this card on my pc in order to use 3Com pcmcia wireless card.
Bufallo WLI-PCM-L11GP works perfect on FC2.
NT:900

Reference document:
http://mysite.verizon.net/winterz/doc/prism54_fc2.txt

install steps:
1. mkdir -p /usr/lib/hotplug/firmware

2. cd /usr/lib/hotplug/firmware

3. mount your driver CD of 3Com

4. copy 3Com firmware in CD to /usr/lib/hotplug/firmware and
rename to isl3890.
for example:
[root@localhost firmware]# ls /usr/lib/hotplug/firmware
isl3890

5. plug 3Com 3CRWE154G72 into pcmcia slot

6. check if FC2 detect your 3Com card:
[root@localhost root]# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

eth1 NOT READY! ESSID:off/any
Mode:Managed Channel:6 Access Point: 00:00:00:00:00:00
Tx-Power=31 dBm Sensitivity=0/200
Retry min limit:0 RTS thr=0 B Fragment thr=0 B
Encryption key:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

sit0 no wireless extensions.

7. bring up eth1:
[root@localhost root]# ifconfig eth1 up

8. scan your AP:
[root@localhost root]# iwlist eth1 scanning
eth1 Scan completed :
Cell 01 - Address: 00:E0:98:4C:05:6E
ESSID:"wyw"
Mode:Master
Encryption key:off
Frequency:2.462GHz
Quality:102/0 Signal level:-46 dBm Noise level:-148 dBm

9. create a new file named "ifcfg-eth1" in /etc/sysconfig/network-scripts:
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
MODE=Managed
ESSID=wyw

10. use "dhclient" command to get ip from AP:
[root@localhost root]# dhclient eth1
Internet Software Consortium DHCP Client V3.0.1rc12
Copyright 1995-2002 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/eth1/00:0d:54:a1:8f:b5
Sending on LPF/eth1/00:0d:54:a1:8f:b5
Sending on Socket/fallback
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 192.168.1.254
SIOCADDRT: File exists
bound to 192.168.1.88 -- renewal in 121862 seconds.

11. now your 3Com 3CWRE154G72 pcmcia wireless card works perfectly:
[root@localhost root]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:0D:54:A1:8F:B5
inet addr:192.168.1.88 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20d:54ff:fea1:8fb5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2480 (2.4 Kb) TX bytes:720 (720.0 b)
Interrupt:11

[root@localhost root]# iwconfig eth1
eth1 IEEE 802.11b/g ESSID:"wyw"
Mode:Managed Channel:11 Access Point: 00:E0:98:4C:05:6E
Bit Rate:11Mb/s Tx-Power=31 dBm Sensitivity=20/200
Retry min limit:8 RTS thr:2347 B Fragment thr:2346 B
Encryption key:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


****************
there is also a good web site & forum that talk about prism chipset:
http://www.prism54.org/
http://www.prism54.org/forums/

[Doc] Linux Serial Console HOWTO

Reference:
http://www.vanemery.com/Linux/Serial/serial-console.html

1. /etc/inittab:
s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100

2. /etc/issueserial (option):
Connected on \l at \b bps
\U
Kernel \r on an \m

3. # init q (option):
forces the init process to re-read the configuration file.

4. /etc/securetty (option):
ttyS0

5. grub.conf:
kernel /boot/vmlinuz-2.6.5-1.358 ro root=LABEL=/ console=ttyS0,9600

6. # chkconfig kudzu off (option, Red Hat based Linux distributions needed)

7. in Windows Hyper Terminal:
Turn flow control "off"

8. reboot

Screen capture:
http://www.wretch.cc/album/show.php?i=ywwang&b=3&f=1093848703.jpg&p=0

[Doc] Installing DB2 Version 8.1.6 for Linux

http://www-106.ibm.com/developerworks/linux/library/l-ss4-db2/?ca=dgr-lnxw07DB24Lin

WLAN Adapter Chipset Directory

http://www.linux-wlan.org/docs/wlan_adapters.html.gz

Use MD5 Digest authentication instead of using Basic Authentication (Apache)

1. httpd.conf:

AllowOverride All


2. create user account:
$ htdigest -c .htpasswd "MD5 Digest authentication test" ywwang
^^^^^^^^^^^^^^^^^^^^^^
A
Adding password for ywwang in realm MD5 Digest authentication test.
New password:
Re-type new password:
$ more .htpasswd
ywwang:MD5 Digest authentication test:223148e89875e6ff0035242a7be3abcd


3. create .htaccess file:
AuthDigestFile /home/ywwang/public_html/private/.htpasswd
AuthType Digest
AuthName "MD5 Digest authentication test"
^^^^^^^^^^^^^^^^^^^^^^
B
AuthDigestDomain /~ywwang/private/ http://192.168.0.139/~ywwang/private/
AuthDigestNonceLifetime 300
require valid-user

NOTE: Part A should be equal to part B.

Login screen:
http://www.wretch.cc/album/show.php?i=ywwang&b=2&f=1091433774.jpg

Chipsets and Wireless cards supported by the Linux prism54 driver

http://prism54.org/supported_cards.php

Wireless LAN resources for Linux (from hp.com)

http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/

AT76C5XXx-based Wireless Devices

http://atmelwlandriver.sourceforge.net/news.html
---
Home of the OpenSource Linux Driver for Atmel AT76C5XXx-based Wireless Devices

Lemel USB wireless network card drivers (Mandrake)

[root@ns root]# lsmod | more
Module Size Used by
at76c505-rfmd2958 40772 0
at76c503 70464 1 at76c505-rfmd2958
usbdfu 5156 1 at76c503

XDMCP client (X Window)

X :1 -query 192.168.0.139
X :2 -query 192.168.0.135

Ctrl + Alt + F7 to switch to the original X Window

Using GRUB via a serial line

grub> serial --unit=0 --speed=9600
grub> terminal serial

In windows you have to select software (Xon/Xoff) flow control.

Extract RPM package

mkdir tmp
cp rpmfile tmp
cd tmp
rpm2cpio rpmfile | cpio -idum

ex:
rpm2cpio sendmail-8.12.6-2.i686.rpm | cpio -idum

[bind] allow specific IP to zone transfer.

in named.conf:

zone "somecompany.com.tw" in {
type master;
file "named.somecompany.com.tw";
allow-update { none; };
allow-transfer {
11.22.33.44;
55.66.77.88;
};
};

Prevention and Recovery of XP Dual Boot Problems

http://www.redhat.com/archives/fedora-devel-list/2004-May/msg00908.html

/etc/yaboot.conf

boot=/dev/hda9
device=hd:
partition=12
root=/dev/hda12
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
defaultos=macosx

image=/boot/kernel-2.4.24-wyw
label=Linux
read-only

macosx=/dev/hda10

fix the broken yaboot

1.boot from Gentoo PPC live cd
2.in boot prompt:
hd:11,/boot/vmlinux root=/dev/hda11
3.after boot into previous installed Gentoo:
mkofboot -v

mkisofs

mkisofs -l -R -J -V SuSE91 -v -o ./suse-9.1-ftp_install.iso /mnt/hdd1/suse/

-l Allow full 31 character filenames.
-R Generate SUSP and RR records using the Rock Ridge protocol to
further describe the files on the iso9660 filesystem.
-J Generate Joliet directory records in addition to regular iso9660
file names.
-V volid
Specifies the volume ID (volume name or label) to be written
into the master block.
-v Verbose execution.
-o filename
is the name of the file to which the iso9660 filesystem image
should be written.

XDMCP client (cygwin)

XWin.exe -query 192.168.0.135
XWin.exe :1 -query 192.168.0.139
then you don't need other commerical software like XWin32 any more

enable XDMCP in Fedora Core 2

a.accept 177/udp in firewall
b./etc/rc.d/init.d/xfs:
daemon xfs -droppriv -daemon -port 7100
c./etc/X11/fs/config:
#no-listen = tcp # comment
d./etc/X11/xdm/xdm-config:
! DisplayManager.requestPort: 0 # comment
e./etc/X11/xdm/Xaccess:
* # any host can get a login window (uncomment)
f./etc/X11/gdm/gdm.conf:
RemoteGreeter=/usr/bin/gdmgreeter
Enable=true

GNU softwares for OSX

http://www.osxgnu.org/

Most Mac OS X users prefer to use GUI tools to make Installations of software.
By providing GNU software ported or built for the Apple Installer we are
providing a needed service for the OS X community. Our Goal is to produce
Tools for the OS X Package Installer/Maker and to port all Free/Open source
software to the OS X Installer system as is possible.
?>

Working kernel .config for my machine?

from:
http://forums.gentoo.org/viewtopic.php?t=168763

---------

If you get a 2004.* livecd to boot, the configuration of the kernel that
booted your machine can be found in /proc/config.gz

An example: you booted your G5 with G5-SMP, installing a kernel is as simple
as:

emerge gentoo-dev-sources (installs a -2.6.5 kernel)
cp /proc/config.gc /usr/src/linux
cd /usr/src/linux
gunzip config.gz
cp ./config ./.config
make all modules_install

or

zcat /proc/config.gz > /usr/src/linux/.config

excute your own scripts after all the other init scripts in Gentoo PPC

there is no /etc/rc.d/rc.local in Gentoo,
you have to put your own scripts in /etc/conf.d/local.start

emulate the right and middle buttons in Gentoo PPC

echo "1" > /proc/sys/dev/mac_hid/mouse_button_emulation
echo "87" > /proc/sys/dev/mac_hid/mouse_button2_keycode
echo "88" > /proc/sys/dev/mac_hid/mouse_button3_keycode

F10 & F11

A project that collects configuration files for Gentoo PPC

i found in Gentoo forum :
http://ppcconfdb.sourceforge.net/

XF86Config in Gentoo PPC

i forget to keep /etc/X11/XF86Config in Yellowdog Linux.
after installed Gento PPC on iBook, X did not work.
one of the good reasons to use MAC is: there are only several hardware
specification in Apple's products.

so, you can steal other's configuration from internet :)

================
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/truetype"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/lfp-fix/"
FontPath "/usr/X11R6/lib/X11/fonts/lfp-var/"
FontPath "/usr/X11R6/lib/X11/fonts/sharefont/"
FontPath "/usr/X11R6/lib/X11/fonts/freefont/"
FontPath "/usr/X11R6/lib/X11/fonts/ttfs/"
FontPath "/usr/share/AbiSuite/fonts/"
EndSection

Section "Module"
Load "extmod"
Load "xie"
Load "pex5"
Load "freetype"
Load "int10"
#Load "dri"
Load "dbe"
Load "record"
Load "xtrap"
Load "glx"
Load "speedo"
Load "type1"
Load "bitmap" #new
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Option "CustomKeycodes"
Option "XkbModel" "Macintosh"
Option "XkbLayout" "us"
Option "XkbRules" "xfree"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "ZAxisMapping" "4 5"
Option "Device" "/dev/input/mice"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
UseModes "Modes0"
HorizSync 30-70
VertRefresh 50-160
EndSection

Section "Device"
### Available Driver options are:-
### Values: : integer, : float, : "True"/"False",
### : "String", : " Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # []
#Option "SWcursor" # []
#Option "Dac6Bit" # []
#Option "Dac8Bit" # []
#Option "ForcePCIMode" # []
#Option "CPPIOMode" # []
#Option "CPusecTimeout" #
#Option "AGPMode" #
#Option "AGPSize" #
#Option "RingSize" #
#Option "BufferSize" #
#Option "EnableDepthMoves" # []
#Option "CrtScreen" # []
#Option "PanelSize" # []
Option "UseFBDev" # []
Identifier "Card0"
Option "UseFBDev"
Driver "ati"
VendorName "ATI"
BoardName "Radeon Mobility M6 LY"
BusID "PCI:0:16:0"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1024x768" "640x480" "800x600"
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768" "640x480" "800x600"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768" "640x480" "800x600"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "640x480" "800x600"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "640x480" "800x600"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection

#Section "DRI"
#Mode 0666
#EndSection

Section "Modes"
Identifier "Modes0"
# mode generated by Xeasyconf
Modeline "1024x768" 65.003 1024 1048 1184 1344 768 771 777 806
-HSync -VSync
EndSection

the modules that Gentoo Live CD used.

in iBook
livecd root # lsmod
Module Size Used by
airport 7680 0
orinoco 53548 1 airport
hermes 14912 2 airport,orinoco
ipv6 282604 12
nls_utf8 2272 0
nls_iso8859_15 4864 0
nls_iso8859_1 4256 1
isofs 40408 1
binfmt_misc 12968 0
ide_scsi 18596 0
sr_mod 21088 0
zlib_inflate 23616 1 isofs
compressloop 8992 1
cryptoloop 5408 0
loop 20840 4 compressloop,cryptoloop

the NIC drivers of iBook in Yellowdog Linux

lsmod::

on board NIC chip:
sungem 28144 1
sungem_phy 7600 0 [sungem]

wireless:
airport 4132 1
orinoco 40032 0 [airport]

NIC drivesr of ibook in Yellowdog linux

lsmod::

on board NIC chip:
sungem 28144 1
sungem_phy 7600 0 [sungem]

wireless:
airport 4132 1
orinoco 40032 0 [airport]

UPS on Linux

1.http://power.sourceforge.net
2.detectups /dev/ttyS0
3.chkconfig powerd on

Audit system resource usage

1./etc/rc.d/init.d/psacct start
2.
[roo@ns /]# sa -m
405 13.38re 0.43cp 0avio 1239k
root 352 12.89re 0.35cp 0avio 1233k
mailman 9 0.19re 0.08cp 0avio 2089k
wyw 42 0.15re 0.00cp 0avio 1087k
smmsp 1 0.01re 0.00cp 0avio 1687k
sshd 1 0.13re 0.00cp 0avio 1488k

how to get your dmi & BIOS informations in Linux ?

you can use "dmidecode" to show this informations

homepage of dmidecode:
http://www.nongnu.org/dmidecode/

what is dmi (Desktop Management Interface):
http://www.dmtf.org/standards/dmi