とらりもんHOME  Index  Search  Changes  Login

OpenMicroserver

資料

シリアルコンソール: minicom

  • 参考
  • 注: baudrateが合ってないと文字化けする。115200にすべし。

Debianをアップグレードする

  • 背景
    • メーカー(ぷらっとホーム)はlenny (ver 5)までしかdebianのイメージを提供していない。
    • lennyはサポート終了。セキュリティホール放置状態。
    • squeeze (ver 6)にバージョンアップすれば延命できる。
  • 準備: OSMのファームウェア(SSD Linux)のカーネルをバージョンアップする。参考
    • http://www.tonaru.net/download/zImage.initrd.treeboot-productをダウンロードし, CFカードに入れる。
    • OMSをinitモードで起動(initボタンを押しながら電源を差す)。シリアルコンソールでデスクトップPCにつなぐ。
    • シリアルコンソールを介して, login: root password: rootでOSMにログイン。
    • さっきのCFカードをマウント。/root/mntにマウントしたとする。
    • flashcfg -f /root/mnt/zImage.initrd.treeboot-product
    • ↑数分間かかる。
    • OMSを再起動(再びinitモードで)
    • uname -rvで2.6.26 #2となっていることを確認。
  • 本番: 参考
    • /etc/apt/sources.listの内容に以下に刷新。
deb http://ftp.jp.debian.org/debian squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
# ↑ securityをsequrityと書かないように注意! 上記ウェブサイトはそのミスをしている。
    • その後,
    • sudo apt-get update
    • sudo apt-get upgrade
    • sudo apt-get install linux-image-2.6-4kc-malta
    • sudo apt-get install udev
    • sudo reboot
    • sudo apt-get update
    • sudo apt-get dist-upgrade
    • mknod /lib/udev/devices/segled c 10 171
  • upgradeの途中で↓こんなエラーが出たが... (2014/09/27)
 ��������������������������Ĵ Configuring mailman ��������������������������Ŀ    
�                                                                           �  
� The directory /var/lib/mailman/qfiles contains files. It needs to be         
� empty for the upgrade to work properly. You can try to handle them by:       
�  - Stop new messages from coming in (at the MTA level).                   �  
�  - Start a mailman queue runner: /etc/init.d/mailman start                �  
�  - Let it run until all messages are handled.                             �  
�    If they don't all get handled in a timely manner, look at the logs     �  
�    to try to understand why and solve the cause.                          �  
�  - Stop it: /etc/init.d/mailman stop                                      �  
�  - Retry the upgrade.                                                     �  
�  - Let messages come in again.                                            �  
� You can also decide to simply remove the files, which will make Mailman   �  
� forget about (and lose) the corresponding emails.                         �  
�                                                                           �  
� If these files correspond to shunted messages, you have to either delete  �  
� them or unshunt them (with /var/lib/mailman/bin/unshunt). Shunted            
�                                                                              
&#65533;                                  <Ok>                                        
&#65533;                                                                           &#65533;  
&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;   
Package configuration
&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#308; Configuring sysv-rc &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#319;
&#65533;                                                                           &#65533;
&#65533; Unable to migrate to dependency-based boot system                         &#65533;
&#65533;                                                                           &#65533;
&#65533; Tests have determined that problems in the boot system exist which        &#65533;
&#65533; prevent migration to dependency-based boot sequencing:                    &#65533;
&#65533;                                                                           &#65533;
&#65533; insserv: script pshd: service skeleton already provided!,                 &#65533;
&#65533;                                                                           &#65533;
&#65533; If the reported problem is a local modification, it needs to be fixed     &#65533;
&#65533; manually. If it's a bug in the package, it should be reported to the BTS  &#65533;
&#65533; and fixed in the package. See                                             &#65533;
&#65533; http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for more        &#65533;
&#65533; information about how to fix the problems preventing migration.           &#65533;
&#65533;                                                                           &#65533;
&#65533; To reattempt the migration process after the problems have been fixed,    &#65533;
&#65533; run "dpkg-reconfigure sysv-rc".                                           &#65533;
&#65533;                                                                           &#65533;
&#65533;                                  <Ok>                                     &#65533;
&#65533;                                                                           &#65533;
&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;

その他: http://slashdot.jp/journal/546607/OpenMicroServer---upgrade-lenny-to-squeeze

クロス開発環境

  • VMware を Ubuntu にインストールする
    • VMware-Player-6.0.3-1895310.x86_64.bundleをダウンロード。
    • 登録不要。
    • ダウンロードしたら, sudo sh VMware-Player-6.0.3-1895310.x86_64.bundleとする。インストーラが起動。シリアル番号入力はスキップ。
    • GNOMEパネルメニューの「システム管理」の中にVMware playerがある。そこを選べば起動する。

メモ

  • CFカードをそのまま別のCFカードにコピー(cpコマンドで)すれば, 起動イメージも含めて全て複製できる。(ただし, 複製先のCFカードには, パーティションは1つで, ext2ファイルシステムでフォーマットしておくこと)

以下は旧コンテンツ

2011/07/22 奈佐原

Ubuntu等のLinux端末からOpen Microserverのシリアルコンソールを使うには: $ screen /dev/ttyUSB0 115200,cs8,-ixon,-ixoff,-istrip

$ screen /dev/ttyUSB0 115200 だけでいいかも。

Debianをインストール

  • OMSのふたを開ける。
  • OMSにCFを挿入。
  • OMSをLinuxパソコンに接続(シリアルコンソール)
  • Linuxパソコンで,
    • $ screen /dev/ttyUSB0 115200
  • INITボタンを押しながらOMSに電源投入(電源ケーブルを差す)。
  • OMSをLANに接続(ETH0ポート使用)。
  • OMSのLAN
  • # dhclient eth0
  • # ftp ftp.plathome.co.jp
  • ftp> cd pub/OMS400/misc/debian/
  • ftp> binary
  • ftp> get lenny-mipsel-oms-20090424-0.tar.gz
  • ftp> quit
  • # tar zxpf lenny-mipsel-oms-20090424-0.tar.gz
  • # ftp ftp.plathome.co.jp
  • ftp> cd pub/OMS400/0.4-RELEASE-20110530/mipsel-oms400/binary/
  • ftp> binary
  • ftp> get kern.tgz
  • ftp> quit
  • # tar zxpf kern.tgz
  • # cd lib/modules/
  • # find ./ -name "*.gz" | xargs gzip -d
  • # depmod -ae -b /mnt -F /mnt/System.map 2.6.16
  • # vi /mnt/etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/hda1       /       ext3    defaults        1       1
#/dev/sda2      swap    swap    defaults        0       0
proc            /proc   proc    defaults        0       0
  • # reboot

debianが立ち上がる。login/passはroot/root

  • # apt-get update
  • # apt-get upgrade
  • # apt-get install postfix
  • # apt-get install mailman
  • # newlist mailman
  • # apt-get install openssh-server
  • # apt-get install ruby

ウェブサーバー(apache2)の設定

apache2でuserのpublic_htmlを使えるようにする:

  • # a2enmod
  • userdir
  • # /etc/init.d/apache2 restart

hikiでinternal server errorが出る:

  • vi /etc/apache2/mods-enabled/userdir.conf
  • AllowOverride All

自動的な時計合わせ

  • sudo apt-get install ntpdate
  • sudo crontab -e
# m h  dom mon dow   command
2 1,6,10,13,18,21   *  *  *  /usr/sbin/ntpdate 130.158.64.180

Vine Linuxで, IPアドレスとGWを設定。

  • sudo vi /etc/sysconfig/network
  • sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0

/var/mailに溜まってたら消す。

Last modified:2015/02/10 15:51:11
Keyword(s):
References:[とらりもんHOME]