6/06/2011

玄箱Proにdebian 6.0.1 (Squeeze)をインストール

技術的に仕事に役に立たないと思いつつ。覚え書き。

http://taidyff.seesaa.net/article/159144003.html
http://www.cyrius.com/debian/orion/buffalo/kuroboxpro/install.html

シリアルコンソールで接続。(telnetとかで接続できるかも。)

玄箱PROを起動して、
<>
Hit any key to stop autoboot:3
のカウントが0になる前にキーを押して中断。

Marvell>のプロンプトが出るので以下のコマンドを順に入れる。
長いけど1行ずつコピーしてTeraTermで右クリックで貼り付ければ簡単確実。

setenv bootargs_root root=/dev/mtdblock2 rw panic=5
setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver)
setenv bootcmd 'nboot $(default_kernel_addr) 0 $(nand_uImage_offset) ;setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver); bootm $(default_kernel_addr)'
setenv nand_boot yes
boot
これで玄箱PROのオリジナルファームで起動する。

root(デフォルトパスワードはkuroadmin)でログインする。

IPアドレスを確認する。
/etc/resolv.confを確認する。
nameserver ネームサーバーアドレス

/etc/nsswitch.confを確認する。
デフォルトはhostsのみを参照する設定。
hosts: files
これを
hosts: files dns
に書き換えておく。

rdate -s pool.ntp.org
hwclock -w

この時点で適当なアドレス(www.yahoo.co.jpでもなんでもいい)にpingを打てば返ってくるはず。
ここで名前解決できない、もしくはunreachableやtimeoutになるならおそらくどこかが足りないか間違っていて、インストール中にハマることになる…ので解決してから先に進むこと。


あとはこちらのサイトの通りにやればOK
fdisk /dev/sda
で、とりあえず1個パーティションを用意する。256MB
既にある場合は敢えて削除しなくてもOK
mkfs.ext2 /dev/sda1
でフォーマットし、
mount -t ext2 /dev/sda1 /mnt/disk1
cd /mnt/disk1
としてマウント~ディレクトリ移動する。

wget http://ftp.jp.debian.org/debian/dists/stable/main/installer-armel/current/images/orion5x/network-console/buffalo/kuroboxpro/config-debian
wget http://ftp.jp.debian.org/debian/dists/stable/main/installer-armel/current/images/orion5x/network-console/buffalo/kuroboxpro/initrd.buffalo
wget http://ftp.jp.debian.org/debian/dists/stable/main/installer-armel/current/images/orion5x/network-console/buffalo/kuroboxpro/uImage.buffalo

としてインストーラ一式をダウンロードする。

sh config-debian
とすると初期化が行われ、再起動するように求められる。
再起動して、5分くらいたった後、コンソールにsshでつなげというメッセージが表示される。
syslogからインストーラーまでの表示は本当に時間がかかる。


TeraTermを起動してsshで接続。
id:installer password:installとしてログインするとインストーラが走る。


パーティションの選択ではGuided - use entire diskでOK(どれでもいい)
構成はSeparate /home, /user,...にしたけどこれもなんでもいい。
追加機能もお好きに。とりあえず今回はどれもいらないので基本システムのみ入れておしまい。

# aptitude install vim lv sysstat ntp byobu ethtool
# dpkg-reconfigure locales
en_us.utf-8とja_jp.utf-8を指定
# vi /etc/default/sysstat
ENABLED="true"

失敗したら、あるいは、再インストールは、もう一度最初から行う。

ログインをしたら、ネットワークの設定を行う。
vi /etc/network/interfaces

iface eth0 inet static
address 192.168.10.10
network 192.168.10.0
netmask 255.255.255.0
broadcast 192.168.10.255
gateway 192.168.10.1

ホスト名の変更
vi /etc/hostname
vi /etc/hosts
再起動後にping `hostname`でちゃんとpingが返ってくる事を確認のこと。

fw_printenvのインストール
aptitude install uboot-envtools
cp /usr/share/doc/uboot-envtools/examples/kurobox_pro.config /etc/fw_env.config

vi /etc/micro_evtd/micro_evtd.conf
設定を適宜行う。


その他やった作業
echo "cgroup /cgroup cgroup defaults 0 0" >>/etc/fstab

groupadd wheel
自ユーザにwheelを追加
vi /etc/groups

vi /etc/pam.d/su
## The PAM configuration file for the Shadow `su' service
#

# This allows root to su without passwords (normal operation)
auth       sufficient pam_rootok.so

# Uncomment this to force users to be a member of group root
# before they can use `su'. You can also add "group=foo"
# to the end of this line if you want to use a group other
# than the default "root" (but this may have side effect of
# denying "root" user, unless she's a member of "foo" or explicitly
# permitted earlier by e.g. "sufficient pam_rootok.so").
# (Replaces the `SU_WHEEL_ONLY' option from login.defs)
# auth       required   pam_wheel.so

# Uncomment this if you want wheel members to be able to
# su without a password.
auth       sufficient pam_wheel.so trust


vi /etc/profile.d/local.sh
#
# local environment
#

VISUAL=vi
EDITOR=vi
PAGER=vi

export VISUAL EDITOR PAGER
 

0 件のコメント: