LoginSignup
0
0

More than 5 years have passed since last update.

MacでEthOSのブートUSBを作成し取りあえずEthOSでマイニングするところまでの設定をする

Last updated at Posted at 2018-08-18

概要

表題の通り、MacでEthOSのブートUSBを作成し取りあえずnanopoolに接続したEthOSでマイニングするところまでの設定を行います。以下の条件を満たした上で、EthOSを使ってマイニングを行うことができます。

  • マイニングリグ一式が揃っていること(HDD/SSDは必要ないです)
  • 有線LANで接続していること
  • EthOSのisoファイルを持っていること
  • ブート用のUSBがあること(容量16GB推奨)

EthOSは、LinuxのOSで、ETHのマイニングをするためだけに作られたOSです。

ブート用のUSBの作成

ブート用のUSBをMacに接続して、以下のコマンドを打つと、/dev/disk2としてUSBが認識されているのがわかります。

$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         500.3 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            322.9 GB   disk1s1
   2:                APFS Volume Preboot                 21.6 MB    disk1s2
   3:                APFS Volume Recovery                519.0 MB   disk1s3
   4:                APFS Volume VM                      4.3 GB     disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.5 GB    disk2
   1:                  Apple_HFS 名称未設定              15.5 GB    disk2s1

次に、USBをアンマウントして初期化するとともに、EFI領域の生成を行います。その後、初期化した際にマウントしてしまうので、再びアンマウントします。

$ diskutil unmountdisk /dev/disk2
$ diskutil eraseDisk MS-DOS ETHOS /dev/disk2
$ diskutil unmountdisk /dev/disk2

次に、事前にダウンロードしていたisoファイルをUSBに焼く作業を行います。PCのpassword入力後、5GB強のデータを写すことになるので、wifi環境にもよりますが、かなり時間がかかります(そのまま待ちます)。無事にisoファイルをUSBに焼くことができたら、以下のようになると思います。


$ sudo dd if=./ethos-1.3.1.iso of=/dev/disk2 bs=1g
Password:
4+1 records in
4+1 records out
5243928576 bytes transferred in 1317.308878 secs (3980789 bytes/sec)

早速、マイニングリグの電源をつけて、EthOSをブートしてみましょう。以下のような表示が出たら取りあえず成功です。次に、EthOSの初期設定に移ります。
S__6897666.jpg

初期設定

LanScan for Macのインストール

EthOSの初期設定を行う時に、SSHで接続して行うのがやりやすいので、マイニングリグに振られているローカルIPを知る必要があります。そこで、同一ネットワーク内で使用されているIPアドレスを割り出してくれるアプリをダウンロードします。

LanScan for Mac

LanScanを使って、以下のようなIPを割り出すことができたら、MacからSSHで接続することができます。

スクリーンショット 2018-08-18 12.58.56.png

※追記
ディスプレイにもIPが振ってあるので、そこから識別することも可能です。

EthOSへのSSH接続

以下の作業は、ローカルのMacで行なっていきます。

$ ssh ethos@10.0.1.104
ethos@10.0.1.104's password: #live

Welcome to ethOS 1.3.1

ethOS 1.3.2 released July 31, 2018
See ethosdistro.com/changelog

♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
 Remote/Local Confs           /home/ethos/remote.conf  /home/ethos/local.conf
 Documentation / Sample Conf  ethosdistro.com/kb     ethosdistro.com/pool.txt

 helpme:                show the list of common commands and information
 allow/disallow:        allow OR disallow miner (automatic start)
 minestop:              turn off all miner instances
 show:                  show output of various log files
♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
ethOS License Agreement
By using ethOS, you agree to the below clauses.

I agree that I will read and follow the necessary guides in the ethOS knowledge base (ethosdistro.com/KB).
I agree that gpuShack does not provide consulting services for mining, that there is no email or phone support for ethOS, and that all ethOS support is provided via the the ethOS Support Policy (ethosdistro.com/S).
I agree that I will purchase from gpuShack one ethOS license per rig/motherboard on which I plan to run ethOS, and if I need additional licenses, I will purchase them from gpuShack (gpushack.com).
I agree that ethOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I agree that all digital products purchased from gpuShack, including those pre-installed on physical media, are sold in accordance with their respective merchantability clauses and licensing agreements.
I agree that if I plan to redistribute ethOS, that certain files which are distributed along-side ethOS may be licensed under separate license agreements (ethosdistro.com/license). I understand that the GNU General Public License does not extend to these files, and that I will remove these files prior to redistributing ethOS itself.
I agree that gpuShack does not distribute ethOS to non-customers, and as such, is not required by the GNU General Public License to provide the ethOS source code to non-customers.
I agree that purchases for ethOS Digital Licenses, ethOS SSDs, and ethOS USB drives cannot be cancelled or refunded under any circumstances, in accordance with the ethOS license agreement.
I agree that a "Significantly Not as Described" (SNAD) claim is impossible for purchases of ethOS Digital Licenses, ethOS SSDs, and ethOS USB drives due to the above reasons, and that I will not file a chargeback, SNAD claim, or cancellation request for any ethOS purchases, for any reason.

Do you accept the ethOS License agreement (y/n)?y
Welcome to ethOS 1.3.1

ethOS 1.3.2 released July 31, 2018
See ethosdistro.com/changelog

♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
 Remote/Local Confs           /home/ethos/remote.conf  /home/ethos/local.conf
 Documentation / Sample Conf  ethosdistro.com/kb     ethosdistro.com/pool.txt

 helpme:                show the list of common commands and information
 allow/disallow:        allow OR disallow miner (automatic start)
 minestop:              turn off all miner instances
 show:                  show output of various log files
♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦

11:00 PM ethos@79e5d4 10.0.1.104 [26.2 hash] /home/ethos $

EthOS設定関連

ethOSは起動時に設定を外部のファイルで上書きするので、上書きしないように設定します。つまり、ローカルの設定ファイルを読み込むようにします。

/home/ethos
$ force-local
remote config turned off

ETHのアドレスを自分のものに書き換えます。

/home/ethos
$ vi local.conf
maxgputemp 85
stratumproxy enabled
proxywallet 0x0bdC4F12fB57d3acA9C3cF72B7AA2789A20d27f2 ← 自分のwalletのアドレスに変更
proxypool1 pool-asia.ethosdistro.com:5001 
proxypool2 pool-eu.ethosdistro.com:5001

書き換えたら以下のコマンドを実行すると設定が反映されます。

/home/ethos
$ putconf && minestop
REMOTE CONFIG DOES NOT EXIST OR IS FORMATTED INCORRECTLY. USING LOCAL CONFIG.

miner STOPPED

マイニングが実行されているか、以下のコマンドで確認します。

/home/ethos
$ show miner

EthOSは、nanopoolにデフォルトで接続されるようになっていますので、そちらのホームページでもマイニングができているのか確認します。

nanopoolで接続を確認
https://eth.nanopool.org/

ETHのアドレスを検索にかけると、自分のマイニングの状況を見ることができます。

EthOSの設定には、他にも

  • パスワードの変更
  • IPの固定
  • つなぎこむプールの変更
  • オーバークロックの設定
  • ZCASHへの切り替え

などがありますが、今回は割愛します。

パスワード変更ー追記20180824ー

$ passwd ethos
Changing password for ethos.
(current) UNIX password: (デフォルトはlive)
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

IP固定ー追記20180824ー

$ sudo vi /etc/network/interfaces

iface eth0 inet dhcp ← ここを以下に変更
↓
iface eth0 inet static

address ***.***.***.***
netmask 255.255.255.0
gateway ***.***.***.***
dns-nameserver ***.***.***.***

rootログイン禁止-追記20180917-

デフォルトでは、rootでもログインできる設定になっているので、設定ファイルをいじって、root権限でログインできないようにします。

/etc/ssh/sshd_config
PermitRootLogin noyesから変更

設定ファイルの読み込みます。

$ /etc/init.d/ssh restart
[ ok ] Restarting ssh (via systemctl): ssh.service.

トラブルシューティング

EthOSが起動しない
EthOSのブートUSBを差し込んで、マイニングで使うディスプレイに以下のようなエラーメッセージが出た場合、途中でUSBを外してしまったなどの原因でUSBにisoファイルを完全に焼くことができていない可能性があります。なので、もう一度、ブート用のUSBを作るところから始めてみてください。

~
/bin/sh:can't access tty; job control turned off

GPUを認識しない
まずは、GPU0枚でEthOSが起動するか確認します。そのあと、一枚ずつGPUを増やしていくと割合認識してくれます。

/home/ethos
$ sudo shutdown -h now

補足ですが、上記のようなコマンドを使ってEthOSをシャットダウンさせないで、例えば、電源からブチ切りすると、次に電源を入れた時に、GPUを認識させるところからやらないといけなくなるので、注意しましょう。

0
0
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
0
0