[ Main Page ]

coLinux tips

ディスクサイズ拡張

dd for windowsとresize2fsを利用すれば、 比較的簡単にディスクサイズを増加させられます。もとのサイズが1024*1024*1024=1073741824(1GB)で、 1024*1024*(1024+512)=1610612736(1.5GB)に拡張する場合、以下のようにできます。 ただし、ほかのサイズで適用する場合は、よく考えてコマンドを入れないと、データを破壊します。 以下で使用するZEROFILEは適当なファイルで構いません。

C:\Program Files\coLinux>dd if=ZEROFILE of=Ubuntu-9.04.ext3.1gb.fs seek=1610612735 bs=1 count=1
rawwrite dd for windows version 0.5.
Written by John Newbigin <jn@it.swin.edu.au>
This program is covered by the GPL. See copying.txt for details
0+1 records in
0+1 records out

NTFSではスパースファイルがサポートされているので、seekして1バイト書き込めば 良いわけです。あとは、オンラインリサイズがサポートされていれば、 coLinux上でリサイズすれば完了です。

root@colinux:~# resize2fs /dev/cobd0

サウンド出力 (PulseAudio)

coLinuxから外向けにパケットを飛ばすので、slirpでも使用は可能だと思われます。

ホストWindows上
[colinux.conf]
# ブリッジ推奨
#eth0=slirp
eth0=tuntap
eth1=pcap-bridge,"Local Area Connection"
# カレントディレクトリから探せればOK
exec0=pulseaudio\pulseaudio.exe
[pulseaudio\default.pa]
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16 受信できればよい
load-module module-esound-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16
load-module module-detect
coLinux上
[/etc/pulse/client.conf]
default-server = 192.168.2.100 ホストWindowsのアドレス

Debian/Ubuntuだとlibpulse0パッケージが必要です。

PulseAudio + ALSA

Debian/Ubuntuだとlibasound2-pluginsパッケージが必要です。

coLinux上
[/etc/asound.conf]
pcm.!default { type pulse }
ctl.!default { type pulse }
pcm.pulse { type pulse }
ctl.pulse { type pulse }

Samba/CIFS

Debian/Ubuntuだと少なくともsmbfsパッケージが必要です。 smbclientパッケージは推奨です。入っていないと、以下のようなエラーが出ます。

CIFS VFS: cifs_mount failed w/return code = -6
smbfs: mount_data version 1919251317 is not supported
 <rindolf>  sussman's been idle for 15 minutes.
 <rindolf>  And I need to talk to him.
 <rindolf>  sussman, oh sussman! Where art thou, sussman?
 <rindolf>  Or is it "wherefore"?
 <arild_f>  The shakespearian version is "wherefore", IIRC
 <rindolf>  Where have all the sussmans gone? (Long time passing)
 <rindolf>  Where have all the sussmans gone? (Long time ago)
 <rindolf>  Where have all the sussmans gone? They've been idle, everyone.
 <rindolf>  When will they ever learn?
 <rindolf>  When will they ever learn?

    -- #svn, Freenode

Try to get all of your posthumous medals in advance.


Powered by UNIX fortune(6)
[ Main Page ]