File systems supported by different OSs

filesystems.png

I just found these tables that I think you should have always at hand, if you want to share successfully your files. This, of course, in case you don’t have your NAS, FTP, or OwnCloud service already available. Maybe I will try to mount my “OwnCloud” and tell you about, one of these days.

Advertisements

SPHIRE reinstall on CentOS 7

I installed it before (as you can read here) then I updated it. Now I’m going to install it anew. The reason is simple: we have a new software model and the old version is giving me library errors. Let’s go ahead. First I go to the sphire webpage and click on the download section at the top. We’re going to install the SPHIRE beta 2017/06/02 version for CentOS 6. The reason behind, we did it before and it worked.

After the download, we simply change the mode to executable (chmod 777 sphire*) and run it. This is the output, trimmed for reading purpose.

tests ## > chmod 777 sphire_beta_20170602.linux64.centos6.sh 
tests ## > ./sphire_beta_20170602.linux64.centos6.sh

Welcome to EMAN2 2.2

EMAN2 will now be installed into this location:
/root/EMAN2

- Press ENTER to confirm the location
 - Press CTRL-C to abort the installation
 - Or specify a different location below

[/root/EMAN2] >>> /my-location/my_sphire
PREFIX=/my-location/my_sphire
installing: python-2.7.13-1 ...
Python 2.7.13
...a lot of packages here...
...this is important, so I leave it ...
installing: openmpi-2.1.1-0 ...
...and this is the last one...
installing: zlib-1.2.11-0 ...

INSTALLATION IS NOW COMPLETE

Please, go to 
http://blake.bcm.edu/emanwiki/EMAN2/Install/BinaryInstallAnaconda
for detailed installation instructions, 
testing and troubleshooting information.
If this installation is on a Linux cluster,
you will require additional steps before 
installation is complete!

installation finished.
Do you wish the installer to prepend the EMAN2 install location
to PATH in your /root/.bashrc ? [yes|no]
[no] >>> no

You may wish to edit your .bashrc or prepend 
the EMAN2 install location:

$ export PATH=/my-location/my_sphire/bin:$PATH

Thank you for installing EMAN2!

In principle we can recycle the old module and simply change the path to “my-location”. I do that. Also I change the ownership so that everybody from my grup can use the program, not only root. After that, we can test if we get the UI and so on. I log in as an user, load my module, and go to the test folder. Unfortunately, when I try to run the standard commands I get some errors.

module load my-sphire
tests $ > e2display.py 
Traceback (most recent call last):
 File "/my-location/my_sphire/lib/python2.7/
site-packages/EMAN2jsondb.py", line 567, in open_db
 try : ret=JSDict(path)
 File "/my-location/my_sphire/lib/python2.7/
site-packages/EMAN2jsondb.py", line 638, in __init__
 self.sync()
 File "/my-location/my_sphire/lib/python2.7/
site-packages/EMAN2jsondb.py", line 688, in sync
 except: raise Exception,"Error: Unable to open {} 
for writing".format(self.normpath)
Exception: Error: 
Unable to open tests/.browsercache.json for writing

I’m just trying to open the display. I try with another one.

tests $ > sphire 
Traceback (most recent call last):
 File "/my-location/my_sphire/bin/sphire", 
line 3224, in <module> main()
 File "/my-location/my_sphire/bin/sphire", 
line 3205, in main sxmain_window = SXMainWindow()
 File "/my-location/my_sphire/bin/sphire", 
line 2254, in __init__ 
self.sxconst_set.widget.register_const_set()
 File "/my-location/my_sphire/bin/sphire", 
line 2045, in register_const_set
 os.mkdir(SXLookFeelConst.project_dir)
OSError: [Errno 13] Permission denied: 'sxgui_settings'

What’s going on here? Very simple: I played on the safe side and sphire cannot write on my “test” folder. I make a new one, chmod 777 newfolder, try there, and I can get my UIs. So far so good.We do the other test suggested on the page.

newfolder $> sparx
Python 2.7.13 | packaged by conda-forge | 
(default, May 2 2017, 12:48:11) 
Type "copyright", "credits" or "license" for more information.

IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', 
use 'object??' for extra details.
/my-location/my_sphire/bin/sx_real.py:48: 
DeprecationWarning: `IPython.lib.inputhook` 
is deprecated since IPython 5.0 and 
will be removed in future versions.
 import IPython.lib.inputhook
Welcome to the interactive SPARX-NoGUI 
Python interface, provided by ipython
 SPARX v4.0 (GITHUB: 2017-05-31 22:16)

In [1]: import mpi

In [2]: Util.version()
 Compile time of util_sparx.cpp May 31 2017 -- 22:17:16
 Modification time: 05/24/2017 11:43 AM

In [3]: quit

As a last test, I open the e2projectmanager.py GUI and I look for the neural network options. They are visible on Workflow Mode –> TomoSeg –> Apply the neural network. We’re ready to go, I think. I close my issue ticket (yes I have of those) and I announce it to the users. We’ll see how long until I get the first complain 😛

NIC is receiving, but not transmitting

So I have this Linux computer that was connected upstairs. Everything was fine and running perfectly. Then I switch if off and move it to a new location with brand new ports. On the new location, the Linux computer doesn’t want to go online. It gets link-up and transmits packets but nothing comes in. Nothing changed, so it must be the network. Here they suggest to check the hardware, but the hardware was OK like half an hour before, so I discard it. It looks similar to this:

p5p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether aa:bb:cc:dd:ee:ff  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0
        RX errors 0  dropped 0  overruns 59  frame 3300
        TX packets 4755  bytes 66645 (XX something)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 32  memory 0xca800000-caffffff 

We see there are no errors on the TX (transmitted) but RX (received) is ZERO. What could it be if it is not hardware? I contact central IT and they tell me I’m using a tagged connection. Meaning I can’t connect unless I define a VLAN over the interface I’m used. Why is that? Because it’s supposed to be safer. OK people, lesson learned: you don’t get internet if you don’t configure the interface on the right way. What other thing could I expect? For the computer to tell me the reason why it is not going online? Maybe… 

I’m trying to post during the weekend but I’m not managing, so just in case, have a nice weekend! See you on Monday.

rsync failed to set permissions on : Function not implemented (38)

I’m cleaning up. As a lamer SysAdmin that I am, I have several HDs floating around, each one with a different backup of my systems. I decided to clean up this mess, now that they sell 4 TB portable hard drives. If possible, the best technique to do this is an rsync: you can use it to tell you the differences between folders before copying them over (so called DRY RUN).

To run one dry, from the folder you are to the destination you need to type:

rsync -avn * /backup/destination/

To make it real, just remove then “n”. Like this:

rsync -av * /backup/destination/

The command will copy everything (*) that is not on /backup/destination/ from the current folder to /backup/destination/. This runs flawlessly, supposing you have everything coming from Linux, going to Linux. Unfortunately this is not the case. When your backup disk is having a GPT or a NTFS format, so that it can be read by OSX or Windows, you may get this function not implemented error. I tried as suggested

rsync -ahv --no-o --no-g * /backup/destination/

but no luck. The permissions are not managed as they should, the error still appears. However, the files are copied to the backup destination, so so far so good. If you want to do the things right, anyway, you can try this solution. Translated to my example, it reads:

rsync -rltDv * /backup/destination/

Now I don’t get function not implemented error. Not that I care, provided the files were copied over, but it’s good to know, just in case.

Cannot login on CentOS 7 with lightdm

I changed gdm, the default CentOS 7 desktop manager, because it was crashing frequently on machines with more than one GPU. I found out gdm didn’t know where to run when there was more than one graphic card. The problem is not affecting lightdm. To install it,

yum install lightdm
systemctl stop gdm.service
systemctl disable gdm.service
systemctl enable lightdm.service

Now we should have the lighdm. The pros: as I said, it doesn’t crash. The cons: sometimes after logging out you don’t get the login screen, but a mouse pointer on a dark surface, or on a blue one, depending on your desktop configuration. Restarting the lightdm service is giving you back your login screen.

systemctl restart lightdm.service

I guess you can do that via ssh.

Another issue is what I will call the lightdm session problem. Some background info: our users are identified by kerberos keys. After the restart of the lightdm service, one user log in, it seems to work, but you come back to the login screen. Why is that? Very simple: you don’t have the desktop keyring that lightdm is looking for. This screen dump will explain it, I think. We have two users, one is pepito and the other is juanito. Turns out that pepito can log in but juanito can’t.

systemctl status lightdm.service 
● lightdm.service - Light Display Manager
   Loaded: loaded (/usr/lib/systemd/system/lightdm.service; 
enabled; vendor preset: enabled)
   Active: active (running) since XX; 16min ago
     Docs: man:lightdm(1)
 Main PID: 43820 (lightdm)
   CGroup: /system.slice/lightdm.service
           ├─43820 /usr/sbin/lightdm
           ├─45323 /usr/bin/X -background none :0 
           └─47820 lightdm --session-child 13 20

date:machine lightdm[44338]: pam_unix(lightdm:auth): 
authentication failure; logname= uid=0 euid=0 tty=:0 
ruser= rhost=  user=pepito
date:machine lightdm[44338]: pam_krb5[44338]: 
TGT verified using key for 'host/myhost.mydomain'
date:machine lightdm[44338]: pam_krb5[44338]: 
authentication succeeds for 'pepito' (pepito@mydomain)
date:machine gnome-keyring-daemon[44358]: 
Gkm: using old keyring directory: /pepito/.gnome2/keyrings
date:machine gnome-keyring-daemon[44358]: 
failed to unlock login keyring on startup
date:machine lightdm[45339]: 
pam_unix(lightdm-greeter:session): 
session opened for user lightdm by (uid=0)
date:machine lightdm[47820]: pam_unix(lightdm:auth): 
authentication failure; logname= uid=0 euid=0 tty=:0 
ruser= rhost=  user=juanito
date:machine lightdm[47820]: pam_krb5[47820]: 
TGT verified using key for 'host/myhost@mydomain'
date:machine lightdm[47820]: pam_krb5[47820]: 
authentication succeeds for 'juanito' (juanito@mydomain)

You see what’s going on. Both users successfully log in. But the user pepito has an old keyring linked with the desktop, therefore he gets a desktop. On the other hand, juanito only logs in, without getting a desktop. If he chooses a desktop, he will manage to get it. On the status, it looks like this:

date:machine lightdm[6544]: pam_unix(lightdm-greeter:session): 
session opened for user lightdm by (uid=0)
date:machine lightdm[6730]: pam_unix(lightdm:auth): 
authentication failure; logname= uid=0 euid=0 tty=:0 
ruser= rhost=  user=juanito
date:machine lightdm[6730]: pam_krb5[6730]: 
TGT verified using key for 'host/myhost@mydomain'
date:machine lightdm[6730]: pam_krb5[6730]: 
authentication succeeds for 'juanito' (juanito@mydomain)'
date:machine lightdm[7674]: pam_unix(lightdm-greeter:session): 
session opened for user lightdm by (uid=0)

Long story short: you need to ask for it if you want something. In this case, your session. And look at the service status 🙂 no rocket science here!

No mobile data after upgrade to Android 7.X nougat

It’s about time I add android to the collection of tips & tricks I write here. I need to have the latest software available always. I need to, since people ask me about it at work. It’s the curse of the SysAdmin 😀 😀

Of course I get nougat at home, with my wifi. Then I happily go to sleep, and in the morning, when I try to connect to my provider, nothing happens. No mobile data. Since my phone is older than 2 years now and it has all kind of doubtful apps installed, I blame some software malfunction. First I reboot. No network yet. Then I uninstall a couple of apps that may be kidnapping my bandwidth. No luck. Then I wait. Am I suffering from a temporary network inconsistency? A glitch in the matrix. Maybe…but the problem persists 3 hours later.

Time to do something about it. First I switch off mobile network and wifi, to immediately after I reset the network settings.

Settings -> Backup & reset -> Network Settings reset

I then reboot the phone, but the result is the same. Still no mobile network. I try resetting the mobile network and then rebooting. Nothing. I have two SIM cards, so I remove one, reboot, clean up the APN, but …you got it… nothing. Swapping the SIMS and rebooting with one SIM only brought me to the same result also.

The solution? Factory reset. After that, I can join again to my mobile network. Be aware of the fact that it does take quite some time to wipe out the phone, and even more to set it up back to a some kind of working status. But always look on the bright side of life! It’s like having a new phone, that comes with a clean, new, nougat android. And you get the experience for free 😀

Raspberry PI kivy touchscreen clock

vrfuyr

I got a lot of Raspberry PI from display calendars, with touchscreen. Since they are not going to be used anymore (in principle) I want to recycle them somehow. The idea is to have a small screen that will give you some information, like on the image above.

I’m loosely following the guide I found here. I first do the update and upgrade of the system (apt-get update, apt-get upgrade, reboot). Then with more or less glory I go through the kivy installation. My problem was here:

Go into the [input] section, remove the lines that are in there and put in:

mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput

Without it, you end up with a dead display. Now we install the python-beautifulsoup, since python-requests appear to be already installed. I download the zip file from the repository, and simply try it out. I end up with the wordclock on English. To change the language, we simply go to the folder screens/wordclock and edit conf.json, replacing “english” for the language of your choice. However, there seems to be some glitches and the rest of the promised features (like the weather forecast) don’t work with my just updated Raspbian Jessie. I try to get the API key and so on, but I’m not lucky and the project is already quite old. So next time, let’s try another approach 🙂