coLinux 0.6.2 + Debian 3.1(sarge) インストールめも

ネットワーク設定

TAP (ネットワーク接続の共有)
ネットワーク接続のプロパティ
TAPのプロパティ

Debian 3.1(sarge) ISOイメージのダウンロード

ここから debian-31r0a-i386-businesscard.iso をダウンロード。
isoから Daemon-Tools などを用いて \install\initrd.gz を取り出し、解凍したものを initrd_iso とリネーム。

HDDイメージのダウンロード

Gniarfさんのfsサイトおよびswapサイトから 必要とするサイズの圧縮イメージファイルをダウンロード。
解凍したものをそれぞれ以下のようにリネーム。
  fs_*Mb -> root_fs
  swap_*Mb -> swap_fs

Debian のインストール

インストール用 設定ファイルの例 (iso_install.xml)
<?xml version="1.0" encoding="UTF-8"?>
<colinux>
    <block_device index="0" path="\DosDevices\D:\coLinux\root_fs" enabled="true" />
    <block_device index="1" path="\DosDevices\D:\coLinux\swap_fs" enabled="true" />
    <block_device index="2" path="\DosDevices\D:\coLinux\install\debian-31r0a-i386-businesscard.iso" enabled="true" />
    <block_device index="3" path="\DosDevices\D:\coLinux\install\initrd_iso" enabled="true" />

    <bootparams>root=/dev/cobd3</bootparams>

    <initrd path="D:\coLinux\install\initrd_iso" />
    
    <image path="C:\Program Files\coLinux\vmlinux" />
    <memory size="128" />
    <network index="0" type="tap" />
</colinux>
"C:\Program Files\coLinux\colinux-daemon.exe" -t nt -c D:\coLinux\iso_install.xml
で coLinux を起動すると Debian-Installer が立ち上がる。
インストール設定
IPアドレスはDHCPで割り当てずに手動で設定。 Partition disks のところでエラーになるので、ALT-F2でシェルに入って以下のコマンドを実行。
mke2fs -j /dev/cobd/0
mkdir /target
mount /dev/cobd/0 /target/
mkswap /dev/cobd/1
swapon /dev/cobd/1
mkdir -p /target/dev/cobd; for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do mknod /target/dev/cobd/$i b 117 $i; done
mkdir /target/etc
echo "/dev/cobd/0 / ext3 defaults 1 1" >> /target/etc/fstab
echo "/dev/cobd/1 swap swap defaults 0 0" >> /target/etc/fstab
cd /target/
その後、ALT-F1で戻って Continue -> Install the base system

GRUBのインストールになったら Go back -> Abort the installation でインストール完了。
インストール後の問題点
このままだと正常に動かないので、もう一度 iso_install.xml で coLinux を起動し、シェルに入って以下のコマンドを実行。
mkdir /target
mount /dev/cobd/0 /target/
cd /target/
mv sbin/start-stop-daemon.REAL sbin/start-stop-daemon

Debian 起動用 設定ファイルの例

<?xml version="1.0" encoding="UTF-8"?>
<colinux>
    <block_device index="0" path="\DosDevices\D:\coLinux\root_fs" enabled="true" />
    <block_device index="1" path="\DosDevices\D:\coLinux\swap_fs" enabled="true" />

    <!-- This is an experimental feature, it may not function completely.
    <cofs_device index="0" path="\DosDevices\C:\Program Files\coLinux" type=flat enabled="true" />
    -->

    <bootparams>root=/dev/cobd0</bootparams>

    <initrd path="C:\Program Files\coLinux\initrd.gz" />

    <image path="C:\Program Files\coLinux\vmlinux" />
    <memory size="128" />
    <network index="0" type="tap" />
</colinux>

その他

/etc/apt/sources.list
deb http://www.t.ring.gr.jp/pub/linux/debian/debian sarge main contrib non-free
deb http://www.t.ring.gr.jp/pub/linux/debian/debian-jp sarge-jp main contrib non-free
deb http://security.debian.org/ sarge/updates main contrib non-free
/etc/ssh/sshd_conf
PermitRootLogin no
PasswordAuthentication yes
/etc/samba/smb.conf
[global]
## for japanese
   dos charset = cp932
   display charset = cp932
   unix charset = eucjp-ms
/etc/init.d/xdm
x-window-system をインストールすると xdm で coLinux が落ちるので使えなくする.
cd /etc/init.d/ && mv xdm xdm.bk