2011年3月30日水曜日

softdog / CONFIG_WATCHDOG_NOWAYOUT

いつも唐突。
Documentation/watchdog/src/watchdog-simple.c の抜粋
int fd = open("/dev/watchdog", O_WRONLY);
while (1) {
ret = write(fd, "\0", 1);
if (ret != 1) {
ret = -1;
break;
}
ret = fsync(fd);
if (ret)
break;
sleep(10);
}
close(fd);
定期的に書き込みがあればカーネルが大丈夫、問題ないよ。と判断。書き込みがないと...リブート。じゃクローズは? が次

Documentation/watchdog/watchdog-api.txt の抜粋意訳

モジュールパラメタ nowayout (CONFIG_WATCHDOG_NOWAYOUT)
"Magic Close" がサポートされていなければデバイスを close すると watchdog も (何もせず) 終了。watchdog デーモンにバグがあってクラッシュした場合なんか考えるとちょっとマズい。この挙動のためいくつかのドライバでは "Disable watchdog shutdown on close", CONFIG_WATCHDOG_NOWAYOUT
というオプション設定ができる。これを Y としてコンパイルすると一度 watchdog が開始した後に watchdog を無効にする方法がなくなる。つまりは watchdog デーモンがクラッシュするとシステムが指定のタイムアウト後にリブートする

Magic Close
ドライバが Magic Close をサポートしていると close 直前に特定の文字 'V' が /dev/watchdog に送られないと (書き込まれないと) watchdog が無効にならない。ユーザスペースのデーモンが、この特定の文字を送らずに close するとドライバはデーモンが watchdog を無効にする前に亡くなったと見なす。で、時間内に再度 open しないとリブート。softdog も
if (c == 'V')
expect_close = 42;
...
static long softdog_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
...
static const struct watchdog_info ident = {
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE,
...
なんてあったりする

ha.cf のサンプルコメントから
ソフトウェア watchdog を使っているならモジュールロードのパラメタに nowayout=0 あるいは CONFIG_WATCHDOG_NOWAYOUT を無効にしてコンパイルするんじゃないかな。さもないと heartbeat をマトモに終了させたとしてもリブートしてしまうって挙動はお望みじゃないと思う

うーん... heartbeat の watchdog か、別立て watchdog デーモンか...

2011年3月28日月曜日

TIPS: squeeze on raw format KVM

さっき作ったイメージ drbd1.img は最初に / 用の sda1 次が何も手を加えていない sda2。最後が swap の sda3。これをホスト側で見るには qcow2 の場合 nbd として扱えるらしけど -f raw でイメージを作成したので...要 root

# file drbd1.img 
drbd1.img: x86 boot sector; partition 1: ID=0x83, active, starthead 32, startsector 2048, 11716608 sectors; partition 2: ID=0x83, starthead 115, startsector 11718656, 3905536 sectors; partition 3: ID=0x82, starthead 143, startsector 15624192, 1150976 sectors, code offset 0x63
# losetup -o $((512 * 2048)) /dev/loop1 drbd1.img
# mkdir mnt_drbd1
# mount /dev/loop1 mnt_drbd1/
# ls mnt_drbd1/
bin boot dev etc home initrd.img lib lib32 lib64 lost+found media mnt opt proc root sbin selinux srv sys tmp usr var vmlinuz
# chroot mnt_drbd1/
root@parent:/# ls
bin boot dev etc home initrd.img lib lib32 lib64 lost+found media mnt opt proc root sbin selinux srv sys tmp usr var vmlinuz
root@parent:/# cat /etc/hostname
drbd1
root@parent:/# exit
exit
# umount mnt_drbd1
# losetup -d /dev/loop1
とまぁ、ホスト側でも操作可能。なので /etc/inittab 書き換え忘れたとか、/etc/default/grub 書き換えたけど update-grub 忘れたとかも後になってでもできる

他ネットワーク周りは...現況は tap 使うが良さげ。ホスト側で適当にブリッジ作っておいて...毎度手は面倒なので /etc/network/interface に

auto br0
iface br0 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

bridge_ports none
bridge_fd 0
bridge_stp off
とか書いといて、KVM (に限らず、仮想ゲストマシン全て) 最初のブリッジに足のばすとすると /etc/kvm/kvm-ifup はこんな感じ
#! /bin/sh
BRCTL=/usr/sbin/brctl

uplinks=$(ip link ls | awk -F: '/^[1-9].*UP> / { print $2; }')
for switch in $uplinks; do
if [ -d /sys/class/net/$switch/bridge/. ]; then
$BRCTL addif $switch $1
break
fi
done

ip link set $1 up
でホスト側で isc-dhcp-server を動かすとゆー... 面倒だね

ターミナルで kvm, debian squeeze

obs600 休憩。間違いもあるので、後日直すコト > 自分

で、唐突めいているけど、あちこち調べながら X なしで squeeze を KVM にてインストールする方法。あちこち調べたのは良いけど、ポロポロ忘れるので...

目的としては DRBD や heartbeat 試したく lxc 使おうとしたけど、今々は lxc 上で DRBD 動かず。ちょっと挑戦した けど、8.4 で connector 止めて genetlink 使う予定だそうなので、素直に? 挫折、待たせてもらうことに。d-i をイジる手もあるそうだけど、素の netinst.iso で何度か試してみて忘れがちなコト
  • 真っ黒画面でスペース & linux test
  • /etc/default/grub の編集 & update-grub
  • /etc/inittab の編集
イメージの作成
$ kvm-img create -f raw drbd1.img 8G
Formatting 'drbd1.img', fmt=raw size=8589934592
$ ls
debian-6.0.0-amd64-netinst.iso drbd1.img

-f qcow2 が正統? なのだろうけど、後々ホスト側からイジるにあたって
kvm-nbd とか面倒なので...で起動
$ kvm -cdrom debian-6.0.0-amd64-netinst.iso -hda drbd1.img -boot d -curses
真っ黒画面の真ん中に
    640x480
で、何も表示されないけどスペース一回押した後に (ここ何押下するかよく忘れる)
    linux text
とすると...
                           Welcome to Debian GNU/Linux!                                F1


This is a Debian 6.0 (squeeze) installation CD-ROM.
It was built 20110205-14:31; d-i 20110106+b1.

HELP INDEX

KEY TOPIC

<F1> This page, the help index.
<F2> Prerequisites for installing Debian.
<F3> Boot methods for special ways of using this CD-ROM
<F4> Additional boot methods; rescue mode.
<F5> Special boot parameters, overview.
<F6> Special boot parameters for special machines.
<F7> Special boot parameters for selected disk controllers.
<F8> Special boot parameters for the install system.
<F9> How to get help.
<F10> Copyrights and warranties.



Press F2 through F10 for details, or ENTER to boot:
こんな画面。ここで F8
            SPECIAL BOOT PARAMETERS - INSTALLATION SYSTEM                                 F8


You can use the following boot parameters at the boot: prompt,
in combination with the boot method (see <F3>). These parameters
control how the installer works.

RESULT PARAMETER
Disable framebuffer vga=normal fb=false
Don't start PCMCIA hw-detect/start_pcmcia=false
Force static network config netcfg/disable_dhcp=true
Set keyboard map bootkbd=es
Select the kde or xfce desktops desktop=kde

Accessibility options (last 2 options not available for all images):
Use high contrast theme theme=dark
Use Braille tty brltty=driver,device,texttable
Use Speakup speakup.synth=driver


For example:
boot: install vga=normal fb=false

Press F1 for the help index, or ENTER to boot:
For example そのまま
    install vga=normal fb=false
で進む。イメージファイル名の通り DRBD を試したかったのでパーティションは 6G を / に 2G は何もせず残りを swap として。Software Selection では Standard と SSH。GRUB のインストールまで終ってリブートするから CD 外してね。になったところ
               [!!] Finish the installation

Installation complete
Installation is complete, so it is time to boot into your new system.
Make sure to remove the installation media (CD-ROM, floppies), so
that you boot into the new system rather than restarting the
installation.

<Go Back> <Continue>
で Go Back。Execute Shell を選択して、ちょっと面倒だけど
BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # mount
rootfs on / type rootfs (rw)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
none on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
none on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda1 on /target type ext3 (rw,relatime,errors=remount-ro,data=ordered)
/dev/sda1 on /dev/.static/dev type ext3 (rw,relatime,errors=remount-ro,data=orde
red)
tmpfs on /target/dev type tmpfs (rw,relatime,mode=755)
~ # chroot /target
# cd /etc/default
# cp grub grub.dpkg-dist
# vi grub
....
# diff -uw grub.dpkg-dist grub
--- grub.dpkg-dist 2011-03-28 11:49:36.000000000 +0900
+++ grub 2011-03-28 11:45:39.000000000 +0900
@@ -4,8 +4,8 @@
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
-GRUB_CMDLINE_LINUX_DEFAULT="quiet"
-GRUB_CMDLINE_LINUX=""
+GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8r"
+GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop
=1"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
@@ -13,7 +13,7 @@
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
-#GRUB_TERMINAL=console
+GRUB_TERMINAL="serial console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-5-amd64
Found initrd image: /boot/initrd.img-2.6.32-5-amd64
done
もう一つ /etc/inittab も

# cd /etc
# cp inittab inittab.dpkg-dist
# vi inittab
...

# diff -uw inittab.dpkg-dist inittab | head
--- inittab.dpkg-dist 2011-03-28 11:52:02.000000000 +0900
+++ inittab 2011-03-28 11:53:16.000000000 +0900
@@ -52,15 +52,15 @@
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/getty 38400 tty1
-2:23:respawn:/sbin/getty 38400 tty2
-3:23:respawn:/sbin/getty 38400 tty3
-4:23:respawn:/sbin/getty 38400 tty4
-5:23:respawn:/sbin/getty 38400 tty5
-6:23:respawn:/sbin/getty 38400 tty6
+#2:23:respawn:/sbin/getty 38400 tty2
+#3:23:respawn:/sbin/getty 38400 tty3
+#4:23:respawn:/sbin/getty 38400 tty4
+#5:23:respawn:/sbin/getty 38400 tty5
+#6:23:respawn:/sbin/getty 38400 tty6

# Example how to put a getty on a serial line (for a terminal)
#
-#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
+T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

# Example how to put a getty on a modem line.
# sync
# exit
~ # sync
~ # exit
でメニューの Finish the Inistallation & Continue... で再起動しないので、他コンソールから kill して再起動。今度は -curses じゃなくて -nographic で
kvm -nographic drbd1.img
でクライアントとして使う分にはソレナリ。

2011年2月21日月曜日

obs600 で debian squeeze - その 2

uImage.initrd-cfboot の作成。src.tgz 展開して (bmake の?) Makefile を眺めると u-boot というパッケージの mkimage とゆーコマンドで三つのファイルを合わせている模様。最初がカーネル、次が ramdisk で最後が obs600.dtd。最初は先に make-kpkg したときにできた vmlinux を objcopy、最後はカーネルソースディレクトリで make のターゲットになってる。で真ん中の抽出。file コマンドの magic どこにあるか知らないので...
$ echo test | gzip > test.gz
$ hexdump test.gz
0000000 8b1f 0008 e2ea 4d5c 0300 492b 2e2d 02e1
0000010 c600 b935 053b 0000 0000
0000019
で uImage.initrd-cfboot 持ってきて眺めてみると
$ wget http://ftp.plathome.co.jp/pub/OBS600/LATEST/powerpc-obs600/installation/uImage.initrd-cfboot
$ mkimage -l uImage.initrd-cfboot
Image Name: 0.5-RELEASE-20101206-cfboot
Created: Sat Dec 11 23:23:08 2010
Image Type: PowerPC Linux Multi-File Image (gzip compressed)
Data Size: 2118162 Bytes = 2068.52 kB = 2.02 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 1694842 Bytes = 1655.12 kB = 1.62 MB
Image 1: 415397 Bytes = 405.66 kB = 0.40 MB
Image 2: 7902 Bytes = 7.72 kB = 0.01 MB
$ hexdump uImage.initrd-cfboot | head -n8
0000000 0527 5619 57d2 dc0f 034d 4c89 2000 1252
0000010 0000 0000 0000 0000 8ea3 d3c5 0705 0104
0000020 2e30 2d35 4552 454c 5341 2d45 3032 3031
0000030 3231 3630 632d 6266 6f6f 0074 0000 0000
0000040 1900 7adc 0600 a556 0000 de1e 0000 0000
0000050 8b1f 0808 dfa9 4d01 0302 6d76 696c 756e
0000060 2e78 6962 2e6e 3432 3532 0033 5be4 707d
0000070 5554 3f96 bbaf 1d03 4388 0d03 0483 63a1
0x50 あたりからがカーネルの gz らしい。mkimage -l の出力に素直に従って
$ dd if=uImage.initrd-cfboot bs=1 skip=$((0x50)) count=1694842 of=Image.0
1694842+0 records in
1694842+0 records out
1694842 bytes (1.7 MB) copied, 7.09509 s, 239 kB/s
$ file Image.0
Image.0: gzip compressed data, was "vmlinux.bin.24253", from Unix, last modified: Fri Dec 10 17:07:05 2010, max compression
おぉ。調子にのって
$ dd if=uImage.initrd-cfboot bs=1 skip=$((0x50 + 1694842)) count=415397 of=Image.1
415397+0 records in
415397+0 records out
415397 bytes (415 kB) copied, 1.6545 s, 251 kB/s
$ file Image.1
Image.1: data
むーんと、再度 0x1f 0x8b 0x08 を探して
$ hexdump Image.1 | head -n 8
0000000 0000 8b1f 0808 8922 4d03 0302 6172 646d
0000010 7369 2e6b 6d69 6761 2d65 6663 6f62 746f
0000020 ec00 099d 1c7c 7d57 47c7 3abb b5ac 3893
0000030 0877 7924 e496 8e43 d0f7 964a 396d 2c72
0000040 72db c4ec 2257 39c7 271c 9d9e d59d b44e
0000050 b3bb 9999 91d5 25c4 b694 9694 dc33 8e10
0000060 29b4 a16d 69b4 e108 204a 82f4 d0b6 5a16
0000070 3d08 d028 b693 6850 bd0b f4db e6ff 4690
$ dd if=uImage.initrd-cfboot bs=1 skip=$((0x50 + 1694842 + 2)) count=415397 of=Image.1
415397+0 records in
415397+0 records out
415397 bytes (415 kB) copied, 1.71914 s, 242 kB/s
$ file Image.1
Image.1: gzip compressed data, was "ramdisk.image-cfboot", from Unix, last modified: Sat Dec 11 23:22:26 2010, max compression
何か力技っぽいけど、まぁ。試しに
$ gzip -cd < Image.1 > ramdisk.image-cfboot
$ file ramdisk.image-cfboot
ramdisk.image-cfboot: Linux rev 1.0 ext2 filesystem data, UUID=79b27492-4074-4633-a1e1-9094c7a4eccd
$ su
Password:
# mkdir tmp
# mount -o loop ramdisk.image-cfboot tmp
# ls tmp
bin dev etc home lib linuxrc lost+found mnt proc root sbin sys tmp usr var
あとは前後の二つ
$ cd linux-source-2.6.32
$ make ARCH=powerpc obs600.dtb
/home/chamaken/obs600/linux-source-2.6.32/scripts/dtc/dtc -O dtb -o arch/powerpc/boot/obs600.dtb -b 0 -p 1024 /home/chamaken/obs600/linux-s\
ource-2.6.32/arch/powerpc/boot/dts/obs600.dts
DTC: dts->dtb on file "/home/chamaken/obs600/linux-source-2.6.32/arch/powerpc/boot/dts/obs600.dts"
$ cp arch/powerpc/boot/obs600.dtb ..
正直よくわかってないけど先の通り Makefile 眺めたところの結果
$ powerpc-linux-gnu-objcopy -O binary vmlinux ../vmlinux.bin
$ cd ..
$ gzip vmlinux.bin
$ ls
Image.0 linux-image-2.6.32_0.9_powerpc.deb obs600.dtb src.tgz uImage.initrd-cfboot vmlinux.bin.gz
Image.1 linux-source-2.6.32 ramdisk.image-cfboot test.gz usr
$ mkimage -n "original.$(date +'%FT%T')" -A ppc -O linux -T multi -C gzip -d vmlinux.bin.gz:Image.1:obs600.dtb myImage.initrd-cfboot
Image Name: original.2011-02-20T18:18:09
Created: Sun Feb 20 18:18:09 2011
Image Type: PowerPC Linux Multi-File Image (gzip compressed)
Data Size: 2304477 Bytes = 2250.47 kB = 2.20 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 1881007 Bytes = 1836.92 kB = 1.79 MB
Image 1: 415397 Bytes = 405.66 kB = 0.40 MB
Image 2: 8053 Bytes = 7.86 kB = 0.01 MB
えぇ、モチロン、コレはチラシのウラ、備忘録。

2011年2月20日日曜日

obs600 で debian squeeze - その 1

squeeze がリリースされたので「OBS600でlinux-2.6.35.4 + Debian squeeze」と同じようなコトしてみた。ただ ssdlinux を走らせるのが面倒だったので極力 amd64 からのクロス環境でダーティハック込み。まずは「ファームウェアアップデートを実行したら起動しなくなりました。どうすれば復旧できますか。」の準備
# apt-get install tftpd-hpa
....
# cd /srv/tftp
# wget http://ftp.plathome.co.jp/pub/OBS600/0.5-LATEST/powerpc-obs600/installation/uImage.initrd
....
# ip addr add 192.168.253.1/24 dev eth0
# /etc/init.d/tftpd-hpa restart
ディップスイッチ操作が必要になる --- であろうとフタは外しておく。
順序はどうでもよいけど「他OSのインストール方法 (OBS600)」見つつ obs600 側の CF フォーマット。
# fdisk /dev/sda
# mke2fs -j -b 4096 -L / /dev/sda1
# mount LABEL=/ /mnt# cd /mnt/
また 開発環境の構築の中「クロス開発 (VMware等のx86環境上での開発)」の 3. 必要なパッケージを追加します。までやっとく。

で amd64 側でのカーネルのコンパイルヘ。obs600 のパッチは ssdlinux のソースから
$ mkdir obs600
$ cd obs600
$ wget http://ftp.plathome.co.jp/pub/ssdlinux/0.5-LATEST/source/src.tgz
$ tar xzf src.tgz
$ ls usr/src/mkdist/kernel
2.4.20 2.4.26 2.4.37 2.6.16 2.6.26 2.6.29 2.6.32 2.6.33 2.6.35 2.6.36 Makefile
2.6.36 も動くけど、ここは squeeze ソース使って
$ sudo apt-get install linux-source-2.6.32
$ tar xjf /usr/src/linux-source-2.6.32.tar.bz2 -C .
$ ls
linux-source-2.6.32 src.tgz usr
2.6.32 のパッチあて
$ cd linux-source-2.6.32
$ for i in ../usr/src/mkdist/kernel/2.6.32/patches/*.patch; do patch -p1 < $i; done
....
patching file Makefile
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
4 out of 4 hunks ignored -- saving rejects to file Makefile.rej
patching file scripts/Makefile.modinst
この Makefile の rej はムシしても OK な範囲。カーネルモジュールを gzip してくれなくてもよいので scripts.patch は除外。その他必要なファイルをコピーしておく
$ patch -p1 -R <  ../usr/src/mkdist/kernel/2.6.32/patches/scripts.patch
$ cp ../usr/src/mkdist/kernel/2.6.32/obs600.dts arch/powerpc/boot/dts/
$ cp ../usr/src/mkdist/kernel/2.6.32/dot.config.powerpc-obs600 .config
$ make ARCH=powerpc menuconfig
....

$ CONCURRENCY_LEVEL=4 fakeroot make-kpkg --arch=powerpc --revision 0.9 kernel_image
....
$ cd ..
$ ls
linux-image-2.6.32_0.9_powerpc.deb linux-source-2.6.32 src.tgz usr
と、その 1 はここまで。

2009年12月14日月曜日

lisp の quicksort

まぁ、まだ元気だよ。と言うことで、とっても久しぶり。

年に一度位。歳と共に頻度が少なくなる気がするけど SICP を中途半端なまま眺めたりすることがある。少し前くらいかな。関数型言語が流行ったらしくていくつか入門書らしきものも購入したり。その中に Haskell の quick ソートがあった。3.1 Quicksort in Haskell
qsort []     = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs)
すんごいシンプル。
  • 遅延評価
  • 副作用はモナドが引き受ける
あたりが魅力的。同じようなものは...と探したところ、Lisp のものもあった。swisspig.net - The Beauty of a Lisp Quicksort
(defun quicksort (lis) (if (null lis) nil
(let* ((x (car lis)) (r (cdr lis)) (fn (lambda (a) (< a x))))
(append (quicksort (remove-if-not fn r)) (list x)
(quicksort (remove-if fn r))))))
で、拙い Scheme では....
(use srfi-1)

(define (qsort lst)
(if (null? lst) '()
(let* ((x (car lst))
(r (cdr lst)))
(append
(qsort (filter (lambda (a) (< a x)) r))
(list x)
(qsort (filter (lambda (a) (>= a x)) r))))))
さらに Shiro さん の続きを早く読みたい なんでも継続を眺めつつ.... こんな感じなのかなぁ。
(define (qsort/cps lst cont)
(if (null? lst) (cont '())
(let* ((x (car lst))
(r (cdr lst)))
(qsort/cps (filter (lambda (a) (< a x)) r)
(lambda (n)
(qsort/cps (filter (lambda (a) (>= a x)) r)
(lambda (m) (cont (append n (list x) m)))))))))
メジャーどころの Python でも同じようにするには、こんなん?
def qsort(lst):
if len(lst) < 1: return []

x = lst[0]
r = lst[1:]

return qsort([i for i in r if i < x]) \
+ [x] \
+ qsort([i for i in r if i >= x])

2009年6月30日火曜日

lxc の (今までの) ごめんなさい

いくつか嘘ついていました。
devpts
lxc.mount に指定する fstab にて devpts を
/dev/pts /opt/lxc/sshd/rootfs/dev/pts none bind,newinstance 0 0
なんて書いていましたが、意図した正しくは
lxcpts /opt/lxc/sshd/rootfs/dev/pts devpts newinstance,ptmxmode=0666 0 0
でした。

quagga のユーザ、グループ
ホスト側とコンテナ内の uid gid が一致しないと動きませんでした。修正しましたので、良ろしかったらお試し下さい。quagga はこちら。sshd はこちらです。debian/lenny の amd64 です。i386 の方は fstab から /lib64 削除すれば動くと思います。

/usr/local/lib の liblxc-*.so
やっぱ /usr/lib にコピーした方が良さげです。相変わらずの勉強不足で ld.so.cache のフォーマットが x86_64 と i386 が同じで良いかわからず、動かせませんでした
付き合ってくれた人、ごめんなさい。