coLinux + Debian セットアップメモ その2
昨日(http://d.hatena.ne.jp/nakunaru/20071024#p1)の補足+修正
.bashrcとかに「export LC_ALL=en_EN.eucJP」とか入れて回避。
これは間違い。
/etc/locale.genを編集
ついでにユーザ毎の.bashrcも編集
export LC_ALL=C
export LANG=C
これを追加。
これで英語環境に。どうせ日本語ファイル使わないし。
追記:これも間違い
ただしくは
localeの設定修正の修正
apt-get install locales
locale.genの編集
locale-gen実行
.bashrc
#export LC_ALL=C.eucJP
export LC_ALL=en_US.EUC-JP
export LANG=en_US.EUC-JP
とする。
キーマップがおかしいのは
# loadkeys "jp106"
で設定。
/etc/init.d/にsetKeyMap.shとかつくる
#/usr/bin/bash
loadkeys "jp106"
# link /etc/init.d/setKeyMap.sh /etc/rc2.d/S200setKeyMap.sh
とかして起動時に有効にしておく。
根本的な解決じゃないけど
# dpkg-reconfigure console-data
じゃ何度やっても設定きなかった。
coLinuxからwinディレクトリをマウントするには
xmlに以下を追加
index=cofsの番号。マウントするときにcofs0としてマウントデバイスを指定。
path=cofsに割り当てるWindowsのパス。cofs0をc:\に割り当てる。
type=cofsのタイプ。"flat"指定。
enabled=cofsを有効にするかどうか。
再起動後
# mkdir /mnt/win
# mount -t cofs cofs0:data /mnt/win
とすると、C:\dataをマウントする。
とした場合
mount -t cofs cofs2: /mnt/win
とするとC:ドライブを丸ごとマウント。
/etc/init.d/winMount.shなんかを作成
#/usr/bin/bash
mount -t cofs cofs2: /mnt/win
# link /etc/init.d/winMount.sh /etc/rc2.d/S20winMount.sh
として起動時に有効にしておく。
(ところでrc2.d配下のリンクはS20とかで始まる名前なんだけど、これってなんの意味があるんだべ)
WINからcoLinuxのディレクトリにアクセス
sambaの設定
参考:(http://www.si-linux.co.jp/wiki/silinux/index.php?CoLinux%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EBdebian%C0%DF%C4%EA%CA%D4
)
# apt-get install samba
Use password encyption? → Yes
Modifysmb.conf to use WINS settings fron DHCP? → No
How do you want to run Samba? → daemonsを選択 → OK
Create samba password database, /var/lib/samba/passdb.tdb? → YES
適当なユーザを追加しておく
# smbpasswd -a -U ユーザ名
New SMB password:
Retype new SMB password:
/etc/samba/smb.confを編集。以下上記参考URLから転載
[global]
coding system = euc ←この行と
dos charset = CP932 ←この行と
unix charset = EUC-JP ←この行は新規追加になるので[global]の下あたりに書いておく
workgroup = WORKGROUP
encrypt passwords = true
[homes]
comment = Home Directories
browseable = no
writable = yes ←noをyesに変更する
# /etc/init.d/samba restart
これでOK。
ファイルを追加したい
参考:(http://www.mylab.jp/diary/20061105.html)
(http://scratchpad.fc2web.com/colinux/install/install-8.html)
cygwinで
# dd if=/dev/zero of=4gb.img bs=1M count=4096
xmlに
追加
ファイルシステム作成
# mkfs.ext3 /dev/cobd2
マウント
# mkdir /mnt/disk2
# mount /dev/cobd2 /mnt/disk2
で追加できる。
ファイルサイズの拡大をしたい場合には参考URLの通りでOK。
元のroot.imgは消さないように注意。
最初にやったときは色々なファイルがコピーできてなくて困ったことになった。