2006-03-20

x206にcentosインストール

結局適切なドライバディスクを作れば良いだけだったのですが、試行錯誤しながらで
時間がかかりました。

http://fedora.jp/pipermail/users/2005-March/009710.html
http://www.gemx.co.jp/modules/tinycontent4/rewrite/tc_2.html
とかを見て作業しました。以下作業の流れです。

0. centOS4.2をインストールしたマシンの準備
x206でなくって、別のマシンにとりあえずインストールしました。
モジュールコンパイルに時間がかかるので速いマシンのほうが幸せかも。

1. カーネルソースの準備
CentOS4.2では、kernel-2.6.9-22.EL.src.rpmでした。
これを、ルートでインストールしたら、/usr/src/redhat以下に入ります。
で、/usr/src/redhat/SPECSにて、
# rpmbuild -bp --target=i586 kernel-2.6.spec
すると、/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9以下に
展開されます。
私はこれを、
# mv linux-2.6.9 /usr/src/linux-2.6.9-i586
と移動して、作業しました。

さらに、
# rpmbuild -bp --target=i686 kernel-2.6.spec
して、i686用を作成して、こちらは、/usr/src/linux-2.6.9-i686
に移動しました。

2. aacraid用のソースを展開
IBMのServerRAID supportCDからソースを展開しました。
linux/sata/driver/aacraid-1.1.5-2387.rpmをインストールすると、
/opt/Adaptec/aacraid/以下にファイルが出来たので、この中の
/opt/Adaptec/aacraid/aacraid_source.tgzを、
/usr/src/linux-2.6.9-i586/drivers/scsi/aacraid

/usr/src/linux-2.6.9-i686/drivers/scsi/aacraid
に展開しました。

3. モジュールの準備
インストール時のカーネルがi586だったので、i586版のモジュールも
必要みたいです。
なので、2.6.9-22.EL i586, 2.6.9-22.ELsmp i586, 2.6.9-22.EL i686,
2.6.9-22.ELsmp i686 の4種類のモジュールを作成しました。

3.1 2.6.9-22.EL i586 用のモジュール作成

# cd /usr/src/linux-2.6.9-i586

初期化します
# make mrproper

i586用コンフィグファイルコピー
# cp configs/kernel-2.6.9-i586.config .config

Makefileの4行めぐらいのEXTRAVERSIONを以下のように編集
EXTRAVERSION = -22.EL

.configを再作成
# make oldconfig

モジュールコンパイル
# make modules

出来たモジュールのstripと確認
# cd drivers/scsi/aacraid
# strip --strip-debug aacraid.ko
# strings aacraid.ko | grep vermagic
vermagic=2.6.9-22.EL 586 REGPARM 4KSTACKS gcc-3.4
ってなっていたらば完成なので、
# mv aacraid.ko aacraid.ko-2.6.9-22.EL-586
と退避しておく

3.2 2.6.9-22.ELsmp i586 用のモジュール作成

コピーするコンフィグファイルが、kernel-2.6.9-i586-smp.config
になって、
MakefileのEXTRAVERSIONが以下のようになる以外の手順は3.1と同じ
EXTRAVERSION = -22.ELsmp

で、最後の確認の所で、
# strings aacraid.ko | grep vermagic
vermagic=2.6.9-22.ELsmp SMP 586 REGPARM 4KSTACKS gcc-3.4
で完成なので、
# mv aacraid.ko aacraid.ko-2.6.9-22.ELsmp-586
と退避しておく


3.3 2.6.9-22.ELsmp i686 用のモジュール作成

最初に作っておいた、/usr/src/linux-2.6.9-i686で作業します。

コピーするコンフィグファイルが、kernel-2.6.9-i686.config
になる以外は、3.1と同じ手順で作業して、最後の確認の所で、
# strings aacraid.ko | grep vermagic
vermagic=2.6.9-22.EL 686 REGPARM 4KSTACKS gcc-3.4
ってなっていたらば完成なので、
# mv aacraid.ko aacraid.ko-2.6.9-22.EL-686
と退避しておく


3.4 2.6.9-22.ELsmp i686 用のモジュール作成

コピーするコンフィグファイルが、kernel-2.6.9-i686-smp.config
になる以外は、3.2と同じ手順で作業して、最後の確認の所で、
# strings aacraid.ko | grep vermagic
vermagic=2.6.9-22.ELsmp SMP 686 REGPARM 4KSTACKS gcc-3.4
で完成なので、
# mv aacraid.ko aacraid.ko-2.6.9-22.ELsmp-686
と退避しておく。


4 ドライバディスク作成

4.1 ベースを作成
適当なディスクをベースに作成します。
私は、IBMのServerRaidのCD内の、aac-linux-i686-rhel4.imgを
使いました。

4.2 モジュールファイルの作成
フロッピをマウントすると、modules.cgzというファイルがあります。
これを差し替えればOKなのです。
このファイルは、モジュールをcpioでまとめて、gzipしたものだそうです。

上書きするので、展開は必要ないですけれど、展開は、
# gzip -dc modules.cgz | cpio -id
で出来ます。

作成には、まず適当なディレクトリを作って移動してから、
# mkdir 2.6.9-22.EL 2.6.9-22.ELsmp
# mkdir 2.6.9-22.EL/i586 2.6.9-22.EL/i686
# mkdir 2.6.9-22.ELsmp/i586 2.6.9-22.ELsmp/i686
とディレクトリを作ります。

それから、3で用意した4つの*.koをそれぞれのディレクトリに、
aacraid.koという名前に戻してコピーします。
この時点で、このディレクトリには、以下のファイルがあります。
# find -name *.ko
./2.6.9-22.ELsmp/i686/aacraid.ko
./2.6.9-22.ELsmp/i586/aacraid.ko
./2.6.9-22.EL/i686/aacraid.ko
./2.6.9-22.EL/i586/aacraid.ko

これを、modules.cgzにまとめるために、以下のコマンドでまとめます。
# find -name *.ko | cpio -oH crc | gzip -9 > modules.cgz

これを、フロッピに書き戻せばドライバディスクの完成です。

CentOSのインストーラ起動時に、
linux ddで、ドライバディスクがある事を指定して、今作ったディスクを
読み込ませれば、無事にServerRAID 7tを認識させる事が出来ました。

14 Comments:

At 11:54 AM, Anonymous Anonymous said...

I alwaуѕ spent mу half an
hour to гeaԁ this blog's posts daily along with a mug of coffee.

Feel free to surf to my weblog: galaxy note 2
Here is my site ; samsung galaxy note 2

 
At 1:50 AM, Anonymous Anonymous said...

Remаrκable! Its genuinely аmazing paragraph, I haѵе got much clеar idea about from thіѕ aгtіcle.
Stop by my webpage - instagram followers cheap

 
At 1:50 AM, Anonymous Anonymous said...

Remаrkablе! Its genuinely amazing paragгaрh, I have got muсh cleаr іdea
about from thiѕ article.
my web site - instagram followers cheap

 
At 10:37 AM, Anonymous Anonymous said...

Wоndеrful articlе! We will bе linκing to thiѕ great content on our ѕitе.
Kеep up the good ωritіng.

Take a look at my blog; www.vapornine.Com
Also visit my page : forex broker

 
At 12:28 AM, Anonymous Anonymous said...

Ηowdy are using Woгԁρгess fοr уouг
site plаtfогm? I'm new to the blog world but I'm
tгying tо get stаrted and cгeate my own.

Dο you need any coding knowleԁge to maκе уour
own blog? Any help would be reаlly apprеciated!


my pаge :: neon signs for home
Check out my web blog ; cartoon network.com\/bike

 
At 11:40 PM, Anonymous Anonymous said...

Νice answer baсk in rеtuгn of thіs
matteг with firm arguments anԁ describing the whole thing regarding that.
Here is my web site ... can you buy followers on instagram

 
At 1:08 AM, Anonymous Anonymous said...

I have been exploring for a little bit for any high-quality articles or weblog posts in this sort of space .

Exploring in Yahoo I finally stumbled upon this site. Studying this info So i am happy to show that I've an incredibly good uncanny feeling I discovered exactly what I needed. I most surely will make sure to do not forget this website and give it a look regularly.

Here is my web-site; targeted twitter followers
Also visit my webpage ... get more followers for twitter

 
At 12:57 AM, Anonymous Anonymous said...

Thanks for the marvelous posting! I quite enjoyed reading it,
you could be a great author. I will be sure to bookmark your blog and may
come back down the road. I want to encourage you to ultimately continue your great job, have a nice
weekend!

My blog buy targeted twitter followers

 
At 9:20 PM, Anonymous Anonymous said...

It's going to be end of mine day, however before ending I am reading this impressive paragraph to improve my know-how.

my site; get followers

 
At 10:28 PM, Anonymous Anonymous said...

Hi there very cool web site!! Man .. Beautiful .

. Amazing .. I'll bookmark your blog and take the feeds additionally? I am glad to search out so many helpful information here in the put up, we want develop extra strategies in this regard, thanks for sharing. . . . . .

Also visit my blog :: review your Free/99c Android app at Google Play

 
At 1:59 AM, Anonymous Anonymous said...

Just want to say your article is as surprising. The clarity to your submit is
simply excellent and i can assume you're an expert in this subject. Fine with your permission let me to clutch your RSS feed to stay updated with coming near near post. Thank you one million and please keep up the rewarding work.

Feel free to surf to my weblog - aaa fx

 
At 12:50 AM, Anonymous Anonymous said...

Peculiar article, exactly what I was looking for.

Feel free to surf to my weblog :: get followers

 
At 11:59 AM, Anonymous Anonymous said...

Amazing blog! Is your theme custom made or did you download
it from somewhere? A theme like yours with a
few simple adjustements would really make my blog shine. Please let me know where you got your design.
Kudos

my site ... zulutrade

 
At 10:01 AM, Anonymous Anonymous said...

This is a topic that is near to my heart...
Take care! Exactly where are your contact details though?


Also visit my homepage :: castle clash cheat app - ,

 

Post a Comment

<< Home