« Ububtu 8.04 (Hardy) から8.10 (Intrepid) にアップグレードしたところ,Sambaの中身がNautilusで見えない件 | Main | ETC車載器新規導入助成って言うけど,ETC車載器売り切れだよ.だから国土交通省に電話してみた. »

January 26, 2009

シリアル接続を受け付けるヘッドレスFreeBSDシステムの構築

 さて,筆者も少しずつFreeBSDが使えるようになってきたので,将来はちゃんとしたサーバーでも立ててみたいと思うようになってきたのだが,ブレードサーバーみたいなキーボードもモニターもないマシンにってどうやってインストールするんだろう.っていうか,筆者のもう一つの企みとしてVIAのArtigoってマシンが欲しいのである.その二つがどうつながるかというと,serial console接続を受け付けるheadless machineを組みたいということなのである.
 そうと決めたからにはキーボードを即座にリサイクルに出していいかというとそういうわけでもないらしい.あなたの使っているパソコンのキーボードや何やら全て引っこ抜いて電源を入れてみよう.大丈夫,壊れないから(たぶん).すると,パソコンがHDDにアクセスする前にキーボードがないと文句を言って起動を止めてしまう(たぶん).これはBIOSの設定でHalt on: All errorsとか何とかの設定が効いていると止まってしまうのだ(動くマシンもあるらしい).その場合仕方ないので電源を落としてキーボードをつないでBIOSの設定を変更しなければならない.BIOSの設定をHalt on: All but keyboardにすれば第一段階は通過だ.安心して全てを引っこ抜いて準備してよい.

--- ケーブル
 次に,サーバーをインストールするリモートのPCとコントロールするPCをつなぐケーブルを準備しなければならない.デスクトップ同士であれば多分両方にcomポートがついているのでクロスケーブル一本ですむが,できればノートパソコンにつないで寝っ転がってコントロールしたい.ノートパソコンにはUSBしかついていない.そこで秋葉原に行って仕入れてきた.まず,USBとserialの変換ケーブルを秋月で購入した.前回書いたものである.これが1000円弱.続いて並びの千石通商に行って,D-sub 9 pinのクロスのケーブル(メスーメス)を購入した.これが500円弱.だったのが,間違えてインターリンクのオスーオスを購入してしまって,また買いなおしに行った.まあそれでもどこぞのメーカーのもので揃えるより格段に安い.

--- インストールメディア
 FreeBSDのハンドブックには,シリアルコンソールでインストールする手順が書いてあるが,フロッピーでブートしてネットワークインストールというのもナニである.ここでは,FreeBSD 7.1のインストールDVDに細工して,それでブートしてインストールすることとする.
 元ネタはftp://ftp.jp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/7.1/の7.1-RELEASE-i386-dvd1.iso.gz.これを適当なディレクトリに解凍してisoファイルを取り出す.
 そうしたら,次のようにしてisoイメージを展開.

> sudo mdconfig -a -f 7.1-RELEASE-i386-dvd1.iso
> sudo mount -t cd9660 /dev/md0 /mnt
> mkdir temp
> cd temp
> tar -C /mnt -cf - . | tar -xf -
> sudo umount /mnt
> sudo mdconfig -d -u 0

boot/loader.confの先頭にに次の記述を追加.
console="comconsole"

boot.configの先頭に次の記述を追加.
/boot/loader -h

ひょっとすると,これは冗長なやり方かもしれない.詳しくはFreeBSDハンドブックの該当部分を参照.
 出来上がったら,これらのファイルを再びまとめてisoイメージにする.手順は次のとおり.
> sudo rm -Rf rr_moved
> cd /usr/ports/sysutils/cdrtools
> sudo make install clean
さっきのiso imageを展開したディレクトリに戻る.
> sudo mkisofs -V FreeBSD7 -J -R -b boot/cdboot -no-emul-boot -o freebsd7.iso .

これで,展開したぐじゃぐじゃしたファイルの中にfreebsd7.isoというファイルができている.これをDVDに焼こう.
(参考)
ozakiさんのwiki
yebo blog

--- Terminal machineの準備
 シリアルを通してFreeBSDマシンを操作するためには手元のマシンの通信環境を整えなければならない.筆者は二通りやってみた.一つはWindows xpの入ったLibrettoにPuTTYを入れて.もう一つは,Ubuntu 8.10の入ったThinkPadのminicomを使ってやってみた.Windowsの方はUSB-serial変換ケーブルのドライバーが必要で秋月で買ったのについてきたものを使用した.COMポートの番号をデバイスマネージャーで確認する.後は,PuTTYでCOMポートの指定をすればOK(確か,通信速度は9600ボーがデフォルトで変える必要がない).Ubuntuの方は

$ sudo apt-get install minicom

でインストールして,
$ minicom -s

で,通信パラメータの設定をするのだが,変更するところはただ一ヶ所で”シリアルポート”の”速度”のところを9600にすればよい.

--- インストール
 以上の準備が整ったら,DVD-ROMを挿入して,パソコンとパソコンをケーブルでつなぎ,先に手元のコントロールするパソコンを立ち上げPuTTYだかminicomだかを立ち上げておく.次に,インストールされる側のパソコンをブートしよう.しばらくするとコンソールプログラムに表示が始まるはずだ.ただ,ブートの途中でターミナルタイプを選ぶ場面が訪れるが,PuTTYを使っている場合はxtermを(そうすると,sysinstallの画面がきちんとカラーになる),minicomの場合はvt100にしよう.あとは普通にインストールを進めればいいが,唯一気をつけなければならないのはnetwork configurationでSSH接続を有効にしておくことだ.すなわち,インストールの開始はserial consoleをつかって進められているが,インストールが終わって再ブートするとserial consoleは有効にならない.SSH接続だけが唯一の接続手段だ.

--- インストール後
 インストール後は,SSHでserial consoleの構築をすればいい(なるべく早くやる方がいい).FreeBSDハンドブックを見てもいいが,portsにsysutils/comconsoleというのがある(otsuneさんに教わった)これを入れれば煩雑な設定をしないでシリアルコンソールがばっちり組める.pkg-installってファイルに9600って書いてあったから,ここを増やしたら通信速度が早くなるかと思って変えてインストールしてみたが,結果はひどい目にあった.そういうことをするなら上のリンクをよく読むことみたい.
 これで気分はデータセンター.
−以上−

|

« Ububtu 8.04 (Hardy) から8.10 (Intrepid) にアップグレードしたところ,Sambaの中身がNautilusで見えない件 | Main | ETC車載器新規導入助成って言うけど,ETC車載器売り切れだよ.だから国土交通省に電話してみた. »

FreeBSD」カテゴリの記事

パソコン・インターネット」カテゴリの記事

Comments

Thsse are genuinely enormous ideas іn aboսt blogging. ϒou have touched ѕome fastidious pоints hеre. Anny wɑy keep up wrinting.

Posted by: Bleu Sapphire | June 01, 2014 at 01:14 PM

Wow, this paragraph is good, my sister is analyzing such things, thus I am going to let know her.

Posted by: windows 7 loader | June 06, 2014 at 07:57 AM

I am truly thankful to the holder of this website who has shared this wonderful paragraph at at this place.

Posted by: Kristie | June 16, 2014 at 04:51 AM

I read this post completely regarding the resemblance of hottest andd previous technologies, it's awesome article.

Posted by: seriale online gratis | June 25, 2014 at 02:33 AM

Helo there! Quick question that's entirely off topic. Do you know how to make your siite mobile friendly? My weblog looks weird when viewing from my iphone 4. I'm trying to find a template or plugin that might be able too correct this issue. If you have any suggestions, please share. With thanks!

Posted by: filme comedie | June 28, 2014 at 06:27 PM

Its like you read my mind! You appear to know so much about this, like you wrote the booik in it or something. I think that youu could do with some pihs to drive the message home a little bit, but insteqd oof that, this is magnificent blog. A great read. I will certainly be back.

Posted by: SOUL GUARDIANS AGE OF MIDGARD BEDRIEGEN | June 28, 2014 at 08:32 PM

Please let me know if you're looking for a article writer for your site. You have some really great posts and I think I would be a goo asset. If you ever want to take some oof the load off, I'd absolutely love to write some content for your blog in exchange for a link back to mine. Please blast me an email if interested. Kudos!

Posted by: Outernauts Monster Battle apk | June 30, 2014 at 04:50 AM

Hi there! I knnow this is kijda off topic but I was wondering whichh blog platform are you usimg for this site? I'm getting fed up of Wordpress bedcause I've had issues with hackers and I'm looking at alternatives for another platform. I would be fantastic if you couyld point me in the direction of a good platform.

Posted by: Lies of Astaroth hack descarga | June 30, 2014 at 05:41 AM

I am in fact thankful to the holder of this web page who has shared this impressive paragraph at here.

Posted by: SOUL GUARDIANS AGE OF MIDGARD DE LA TERRE DU MILIEU TRICHEURS IPAD | June 30, 2014 at 11:24 AM

I for all time emailed this web site post pahe to all my friends, as if like to read it aftefward myy links wiull too.

Posted by: army attack hack | June 30, 2014 at 12:36 PM

Its like you read my mind! You appear to knhow a lot about this, like you wrote the bbook in it or something. I think tthat you could do withh a few pics to drive the message home a little bit, but instead of that, this is fantastic blog. A fantastic read. I'll definitely be back.

Posted by: Airport City Cheat | July 01, 2014 at 02:42 AM

I'm amazed, I have to admit. Seldom do I encounter a blog that's both eqwually educative and amusing, and let me tell you, you've hit the nail on the head. The issue is something which too few men and women are speaking intelligently about. I'm very happy that I found this during my hunt for something concerning this.

Posted by: Zombie Road Trip Trials hack | July 01, 2014 at 03:18 AM

I read this post completely regarding the compaarison of newest and previous technologies, it's amazing article.

Posted by: CAMTASIA STUDIO 8 KEYGEN | July 01, 2014 at 06:33 AM

you are truly a good webmaster. The website loading pace is amazing. It seems that you are doing any unique trick. Also, The contents are masterwork. you've done a great procerss on thiss matter!

Posted by: soul guardians age of midgard cheat ios | July 01, 2014 at 11:16 AM

Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! However, how could we communicate?

Posted by: Army attack hack facebook | July 02, 2014 at 03:24 PM

Every weekend i used to go to see this web site, as i wish for enjoyment, for the reason that this this site conations genuinely good funny material too.

Posted by: victoria secrets uk | August 29, 2014 at 11:51 PM

I have read so many posts on the topic of the blogger lovers but this piece of writing is genuinely a nice post, keep it up.

Posted by: forge of empires hack romania | October 20, 2014 at 02:44 PM

Having read tjis I thought it was very enlightening. I apppreciate you finding the tome and energy to put this conttent together. I once again find myself spending a significant amount off time both reasding and commenting. But soo what, it was still worthwhile!

Posted by: Angelia | November 04, 2014 at 10:12 PM

"Raymond Fortun made a comment on twitter that I am a paid hack. Camping not only works to ruin the game overall, but also ruins the game for that player specifically by contributing to their own overall lack of skill. At that time the members of the camp escalated the situation.

Posted by: lies of astaroth hack attacks | November 22, 2014 at 09:40 PM

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why throw away your intelligence on just posting videos to your site when you could be giving us something informative to read?

Posted by: nike air max uk sale | December 03, 2014 at 07:49 PM

This Hay Day Hack is working on all iOS devices for Android and iPhone and also working on iPad.

Posted by: Hay Day Hack Resources Generator | December 05, 2014 at 06:05 PM

EA in the letter wrote: "the ultimate team mode of the structure of the design concept is to compete with other players. Of course, it is only four days to go before its first full game release. You won't find it here, neither in any other place.

Posted by: fifa 15 hack | December 23, 2014 at 08:59 AM

Stepped to the keel, it was measure of the solid nature of the boat. *When the original supercar idea was outlined a few years ago, a twin-turbo V-8 was the engine of choice. Get legit cd key for Warhammer 40K: Space Marine and Need for speed cd key at.

Posted by: NFS World hack Boost no download | December 24, 2014 at 09:19 AM

First of all I want to say wonderful blog! I had a quick question which I'd like to ask if you don't mind. I was interested to find out how you center yourself and clear your head before writing. I have had trouble clearing my mind in getting my ideas out there. I do enjoy writing however it just seems like the first 10 to 15 minutes are usually lost simply just trying to figure out how to begin. Any ideas or hints? Kudos!

Posted by: hay day hack | December 27, 2014 at 11:45 AM

You actually make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand. It seems too complex and extremely broad for me. I'm looking forward for your next post, I'll try to get the hang of it!

Posted by: clash of clans cheat without computer | December 28, 2014 at 12:05 PM

Thanks Apple!

Posted by: Free IMVU Credits Generator | January 06, 2015 at 02:47 PM

GT Racing two: The Accurate Car Know-how is a entirely free of charge-to-perform motor vehicle racing simulation game for Android, iPhone, iPad and iOS units.

Posted by: gt racing 2 Hack | January 09, 2015 at 01:27 PM

You have to find time in seconds and oil/metal amount in four byte when war commander is loading up and do it rapidalter the values to one hundred.

Posted by: war commander Cheats no download | January 10, 2015 at 08:17 PM

I always used to study article in news papers but now as I am a user of web thus from now I am using net for posts, thanks to web.

Posted by: Chang | January 19, 2015 at 06:03 AM

The attacker can use your MAC address and verification code to access your whatsapp account.

Posted by: whatsapphackenx.com | January 20, 2015 at 06:45 AM

Why users still make use of to read news papers when in this technological globe all is accessible on web?

Posted by: Blaine | January 21, 2015 at 07:25 AM

Pou is one of the most successful applications for Android on Google Play, which has been downloaded millions of times. The protagonist, Pou desires to be feed, place into bed, to wake up and perform educational games with him.

Posted by: pou hack android download without survey | January 24, 2015 at 10:18 AM

Marvel Avengers Alliance game hacking device is spam entirely cost-free. To Marvel Avengers Alliance Facebook Download Marvel Avengers Alliance Hack Tool by clicking the download button over. Download Marvel Avengers Alliance Hack Instrument Click here to download the Marvel Avengers Alliance Hack Tool !

Posted by: Marvel Avengers Alliance Cheats | February 04, 2015 at 03:20 AM

Additionally, your particular person execution of Large Fish On line casino Cheats may be extensively improved by applying our hack.

Posted by: big fish casino cheats | February 12, 2015 at 01:12 AM

Often the hack makes the Meez technique think you purchased coins when in reality, you haven't.

Posted by: meez hack no download or survey | February 21, 2015 at 01:17 AM

Inspiring quest there. What occurred after? Take care!

Posted by: ทัวร์ฮ่องกง | February 21, 2015 at 04:23 AM

Being a casino recreation, Large Fish On line casino heavily focuses on social elements because it wouldn't be enjoyable playing with solely you.

Posted by: big fish casino hack iphone no survey | March 11, 2015 at 12:41 PM

Hi there! This post couldn't be written any better! Reading through this post reminds me of my previous room mate! He always kept chatting about this. I will forward this article to him. Fairly certain he will have a good read. Thank you for sharing!

Posted by: binary options | May 13, 2015 at 01:14 PM

Cramp or 8 12 25 TCA solution one, had faith that stage makeup with nine months now shedding i've dropped it washed it sounded EXACTLY.

Posted by: WhatsApp hack | June 10, 2015 at 04:15 AM

The Crossy Road hack will let you know when it's complete.

Posted by: hay day hack no survey | June 13, 2015 at 11:08 AM

May be that's you!

Posted by: Marvel Future hacker without survey | July 04, 2015 at 08:02 PM

Boom Beach Hack Cheat Tool characteristics incorporate Unlimited Diamonds and Wood.

Posted by: Boom Beach Hack | July 05, 2015 at 10:44 AM

There are plenty of users who complained of having downloaded fake Whatsapp message trackers that contain spyware, adware and other malicious programs.

Posted by: whatsapp hack spy tool download | July 08, 2015 at 05:01 AM

The most current released version of Boom Beach Hack has become availabe for public download and use after its extensive.

Posted by: boom beach unlimited diamonds cydia | July 26, 2015 at 10:37 AM

Very nice post. I just stumbled upon your weblog and wished to say that I have really enjoyed browsing your blog posts. After all I will be subscribing to your rss feed and I hope you write again soon!

Posted by: FORT LAUDERDALE | September 19, 2015 at 12:42 PM

You couldn't get these kind of coin making cheats anywhere else.

Posted by: Fifa 16 Ultimate Team cheats for ios | September 27, 2015 at 03:07 AM

I am sure this paragraph has touched all the internet users, its really really fastidious paragraph on building up new webpage.

Posted by: Frank | February 13, 2016 at 09:15 AM

Post a comment



(Not displayed with comment.)




TrackBack

TrackBack URL for this entry:
http://app.cocolog-nifty.com/t/trackback/37290/43865760

Listed below are links to weblogs that reference シリアル接続を受け付けるヘッドレスFreeBSDシステムの構築:

« Ububtu 8.04 (Hardy) から8.10 (Intrepid) にアップグレードしたところ,Sambaの中身がNautilusで見えない件 | Main | ETC車載器新規導入助成って言うけど,ETC車載器売り切れだよ.だから国土交通省に電話してみた. »