News from “The Lab”

Today I think I found out what was blocking my new server from properly booting.

This is a close-up of SAS backplane.

It’s quite hard to see, but some pins of the main Cypress component are bent. A close look with a (cheap) PCB inspection microscope made me quite sure that this damage could prevent the PERC card to properly detect the backplane itself and, in turn, the disks.

I asked my colleague to fix the problem by reworking the joints, and tomorrow I’ll test if this patch works.

In the meanwhile I’m watching some spare parts on eBay… Murphy is always watching you…

Stay tuned!

News from “The Lab”

As I recently discovered, my new server is not working as it should.

After some suggestions from my friends, I tried reseating all of the internal cards, starting from the PERC 5i controller and PCIe riser card. None of them made the server to properly boot.

As a last resource I removed the PERC card (the riser card cannot be removed because it’s used to connect the front panel, with power on switch, to the baseboard). Obviously as expected the F/W initializing , along with PERC BIOS messages, didn’t came up. Connecting only the card, removing connections with the SAS backplane, brought me to the conclusion that the problem could reside into the backplane or the disks. If I remove the disks I’m warned about their absence, but reinserting them doesn’t make any blinking LED to came up.

So I suspect that I have to look after some new disks to check and then pray that the problem is not due to a faulty backplane…

More coming…

News from “The Lab”

I decded to switch over to a new server, as the old HP Proliant was unable to handle 64bit virtual machines (due to lack of BEST in its processors).

I found a cheap Dell PowerEdge 2950 with two quad-core processors, 8GB RAM and two 146GB SAS disks.

But…

When I turned on the server after its installation, this message came up:

It seems that the PERC controller is not working… I just tried reseating it and the riser card, but no luck.

I will try to remove the controller to see if the message still persists, just to isolate the problem source.

If anyone has some ideas on how to troubleshoot this problem, please let me know.

… and it’s finally here

I was waiting my new gadget, and it’s finally here.

A couple of Onion Omega 2 plus board, a couple of prototyping expansion board and a power dock. I also have a Onion Omega (the previous version) with a couple of power dock, so I can power up all the three boards at the same time.

Now it’s time to think about what to do… Ideas are welcome!

Create and test a bootable USB pen drive

A couple of usefull links to remember, with instruction about to create a bootable USB pen drive with Windows 10 (or any other O.S.) and a way to test it without having to reboot your PC:

Waiting for my new gadget…

About a year ago I received my Onion Omega board, and it’still here on my shelf, waiting for something cool to do.

But then Onion released Omega2, a more powerful device, which doubles RAM and ROM available at a little cost. So I backed the project on Kickstarter, and my new Omega2 is on track now. I’m waiting it to be here in a couple of weeks, and in the meantime I’ll think about something to do with this new board and with the old one. I have some expansion boards (relays, OLED, Ethernet) that will be divided between the two boards to build some IoT projects.

Stay tuned!

Forcibly shutting down a Virtual Machine under ESXi

Even though this could be a last-used-resource, sometimes you need to shut down a unresponsive virtual machine in your ESXi server.

To do so the only way is to connect to the console via SSH (that should have been enabled from ESXi configuration). Then follow these steps:

  • Identify the machine you need to shut down. This is achieved running the following command and looking for the World ID of the machine you need to stop:
esxcli vm process list
  • issue the first kind of shut down option, that is a “try to shut down gracefully” command:
esxcli vm process kill --type=soft --world-id=xxxxx
  • if this not helps, try to improve your order in this way, performing a “shut down and don’t care”:
esxcli vm process kill --type=hard --world-id=xxxxx
  • if also this command doesn’t work… try this last resource, the “I told you to shut down and you do this now”:
esxcli vm process kill --type=force --world-id=xxxxx

Then you can perform all of the operation you need, for instance delete a stuck or corrupt machine from datastore.

If also the force mode doesn’t work, you’ll have to restart your ESXi server. But usually the force option is good enough to make all stucked host to turn off.

 

Firsts steps into the IoT world…

Ok, it’s time to enter the IoT world, because IoT is cool.
With my Udoo Neo board I decided to do something usefull  (at least for me): trace down temperature and humidity data from my garage, that is the place in which almost all of my equipment lives (or try to do it).

First of all you have to think how to collect and how to show data. Many options are available, starting from DIY, and finishing to online services. Many of them are available up to now, but one focused my attention: ThingSpeak.

ThingSpeak is a platform for IoT data collection and analysis, driven by Mathworks (yes, that Matworks that publish Matlab). Within certain limits, you can use it for free (see their statements here).

I then opened a channel and wanted to start publishing data. I had to google around a bit to find a way to publish data, just because the most of the work is done for Arduino and other platforms different from Udoo Neo. But basically publishing data is almost a web service connection exercise, so mixing some script (and having to learn some Python coding), let me to create this script:

import httplib, urllib

def getfcontents(filename):
   "retrieve file contents"
   with open(filename, 'r') as myfile:
      data = myfile.read().replace('\n', '')
   return data

temp_raw = getfcontents('/sys/class/i2c-dev/i2c-1/device/1-0060/iio:device0/in_temp_raw')
temp_scale  = getfcontents('/sys/class/i2c-dev/i2c-1/device/1-0060/iio:device0/in_temp_scale')
baro_raw   = getfcontents('/sys/class/i2c-dev/i2c-1/device/1-0060/iio:device0/in_pressure_raw')
baro_scale  = getfcontents('/sys/class/i2c-dev/i2c-1/device/1-0060/iio:device0/in_pressure_scale')

temperature = float(temp_raw) * float(temp_scale)
barometer = float(baro_raw) * float(baro_scale)

params = urllib.urlencode({'field1': temperature, 'field2': barometer,'key':'<strong><em>your_api_key_goes_here</em></strong>'})
headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
conn = httplib.HTTPConnection("api.thingspeak.com:80")

try:
        conn.request("POST", "/update", params, headers)
        response = conn.getresponse()
        print response.status, response.reason
        data = response.read()
        print data
        conn.close()
except:
        print "connection failed"

On Udoo Neo, temperature can be read from an external device connected to I2C bus, known as “a brick”. For more information about hardware connection you’d better take a look to the official Udoo Neo brick documentation.

My script does the following:

  1. reads from the I2C device the values for temperature and pressure (they are shadowed into four files on a virtual file system)
  2. calculates the temperature and pressure absolute values
  3. connects to ThingSpeak REST API service and post data

and that’s all. To invoke on a timely-based fashion my script, I simply put the invocation into the crontab file, with the following command:

crontab -e

wich will start your favorite editor, allowing to edit the crontab file. I chose to execute my script once per minute, to see what it happened, but I’ll probably switch the time to once every 5 or 10 minutes, just because these data are not suitable to change so fast. My crontab line so will look like this:

*/1 * * * * python /home/udooer/thing.py

just because my script is in /home/udooer/thing.py file.

Feel free to use the script and modify it; you will have to put your private write API key in the correct place (I put your_api_key_goes_here where you have to do it).

There is something more to do… Did you catch it? At the beginning I said I wanted to record humidity of my garage, but in the following I’ve always spoken about pressure. Why? Because the brick sensor provided is an NXP MPL3115A2, that is a barometer with a temperature sensor included. To measure humidity I need a DHT11-like sensor, but it has to be wired and this will require some more time. To check if all it’s working I’ll go with this setup, then I’ll add a DHT11 sensor later.

And again on the MPL3115A2, it’s actually unclear what is actually the pressure readout supposed to be. This device can output an absolute pressure value, but it can also express an elevation measure depending on its configuration.

udoo neo reconfiguration

Just a quick note on how to reconfigure udoo neo keyboard and timezone from console.

To reconfigure keyboard, from the console issue:

sudo dpkg-reconfigure console-data

give sudo password then select the last option ( ‘Select keymap from full list’). From there you can choose you actual keyboard layout and confirm with enter.

To reconfigure timezone, I think that you can manually edit /etc/timezone with an editor, changing the contents to suit your correct time zone. Otherwise you can simply issue from console:

timedatectl list-timezones

to have a list of available time zones, then

sudo timedatectl set-timezone your/timezone

to set up the correct time zone. For instance I had to issue

sudo timedatectl set-timezone Europe/Rome

and that’s all. For keyboard you should have to restart udoo neo; time zone is immediately set up, and information are update also in lxde.

Previous commands are available also for Ubuntu, from wich udoo Linux distribution comes from.

Acronis 2016 with NVMe disks

Today I helped a colleague to restore its Dell laptop from an Acronis image. The process should have been easy to perform, but there was a little problem… Its laptop was using an M.2 Toshiba SSD (specifically the model THNSN51T02DU7). If you use the Acronis launcher even in WinPE mode, the M.2 disk is not detected.

And now? What to do?

Googling around a bit I found this site which explain (in Italian, many thanks to Gianluca Cecca) how to integrate a Samsung 950 Pro M.2 disk into Acronis. The problem was: where to find THNSN51T02DU7 drivers? We had to look around again with Google, and finally we came up with this explanation:

Intel and Samsung offer a proprietary NVMe driver for their NVMe SSDs, but Toshiba does not. The XG3 utilizes the standard Microsoft NVMe driver that comes baked into Windows 8-10. This makes sense because the XG3 is an OEM SSD, and not needing an additional driver for best performance makes setup easier for OEMs.
So all we had to do was:
  1. search for the original Windows 10 drivers
  2. download them
  3. integrate them into the Acronis WinPE image
  4. cross our fingers…

Locating the driver to download wasn’t an easy taks to perform. Fortunately on Dell website there was an explanation of a similar task related to WinPE and storage controller drivers. So we had to download the Intel Rapid Storage drivers from Intel’s web site (following the lin provided into Dell’s site, we were redirected to a driver version that wasn’t the last one available; Intel site then suggested us to download the last version).

We choosed to download the package f6flpy-x64.zip from the site (f6flpy-x32.zip if your sistem is running in 32 bit mode, but it’s really improbable), then followed the instruction from the integration guide. Basically here are the instructions:

  1. Create the Acronis loader in WinPE format from within your Acronis True Image, writing it onto an USB pen drive
  2. Install Windows ADK; you might have it already installed if you are a developer. You can try to open ad administrator command prompt, then issue the following instruction. If you receive any errors, you might have to download Windows ADK
  3. Create three folders in C:\, naming them Temp, Drivers and Mount
    Copy BOOT.WIM file from the Source folder of Acronis WinPE pen drive, into C:\Temp
  4. Extract the drivers from f6flpy-x64.zip into C:\Drivers
  5. Open the Administrator command prompt
  6. Issue the following command to mount the image
    dism /mount-wim /wimfile:c:\temp\boot.wim /index:1 /mountdir:c:\mount
  7. Issue the following command to merge drivers into image
    dism /add-driver /image:c:\mount /driver:c:\drivers /forceunsigned
  8. Issue the following command to integrate the drivers into the driver library
    dism /get-drivers /image:c:\mount
  9. Issue the following command to write changes into the .WIM file and release resources
    dism /unmount-wim /mountdir:c:\mount /commit
  10. Copy the new BOOT.WIM file from C:\Temp into Sources folder of Acronis WinPE pen drive
  11. Eject pen drive and delete the Temp, Drivers and Mount folders created in point 3.

    Your disk should now be visible from Acronis loader and you can proceed to data restoration.

Further steps

If you found that your Acronis loader won’t recognize your M.2 disk, probably you don’t need to read  more, as you already succeded to boot up your PC from the USB key. But what if you don’t?

Modern PC use UEFI boot process with a secure option into BIOS. This is to avoid your PC to be booted from a device you don’t trust. It might be needed to enter the BIOS and add your Acronis WinPE boot pen drive to the trusted boot sources. How to perform this task may vary from BIOS to BIOS, and you should read your PC manual to perform these steps.