{"id":8375,"date":"2016-01-09T11:09:28","date_gmt":"2016-01-09T02:09:28","guid":{"rendered":"http:\/\/www.ekesete.net\/log\/?p=8375"},"modified":"2016-01-10T10:20:17","modified_gmt":"2016-01-10T01:20:17","slug":"8375","status":"publish","type":"post","link":"https:\/\/www.ekesete.net\/log\/?p=8375","title":{"rendered":"ASUS ZenPad S8.0 chroot\u74b0\u5883\u4f5c\u62102 (\u4eee\u60f3\u30a4\u30e1\u30fc\u30b8\u4f5c\u6210)"},"content":{"rendered":"<h4>\u53c2\u7167\u5143<\/h4>\n<p>ubuntu\u3067\u306echroot\u74b0\u5883\u4f5c\u6210\u624b\u9806<br \/>\n<a href=\"https:\/\/wiki.ubuntu.com\/DebootstrapChroot\">DebootstrapChroot<\/a><\/p>\n<p><a href=\"https:\/\/blog.tan-ce.com\/chroot-ubuntu-14-04-on-android-nexus-10\/\">Chroot Ubuntu 14.04 on Android (Nexus 10)<\/a><br \/>\n\u4ee5\u4e0b\u306f\u3001\u307b\u307c\u3053\u306enexus10\u306bchroot\u74b0\u5883\u3092\u4f5c\u308b\u8a18\u4e8b\u305d\u306e\u307e\u307e\u3067\u3059\u3002<\/p>\n<h4>\u304a\u304a\u307e\u304b\u306a\u624b\u9806<\/h4>\n<p>ubuntu14.04(x86_64)\u74b0\u5883\u4e0a\u3067\u4eee\u60f3\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3001\u305d\u306e\u4e2d\u306bchroot\u74b0\u5883\u3092\u4f5c\u6210\u3057\u3066\u305d\u306e\u4eee\u60f3\u30a4\u30e1\u30fc\u30b8\u3092ZenPad\u306eSD\u30ab\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3059\u308b\u65b9\u5f0f\u306b\u3057\u307e\u3059\u3002<br \/>\nSD\u306b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u5207\u3063\u3066\u305d\u3053\u306b\u5165\u308c\u308b\u65b9\u5f0f\u3082\u3042\u308a\u3067\u3059\u304c\u3001\u3053\u3061\u3089\u306e\u65b9\u304c\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304c\u697d\u306a\u306e\u3067\u3002<br \/>\n\u306a\u304a\u3053\u3053\u306e\u624b\u9806\u306f\u901a\u5e38\u306echroot\u74b0\u5883\u69cb\u7bc9\u624b\u9806\u3068\u3057\u30668\u5272\u65b9Android\u306b\u95a2\u4fc2\u306a\u304f\u5229\u7528\u53ef\u80fd\u3002<\/p>\n<h4>chroot\u5148\u30a4\u30e1\u30fc\u30b8\u306e\u4f5c\u6210<\/h4>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u305f\u3081\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30db\u30b9\u30c8\u306b\u5165\u308c\u308b<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sudo apt-get install debootstrap<\/div><\/div>\n<p>\u4ee5\u964d\u306e\u8aac\u660e\u3067chroot\u74b0\u5883\u306f<br \/>\n\/home\/ichinomoto\/ubuntu<br \/>\n\u4ee5\u4e0b\u306b\u4f5c\u308b\u3082\u306e\u3068\u3057\u3066\u74b0\u5883\u5909\u6570\u306b\u8a2d\u5b9a\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u9069\u5b9c\u8aad\u307f\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$mkdir \/home\/ichinomoto\/ubuntu<br \/>\n$export UBUNTU=\/home\/ichinomoto\/ubuntu<\/div><\/div>\n<p>\u4eee\u60f3\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u30de\u30a6\u30f3\u30c8<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">16GB\u306e\u4eee\u60f3\u30c7\u30a3\u30b9\u30af\u3092\u4f5c\u6210\u3057\u3066\u30d5\u30a9\u30fc\u30de\u30c3\u30c8(\u30b5\u30a4\u30ba\u306f\u304a\u597d\u307f\u3067)<br \/>\n$dd if=\/dev\/zero of=ubuntu.img bs=1M count=16000<br \/>\n<br \/>\n\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<br \/>\n$mkfs.ext4 ubuntu.img<br \/>\n<br \/>\n\u30c7\u30a3\u30b9\u30af\u30c1\u30a7\u30c3\u30af\u306f\u3057\u306a\u3044<br \/>\n$tune2fs -c 0 ubuntu.img<br \/>\n<br \/>\n$sudo mount -o loop ubuntu.img $UBUNTU<\/div><\/div>\n<p>\u4eee\u60f3\u30c7\u30a3\u30b9\u30af\u5185\u306b\u65b0\u3057\u3044\u74b0\u5883\u3092\u69cb\u7bc9<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">64bit\u306eubuntu 14.04\u3092\u5165\u308c\u308b\u5834\u5408<br \/>\n$sudo debootstrap --variant=buildd trusty $UBUNTU http:\/\/ja.archive.ubuntu.com\/ubuntu\/<br \/>\n<br \/>\n\u53c2\u8003) 64bit\u30db\u30b9\u30c8\u306732bit\u306eubuntu14.04\u3092\u5165\u308c\u308b\u5834\u5408<br \/>\n$sudo debootstrap --variant=buildd --arch i386 trusty $UBUNTU http:\/\/ja.archive.ubuntu.com\/ubuntu\/<\/div><\/div>\n<h4>chroot\u74b0\u5883\u306b\u5165\u308b<\/h4>\n<p>chroot\u74b0\u5883\u306b\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u306e\u30de\u30a6\u30f3\u30c8<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$sudo mount -o bind \/dev\/ $UBUNTU\/dev\/<br \/>\n$sudo mount -t devpts devpts $UBUNTU\/dev\/pts<br \/>\n$sudo mount -t proc proc $UBUNTU\/proc<br \/>\n$sudo mount -t sysfs sysfs $UBUNTU\/sys<\/div><\/div>\n<p>\u5fc5\u8981\u30d5\u30a1\u30a4\u30eb\u306e\u30b3\u30d4\u30fc\u306a\u3069<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">sources.list\u306f\u30db\u30b9\u30c8\u306e\u8a2d\u5b9a\u3092\u30b3\u30d4\u30fc<br \/>\n$sudo cp \/etc\/apt\/sources.list $UBUNTU\/etc\/apt\/sources.list<\/div><\/div>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067chroot\u74b0\u5883\u306b\u5165\u308b<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$sudo chroot $UBUNTU \/bin\/bash<\/div><\/div>\n<p>\u3053\u3053\u304b\u3089\u4e0b\u306fchroot\u74b0\u5883\u4e0b\u3067\u3059\u3002<\/p>\n<h4>chroot\u74b0\u5883\u4e0b\u3067\u306e\u521d\u671f\u8a2d\u5b9a<\/h4>\n<p>nameserver\u306e\u8a2d\u5b9a\u306f\u4e0a\u3067\u66f8\u3044\u305fsource.list\u306e\u3088\u3046\u306b\u30db\u30b9\u30c8\u304b\u3089\u6301\u3063\u3066\u304d\u3066\u3082\u826f\u3044\u3067\u3059\u304c\u3001public dns\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">#echo &quot;nameserver 8.8.8.8&quot; &gt;&gt; \/etc\/resolv.conf<\/div><\/div>\n<p>\u307e\u305a\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u9069\u7528\u3057\u3066\u6700\u65b0\u72b6\u614b\u306b\u66f4\u65b0<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">#apt-get update<br \/>\n#apt-get upgrade<\/div><\/div>\n<p>\u3053\u3053\u3067\u3001Android\u306e\u5834\u5408udev\u3068upstart\u304c\u7121\u304f\u554f\u984c\u306b\u306a\u308b\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067<a href=\"http:\/\/qref.sourceforge.net\/Debian\/quick-reference\/ch-package.ja.html#s-dpkg-divert\">dpkg-divert<\/a>\u3067\u3001\u66f4\u65b0\u3055\u308c\u3066\u3082\u4e0a\u66f8\u304d\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u30c0\u30df\u30fc\u30d5\u30a1\u30a4\u30eb\u306b\u304a\u304d\u304b\u3048\u307e\u3059\u3002<br \/>\n\u5b9f\u969bAndroid\u304c\u30db\u30b9\u30c8\u3060\u3068udev\u3068upstart\u304c\u52d5\u3044\u3066\u3044\u306a\u3044\u306e\u3067\u3001ZenPad\u3067chroot\u74b0\u5883\u306b\u5165\u3063\u3066apt-get\u3057\u305f\u969b\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306fNexus10\u3067chroot\u74b0\u5883\u3092\u4f5c\u308b\u30b5\u30a4\u30c8\u306b\u306a\u3089\u3063\u305f\u3082\u306e\u3067\u3059\u3002<br \/>\n\u901a\u5e38\u306ePC\u3067chroot\u74b0\u5883\u3092\u4f5c\u308b\u969b\u306b\u306f\u3053\u306e\u7f6e\u304d\u63db\u3048\u306f\u4e0d\u8981\u3067\u3059\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">initctl\u3092true\u30b3\u30de\u30f3\u30c9\u306b\u7f6e\u304d\u63db\u3048<br \/>\n#dpkg-divert --local --rename --add \/sbin\/initctl<br \/>\n#cp \/bin\/true \/sbin\/initctl<br \/>\n<br \/>\nudev\u3067\u4f55\u3082\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b<br \/>\n#dpkg-divert --local --rename --add \/etc\/init.d\/udev<br \/>\n#cp \/etc\/init.d\/udev.distrib \/etc\/init.d\/udev<\/div><\/div>\n<p>\u30b3\u30d4\u30fc\u3057\u305f \/etc\/init.d\/udev \u306e\u6700\u521d\u306e\u30b3\u30e1\u30f3\u30c8\u30d6\u30ed\u30c3\u30af\u306e\u5f8c\u306b\u4ee5\u4e0b\u306e\u884c\u3092\u8ffd\u52a0\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">### END INIT INFO<br \/>\nexit 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\u2190\u3053\u306e\u884c\u3092\u8ffd\u52a0<\/div><\/div>\n<p>\u65e5\u672c\u8a9e\u30ed\u30b1\u30fc\u30eb\u3092\u5165\u308c\u308b(\u304a\u597d\u307f\u3067)<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">#apt-get install language-pack-ja<\/div><\/div>\n<p>\u3088\u304f\u4f7f\u3044\u305d\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u3044\u308c\u3066\u304a\u304f(\u304a\u597d\u307f\u3067)<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">#apt-get install sudo vim less openssh-server bash-completion rsync<\/div><\/div>\n<p>\u30e6\u30fc\u30b6\u30fc\u306e\u8ffd\u52a0\u3068\u5fc5\u8981\u6a29\u9650\u306e\u8ffd\u52a0<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">android\u74b0\u5883\u3067chroot\u3059\u308b\u3068\u756a\u53f7\u304c\u304b\u3076\u308b\u306e\u3067uid\u3092\u6307\u5b9a\u3057\u3066\u304a\u304f\u3002\u3068\u308a\u3042\u3048\u305a2000\u3092\u6307\u5b9a\u3002<br \/>\n#adduser -u 2000 ichinomoto<br \/>\n<br \/>\nsudo\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u304a\u304f<br \/>\n#sudo gpasswd -a ichinomoto sudo<br \/>\n<br \/>\nAndroid\u30db\u30b9\u30c8\u5074\u306egroup\u3092\u8ffd\u52a0\u3002\u3053\u308c\u3092\u3057\u306a\u3044\u3068\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068BT\u304c\u4f7f\u3048\u306a\u3044\u3068\u306e\u3053\u3068\u3002<br \/>\n#groupadd -g 3001 aid_net_bt_admin<br \/>\n#groupadd -g 3002 aid_net_bt<br \/>\n#groupadd -g 3003 aid_inet<br \/>\n#groupadd -g 3004 aid_inet_raw<br \/>\n#groupadd -g 3005 aid_inet_admin<br \/>\n<br \/>\n#gpasswd -a ichinomoto aid_net_bt_admin<br \/>\n#gpasswd -a ichinomoto aid_net_bt<br \/>\n#gpasswd -a ichinomoto aid_inet<br \/>\n#gpasswd -a ichinomoto aid_inet_raw<br \/>\n#gpasswd -a ichinomoto aid_inet_admin<\/div><\/div>\n<p>\u4e00\u5ea6\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306b\u306a\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">#su ichinomoto<\/div><\/div>\n<p>\u7279\u306b\u554f\u984c\u7121\u3051\u308c\u3070OK\u3002<br \/>\n\u74b0\u5883\u304b\u3089\u629c\u3051\u3066\u30a2\u30f3\u30de\u30a6\u30f3\u30c8<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">$exit<br \/>\n#exit<br \/>\nchroot\u74b0\u5883\u304b\u3089\u30db\u30b9\u30c8\u306b\u5fa9\u5e30\u3002<br \/>\n<br \/>\n\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30f3\u30de\u30a6\u30f3\u30c8\u3059\u308b<br \/>\n$sudo umount $UBUNTU\/proc<br \/>\n$sudo umount $UBUNTU\/sys<br \/>\n$sudo umount $UBUNTU\/dev\/pts<br \/>\n$sudo umount $UBUNTU\/dev<br \/>\n$sudo umount $UBUNTU<\/div><\/div>\n<p>\u3053\u308c\u3067\u505c\u6b62\u307e\u3067\u5b8c\u4e86\u3002<\/p>\n<p>ubuntu.img\u3092ZenPad\u3067\u4f7f\u7528\u3059\u308bSD\u30ab\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u30d9\u30fc\u30b9\u74b0\u5883\u306f\u3067\u304d\u305f\u306e\u3067\u3001\u3042\u3068\u306fZenPad\u4e0a\u3067chroot\u3057\u3066GUI\u74b0\u5883\u3092\u4f5c\u3063\u305f\u308a\u4f7f\u7528\u3057\u305f\u3044\u30bd\u30d5\u30c8\u3092\u5165\u308c\u308b\u306a\u3069\u3057\u307e\u3059\u3002<br \/>\n\u305d\u308c\u306f\u307e\u305f\u6b21\u3067\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u7167\u5143 ubuntu\u3067\u306echroot\u74b0\u5883\u4f5c\u6210\u624b\u9806 DebootstrapChroot Chroot Ubuntu 14.04 on Android (Nexus 10) \u4ee5\u4e0b\u306f\u3001\u307b\u307c\u3053\u306enexus10\u306bchroot\u74b0\u5883\u3092\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.ekesete.net\/log\/?p=8375\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,48,52],"tags":[],"class_list":["post-8375","post","type-post","status-publish","format-standard","hentry","category-android","category-linux","category-zenpad-s8-0"],"_links":{"self":[{"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/posts\/8375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8375"}],"version-history":[{"count":20,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/posts\/8375\/revisions"}],"predecessor-version":[{"id":8399,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=\/wp\/v2\/posts\/8375\/revisions\/8399"}],"wp:attachment":[{"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ekesete.net\/log\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}