20 June, 2017

So i had a holliday. I've programmed for years, but strangely enough never in C. Why not try it out? I used:

gcc as a compiler

nano as the editor

So much for the software architecture. I followed these tutorials, and found that the learning curve to C is akin to PHP and JavaScript. The variables are defined in a different way. But loops are pretty much the same thing. Here's a sample from one of the tutorials.

#include

int main () {

int a;

/* for loop execution */

for( a = 10; a < 20; a = a + 1 ){

printf("value of a: %d\n", a);

}

return 0;

}

The main difference is compiling. So save the code above in say myForLoop.c. Then compile the file, like this:

If you then try to mount the folder, there will be a message like "missing permissions". So the folder is there, but only the root user will have access to this paradise. The solution is this shell command:

# sudo usermod -G vboxsf -a YourUserNameHere

You'll have to reboot the system. Then lo and behold, you can try this in a terminal window:

# touch /media/yourSharedFolder/x.txt

If the file is created the hidden entrance to the palace of the king is open. Of course you could just open the folder, and add a file. But that solution is so last century.

18 June, 2017

Had this error: "Ubuntu: failed to connect fo lvmetad". Ubuntu booted into a shell. The /home partition was not mounted. I tried to edit the fstab, but the /home share would not mount on boot.

However it was possible to mount the drive, like:

# mount -a

In the failsafe Ubuntu version I cound boot into a menu, with several options. If a fsck was run, the /home would mount, and the boot process could continue.

An error message stated, that there was an error on the /dev/sda5 - and Ubuntu recommended a "manual fsck".

So I booted into the shell, and ran fsck. There were tons of errors, Basicly the prompt asked "shall I repair this or that error". I answered "y" every time. Fsck found some 30 - 40 errors. Then fsck stated, that the system was clean.

I booted ... and ...

to my great surprise everything worked. As in: OK!

During the failsafe mode the CPU ran like hell: 50% or more all the time. The temperature was not a problem. But of course the fans ran like hell. Now everything is back to normal. The CPUs run around 20% when I use a browser, Spotify and what not.