[ 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
    <edeca>  Hrm. More infernal questions, mainly because I am trying to
             make my perl prettier and contain less nasty if's. I have
             $foo and $bar which are obtained from split(/ /, 'kitten
             loving'). But I don't want undef if the split fails, I'd
             rather '' for $bar or both. What's the nicest way to do that?
 <Khisanth>  ($foo, $bar) = map { $_ // "" } split / /, $str; # 5.10
             version :)
    <edeca>  Noo 5.10! :)
 <Khisanth>  ($foo, $bar) = map { defined $_ ? $_ : "" } split / /, $str;
             # probably some other shorter ways too
  <rindolf>  edeca: [bad idea] you can also try using the
             conditional->inheritance refactoring.
  <rindolf>  :-)
          *  Khisanth pours boiling coffee on rindolf
  <rindolf>  Khisanth: I hate coffee, but I guess I deserved it.
  <rindolf>  That was a joke, of course.
 <Khisanth>  you weren't really supposed to like having boiling anything
             poured on you but I guess you are into the kinkier stuff

    -- Conditional-to-Inheritance Refactoring on Freenode's #perl
    -- #perl, Freenode

       <rindolf>  ljuwaidah: so aren't there more people who use FOSS in
                  Oman?
     <ljuwaidah>  there are, but they're only a few
       <rindolf>  ljuwaidah: ah.
       <rindolf>  Oman has .om as its TLD.
       <rindolf>  .om .nom .nom
       <rindolf>  p.om p.om
       <rindolf>  kabo.om
       <rindolf>  DJB got the cr.yp.to domain.
       <rindolf>  And there's also ali.as which is Adam Kennedy's.
     <ljuwaidah>  looool
     <ljuwaidah>  rand.om :P
     <ljuwaidah>  do.om :P
     <ljuwaidah>  ro.om
     <ljuwaidah>  m.om
 <Black_Phoenix>  your.m.om
     <ljuwaidah>  hahahaha
     <ljuwaidah>  is that supposed to be a milf site? :P
       <rindolf>  yahoo.c.om
     <ljuwaidah>  bro.om
       <rindolf>  http://yourmom.com/
       <rindolf>  Though it's down now.
     <ljuwaidah>  don't keep your hopes up on .om domains
     <ljuwaidah>  our ISP is a greedy money sucker
       <rindolf>  "I'd rather be a .com than a .om"
     <ljuwaidah>  rindolf: me too
       <rindolf>  ljuwaidah: this was a joke.
       <rindolf>  I have a few .org domains.
       <rindolf>  From GoDaddy
     <ljuwaidah>  unless you need it for a domain trick
               *  Black_Phoenix <--- .com bastard here
     <ljuwaidah>  rindolf: where's the joke?
       <rindolf>  ljuwaidah: joke?
       <rindolf>  ljuwaidah: it rhymes.
       <rindolf>  dot-com, dot-om - get it? get it? get it?
       <rindolf>  ;-)
     <ljuwaidah>  no :(
       <rindolf>  ljuwaidah: om rhymes with com.
     <ljuwaidah>  so?
       <rindolf>  ljuwaidah: "I'd rather be a dot-com than a dot-om"
       <rindolf>  ljuwaidah: it's just a silly rhyme.
 <Black_Phoenix>  I'd rather a website
       <rindolf>  Black_Phoenix: I accidentally a web-site.
     <ljuwaidah>  I still don't get the joke
 <Black_Phoenix>  rindolf, I'd still rather a blog
       <rindolf>  Black_Phoenix: rather what a blog?
 <Black_Phoenix>  Website a blog
       <rindolf>  ljuwaidah: never mind.
     <ljuwaidah>  sorry, I don't know why I'm slow today
       <rindolf>  Black_Phoenix: do you mean that you would rather *be* a
                  web-site?
 <Black_Phoenix>  I'd rather website a blog
 <Black_Phoenix>  broken grammar time :D
     <ljuwaidah>  Black_Phoenix: when did website become a verb?
 <Black_Phoenix>  it didn't
 <Black_Phoenix>  I'm using it as a verb to produce nonsense
     <ljuwaidah>  I sense light!
     <ljuwaidah>  {I see}
       <rindolf>  ljuwaidah: http://www.google.com.om/
     <ljuwaidah>  rindolf: I know
       <rindolf>  If Google can do it - so can you.
     <ljuwaidah>  I don't use it
     <ljuwaidah>  'cause some services don't work on it
       <rindolf>  ljuwaidah: ah.
       <rindolf>  ljuwaidah: in any case, seems like one can register a
                  .com.om domain.

    -- The .om domain
    -- ##programming, Freenode


Powered by UNIX fortune(6)
[ Main Page ]