linux-usb-cgminer 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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" (the system menu is
  19. 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
  31. (this happens by default if you wait for the timeouts)
  32. 6) Start a terminal
  33. "Applications->Accessories->Terminal Emulator"
  34. 7) sudo apt-get install openssh-server screen
  35. if you have a problem here then it's probably coz the internet isn't
  36. available ... sort that out by reading elsewhere about routers etc
  37. 8) sudo apt-get install fglrx fglrx-amdcccle fglrx-dev
  38. sudo sync
  39. sudo shutdown -r now
  40. N.B. always do a "sudo sync" and wait for it to finish every time before
  41. shutting down the PC to ensure all data is written to the USB
  42. 9) sudo aticonfig --lsa
  43. this lists your ATI cards so you can see them
  44. sudo aticonfig --adapter=all --odgt
  45. this checks it can access all the cards ...
  46. 10) aticonfig --adapter=all --initial
  47. this gets an error - no idea why but the xorg.conf is OK
  48. sudo sync
  49. sudo shutdown -r now
  50. 11) sudo aticonfig --adapter=all --odgt
  51. this checks it can access all the cards ...
  52. 12) get AMD-APP-SDK-v2.4-lnx64.tgz from
  53. http://developer.amd.com/sdks/amdappsdk/downloads/pages/default.aspx
  54. ( http://developer.amd.com/Downloads/AMD-APP-SDK-v2.4-lnx64.tgz )
  55. sudo su
  56. cd /opt
  57. (replace /home/ubuntu/ with wherever you put the file: )
  58. tar -xvzf /home/ubuntu/AMD-APP-SDK-v2.4-lnx64.tgz
  59. cd AMD-APP-SDK-v2.4-lnx64/
  60. cp -pv lib/x86_64/* /usr/lib/
  61. rsync -avl include/CL/ /usr/include/CL/
  62. tar -xvzf icd-registration.tgz
  63. rsync -avl etc/OpenCL/ /etc/OpenCL/
  64. ldconfig
  65. sync
  66. shutdown -r now
  67. You now have an OpenCL enabled xubuntu
  68. 13) cgminer:
  69. sudo apt-get install curl
  70. get the binary linux cgminer (see the bitcoin forum cgminer thread for where to
  71. get it)
  72. ./cgminer -n
  73. this shows you the GPU's it found on your PC
  74. 14) An OC option:
  75. sudo apt-get install libwxbase2.8-0 libwxgtk2.8-0
  76. http://sourceforge.net/projects/amdovdrvctrl/
  77. for an Over/underclocking application and get the file listed below then:
  78. sudo dpkg -i amdoverdrivectrl_1.2.1_amd64.deb
  79. 15) set the screen saver to ONLY blank ...
  80. Move the mouse to the bottom of the screen and you see a set of icons like on
  81. an Apple PC
  82. Click on Settings, then in the Settings window "Screensaver"
  83. Set "Mode:" to "Blank Screen Only"
  84. Edit: originally left this somewhat useful addition out:
  85. 16) apt-get install ntpd
  86. An accurate clock is always a good idea Smiley
  87. Initial setup complete.
  88. ========
  89. If you want to SSH into the machine and run cgminer:
  90. From a terminal on the miner display each time after you boot:
  91. xhost +
  92. Then after ssh into the machine:
  93. export DISPLAY=:0
  94. before running cgminer
  95. Also note, that you should force the screen to blank when mining if the ATI card
  96. is displaying the screen (using the screen saver application menu)
  97. In my case it takes away 50Mh/s when the screen isn't blanked
  98. This is of course just the basics ... but it should get you a computer up and
  99. running and able to run cgminer
  100. ========
  101. You should keep an eye on USB disk space
  102. The system logger writes log files in the /var/log/ directory
  103. The two main ones that grow large are 'kern.log' and 'syslog'
  104. If you want to keep them, save them away to some other computer
  105. When space is low, just delete them.
  106. The 'df' command will show you the current space e.g.:
  107. Filesystem 1K-blocks Used Available Use% Mounted on
  108. aufs 2099420 892024 1100748 45% /
  109. none 1015720 628 1015092 1% /dev
  110. /dev/sda1 3909348 2837248 1072100 73% /cdrom
  111. /dev/loop0 670848 670848 0 100% /rofs
  112. none 1023772 136 1023636 1% /dev/shm
  113. tmpfs 1023772 16 1023756 1% /tmp
  114. none 1023772 124 1023648 1% /var/run
  115. none 1023772 0 1023772 0% /var/lock
  116. This shows the 2GB space allocated when you setup the USB as '/' (aufs)
  117. In this example, it's currently 45% full with almost 1.1GB of free space