New lukSticks (v0.10.1)

How-dee everybody. As some may already have seen I “recently” (well – already several days ago by now) pushed some new “lukStick” images to the releases page. For those that read this for the first time: this is at http://www.lukminer.net/releases .

I actually wanted to write about this new release right after I uploaded (and apologize to those I confused by not doing so, because they actually change a few things :-/), but then goto side-tracked… apologies, too much to do :-/. Either way, in this blog I’ll try to summarize the latest changes, all of which were driven by feedback from users.

Re-Cap: The lukStick

For those that haven’t read the previous article and/or discussions on the lukStick, here a very brief re-cap of what it’s supposed to be about (for those that already do, feel free to jump to the next section!).

The core idea of the “lukStick” is to provide a single ISO image that is a fully installed linux with the miner pre-installed, ready-to-go, and auto-started upon boot time. This was initially driven by my own “experience” (say: annoyance?) at having to re-install machine after machine after machine, doing the same things all over again, etc, and losing tons of time because I always forgot one little detail, etc. Also, I realized that many of my readers might simply not have the experience of dealing with linux at all; let alone with auto-starting the network, miner, etc; let alone dealing with installing and starting MPSS stacks for KNC and KNL PCI cards; etcpp.

As such, I eventually decided to try to build (and it worked like a charm!) a single bootable USB stick that had all of that installation work done, and simply clone it every time I got a new machine. And in addition to making life easier in setting up a new machine this had the added benefit of allowing to use any “barebone” server (e.g., the Asrock Machines) without ever having to get or install a disk for them…

Be that as it may;  that thing turned out to worked pretty well at least for myself, so eventually I eventually decided to generate ISO images of those sticks, and share them as well. Sharing for others required a few additional changes (users, passwords, ability to change pool/user setttings, etc), and not unexpectedly, a few rough edges have been reported since. This release is supposed to fix at least the most egregious ones of those.

The new lukSticks (v0.10.1)

The most obvious change to the new lukSticks is – who’d have guessed – that they update the miner to v0.10.1, which is the one with support for XMR v7. As such, this update to the sticks was way overdue even without the additional changes, becuase starting 6 days from now (ie, after the v7 fork) you’ll actually need this new version to mine XMR.

However, the new stick isn’t just the old one with an updated miner, but actually contains several additional changes as well that were triggered by feedback from you, the users. In particular, on a high level:

  • There are now three version of the lukStick, for “cpu and/or phi”, “knc with mpss” and “knl with mpss”, respectively (see below).
  • All three sticks are now “homogenized” in the sense that they all use the same user, password, ssh key, directory structure, startup method, location of config and output/log files, etc.
  • User/password: All three lukSticks now only have a single user (root), and the same password (luk) for that root user. Ie, no more confusion on which users/password to user for which stick, how to sudo, etcpp.
  • Remote login: All luksticks now allow remote ssh login, using either password or ssh key (I’ll upload the public/private ssh key soon). In particular that should allow for more easily “remote control”ing many different servers via remote ssh calls.
  • Homogenized file naming and directory structure: In all three lukSticks the relevant ssh keys are not in /root/.ssh, the config file in /mnt/fat/mine.cfg, etc. This again should make it easier to, for example, “bulk” change the miner config on a large number of machines.
  • At least the “cpu-phi” and “mpss-knl” method will automatically print miner output to console tty1; so no more need to first login before you can see the miner status. (note this feature is intentionally disabled on the mpss-knc version, since the MPSS “mic” kernel module throws a kernel panic when enables (ugh!).
  • The partitions have been slightly shrunk, so even with USB sticks that have a few  broken sectors (ie, which in the past were slightly too small for the ISO image) you’ll no longer get broken partitions.

Now with these high-level changes, a few more details below:

Which lukStick to Use?

There’s now three flavors of lukSticks, for the three different configs that exist:

  • lukStick-phi-cpu : This one works for both regular CPUs and bootable Phis (it’ll auto-detect if it’s a phi, and fallback to CPU if not). Ie, that’s the one you want to use if you have one of the Asrock Rack, Exxact, Colfax, etc 2U4N servers; but you can also use it on any old CPU/Xeon server you may have lying around. Internally this stick builds on top of Ubuntu, which generally gets highest performance.
  • lukStick-mpss-knc : This version is designed for systems with the x100 “KNC/Knights Corner” Xeon Phi PCI cards; those require an install of the MPSS 3.x stack, which in turn requires the right version of CentOS, which in turn … you get the point. This stick has all of that pre-installed, using CentOS 6.9, MPSS 3.8(I think), and with everything auto-started and auto-configured (even the number of cards is automatically detected).
  • lukStick-mpss-knl : This version is for the select lucky ones that got some of the 7220 or 7240 PCI versions of the x200 “KNL/Knights Landing” PCI cards. Ie, it’s not for the Asrock Rack “bootable” KNLs (use phi-cpu instead!), but if you happen to have one of the 7240s that version should do the trick. As with the mpss-knl version this has the right flavor of Linux (CentOS 7.3), the right driver stack (MPSS 4.x), automatic card detection and configuration, etcpp.

Note I do not install NVidia, ATI, or whatever GPU drivers, so the luk-ocl miner will not work on thost sticks.

“Making” a lukStick

To make a new lukStick all you have to do is download the right image (see previous section), unpack the ISO image, and burn it on a 16GB (or larger) USB stick (in fact, a harddisk should work, too, though I haven’t tried yet). For those that use linux and are comfortable with the command line, this would work, for example, via

dd if=lukStick-<type>-<version>.iso of=/dev/sd<deviceName>

Note: Usually, you can find the “deviceName” to write to inserting a new, blank USB stick into a USB port, and then doing “dmesg” – which should show something like “new USB device X-Y-Z …. /dev/sdXYZ.

Warning: If you’re not familiar with linux, command line, dd, etc, you might want to use some graphical tools, or you might simply overwrite your main harddisk. Be careful! I’m also sure there’s some windows tools for that, but sorry, can’t help with that – I’m not exactly an expert in windows….

Configuring the LukStick to your pool/user/… settings

Once you “burned” the ISO image to a USB stick or harddisk, you should be able to mount this stick in either a linux or a windows machine. Under linux you should see two partitions (a ‘linux’ one with the linux, and a ‘fat’ one with the config files); under Windows you’ll only see a ca 100MB FAT partition.

The “FAT” partition is what contains the config files. Unlike previous versions this version of the stick no longer hosts the scripts themselves in this location (too easy to accidentally break, apparently), but instead contains a file “miner.cfg”. You can edit the respective host, port, user, etc values, and next time you boot they should automatically apply.  Make sure to properly unmount (“eject” under windows) to make sure your edits are saved!

Running the lukStick

Once burned you should be able to put the lukStick into any machine, turn it on, and automatically run upon boot (of course, this assumes that your BIOS is configured to actually boot from USB 🙂 ). I’ve seen some issues with UEFI vs non-UEFI systems (the sticks are “legacy” stick, and some UEFI systems apparently want to boot only UEFI devices!@#!@), but “usually” it should work. (In particular, all the Asrock Rack etc machines should work.

Of course, to actually run the miner the machine needs an internet connection – and while the miner will automatically start the network devices you’ll still have to make sure that there’s a proper physical network caple plugged into the right network port (on the Asrock Rack machines, for example, I usually use the right one of the two side-by-side ethernet ports – do not use the individual one next to those two, that one is only for board’s IMPI; the OS won’t even see it).

Monitoring Hash Rate / Miner Output

Upon startup it may take a while for all the services to start (in particular for the MPSS version that can take three or four minutes); but at least ont he cpu-phi and mpss-knl versions you should at some point see some miner outputs on the text console (assuming you do have a monitor connected, of course). Note this doesn’t work on the mpss-knc version (mic module throws a kernel panic when writing to /dev/tty1!?!), but does on the others.

In addition, all miner output is also written to /tmp/luk.out, so you can always login (remotely, if required, see next sec), and check that file as well. Also, to help debug any potential issues (ie, if the miner doesn’t start up), the startup scripts will write some debugging information (dmesg, cpu info, memory info, startup log, etc) to the FAT filesystem, from which you can inspect them (and/or send them to me if you need to).

Loggin in

At least for casual users you usually shouldn’t have to log in – as described above you can configure the miner with the “miner.cfg” file on the FAT partition – but just in case you do want/need to: All three lukSticks now have a unified user (root) and password (luk). Of course, three ascii letters for a password isn’t exactly NSA standard, so if you do plan on putting a machine with this stick onto an externally accessible IP: make sure to change that root password!!!!  (If you’re on a trusted network or behind a DHCP server and firewall, it shouldn’t matter).

If you do want to log in, there’s two three ways: Console, ssh via password, and ssh via ssh key. For console login, you’ll probably see rather quickly that the miner also prints its output to console 1, and that logging in / working on that console becomes a bit “confusing” with all those outputs. Simple fix: Press ctrl-alt-2 (or ctrl-alt-f2?) to swtich to another console (may take 4 or 5 seconds to open), then you can login/use this one.

For ssh login, you can either use the user/password I provided, or use some public/private ECDSA key. (I’ll upload that later today; until then you can pull it from /root/.ssh). All three versions have the same ssh key installed, so you can use the same ssh key to login (without password), and thus easily do things like remotely overwrite each machine’s mine.cfg with a new version, etc.

Summary

Oh-kay – that post was way longer than I had hoped it’d be, but hope it helps – there were a lot of people that tried the earlier lukSticks, and those most eventually got them to work some questions came up again and again – I hope this post will answer the most important ones up front.

All that said, I’m reasonably sure there’ll be some remaining teething issues even in this major iteration of the lukStick, so if you run into any, don’t hesitate to drop me a note. It may take a few days (weeks?) to fix it, but eventually I will …. (or so I hope).

As such: Happy mining!

Luk

 

Published by

lukMiner

To learn more about me, look at the "About" page on http://lukminer.org

6 thoughts on “New lukSticks (v0.10.1)”

  1. In the absence of access to source code, can you tell me the basic steps you went through to convert this miner to run on the Xeon Phi? I have a coin I’d like to mine with it and being CPU-only I believe it would be ideally suited. This would also serve as a self training exercise in using Parallel Studio and the libraries, which so far I’m finding a bit complex without using them to build something practical.

    Like

  2. Never mind, I compiled the code on the Xeon Phi 7290 under Ubuntu 16.04.4 and without optimization got over 2400H/s. In 2016 I was paying IBM US$500/month to rent a dual E5-2699v4 cloud server that did worse than that, so I’m satisfied. 🙂

    Like

  3. Luk, thanks so much for making this!

    You mentioned that you found a colo site for your 2U miners — do you mind sharing which company you went with? Feel free to email me directly if that’s easier.

    Thanks!

    Like

    1. Send me an email, and I’d be happy to reply – both the one that I’m currently using, as well as the ones I’m going to use for the next batch – but I don’t want to publicly post the address of the latter without having expicit permission to do so…

      Like

  4. Luk, I burned the iso to a flash drive but when I try to boot from the usb stick, it just shows a black screen that turns slightly purple and then nothing else happens even after waiting 5-10 mins. I’m using the Exxact system from your earlier posts.

    I can boot from this USB stick and see the ubuntu screens fine on another computer — is there any setup I need to do on the Exxact server before I put the lukstick in?

    Please help!

    Like

    1. Hey,
      I’ve heard that bug report from soembody else, and actually even saw it myself in some machines. Try pressing ctrl-alt-f1 and/or ctrl-alt-f2 – those switch between the virtual consoles, and “in theory” the miner output should be on console 1, and you can login on console 2. For some reason on some systems it doesn’t automatically show those consoles (on others it does), but switching between them should show the proper output. I.e., chances are good that your system actually does what it’s supposed to do, you just don’t see anything on the screen (other than the ubuntu purple)

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s