SSDに換装したWindows7 AHCI モードでクラッシュ

一世代前のノートブックパソコン、まだまだ使えるのだが、動作がやや緩慢、そこで最近ぐっと購入しやすい値段になってきたSSDに換装してみた。 使ったのは250GBのSamsung840EVo。
Windows用のマイグレーションソフトウエアが付属してくるのでUSBを通してSATAに接続できるケースさえ手元にあればディスクイメージのコピーは問題なくできる。 あとはパソコンの裏ケースをはずし、HDDを取り出して、SSDを組み付けるだけ。ただし、Dual Bootで入れておいたMint Linuxはきれいに無視されるので、バックアップとリストアをしっかりおこなっておいて、再導入する必要があった。またWindowsのリカバリーパティションも複製されないようなので、リカバリーディスクを作成しておく必要がありそうだ。
Windows7の起動とアプリケーションの起動が圧倒的に早くなった。 めでたしめでたし、と思ったが、付属のSamsung Magicianという管理ツールを使ってみると、AHCIモードが無効になっているので、最適状態ではない、というようなメッセージが出ている。
AHCIというのはディスクの管理モードのようで、BIOS画面を見るとHDDのアクセス方法の選択肢の一つになっていた。 このパソコンの規定値はIDEアクセスモードになっており、これをAHCIに変えてやればよいと思ったのだが、設定を切り替えて作動させてみるとWindowsが起動途中でクラッシュする。いわゆるBSOD(Blue Screen of Death=青いエラー画面)が出てその内容を読む暇もなくリセットがかかる。

しょうがないので、Bios設定を元にもどし、再起動。 Google検索で”BSOD Windows 7 AHCI SSD”のキーワードで検索したら、 以下の記事を発見。なんと4ねんん以上も前に書かれている。こういうEarly Adapterがいてくれるおかげで後からついていく我々はネット検索するだけで問題解決ができてしまう。

HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlset / Services /msahci
このレジストリの値を0に変更(自分の場合は3になっていた)してWindowsを終了し起動の途中でF2キー(Deleteキーの場合もある)を押してBios画面を呼び出して AHCIに設定しWindows7を起動すると今度はクラッシュすることなく必要なドライバーを導入した後、再起動を促されるのでもう一度リブートして解決。

End of life for my WRT54G

Last week, I had a strange phenomena. my home web server was not accessible.

I looked at all kinds of setting I had configured with my home network for the last few years. Local DNS, squid/reverse proxy setup, IIS web server set up (I run my website on Windows 7 PC) and ddns setup. Although nothing was supposed to have changed, I looked at them again and made sure everything is what it supposed to be.

I finally turned my eyes on my trusty router. Linksys WRT54G was servicing me well, for almost 10 years (mine is WRT54G V2.2.)

I looked at port forward option. the port 80 is forwarded to 192.168.1.99. This is a linux based NAS that also runs squid in reverse proxy mode, but for some reason, the traffic appears to be reaching 192.168.1.98, another linux based NAS.
I re-saved the setting and voila! for a while, the web site was accessible. Then after one hour or so, connection was again lost.

I did a factory reset and then updated the firmware. These did not improve the situation. I concluded that the router can no longer retain the port forward information. Maybe one bit of memory chip got bad. Hard to tell. I bit a bullet and bought an N-band router. although a little pricey compared to D-link and/or Netgear, I decided to stick with Cisco/Linksys brand.

After initial setup, everything was back to normal. So here they are, it was indeed my router.

Hopefully my new router can serve me another 10 years. That’s why I paid extra for gigabit ports with this router. Looking at this router, the most striking is a small size of a power brick that comes with it, compared to the power brick from 10 years ago. This is where I see the advancement of technology.

ModX Revolution2.2 とIIS の相性

modXの2.2 がリリースされてから2ヶ月ほど経ったが、今回自宅のサーバーに導入してみた。 ホストサービスのほうで運用しているサーバーはApache なのだが、自宅はWindowsに実装したIIS7だ。

で、インストールしてマネージャ画面に行ってみたら、なんとリソースツリーがない。メニューとお知らせは表示されるのだが メニューをクリックしても空白の画面が出てくるばかり。 ログアウトもできない。

インストールを繰り替えしてみたり色々やってみたが拉致あかず

サポートフォーラムに行って2.2のエントリーを眺めてみると、結構類似の問題が発生している模様、 その中で

「どういう訳か、IISではJS とCSSを圧縮するとうまく行かない」という記述があり、対策としてはPHPMyadminなどで直接mysqlデータにアクセスし、System settingの当該項目を圧縮あり(1)からなし(0)に変更すればよい、との書き込みを見つけた。

もっとはやく言ってよ。

早速SQLBUDDYでデータ内容を書き換えて解決。

 

Comcast blocked my port 25

About a week ago, my PC’s mail client (Thunderbird) started to complain that it can not login to mail.comcast.net and i could not send any email.

It continued to do so for about a couple of days. my wife’s PC was in the same condition.

When I logged into Comcast web mail, an e-mail from Comcast was waiting. It basically told me that due to suspicious activity, they blocked my port 25 to protect me being from a victim of security attack.

It also tells me how to setup a client to listen to another port.  So I went ahead and setup my client to use another port.  That was an end of the story for Comcast mails. (outgoing port 25)

However, I also have hMail server running for my own domain in my home server. the mail server receives emails via port 25 (incoming) this was also blocked, so I was not receiving any mails.

The my domain is served by TZO DDNS service.  they also offer the service called Store and forward.  The service can be a proxy receiver for mails sent to my domain, then it will forward them to my PC via port of your choice.  SO I had to buy this service and configured the service to use another port (in my case 8025) to forward emails to my domain.   In the htserver admin panel, I added smtp port 8025 so that the server can listen to the port.

 

Now the home mail server started to receive mails again.

I hope Comcast eventually removes this block after a while so that I can revert back to normal setting and unsubscribe from this Store and Forward service.

running hmailserver inside comcast.net, relaying to smtp.comcast.net

Ok,

Ingredient:

Home computer “A”  working as a server

linksys router that comes with ddns setup firmware for tzo.com

htmailserver running on the home computer “A”.

port forward set up for the linksys router port 25 (for smtp) and port 143 (for imap), pointing to computer “A”‘s ip address.

set up the linksys router with Tzo.com (or dyndns.com) so that “mydomain.linksysnet.com” is now recognized from the outside world, pointing to computer “A”

Using htmailserver administrator, configure imap account.  this is straightforward. For the sake of clarity, let’s say I have created “mydomain.linksysnet.com” domain in the administrator program, then I add an account “john@mydomain.linksysnet.com” I also set up a password for this account, lets say “*htpassword*” is my password

‘attach’ existing external e-mail accounts to the “john@mydomain.linksysnet.com.”  In that way, all my e-mail accounts will be collected by this imap server.

receiving mail part is done.  this was straight forward.

The reason for this post is to document what had been done for email sending part.  this turns out to be a trciky part. There are a lot of posts about comcast smtp server relaying for hmailserver.   To make a long story short, the relaying of mail to smtp.comcast.net does work. here is how.

htmailserver side  : Settings->Prootcol->SMTP in “Delivery of e-mail” tab,

localhost name =”smtp.mydomain.linksysnet.com”

SMTP relayer : Remote Host name =”smtp.comcast.net”  Remote TCP/IP port =”25″

Server Requires Authentification=”Checked”  Username : your comcast mail address, ie “johnsmith@comcast.net” (Since you are a comcast customer, you do have one, don’t you?)

Password=password for johnsmith@comcast.net”

Use SSL =Unchecked

That’s all for htMailserver side.

Now I want to use my e-mail client (such as Thunderbird) to connect to htmailserver from other computer “B”. Since I setup the imap server, all  emails will be stored in the server (computer A) and not in the local folder (of computer B).  This is good because I wanted to access mails from multiple PCs.

Assuming Thunderbird as mail client,

mail protocol is imap.  server name for recieving mail is imap.mydomain.linksysnet.com.  Port is 143. Thunderbird should automatically configre this for you, if the hmailserver is properly set up and running (amazing)

For e-mail sender, the servername is smtp.myname.linksysnet.com.   you use plain password to send an email and the username is “john@mydomain.linksysnet.com”, password you are going to use is “*htpassword*”  and port you are going to use is 25

That’s all there is to it.  with this setup, I can send e-mail from ‘john@mydomain.linksysnet.com” to any e-mail addresses.

Its thrilling to see my email is now sent from “john@mydomain.linksysnet.com” rather than “johnsmith@comcast.net” tzo let you use your own domain name rather than linksysnet.com subdomain (for fee) so it is possible to have e-mail address such as john@smiths.info.

 

Remote Desktop あれこれ

先週、うちの地下室のPCをWindows 7のHomeからプロフェッショナルにアップグレードした。

自分でデザインしたWEBPageを見るために同じパソコン上IE6,IE7などをバーチャルPCとXPモードの組み合わせで走らせられるようにしたかったのが動機だが、このXPモード云々はリモートモードで動いてる。 でSide benefitでリモートアクセスが他のコンピューターからもできるようになった。

このコンピューターからー>このコンピューターを操作するのに必要なツールというのは

Windows 7 homeで走っている書斎のPC -> Windows Professional の地下室のPC: Remote Desktop Connection でOK

Ubuntu Desktop で走っているノートブックパソコン->地下室のPC:  TS Clientという標準プログラムで接続OK

で、興味がわいてやってみたら、

Windows Home -> Ubuntu Desktop  ‘は Windwos7側にTight VNC (Viewer のみ)というフリーソフトをインストールしてOK

ここまではローカルネットワーク内部での話し。

外からアクセスできないかと思って調べていたら、今使っているリンクシスのラウターがDDNSという機能をサポートしているのにルータを買ってから3年目にして気が付いた。 TZOというプロバイダーを通して設定し、 ターゲットコンピューターのIPアドレスをポートフォワードしてすることによって、外部からドメインネームの指定で自分の家のパソコンにたどり着ける。上のリモートデスクトップ機能と組み合わせると外部からのデスクトップへのリモートアクセスが可能になる。 つまり、地下のパソコンに外部からの接続が可能。

と、ここまでは楽しくできたのだが、 会社のオフィスのパソコンからはこの方法が使えない。 会社の マイクロソフトファアフロントというセキュリティソフトがポートをブロックしているために接続が不可能になっているのだ。

で、あらためてネットを見直してみると、リモートアクセス用のプログラムというのが実は色々あるのに気が付いた。

logmein というツールがすぐれものだ、と聞いたが、試してみると、やはり会社のファイアウオールでポート接続が、はねられる。

この中でTeamViewerというプログラムはincoming ports を使用しない、というオプションがあり、office側のクライエントでこれを使うとファイアウオールを超えて通信が可能になった。

自宅のPCにTeamViewer のサーバー設定を前もっておこなっておき、 オフィスのPCからはTeamViewerのクライエントを使うか、ブラウザでTeamViewerのサイトにアクセスし、ここからログインすることによって、自宅のPCの画面を見ることができる。  私用に使うなら無料、というのがうれしい。

ま、繋がったから何か悪いことをやってやろうとか、そういうことではないのですが。TeamViewer は知識としてしまっておくくらいにしておいて、 役にたつかなあ、と思うのはDDNSを使った外部からのコンピューターアクセス。 Web Cam とリモートデスクトップを組み合わせれば旅行先から自分の家の中をモニターする、なんてことができそうだ。 このDDNSサービス、最初の30日は無料だが、あとは有料。 値段はmyname.linksysnet.comというdomain name なら年間25ドル。 自分のドメインを使いたければ50ドルだ。 PCにアパッチやIISなどのサーバー設定をしておけば、自宅でWeb Site のホストができるようになる。 プロバイダーのTZOも簡単に設定できるサーバーソフトを提供しているようだ。

http://myname.linksysnet.com で自宅のPC上で運営するWeb siteにアクセスし、 リモートデスクトップで接続先をmyname.linksys.net と入力すると自宅のPCのデスクトップを使える、という感じか。

Windows Share をLinux (ubuntu)側から(常時)みれらるようにする方法

Windows Share をLinux (ubuntu)側から(常時)みれらるようにする方法

Windows側からLinux Server 側のファイルを見る方法、というのはいくらでも方法が書いてあるのだが、その逆をやろうとするとあまり無い、いや、あるのだけれど、あっちに少し、こっちに少し。
というわけで。
Ubuntu Wikiに書いてあったのでそれをもとにやってみた。 ターゲットはUbuntu 10.4

Windows のファイルシステムを読み書きするためのsmbfsは導入済みと思ったが念のために

$ sudo apt-get install smbfs

案の定、何もアップデートされなかった。

次に、etc/hosts に以下の 一行を追加

192.168.1.99 mybooklive

セールのときにうっかり購入してしまった、1テラバイトのネットワークHDを前もって固定アドレスで設定済み

ローカルファイルシステムに取り込むために /media にフォルダーを追加

$ sudo mkdir /media/Public

Public Share は パスワードがついてない。 誰でもアクセスできる

etc/fstab ファイルに以下を追加

//mybooklive/Public /media/Public cifs guest,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0

で、ファイルシステムをマウントしなおす。

$ sudo mount -a

これで/media/Public 経由で 1テラバイトがアクセスできるようになった。

ちなみにパスワードが必要な場合のアクセスは

//servername/sharename /media/mountname cifs username=myusername,password=mypassword 0 0

とすれば、よいのだが etc/fstab は誰でも読めてしまう、ということで、 別ファイルを参照する方法が推奨されている

//servername/sharename /media/mountname cifs exec,credentials=/etc/cifspw 0 0

これで password file cifspw を作るわけだが、中身は
userid=ここにログインネーム
password=ここにパスワード

だけを記入しておく

ファイルをのぞき見されないようにプロテクト

$ sudo chmod 600 /etc/cifspw

やっぱり最後は

$sudo mount -a