{"id":357,"date":"2014-01-22T00:57:19","date_gmt":"2014-01-21T15:57:19","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=357"},"modified":"2019-04-15T10:53:12","modified_gmt":"2019-04-15T01:53:12","slug":"usermode-qemu-kono-on-debian","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2014\/01\/22\/usermode-qemu-kono-on-debian\/","title":{"rendered":"\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\u30a8\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3qemu \u3092\u4f7f\u3063\u3066 Kono on Debian \u306e\u30a4\u30e1\u30fc\u30b8\u3092 Host PC \u3067 apt-get \u3068\u304b\u3059\u308b"},"content":{"rendered":"<p><iframe loading=\"lazy\" src=\"https:\/\/www.flickr.com\/photos\/matoken\/12070889814\/player\/09fca565e7\" height=\"331\" width=\"500\"  frameborder=\"0\" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen><\/iframe><\/p>\n<p>Kobo on Debian \u3067\u3059\u304c\uff0c\u30b9\u30c8\u30ec\u30fc\u30b8\u304cmicroSD \u306e\u305b\u3044\u304b\u3088\u304f\u30a4\u30e1\u30fc\u30b8\u304c\u58ca\u308c\u3066\u3057\u307e\u3044\u307e\u3059\uff0e\u305d\u306e\u305f\u3073\u306b\u66f8\u304d\u8fbc\u307f\u306a\u304a\u3057\u3066\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3068\u3044\u3046\u306e\u306f\u5927\u5909\u3067\u3059\uff0e\u3068\u3044\u3046\u3053\u3068\u3067 Kobo on Debian \u306e\u30a4\u30e1\u30fc\u30b8\u3092\u30db\u30b9\u30c8\u306eLinux \u30de\u30b7\u30f3\u3067\u30de\u30a6\u30f3\u30c8\u3057\u3066\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9qemu \u3092\u5229\u7528\u3057\u3066 apt-get \u3057\u305f\u308a\u3059\u308b\u65b9\u6cd5\u306e\u7d39\u4ecb\u3067\u3059\uff0e<\/p>\n<p>\u3053\u3053\u3067\u306fhost pc \u306b Debian jessie \u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u304c\uff0cwheezy \u3084 Ubuntu 13.10 \u306a\u3093\u304b\u3067\u3082\u5168\u304f\u540c\u3058\u3088\u3046\u306b\u52d5\u4f5c\u3057\u305d\u3046\u3067\u3059\uff0e<br \/>\n\uff08\u4ed6\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u3082\u5927\u4e08\u592b\u3067\u3057\u3087\u3046\u304c\u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306a\u3069\u304c\u7570\u306a\u308b\u3068\u601d\u308f\u308c\u307e\u3059\uff0e\uff09<\/p>\n<h1>qemu-user-static \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165<\/h1>\n<p>\u5148\u305a\uff0c\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9qemu \u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5c0e\u5165\u3057\u307e\u3059\uff0e\u3053\u308c\u3067\uff0c\u5225\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u30d0\u30a4\u30ca\u30ea\u3092\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\u3067\u52d5\u4f5c\u3055\u305b\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n<pre><code>% sudo apt-get install qemu-user-static\r\n<\/code><\/pre>\n<p>\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u4e2d\u3092\u898b\u308b\u3068\u4ee5\u4e0b\u306e\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u304c\u52d5\u4f5c\u3059\u308b\u3088\u3046\u3067\u3059\uff0e<\/p>\n<pre><code>% dpkg -L qemu-user-static\r\n\/usr\/bin\/qemu-mipsn32-static\r\n\/usr\/bin\/qemu-or32-static\r\n\/usr\/bin\/qemu-mips-static\r\n\/usr\/bin\/qemu-m68k-static\r\n\/usr\/bin\/qemu-ppc64-static\r\n\/usr\/bin\/qemu-sparc-static\r\n\/usr\/bin\/qemu-i386-static\r\n\/usr\/bin\/qemu-armeb-static\r\n\/usr\/bin\/qemu-mipsn32el-static\r\n\/usr\/bin\/qemu-ppc-static\r\n\/usr\/bin\/qemu-ppc64abi32-static\r\n\/usr\/bin\/qemu-mipsel-static\r\n\/usr\/bin\/qemu-arm-static\r\n\/usr\/bin\/qemu-x86_64-static\r\n\/usr\/bin\/qemu-sh4-static\r\n\/usr\/bin\/qemu-mips64el-static\r\n\/usr\/bin\/qemu-sparc64-static\r\n\/usr\/bin\/qemu-unicore32-static\r\n\/usr\/bin\/qemu-sh4eb-static\r\n\/usr\/bin\/qemu-microblazeel-static\r\n\/usr\/bin\/qemu-microblaze-static\r\n\/usr\/bin\/qemu-mips64-static\r\n\/usr\/bin\/qemu-cris-static\r\n\/usr\/bin\/qemu-sparc32plus-static\r\n\/usr\/bin\/qemu-alpha-static\r\n\/usr\/bin\/qemu-s390x-static\r\n<\/code><\/pre>\n<h1>\u30c7\u30a3\u30b9\u30af\u30a4\u30e1\u30fc\u30b8\u3092\u30de\u30a6\u30f3\u30c8<\/h1>\n<p>Kobo on Debian \u306e\u30a4\u30e1\u30fc\u30b8\u3092 loopback mount \u3057\u307e\u3059\uff0e\u30a4\u30e1\u30fc\u30b8\u306f\u8907\u6570\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306a\u306e\u3067\uff0cfdisk \u30b3\u30de\u30f3\u30c9\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u60c5\u5831\u3092\u78ba\u8a8d\u3057\u3066 mount \u6642\u306b offset \u3092\u6307\u5b9a\u3057\u307e\u3059\uff0e<\/p>\n<pre><code>% \/sbin\/fdisk -l -u .\/2013-08-17_kobo_debian.img\r\n\r\nDisk .\/2013-08-17_kobo_debian.img: 8014 MB, 8014266368 bytes\r\n255 heads, 63 sectors\/track, 974 cylinders, total 15652864 sectors\r\nUnits = sectors of 1 * 512 = 512 bytes\r\nSector size (logical\/physical): 512 bytes \/ 512 bytes\r\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\r\nDisk identifier: 0x000aad1a\r\n\r\n                       Device Boot      Start         End      Blocks   Id  System\r\n.\/2013-08-17_kobo_debian.img1           19456    10506239     5243392   83  Linux\r\n.\/2013-08-17_kobo_debian.img2        10506240    14698495     2096128    b  W95 FAT32\r\n.\/2013-08-17_kobo_debian.img3        14698496    15652863      477184   82  Linux swap \/ Solaris\r\n<\/code><\/pre>\n<p>\u4eca\u56de\u5229\u7528\u3057\u305f\u3044\u306e\u306f1\u3064\u3081\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e <em>.\/2013-08-17_kobo_debian.img1           19456    10506239     5243392   83  Linux<\/em> \u90e8\u5206\u3067\u3059\uff0e<br \/>\n\u5148\u982d\u30d6\u30ed\u30c3\u30af\u306f 19456 \u3067\uff0c\u30d6\u30ed\u30c3\u30af\u30b5\u30a4\u30ba\u306f 512 \u306a\u306e\u3067\uff0c 19456*512 = 9961472 \u304c offset \u306b\u306a\u308a\u307e\u3059\uff0e\uff08\u82e5\u3057\u304f\u306f <code>expr 19456 \\* 512<\/code> \u3068\u304b\u3057\u3066\u3082\u5224\u308a\u3084\u3059\u3044\u304b\u3082\u3067\u3059\uff0e\uff09<\/p>\n<pre><code>% sudo mount -o loop,offset=9961472 .\/2013-08-17_kobo_debian.img \/mnt\r\n<\/code><\/pre>\n<p>\u3053\u308c\u3067 2013-08-17_kobo_debian.img \u306e\u7b2c1\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u304c \/mnt \u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u307e\u3057\u305f\uff0e<\/p>\n<h1>\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\u30a8\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3QEMU \u30b3\u30de\u30f3\u30c9\u3092\u30b3\u30d4\u30fc\u3059\u308b<\/h1>\n<p>Kobo on Debian \u90e8\u5206\u3092 chroot \u3067\u5229\u7528\u3057\u305f\u3044\u306e\u3067\uff0c\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\u30a8\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3QEMU \u30b3\u30de\u30f3\u30c9\u3092\u30a4\u30e1\u30fc\u30b8\u5185\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\uff0e<br \/>\n\u30de\u30a6\u30f3\u30c8\u6642\u306b \/usr\/bin \u306b\u306a\u308b\u90e8\u5206\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\uff0e<\/p>\n<pre><code>% sudo cp -p \/usr\/bin\/qemu-arm-static \/mnt\/debian\/usr\/bin\r\n<\/code><\/pre>\n<h1>chroot \u3057\u3066apt \u3068\u304b\u3059\u308b<\/h1>\n<p>\u30a4\u30e1\u30fc\u30b8\u3092 chroot \u3057\u3066 apt \u3068\u304b\u3057\u3066\u307f\u307e\u3059\uff0e<\/p>\n<pre><code>% sudo chroot \/mnt\/debian \/bin\/bash\r\n# vi etc\/apt\/sources.list\r\n<\/code><\/pre>\n<p>\u540d\u524d\u89e3\u6c7a\u306b\u5931\u6557\u3059\u308b\u306e\u3067\uff0cnameserver \u3092\u8a2d\u5b9a\u3057\u307e\u3059\uff0e\u4ee5\u4e0b\u306f Google \u306e 8.8.8.8 \u3092\u6307\u5b9a\u3057\u305f\u6642\u306e\u4f8b\u3067\u3059\uff0echroot \u524d\u306b host \u306eresolv.conf \u3092 cp \u3057\u3066\u304a\u3044\u3066\u3082\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e<\/p>\n<pre><code># cat &lt;&lt;__EOF__&gt; \/etc\/resolv.conf\r\n&gt; nameserver 8.8.8.8\r\n&gt; __EOF__\r\n# apt-get update\r\n  :\r\n<\/code><\/pre>\n<p>\u5f8c\u306f\u666e\u901a\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\uff0e<br \/>\n\u8a2d\u5b9a\u304c\u7d42\u4e86\u3057\u305f\u3089exit \u30b3\u30de\u30f3\u30c9\u3067 chroot \u3092\u629c\u3051\uff0cumount \u30b3\u30de\u30f3\u30c9\u3067\u30a2\u30f3\u30de\u30a6\u30f3\u30c8\u3057\u307e\u3059\uff0e<\/p>\n<p>RaspberryPi \u306e Rasbian \u30a4\u30e1\u30fc\u30b8\u3067\u3082\u884c\u3051\u308b\u3060\u308d\u3046\u3068\u601d\u3063\u3066\u8a66\u3057\u305f\u306e\u3067\u3059\u304c\uff0c\u5931\u6557\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\uff0e\u89e3\u6c7a\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u2026\uff0e<\/p>\n<div>\n<p>ADD: \u305d\u306e\u5f8c\u3084\u308a\u76f4\u3057\u305f\u3089\u3046\u307e\u304f\u884c\u3063\u305f<\/p>\n<\/div>\n<p><iframe src=\"http:\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=matokensmeme-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=ss_til&#038;asins=B00H8X84E6\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kobo on Debian \u3067\u3059\u304c\uff0c\u30b9\u30c8\u30ec\u30fc\u30b8\u304cmicroSD \u306e\u305b\u3044\u304b\u3088\u304f\u30a4\u30e1\u30fc\u30b8\u304c\u58ca\u308c\u3066\u3057\u307e\u3044\u307e\u3059\uff0e\u305d\u306e\u305f\u3073\u306b\u66f8\u304d\u8fbc\u307f\u306a\u304a\u3057\u3066\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3068\u3044\u3046\u306e\u306f\u5927\u5909\u3067\u3059\uff0e\u3068\u3044\u3046\u3053\u3068\u3067 Kobo on Debian \u306e\u30a4\u30e1\u30fc\u30b8\u3092 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[7,6],"tags":[276,32,40,275],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-debian-linux","category-linux","tag-debian-linux","tag-jessie","tag-kobo","tag-linux"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}