linux-usb-cgminer 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. How to setup a cgminer using xubuntu 11.04 live on a USB courtesy of Kano
  2. Software
  3. ========
  4. Short hardware comment:
  5. Your mining computer doesn't need any HDD or CD/DVD/BD as long as it has at
  6. least 2GB of RAM, can boot USB, has some network connection to the internet and
  7. of course a reasonable mining ATI graphics card
  8. ... Or you can boot a windows PC with the USB to only do mining ... and ignore
  9. the system HDD ... wasting energy Smiley
  10. To create the USB, you need of course a 4GB USB and temporarily need a PC with a
  11. CD (or DVD/BD) writer, a USB port and of course an internet connection to the PC
  12. 1) Download the xubuntu 11.04 desktop live CD iso for amd64
  13. ( look here for mirrors: http://www.xubuntu.org/getubuntu )
  14. 2) Burn it to CD then boot that temporarily on any PC with a CD/DVD/BD and a USB
  15. port (this and the next 2 step won't effect that PC)
  16. 3) Plug in your 4GB USB device and it should appear on the desktop - you can
  17. leave it's contents as long as there is at least 2.8GB free
  18. 4) Now run "Startup Disk Creator" in "Applications->System"
  19. (the system menu is the little rat in the top left corner)
  20. (if you have no mouse you can get the menu with <ctr><esc> and navigate the menu
  21. with the arrow keys and <return> key)
  22. From here select the boot CD as the "Source" and the USB as the "Disk to use"
  23. lastly move the slider to 2GB for reserved extra space
  24. The 2GB should be enough for modifications
  25. Click: "Make Install Disk"
  26. After about 10-15 minutes you have a base xubuntu 11.04 boot USB
  27. (you can shut down this computer now)
  28. 5) Boot your cgminer PC with this USB stick, select "English"
  29. then select "Try Xubuntu without installing" and wait for the desktop to
  30. appear (this happens by default if you wait for the timeouts)
  31. 6) Start a terminal
  32. "Applications->Accessories->Terminal Emulator"
  33. 7) sudo apt-get install openssh-server screen
  34. if you have a problem here then it's probably coz the internet isn't
  35. available ... sort that out by reading elsewhere about routers etc
  36. 8) sudo apt-get install fglrx fglrx-amdcccle fglrx-dev
  37. sudo sync
  38. sudo shutdown -r now
  39. N.B. always do a "sudo sync" and wait for it to finish every time before
  40. shutting down the PC to ensure all data is written to the USB
  41. 9) sudo aticonfig --lsa
  42. this lists your ATI cards so you can see them
  43. sudo aticonfig --adapter=all --odgt
  44. this checks it can access all the cards ...
  45. 10) aticonfig --adapter=all --initial
  46. this gets an error - no idea why but the xorg.conf is OK
  47. sudo sync
  48. sudo shutdown -r now
  49. 11) sudo aticonfig --adapter=all --odgt
  50. this checks it can access all the cards ...
  51. 12) get AMD-APP-SDK-v2.4-lnx64.tgz from
  52. http://developer.amd.com/sdks/amdappsdk/downloads/pages/default.aspx
  53. ( http://developer.amd.com/Downloads/AMD-APP-SDK-v2.4-lnx64.tgz )
  54. sudo su
  55. cd /opt
  56. (replace /home/ubuntu/ with wherever you put the file: )
  57. tar -xvzf /home/ubuntu/AMD-APP-SDK-v2.4-lnx64.tgz
  58. cd AMD-APP-SDK-v2.4-lnx64/
  59. cp -pv lib/x86_64/* /usr/lib/
  60. rsync -avl include/CL/ /usr/include/CL/
  61. tar -xvzf icd-registration.tgz
  62. rsync -avl etc/OpenCL/ /etc/OpenCL/
  63. ldconfig
  64. sync
  65. shutdown -r now
  66. You now have an OpenCL enabled xubuntu
  67. 13) cgminer:
  68. sudo apt-get install curl
  69. get the binary linux cgminer (see the bitcoin forum cgminer thread
  70. for where to get it)
  71. ./cgminer -n
  72. this shows you the GPU's it found on your PC
  73. 14) An OC option:
  74. sudo apt-get install libwxbase2.8-0 libwxgtk2.8-0
  75. http://sourceforge.net/projects/amdovdrvctrl/
  76. for an Over/underclocking application and get the file listed below then:
  77. sudo dpkg -i amdoverdrivectrl_1.2.1_amd64.deb
  78. 15) set the screen saver to ONLY blank ...
  79. Move the mouse to the bottom of the screen and you see a set of icons
  80. like on an Apple PC
  81. Click on Settings, then in the Settings window "Screensaver"
  82. Set "Mode:" to "Blank Screen Only"
  83. Edit: originally left this somewhat useful addition out:
  84. 16) apt-get install ntpd
  85. An accurate clock is always a good idea Smiley
  86. Edit2: another item that seems I missed
  87. 17) if you wish to ssh into the box you must set a password
  88. to do this you simply have to be logged into it at the screen and type
  89. sudo passwd ubuntu
  90. it will prompt you (twice) to enter a password for the ubuntu account
  91. Initial setup complete.
  92. ========
  93. If you want to SSH into the machine and run cgminer:
  94. From a terminal on the miner display each time after you boot:
  95. xhost +
  96. Then after ssh into the machine:
  97. export DISPLAY=:0
  98. before running cgminer
  99. Also note, that you should force the screen to blank when mining if the ATI card
  100. is displaying the screen (using the screen saver application menu)
  101. In my case it takes away 50Mh/s when the screen isn't blanked
  102. This is of course just the basics ... but it should get you a computer up and
  103. running and able to run cgminer
  104. ========
  105. You should keep an eye on USB disk space
  106. The system logger writes log files in the /var/log/ directory
  107. The two main ones that grow large are 'kern.log' and 'syslog'
  108. If you want to keep them, save them away to some other computer
  109. When space is low, just delete them.
  110. The 'df' command will show you the current space e.g.:
  111. Filesystem 1K-blocks Used Available Use% Mounted on
  112. aufs 2099420 892024 1100748 45% /
  113. none 1015720 628 1015092 1% /dev
  114. /dev/sda1 3909348 2837248 1072100 73% /cdrom
  115. /dev/loop0 670848 670848 0 100% /rofs
  116. none 1023772 136 1023636 1% /dev/shm
  117. tmpfs 1023772 16 1023756 1% /tmp
  118. none 1023772 124 1023648 1% /var/run
  119. none 1023772 0 1023772 0% /var/lock
  120. This shows the 2GB space allocated when you setup the USB as '/' (aufs)
  121. In this example, it's currently 45% full with almost 1.1GB of free space