LoginSignup
5
2

More than 5 years have passed since last update.

#MA_2017 人力で Monacoin を採掘する装置向けLinuxイメージ garimpo を作る手順

Last updated at Posted at 2017-12-13

人力で仮想通貨をマイニングする装置 〜Garimpo〜 の為の Raspberry Pi ZERO W 用Linuxイメージを作る手順

環境

MacBook
VirtualBox
- x86仮想化ソフトウェア
Vagrantfile(ベイグラント)
- 仮想マシン環境を簡単に構築・管理・配布できるツール
Buildroot
- 組み込み系ターゲットのrootfsイメージを作成するためのオープンソースソリューション

手順

  1. VirtualBoxをインストールしていない場合はインストールする
    VirtualBox(Downloads)
  2. Vagrantfile(ベイグラント) をインストールする
    Vagrantfile(ベイグラント)
  3. 適当なディレクトリを作って garimpo リポジトリをcloneする

    madir ~/Downloads/garimpo
    cd ~/Downloads/garimpo
    git clone git@github.com:tnayuki/garimpo-buildroot.git
    
  4. clone したディレクトリにある Vagrantfile をテキストエディタ等で開いて vb.memory の値をホスト環境にあわせて編集する ※初期値が8GB割当なので、環境によってはホスト毎動かなくなるようです(古いMacBookAirとか)

    Vagrantfile
    vb.memory = "4096"
    
  5. clone したディレクトリで Vagrant を使ってゲストOSを起動する
    初回はOSイメージダウンロードなどを実効するので時間がかかる

    cd garimpo-buildroot
    vagrant up
    
  6. Vagrantで起動した ゲストOS(Ubuntu)にSSH ログインする

    vagrant ssh
    
  7. ゲストOSに構築済みの buildroot で Raspberry Pi ZERO W 用Linuxイメージを作る
    Linuxイメージを作るので時間がかかる

    cd buildroot
    make
    
  8. make が終わると output/build に sdcard.img ファイルが出来ているはず

    cd ~/buildroot/output/images
    ls     
    
  9. sdcard.img をホストOSと共有されているディレクトリにコピーする

    cd ~/buildroot/output/images
    cp sdcard.img /vagrant
    
  10. vagrant で立ち上げたゲストOSを終了する

    exit
    vagrant halt
    
  11. ホストOSで sdcard.img をSDに書き込む

    cd ~/Downloads/garimpo/garimpo-buildroot
    sudo dd if=sdcard.img of=/dev/disk3 bs=4m
    
  12. 起動できるSDカードになっているハズ。

参考

人力で仮想通貨をマイニングする装置 〜Garimpo〜
Vagrant Tips#5 boxのメモリをVagrantfileで変更する(VirtualBox限定
Linux(Ubuntu)で、RaspberryPiのSDカードをインストールする方法
MacBookAir の容量がきついので Vagrant 環境を外付けに移した話

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2