玄箱HG +uboot + lenny化メモ
uboot環境でdisk飛ばしちゃった人向け(私ですが)に
まとめてみる。
- 前提
- uboot導入済みkurobox-HG
- 未フォーマットHDD接続済み
- DHCPサーバ(ブロードバンドルータについてる奴でok)
- (なくてもよい)serialかncできる端末(ipは192.168.11.149にしておく)
lennyのイメージはubootだとうまくいかなかったので
etchのイメージを持ってきて、dist-upgradeするっ
前準備
ファイルダウンロードする
http://lifescape.seesaa.net/article/96280538.html
- kernel/module/loader.o
- modules-2.6.25.1-kuroHG.tgz
- kernelimage-2.6.25.1-kuroHG.tgz
- loader.o
nc端末とkuroboxをHUBにつなげてncしとく。緊急時用。うまくいったら閉じてok
nc -v -v -n -u -s 192.168.11.149 -p 6666 192.168.11.150 6666
真っ新のHDDつなげると勝手にEMモードで上がってくるのでtelnet する。ipはping打っとけば分かる。
ping -b 192.168.0.255
- disk初期化コマンド
/sbin/mkfilesystem.sh
scriptのmfdiskのオプションを以下に変更すると/の領域を5GBとってくれる。
viで直しちゃっていいと思う。ramに展開されてるんでflashには影響なし。
#hda1を5GB,hda2をswap256MB,のこりhda3
/sbin/mfdisk -g 50 /dev/hda
初期化コマンドでmountまでしてくれる
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/ram0 9677 5122 4555 53% /
/dev/hda3 71504536 32832 71471704 0% /mnt2
/dev/hda1 5154852 243572 4649424 5% /mnt
- FTPで接続する
次のファイルを/mnt2に転送する
展開する
cd /mnt
tar xzf /mnt2/debian-etch-2.6.25-kuroBOX-DHCP-20080509.tgz
cd /mnt/lib/modules
tar xvzf /mnt2/modules-2.6.25.1-kuroHG.tgz
cd /mnt/boot
tar xvzf /mnt2/kernelimage-2.6.25.1-kuroHG.tgz
ln -s uImage vmlinux.UBoot
cp /mnt2/loader.o ./write_ok
必要に応じてnetworkまわりを設定しておく
vi /mnt/etc/network/interfaces
特にresolv.confは192.168.24.1に向いてるので、直しとく。後でもよいけど
vi /mnt/etc/resolv.conf
うまく上がってこなかったら電源ブチギリしてncからEMモードで起動、やりなおす。
とここまでがetch化
deb http://archive.debian.org/debian/ etch main contrib
apt-get install apt-spy wget
sudo apt-spy -s jp -d stablewget http://ftp-master.debian.org/archive-key-4.0.asc -O - | apt-key add -
(Reading database ... 10860 files and directories currently installed.)
Preparing to replace initscripts 2.86.ds1-38 (using .../initscripts_2.86.ds1-61_powerpc.deb) ...
Removing unmodified and obsolete conffile /etc/init.d/bootclean ...
Unpacking replacement initscripts ...
Setting up initscripts (2.86.ds1-61) ...
Installing new version of config file /etc/init.d/bootlogd ...
Installing new version of config file /etc/init.d/stop-bootlogd ...
Installing new version of config file /etc/init.d/stop-bootlogd-single ...
Installing new version of config file /etc/init.d/bootmisc.sh ...
Installing new version of config file /etc/init.d/checkfs.sh ...
Installing new version of config file /etc/init.d/checkroot.sh ...Configuration file `/etc/init.d/halt'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : background this process to examine the situation
The default action is to keep your current version.halt (Y/I/N/O/D/Z) [default=N] ?
Installing new version of config file /etc/init.d/killprocs ...
Installing new version of config file /etc/init.d/mountall.sh ...
Installing new version of config file /etc/init.d/mountall-bootclean.sh ...
Installing new version of config file /etc/init.d/mountnfs.sh ...
Installing new version of config file /etc/init.d/mountnfs-bootclean.sh ...
Installing new version of config file /etc/init.d/mountdevsubfs.sh ...
Installing new version of config file /etc/init.d/mountkernfs.sh ...
Installing new version of config file /etc/init.d/rc.local ...Configuration file `/etc/init.d/reboot'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : background this process to examine the situation
The default action is to keep your current version.reboot (Y/I/N/O/D/Z) [default=N] ?
Installing new version of config file /etc/init.d/rmnologin ...
Installing new version of config file /etc/init.d/sendsigs ...
Installing new version of config file /etc/init.d/single ...
Installing new version of config file /etc/init.d/umountnfs.sh ...
Installing new version of config file /etc/init.d/umountroot ...
Installing new version of config file /etc/network/if-up.d/mountnfs ...