{"id":269762,"date":"2015-12-07T13:02:02","date_gmt":"2015-12-07T10:02:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269762"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269762","title":{"rendered":"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u0430 Raspberry Pi \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e qemu-user-static (Ubuntu 14.04)"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"http:\/\/prom-electric.ru\/media\/pi.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0442\u0438\u0440\u0430\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u0442 Raspberry Pi. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b qemu-user-static \u0438 binfmt-support.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u044b qemu-user-static \u0438 binfmt-support:<\/p>\n<pre><code class=\"bash\">sudo apt-get install qemu qemu-user-static binfmt-support  <\/code><\/pre>\n<p>  QEMU \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 qemu-user-static \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b. \u041f\u0430\u043a\u0435\u0442 binfmt-support \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. <\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432:<\/p>\n<pre><code class=\"bash\">update-binfmts --display  <\/code><\/pre>\n<pre> qemu-aarch64 (enabled): ...... qemu-microblaze (enabled): ...... qemu-arm (enabled): ...... qemu-m68k (enabled): ...... qemu-ppc64abi32 (enabled): ...... qemu-sparc64 (enabled): ...... qemu-sparc (enabled): ...... qemu-sh4 (enabled): ...... qemu-sh4eb (enabled): ...... qemu-sparc32plus (enabled): ...... qemu-ppc64 (enabled): ...... qemu-ppc (enabled): ...... qemu-mipsel (enabled): ...... qemu-alpha (enabled): ...... qemu-mips (enabled): ...... qemu-cris (enabled): ...... qemu-s390x (enabled): ...... qemu-armeb (enabled): ......  <\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 ARM \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u2014 qemu-arm (enabled).<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <a href=\"https:\/\/www.raspberrypi.org\/downloads\/\">www.raspberrypi.org\/downloads<\/a> \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c Raspbian Wheezy, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f 2015-05-05-raspbian-wheezy.img.<\/p>\n<p>  \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432:<\/p>\n<pre><code class=\"bash\">sudo mkdir ~\/rpi_image cd ~\/rpi_image sudo wget http:\/\/downloads.raspberrypi.org\/raspbian\/images\/raspbian-2015-05-07\/2015-05-05-raspbian-wheezy.zip sudo unzip 2015-05-05-raspbian-wheezy.zip sudo rm 2015-05-05-raspbian-wheezy.zip  <\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u0440\u0430\u0437\u0435:<\/p>\n<pre><code class=\"bash\">sudo fdisk -lu 2015-05-05-raspbian-wheezy.img <\/code><\/pre>\n<pre> \u0414\u0438\u0441\u043a 2015-05-05-raspbian-wheezy.img: 3276 \u041c\u0411, 3276800000 \u0431\u0430\u0439\u0442 255 \u0433\u043e\u043b\u043e\u0432\u043e\u043a, 63 \u0441\u0435\u043a\u0442\u043e\u0440\u043e\u0432\/\u0442\u0440\u0435\u043a\u043e\u0432, 398 \u0446\u0438\u043b\u0438\u043d\u0434\u0440\u043e\u0432, \u0432\u0441\u0435\u0433\u043e 6400000 \u0441\u0435\u043a\u0442\u043e\u0440\u043e\u0432 Units = \u0441\u0435\u043a\u0442\u043e\u0440\u044b of 1 * 512 = 512 bytes \u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 (\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e\/\u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e): 512 \u0431\u0430\u0439\u0442 \/ 512 \u0431\u0430\u0439\u0442 I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u0438\u0441\u043a\u0430: 0xa6202af7                       \u0423\u0441\u0442\u0440-\u0432\u043e \u0417\u0430\u0433\u0440        \u041d\u0430\u0447\u0430\u043b\u043e      \u041a\u043e\u043d\u0435\u0446       \u0411\u043b\u043e\u043a\u0438     Id    \u0421\u0438\u0441\u0442\u0435\u043c\u0430 2015-05-05-raspbian-wheezy.img1          8192       122879      57344     c     W95 FAT32 (LBA) 2015-05-05-raspbian-wheezy.img2          122880     6399999     3138560   83    Linux <\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c 1Gb \u043a \u043e\u0431\u0440\u0430\u0437\u0443:<\/p>\n<pre><code class=\"bash\">sudo chmod 775 2015-05-05-raspbian-wheezy.img sudo dd if=\/dev\/zero bs=1M count=1024 &gt;&gt; 2015-05-05-raspbian-wheezy.img <\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0446\u0435\u043f\u043b\u044f\u0435\u043c \u0432\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0437 \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 loop0, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b (\u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 122880, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 \u043f\u043e 512 \u0431\u0430\u0439\u0442) \u043a loop1.<\/p>\n<pre><code class=\"bash\">sudo losetup -f --show 2015-05-05-raspbian-wheezy.img sudo losetup -f --show -o $((122880*512)) 2015-05-05-raspbian-wheezy.img <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \/dev\/loop0 \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0437\u0443 \u0438 \/dev\/loop1 \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c.<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c parted, \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \/dev\/loop0 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0435\u0433\u043e \u0441 \u043d\u043e\u0432\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c.<\/p>\n<pre><code class=\"bash\">sudo parted \/dev\/loop0  <\/code><\/pre>\n<p>  <\/p>\n<pre> GNU Parted 2.3 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \/dev\/loop0 \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 GNU Parted! \u041d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 'help' \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 <\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">(parted) print  <\/code><\/pre>\n<p>  <\/p>\n<pre> \u041c\u043e\u0434\u0435\u043b\u044c: Loopback device (loop) \u0414\u0438\u0441\u043a \/dev\/loop0: 4351MB \u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 (\u043b\u043e\u0433\u0438\u0447.\/\u0444\u0438\u0437\u0438\u0447.): 512B\/512B \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432: msdos   \u041d\u043e\u043c\u0435\u0440  \u041d\u0430\u0447\u0430\u043b\u043e  \u041a\u043e\u043d\u0435\u0446   \u0420\u0430\u0437\u043c\u0435\u0440  \u0422\u0438\u043f      \u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430  \u0424\u043b\u0430\u0433\u0438  1     4194kB  62,9MB  58,7MB  primary  fat16             lba  2     62,9MB  3277MB  3214MB  primary  ext4  <\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">(parted) rm 2                                                               (parted) mkpart primary 62.9 4351                                           (parted) print       <\/code><\/pre>\n<p>  <\/p>\n<pre> \u041c\u043e\u0434\u0435\u043b\u044c: Loopback device (loop) \u0414\u0438\u0441\u043a \/dev\/loop0: 4351MB \u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 (\u043b\u043e\u0433\u0438\u0447.\/\u0444\u0438\u0437\u0438\u0447.): 512B\/512B \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432: msdos   \u041d\u043e\u043c\u0435\u0440  \u041d\u0430\u0447\u0430\u043b\u043e  \u041a\u043e\u043d\u0435\u0446   \u0420\u0430\u0437\u043c\u0435\u0440  \u0422\u0438\u043f      \u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430  \u0424\u043b\u0430\u0433\u0438  1     4194kB  62,9MB  58,7MB  primary  fat16             lba  2     62,9MB  4351MB  4288MB  primary  ext4 <\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">(parted) quit <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430:<\/p>\n<pre><code class=\"bash\">sudo e2fsck -f \/dev\/loop1  <\/code><\/pre>\n<p>  <\/p>\n<pre> e2fsck 1.42.9 (4-Feb-2014) \u041f\u0440\u043e\u0445\u043e\u0434 1: \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 inodes, \u0431\u043b\u043e\u043as, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 Pass 2: Checking \u043a\u0430\u0442\u0430\u043b\u043e\u0433 structure Pass 3: Checking \u043a\u0430\u0442\u0430\u043b\u043e\u0433 connectivity Pass 4: Checking reference counts Pass 5: Checking \u0433\u0440\u0443\u043f\u043f\u0430 summary information \/dev\/loop1: 86233\/196224 files (0.1% non-contiguous), 630146\/784640 blocks  <\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo resize2fs \/dev\/loop1  <\/code><\/pre>\n<p>  <\/p>\n<pre> resize2fs 1.42.9 (4-Feb-2014) Resizing the filesystem on \/dev\/loop1 to 1046784 (4k) blocks. The filesystem on \/dev\/loop1 is now 1046784 blocks long. <\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0441\u044f \u043d\u0430 1 Gb:<\/p>\n<pre><code class=\"bash\">sudo parted \/dev\/loop0  <\/code><\/pre>\n<p>  <\/p>\n<pre> GNU Parted 2.3 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \/dev\/loop0 \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 GNU Parted! \u041d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 'help' \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434.  <\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">(parted) print <\/code><\/pre>\n<p>  <\/p>\n<pre> \u041c\u043e\u0434\u0435\u043b\u044c: Loopback device (loop) \u0414\u0438\u0441\u043a \/dev\/loop0: 4351MB \u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u043a\u0442\u043e\u0440\u0430 (\u043b\u043e\u0433\u0438\u0447.\/\u0444\u0438\u0437\u0438\u0447.): 512B\/512B \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432: msdos   \u041d\u043e\u043c\u0435\u0440  \u041d\u0430\u0447\u0430\u043b\u043e  \u041a\u043e\u043d\u0435\u0446   \u0420\u0430\u0437\u043c\u0435\u0440  \u0422\u0438\u043f      \u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430  \u0424\u043b\u0430\u0433\u0438  1     4194kB  62,9MB  58,7MB  primary  fat16             lba  2     62,9MB  4351MB  4288MB  primary  ext4  <\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">(parted) quit  <\/code><\/pre>\n<p>  \u041e\u0447\u0438\u0441\u0442\u0438\u043c loop-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<pre><code class=\"bash\">losetup -d \/dev\/loop0 \/dev\/loop1  <\/code><\/pre>\n<p>  \u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0437:<\/p>\n<pre><code class=\"bash\">sudo mkdir ~\/rpi_mnt sudo mount ~\/rpi_image\/2015-05-05-raspbian-wheezy.img -o loop,offset=$((122880*512)),rw ~\/rpi_mnt <\/code><\/pre>\n<p>  (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e) \u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \/boot:<\/p>\n<pre><code class=\"bash\">sudo mount ~\/rpi_image\/2015-05-05-raspbian-wheezy.img -o loop,offset=$((8192*512)),rw ~\/rpi_mnt\/boot <\/code><\/pre>\n<p>  (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e):<\/p>\n<pre><code class=\"bash\">cd ~\/rpi_mnt sudo mount --bind \/dev dev\/ sudo mount --bind \/sys sys\/ sudo mount --bind \/proc proc\/ sudo mount --bind \/dev\/pts dev\/pts <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0442\u044c) \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 ~\/rpi_mnt\/etc\/ld.so.preload:<\/p>\n<pre><code class=\"bash\">sudo vi ~\/rpi_mnt\/etc\/ld.so.preload <\/code><\/pre>\n<p>  \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 i, \u0432\u043f\u0438\u0448\u0438\u0442\u0435 # \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u043c\u0438\u0442\u0435  :wq \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 (CHROOT).<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e binfmt-support \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043d\u0430\u0448 \u043a\u043e\u0434, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043e\u0431\u0440\u0430\u0437\u0430:<\/p>\n<pre><code class=\"bash\">sudo cp \/usr\/bin\/qemu-arm-static ~\/rpi_mnt\/usr\/bin  <\/code><\/pre>\n<p>  \u041c\u0435\u043d\u044f\u0435\u043c \u043a\u043e\u0440\u0435\u043d\u044c:<\/p>\n<pre><code class=\"bash\">cd ~\/rpi_mnt sudo chroot . bin\/bash  <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430:<\/p>\n<pre><code class=\"bash\">uname -a <\/code><\/pre>\n<p>  <\/p>\n<pre> Linux simm-UX32VD 3.19.0-33-generic #38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28 UTC 2015 armv7l GNU\/Linux <\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 Raspberry Pi, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430 \u0438 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435.<\/p>\n<p>  \u0412\u0445\u043e\u0434 \u0432 \u043c\u0435\u043d\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Raspberry Pi:<\/p>\n<pre><code class=\"bash\">sudo raspi-config <\/code><\/pre>\n<p>  \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430:<\/p>\n<pre><code class=\"bash\">apt-get remove --dry-run --auto-remove --purge libx11-.* <\/code><\/pre>\n<p>  \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437 \u0431\u0435\u0437 &quot;&#8212;dry-run&quot;.<\/p>\n<p>  \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0414\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, jessie, stretch \u0438 \u0434\u0440.), \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d \/boot (\u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \/etc\/apt\/sources.list.d \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f). \u041f\u0435\u0440\u0435\u0434 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<pre><code class=\"bash\">sed -i 's\/wheezy\/jessie\/g' \/etc\/apt\/sources.list apt-get update apt-get dist-upgrade -o Dpkg::Options::=&quot;--force-confold&quot; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0431\u0440\u0430\u0437\u0430 \u043d\u0430 SD \u043a\u0430\u0440\u0442\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e:<\/p>\n<p>  1. \u0412\u044b\u0439\u0442\u0438 \u0438\u0437 CHROOT (\u043d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 exit)<br \/>  2. \u0420\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/ld.so.preload:<\/p>\n<pre><code class=\"bash\">sudo vi ~\/rpi_mnt\/etc\/ld.so.preload  <\/code><\/pre>\n<p>  \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0440\u0430\u043d\u0435\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b # \u043d\u0430\u0436\u0430\u0442\u0438\u0435\u043c x, \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u043c\u0438\u0442\u0435  :wq 3. \u0420\u0430\u0437\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044b:<\/p>\n<pre><code class=\"bash\">sudo umount ~\/rpi_mnt\/sys sudo umount ~\/rpi_mnt\/proc sudo umount ~\/rpi_mnt\/dev\/pts sudo umount ~\/rpi_mnt\/boot sudo umount ~\/rpi_mnt\/dev cd .. sudo umount ~\/rpi_mnt  <\/code><\/pre>\n<p>  \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c SD \u043a\u0430\u0440\u0442\u0443, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0443\u0442\u044c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0437:<\/p>\n<pre><code class=\"bash\">sudo fdisk -l sudo dd if=~\/rpi_image\/2015-05-05-raspbian-wheezy.img of=\/dev\/mmcblk0 <\/code><\/pre>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/272523\/\"> http:\/\/habrahabr.ru\/post\/272523\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"http:\/\/prom-electric.ru\/media\/pi.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0442\u0438\u0440\u0430\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u0442 Raspberry Pi. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b qemu-user-static \u0438 binfmt-support.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-269762","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=269762"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269762\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}