My Fedora 15 tweaks for an SSD

NOTE: Same things apply even on Fedora 17/18/19 🙂

====== In English / Αγγλικά ======

Hello! I am going to share how I tweaked my Linux system using Fedora 15!

I did a bit of searching and found some interesting proposals on how to do it. To be honest there isn’t one specific way of doing it. It depends on how much you love your data, how much you want your SSD to live and of course what’s your hardware (eg. my SSD supports TRIM, I have enabled the RAID option and I have 8 GBs of RAM). In short, what I will do is make the system use the TRIM command (which is essential) and put the temporary folders in RAM.

tip: if you have other OSs installed and change to RAID mode (with one ssd it’s like AHCI), they might not work (there are guides to avoid re-installation)…Linux will work though 🙂

One great source was this one [1].

First of all, we will use the ext4 filesytem (no swap partition for me). There is one thing to know! Writing on your SSD without reason or moving/writing data is harming its life expectancy. SSDs have endurance due to the MLC technology [2] (approximately 10.000 writes per memory block [3]) which is cheaper, but in the end we also want our SSD to live!

Now, apart from my SSD, I also have my old HDD plugged in my computer. It’s SATA so I didn’t have any other problems to set it up. During the installation process, I created my partitions manually. You know: create some free space and then create new partitions with the appropriate mount points. I used “/” ,obviously for a partition for the root directory, and also “/home” to place my data and program configuration on a different partition (and disc). To store “/home” folder, I used the HDD, just because I want to download stuff and save my media files there! Remember that it’s bad for your SSD writing again and again to it.

After you install Fedora 15, to check if your SSD supports the TRIM command (supposing your disc is  /dev/sda) :

hdparm -I /dev/sda | grep TRIM

(grep will search and find the lines where the word “TRIM” exists in the output of the command before the “|” symbol)

Now, you must edit the “/etc/fstab” file, it’s the filesystem table.You can create a copy of this file in case you feel it won’t work (but, hey, it will) or something else goes wrong:

cp /etc/fstab /etc/fstab.bakup

How did I edit it? “su -” , give your password and then “gedit /etc/fstab”. Now, visit the second page [4] of the guide at step 2! TRIM command support (if your drive supports it of course) ! You absolutely need to do this! Now that you opened “fstab” you need to add the “discard” parameter next to the defaults parameter for the root directory! As you will see at the link it’s something like that:

/dev/sda1 / ext4 defaults

That will change to something like that:

/dev/sda1 / ext4 discard,defaults

Now, it’s up to you if you want to add one other parameter! Tweaking might mean less reliability and data integrity but that’s why I moved my precious data on my HDD 😉 You can also add the “noatime” parameter (just like discard)  and, hey(!), Linus Torvalds also suggests it [5]

What’s next? Moving our temporary folders to RAM. I have 8 GBs of RAM and I am not afraid to “use” them! By “temporary folders” I mean “/tmp”, “/var/tmp” and “/var/log”. For that, you need to add three lines (each one for every folder) at the “/etc/fstab” file. It’s step 6 at the guide. One line (for /tmp) will look like this:

none /tmp tmpfs defaults 0 0

Don’t worry about “none” (it’s just a name) it helps the folders stand out so that we will find them easier later. Next thing you can do is to also move the Mozilla Firefox cache there (as proposed in the guide)!

To check if everything is working just run the command “df” and it will show you what are you partitions doing!

OK, how can we optimize our system even more? Disabling journaling of ext4 (making it unable to keep track of data, meaning unreliable). BUT! This is as far as I will tweak my SSD. Furethermore, we allready changed “noatime”. I have the life expectancy I need and also a high speed disk, having in mind that I want my data uncorrupted as much as possible.

[1] http://cptl.org/wp/index.php/2010/03/30/tuning-solid-state-drives-in-linux/

[2] http://en.wikipedia.org/wiki/Multi-level_cell

[3] http://www.laptopmag.com/advice/expert/are-ssds-worth-the-money.aspx?page=3

[4] http://cptl.org/wp/index.php/2010/03/30/tuning-solid-state-drives-in-linux/2/

[5] http://kerneltrap.org/node/14148

======= In Greek / Ελληνικά =======

Για να λειτουργήσετε τον SSD σας ώστε να “ζήσει” και να λειτουργεί στην μέγιστη απόδοση, δεν υπάρχει μόνο ένας τρόπος. Ανάλογα με το hardware του υπολογιστή σας (ο δικός μου υποστηρίζει την εντολή TRIM , έχω ενεργοποιήσει το RAID mode και έχω 8GB RAM),και το πόσο χρειάζεστε την ασφάλεια των δεδομένων σας πρέπει να επιλέξετε εσείς τί αλλαγές θα κάνετε. Αυτό που είναι σίγουρο πως πρέπει να κάνετε είναι να ενεργοποιήσετε τη λειτουργεία TRIM του λειτουργικού. Εγώ επέλεξα και να μεταφέρω τους φακέλους “/tmp”, “/var/tmp /” και “/var/log” στη RAM, όπως επίσης εφτιαξα ένα partition για το  “/home” στον HDD δίσκο που μου ξέμεινε από το προηγούμενό μου PC.

συμβουλή: αν έχετε εγκαταστήσει ήδη κάποιο άλλο λειτουργικό εκτός του Linux και αλλάξετε το IDE mode σε RAID mode θα έχετε πρόβλημα το οποίο λύνεται και χωρίς format. Απλά ψάξτε το λίγο.

Ένα καλό site που συμβουλεύτικα για όσα έκανα στο δίσκο είναι αυτό εδώ [1] (δείτε τα links πάνω)

Καταρχήν, χρησιμοποιό το ext4 filesystem. Χωρίς swap. Πρέπει να γνωρίζετε ότι όσο περισσότερο γράφουμε στον δίσκο τόσο πιο γρήγορα θα σταματήσει να λειτουργεί στο επιθυμητό επίπεδο. Τόσο πιο γρήγορα θα πρέπει να πάρουμε καινούριο.

Λοιπόν, έφτιαξα ένα partition με το φάκελο root (“/”) στον SSD μου και ένα με το φάκελο “/home” HDD επειδή κατεβάζω και δημιουργώ συνέχεια αρχεία σε αυτόν τον φάκελο!

Έχοντας εγκαταστήσει το Fedora 15, για να δούμε, άραγε ο SSD σας υποστηρίζει το TRIM; (υποθέτως πως είναι ο  /dev/sda) :

hdparm -I /dev/sda | grep TRIM

(το grep θα ψάξει και θα βρει που βρίσκεται στην έξοδο της εντολής πριν το σύμβολο “|” η λέξη “TRIM”)

Τώρα θα επεξεργαστούμε το αρχείο “/etc/fstab”, είναι ο πίνακας για τα filesystems. Μπορείτε να δημιουργήσετε ένα αντίγραφω, μην πάει κάτι στραβά:

cp /etc/fstab /etc/fstab.bakup

Πως να το επεξεργαστείτε τώρα; Με το “su -” , δίνοντας τον κωδικό του root (administrator) και έπειτα με “gedit /etc/fstab” θα σας το ανοίξει με τον επεξεργαστή κειμένου. Τώρα, πηγαίνετε στη 2η σελίδα [4] του οδηγού, στο βήμα 2 (είναι στα αγγλικά)! Αφορά την υποστήριξη του TRIM command (αν το υποστηρίζει ο δίσκος) ! Πρέπει να το κάνετε! Απλά πρέπει να πάτε στο αρχείο που μόλις ανοιξαμε και να προσθέσετε την παράμετρο “discard” στο partition που εγκαταστήσαμε το root directory (το “/” δηλαδή”)! Πρέπει από κάπως έτσιt:

/dev/sda1 / ext4 defaults

Να γίνει  κάπως έτσι:

/dev/sda1 / ext4 discard,defaults

Αν θέλετε να πειράξετε κάτι άλλο εξαρτάται από εσας, για μέγιστη απόδοση φτάνει και αυτό. Μπορείτε (με ρίσκο για τα δεδομένα σας να προσθέσετε και την παράμετρο “noatime“(εγώ την έβαλα καθώς τα δεδομένα που με ενδιαφέρουν βρίσκονται στον HDD μου) Πάντως το συστήνει και ο Linus Torvalds [5].

Επόμενο! Έχω  8 GB RAM και δεν φοβάμαι να τα χρησιμοποιήσω όποτε είπα να μεταφέρω τους προσωρινούς φακέλους μου εκεί. Συγκεκριμένα τους “/tmp”, “/var/tmp” and “/var/log”. Πάλι στο “/etc/fstab” πρέπει να προσθέσουμε μερικές γραμμες (το βήμα 6 στον οδηγό). Μία από τις γραμμές που πρέπει να προστειούν στο τέλος του αρχείου είναι πχ. έτσι (για τον φάκελο /tmp):

none /tmp tmpfs defaults 0 0

Το “none” είναι απλά ένα όνομα, θα βοηθήσει μετά για να ξεχωρίζει από τα άλλα.

Μπορούμε επίσης να μεταφέρουμε και την cache του Mozilla Firefox cache σε αυτό το partition (όπως λέει και ο οδηγός)!

Για να δείτε αν δουλεύουν όλα ρολόι εκτελέστε την εντολή “df” και θα σας δείξει τί κάνουν τα partitions σας!

OK, τώρα αν θέλετε και κάτι παραπάνω (με δικόσας ρίσκο πάντα) μπορείτε να απενεργοποιήσετε το journaling του ext4. Αλλά! Δεν πρόκειται να πω άλλα καθώς δεν έχω πειράξει άλλο το δίσκο μου. Επιπροσθέτως ήδη προσέθεσα τη παράμετρο “noatime”. Ήδη έχω μεγαλώσει το προσδόκιμο ζωής του δίσκου μου. Μήπως τους κρατάμε και για πολύ;

FossComm 2011 and OpenFest 2011 review

This is my review from 2 events I attended and participated in. I will just report with few words what happened and what I did there. Of course I wasn’t alone. As always Fedora rocked with his presence (I will explain later). But! I didn’t only participate with Fedora. You know, I am basically a hardware guy, I study electronics (currently at my last semester, yeah!)

====OpenFest 2011===

OK! Since OpenFest 2011 was first I will start with this event! It was organized by students of the department of Computer Systems at the TEI of Pireaus. I think the Fedora booth was exemplar and with a lot of people helping! We had one bad comment though…few people really wanted the Fedora cheat cubes again on our booth table. I also believe it’s a very cool swag and it’s just a piece of paper! So, people should just wait for our next event 🙂

At OpenFest I made a presentation on Fedora 15 (mentioning and showing a bit of Gnome 3 magic). Pierros and Nikos did a very cool workshop on how to survive with Gnome 3 too!

I also co-presented a workshop with Pierros and Konstantinos concerning Arduino. While it was introductory, we had to repeat it for 2 times more! The room had about 35 seats I think, but at the first 2 presentations people were even standing outside the windows to watch (not to mention that the door was open and people were trying to listen from outside. The 3rd presentation was made in a bigger room the next day.

Photos (thanks to Thalia and Dimitris):

https://picasaweb.google.com/saliyath/OpenFest2011#

https://picasaweb.google.com/dimitrisglaros/Openfest2011#

===FossComm 2011===

Last but not least, the major open source event in Greece. This time at the Univercity of Patras, organized by the Department of Computer Engineering and Informatics. What I really need to mention is that the schedule of FossComm 2011 tried to cover the needs of everyone and I think it did. We enjoyed a lot of good presentations and workshops!

I need to mention that while the Fedora booth was represented well by all the Ambassadors who came to support, Fedora made the difference in the event’s schedule. We had good and many presentations. Not any community can do that 🙂

Of course the swag was there on both booths (Fedora and Mozilla).  But not always there. Visitors, hosts, everyone took everything 🙂

Together with Pierros Papadeas (also made presentations on Fedora and Mozilla at FossComm 2011 ) we did again, as in OpenFest 2011, an introductory Arduino presentation. If I could only have the time to show more code! People were starving for code! Something that we kind of did at OpenFest 2011 🙂 I wanted to talk to people about how useful a library and how Arduino is part of the “Internet of things” nowadays, showing Pachube and the completely opensource Thingspeak.

Presentations I attended:

  • Melissi project by Giorgos Logiotatidis (If you are looking for cloud/python stuff please please check it out and ask)
  • Building a platform-agnostic wireless network of interconnected smart objects using open source tools
    by Anastasia Protopapa and Basilios Georgitzikis (who I thank for his hospitality!). Interconnecting different Zigbee nodes? Sounds like the future to me!
  • hackerspace.gr – hackerspace αλα ελληνικά (I will post more details when hackerspace.gr will be completely ready, but you can follow us on the wiki, the mailing list, identi.ca , twitter or even facebook. We want to share the news everywhere.)

I think I didn’t fully attend something else, but I watch the work of many of the people that presented and I am fully aware of what they do and still wish the best for them. One example is the work of the foss.ntua team Consuela a very handy arduino project for controlling lights with a simple web client setup.

Photos (thanks to Thalia, and Dimitris) :

https://picasaweb.google.com/saliyath/Fosscomm2011Patras02#

https://picasaweb.google.com/dimitrisglaros/Fosscomm2011#

Once again, a big thank you to the hosts and organizers of the events. Another thank you to those who helped!

Sound fix for Adobe Flash for Firefox 4 beta on Fedora

I am currently using Firefox Minefield 4.0b12pre but I have tried this fix also on Firefox 4 beta 11 on my 64 bit system (Fedora 14)! This problem has occured to me with the 64 bit Adobe Flash plugin 10.2.

Some of the code I will paste here (the code for creating the linusmemcpy.c file)  was found in this post at Ahmed Abdo’s blog!

I will give you the script code to paste it in the terminal as after doing some trivial staf f the bug will be exterminated! But I will pretty much explain what this script does.

In general, what we need to do is to create a C file (with a certain memcopy function that will solve our problem) , and the binary and then load the binary when we open Firefox.  The first line of the script creates our C file at the hidden folder .mozilla  (to unhide use Control+H) named linusmemcpy.c , then “cat” is waiting for us to write our text (this time the C code) until we write EOF (end of file). Then what we do is to enter the .mozilla folder and compile the c file. Our last step is to use the GNU Linker with ld on the binary files.

Just copy the whole text and paste it on your terminal as it is 🙂

cat > $HOME/.mozilla/linusmemcpy.c <<EOF
#include <sys/types.h>

void *memcpy(void *dst, const void *src, size_t size)
{
void *orig = dst;
asm volatile("rep ; movsq"
:"=D" (dst), "=S" (src)
:"0" (dst), "1" (src), "c" (size >> 3)
:"memory");
asm volatile("rep ; movsb"
:"=D" (dst), "=S" (src)
:"0" (dst), "1" (src), "c" (size & 7)
:"memory");
return orig;
}
EOF
cd $HOME/.mozilla/
gcc -O2 -c linusmemcpy.c
ld -G linusmemcpy.o -o linusmemcpy.so
linusmemcpy.clin

Now the next very small step is to automate the procedure of starting Firefox correctly with the shortcut on the desktop panel. We will create a small shell script the same way we did with our C file. If you are using beta that means somewhere in your system exists the “firefox” shell script that executes the firefox-bin. We need to know the path to it! If already have a shortcut, right click -> Properties and look at “Command” . This is it. Mine (for firefox 4 from spot’s repos) says firefox4. Don’t forget the & at the end 😉

cat > $HOME/.mozilla/custom_firefox_startup.sh <<EOF
LD_PRELOAD=$HOME/.mozilla/linusmemcpy.so firefox4 &
EOF
chmod u+x $HOME/.mozilla/custom_firefox_startup.sh

So, now is our last step! Go to the icon of Firefox on the desktop panel , right click -> Properties , and at the command click “Browse” press control+H to unhide the folders, enter the .mozilla folder and select “custom_firefox_startup.sh”.

Now, close every instance of Firefox that is running right now (yes I ask too much, but you can leave my blog 🙂 ) and press the Firefox button 🙂

==== Ελληνικά/Greek ====

Σε αυτό το post δίνω οδηγίες για το πως να φτιάξετε το πρόβλημα που έχει παρουσιαστεί με τον ήχο στο Flash της Adobe (10.2) για τον Firefox 4 beta 11 (αυτό και το Minefield στην έκδοση 4.0b12pre δοκίμασα, λογικά τρέχει και σε άλλες beta). Χρησιμοποιό την 64bit εκδοση του Fedora 14.

Θα εξηγήσω λίγο τι γινεται με το script, όμως μπορείτε να το αντιγράψετε και να το επικολλήσετε στο terminal ολόκληρο χωρίς να γράψετε τίποτα εσείς! Απλά τα γράφω για να μη τα κάνετε απλά copy paste χωρίς να ξέρετε τί γίνεται περίπου.

Στη πρώτη εντολή δημιουργούμε ένα κενό αρχείο που θα είναι o C κώδικας με το fix μας (μια συνάρτηση που λέγεται memcpy) στο οποίο θα γράψουμε ότι χρειάζεται και θα περιμένει την λέξη EOF (που σημαίνει τέλος του αρχείου , end of file). Μετά δίνουμε την εντολή cd και μας κατευθήνει στον φάκελο .mozilla (η τελεία δίνει είναι κρυφός φάκελος που βρίσκεται στο home folder και για να τον δούμε πατάμε control+H). Εκεί βρίσκονται οι ρυθμίσεις του Firefox. Κάνουμε compile το C αρχείο και εκτελούμε και την εντολή ld για τον GNU Linker.

Στο επόμενο βήμα δημιουργούμε ένα μικρό shell script το οποίο απλά θα προφορτώσει τo binary αρχείο που φτιάξαμε προηγουμένως την ώρα που ανοίγει ο Firefox! Πάμε λοιπόν μετά στο εικονίδιο του Firefox στη μπάρα στην επιφάνεια εργασίας και κάνουμε δεξί click. Στην 3η σειρά με τη λέξη “Command” επιλέγουμε το Browse και από το Home folder πηγαίνουμε στο φάκελο “.mozilla” και επιλέγουμε το custom_firefox_startup.sh. Κλείνουμε κάθε παράθυρο του Firefox που είναι ανοιχτό και ξανανοίγουμε. Έτοιμοι! 🙂

Microwave circuit design/sim programs on Fedora

Hello once more,

Recently I made a presentation at the TEI of Pireaus on Arduino and Fedora Electronic Lab. Hopefully, I will repeat it to give the chance to more people to come.

I intend to make some simple tutorials (we’ll see how complex they’ll get on the way actually) on using programs that assist or create designs and simulations of microwave circuits and set-ups. In this post, I will just post a simple guide to install some programs that deal with the design and simulation of microwave circuits and components. What I am trying to do is at least reach the 3D FDTD simulation using free and open source software. Currently I have found Qucs, Transcalc, emGine and MIT’s Meep that will help us reach this goal. I am trying to install Elmer-FEM (which looks extremely cool and a lot easier than Meep) but unfortunately, I couldn’t install it due to problems with a certain dependency (ftgl-devel is installed but not found 😦  see here).

You can easily install Qucs with : $ su -c “yum install qucs” (it’s also inside Fedora Electronic Lab together with other valuable packages). It’s a circuit simulation program (not only for microwave circuits) that has various microwave components to use.

Transcalc is ” an analysis and synthesis tool for calculating the electrical and physical properties of different kinds of RF and microwave transmission lines”. The idea behind this is to get the dimensions of real components and then use the results (the parameters we need) in our simulation programs!

To install Transcalc you will need to install the GTK2.0 development files (gtk2-devel on fedora). After you download the package and place it in a folder of your choice (I have a “programs” folder and place every to-be-installed program there) you can go to the terminal and write :

$ cd ./your_path_to_transcalc_folder/

$ ./configure (if something is missing search in yum or “Add/Remove applications”)

$ make

$ su -c “make install” ….and to run the program just type : $ transcalc

A few words for emGine! It’s a full-wave 3D electromagnetic field simulation environment solving Maxwell’s equations in time-domain. You create 3D models of your components, put the parameters and then simulate and get your graphs and results. Not 3D FDTD.

Let’s install it then! You are going to need to find and install (if not already installed): tkinter , python, vtk , vtk-devel, wxWidgets (I got wxBase, wxGTK, wxGTK-gl, wxGTK-media installed) , wxPython, numpy and python-matplotlib. Now go to the download page and get the package (emGine GUI platform independent of course) .

As you understand we are going to compile using python. So, go to the emGine folder (like we did in transcalc) and just type in your terminal:

$ python emGine.py

It might take a bit to run, but if nothing is missing the program shoud start. And that’s for the emGine environment.

Now, to the more serious staff. Meep is an FDTD program to model electromagnetic systems! One of my next posts will be an example running a 3D (I hope) simulation (if not a 3D then a 2D). I will try to get the dimensions of a real waveguide, get the parameters from Transcalc, use them on Meep to visualize a cool simulation and maybe see what we can do on a circuit with Qucs.

What did I need to install Meep on Fedora 14?

libctl (new version on the link, or install libctl and libctl-devel version 3.0.2 from yum etc.), hdf5 and hdf5-devel. I think that was all I needed.

Then let’s go to the terminal one last time:

$ export LDFLAGS=”$LDFLAGS -lm”    (this line is needed to avoid the DSO Linking error with libm.so)
$ make
$ make install

Now if you type: $ meep …you should get:  meep>    I tried to make a 2D example to simulate a waveguide. Not the fastest thing I have done in my life 😛

The reference is here. Start the calculations and wait for my 2nd post. (Also, just found it, check this out, there are tools like the japanese ADVENTURE and its modules)

Athens Digital Week 2010 recap

One of the major events here in Athens (and Greece), that allows us to inform people about FLOSS, lets us give a great deal of swag and meet interesting people is called Athens Digital Week (ADW). This year ADW 2010 had once again an Open source section and (once again) the Greek Fedora team couldn’t miss the chance and make the best of it! So, the set up of the first day had to be done by me, Nikos, Thalia, Anastasis and Christos! Pierros was at POSSE in South Africa that day but he joined us on Friday. Many other Fedora members joined as well! Thanks to everyone!

In overall, the event was quite good. Not like last year as I was told (last year I was living in Barcelona 🙂 ) and even in 2008 I remember even famous bands playing at the stage of ADW. Budget problems maybe. Anyway, in 2008 I had the chance to meet Max Spevack just for a little bit. This year, I met Jon “maddog” Hall. And he is one of the most impressive people I’ve ever met, due to his work and ideas around FLOSS, plus his amount of experience that makes him a perfect advice-giver. I learnt a lot (eg. Project Cauã) and had fun (ouzo and mezes FTW). And that’s what matters. Not to mention that after he concluded his talk he thanked Pierros Papadeas (who invited him), the Greek Fedora team 😀  and ADW.

Concerning the Fedora presence. As usual we informed people for our latest news and technologies, how we practice freedom through software and how we work as a community. At our booth, we also presented to people many of our Spins like Fedora Security Lab, Fedora Electronic Lab (I didn’t try much, it is an awesome spin), and Greek Fedora EDU remix. Well, of course we had balloons and a pop corn machine because in Fedora contribution is a party!.  Plus, chats with Maddog every now and then. ‘Nough said.

Anastasis Stasinopoulos talked on Saturday for Fedora Security Spin. Christos Bacharakis made a talk for Fedora on Education, followed by my talk on Fedora 14! I also co-presented the same morning a workshop on Arduino (together with Pierros, tzikis and Konstantinos).

In overall, it was a successful event, as for  next year I hope it will get even better 😀

Some photos here (most of the pictures were taken from Thalia)

=== In Greek / Ελληνικά ===

Μία από τις μεγαλύτερες τεχνολογικές εκδηλώσεις στην Αθήνα (και στην Ελλάδα), στην οποία ενημερώνουμε σχετικά με το ΕΛΑΚ λογισμικό και υλισμικό, να μοιράσουμε υλικό και να συναντήσουμε ενδιαφέροντα άτομα, ονομάζεται Athens Digital Week (ADW). Φέτος το ADW 2010 είχε και πάλι Open source τμήμα και (πάλι) η ελληνική ομάδα του Fedora με χαρά της το εκμεταλλεύτηκε στο βέλτιστο βαθμό! Την 1η μέρα στήσαμε με Νίκος, Θάλεια, Αναστάση και Χρήστο. Ο Πιέρρος βρισκόταν στην Νότια Αφρική για το POSSE αλλά την Παρασκευή κλασσικά συμμετείχε και εκείνος. Δεν ξεχνάω και τα υπόλοιπα μέλη της ελληνικής ομάδας Fedora που ήρθαν και βοήθησαν! Ευχαριστώ!

Σε γενικές γραμμές η εκδήλωση ήταν καλή. Από οτι μου είπαν όχι σαν πέρσυ (έλειπα στην Barcelona), και σίγουρα όχι όπως το 2008 που ήμουν παρών. Οικονομικής φύσης προβλήματα μάλλον. Πάντως, το 2008 είχα την ευκαιρία να συναντήσω τον Max Spevack για λίγο ( ήταν οι πρώτοι μου μήνες ως μέλος του Fedora). Φέτος, γνώρισα τον Jon “maddog” Hall. Είναι σίγουρα από τις πιο εντυπωσιακές προσωπικότητες που έχω γνωρίσει, λόγω της δουλειάς που έχει κάνει αλλά και των ιδεών του στο ελεύθερο και ανοιχτό λογισμικό και λόγω της εμπειρίας του που φάνηκε στις συμβουλές που μου έδωσε. Έμαθα πολλά (πχ. Project Cauã) και διασκέδασα. Και αυτό μετράει. Στο τέλος της ομιλίας του ευχαρίστησε τον Πιέρρο Παπαδέα (που τον προσκάλεσε) την ελληνική ομάδα του Fedora 😀 και το ADW.

Για την παρουσία του Fedora. Ως συνήθως ενήμερώσαμε τον κόσμο για τα νέα και τις καινούριες τεχνολογίες στο Fedora, το πόσο χρήσιμη είναι η ελευθερία στο λογισμικό, πως την ασκούμε και πως δουλεύουμε ως κοινότητα. Στο booth δείξαμε και τα Spins του Fedora. To Fedora Security Lab, Fedora Electronic Lab ( εντυπωσίασε αρκετό κόσμο που ασχολείται με τον τομέα) και το Ελληνικό Fedora EDU remix. Φυσικά είχαμε μπαλόνια και μια μηχανή pop corn γιατί στο Fedora συμμετέχουμε γιορτάζοντας.

O Αναστάσης Στασινόπουλος μίλησε το Σάββατο για το Fedora Security Spin. Ο Χρήστος Μπαχαράκης παρουσίασε το “Fedora στην εκπαίδευση” και ακολούθησε η ομιλία μου για το Fedora 14! Επίσης, συμπαρουσίασα (μαζί με Πιέρρο, tzikis και Κωνσταντίνο) ένα workshop για το Arduino.

Γενικά ήταν μια επιτυχημένη εκδήλωση και ελπίζω να πάει ακόμη καλύτερα του χρόνου 😀

Μερικές φωτογραφίες εδώ (σχεδόν όλες έχουν τραβηχθεί από την Θάλεια)

MSP430 (ez430) on Fedora

For learning purposes I currently have on my hands a EZ430-F2013 Development Kit (We all should also use Arduino 🙂 ). This kit comes with a CD containing proprietary software (an IDE) in order to program and debug the MSP430 microcontroller. So, I took the chance to run it on Fedora using Linux tools and a few resources on the internet. In this post I will write down how you can program and debug your ez430 using Fedora 13 and your terminal.

First, I plugged in the ez430 and opened a terminal (yes we will work only this way for now). Write down lsusb and hit enter. Then you should get some lines containing this one:

Bus 005 Device 003: ID 0451:f430 Texas Instruments, Inc. MSP-FET430UIF JTAG Tool

That means that by default your system recognises the device and you can actually communicate with it.

Next, we need our tools! Go to System ->Administration-> Add/Remove Software (or use yum install etc.). The software we need is (actually not sure if everything is needed):

  • latest version of gcc, texinfo, patch, ncurses5-dev, zlib, zlib-dev, libX11-dev, libusb-dev (not only libusb1-dev), libreadline6-dev, msp430-binutils, msp430-gcc, msp430-libc

and also : mspdebug (the program that actually does the work).To install it manually (in case there is an older version on the repository) download the .tar file create a  folder named “Programs” (in case you don’t have one) on your Home Folder.Then, extract the mspdebug folder there!

With your terminal (you can auto-complete the words in the directory using Tab on your keyboard) :

$ cd /home/(your user name on Fedora)/Programs/mspdebug-0.11

(now you are in the mspdebug folder with your terminal, the version 0.11 is the current one I use, yours can differ)

$ make (this will compile the program)

$ su -c “make install” (and give your root password to install it)

(the $ symbol is just to show that you are using different commands in the terminal, don’t copy it)

now you have installed mspdebug! Great!

If you are ready to use the MSP430 you should have a program already written. In case you don’t, get this example (modified by me to get it to compile) that flashes the internal LED of the device:

/* Blink LED example */
#include <msp430x20x3.h>

/** Delay function. **/
delay(unsigned int d) {
int i;
for (i = 0; i<d; i++) {
nop();
}
}

int main(void) {
WDTCTL = WDTPW | WDTHOLD;
P1DIR = 0xFF;
P1OUT = 0x01;   // THE x IS NOT Copy-Pasted CORRECTLY 🙂

for (;;) {
P1OUT = ~P1OUT;
delay(0x4fff);
}
}

Create a file named blink.c in a folder of your choice, copy this on the file and then cd on the folder. Now to compile it we need 3 lines (I also changed this to work):

$ msp430-gcc -Os -mmcu=msp430x2013 -o led.elf blink.c

$ msp430-objdump -DS led.elf > led.lst

$ msp430-objcopy -O ihex led.elf  led.hex

In order not to do this every single time, you need to run the program, you can create a Makefile based on the one in this site (it’s inside this zip file).

Next, to run mspdebug in order to flash the program into the MSP430, type :

$ mspdebug -d /dev/ttyUSB0 uif

(“/dev/ttyUSB0” is of course the ez430 if you don’t have any other device and “uif” the parameter to run it with mspdebug, check the manual for more)

To flash the program you need to type : prog led.hex . Notice that it is a command to control mspdebug and not the terminal). If you push Control+D mspdebug will close, the ez430 will reset, start the program and also blinking the LED! 🙂

My resources were 3 posts in this site : http://bit.ly/deonNa I should also mention that I have installed all the Fedora Electronic Lab packages with: $ su -c “yum groupinstall “electronic-lab”

Software Freedome Day Athens (review)

Yesterday, as you may know was Software Freedome Day. I will start with this link [1]

Yes the only people that were present were members of the greek Fedora team [2](we could be more but some lucky ones are at FUDCon @ Zurich 😀 ) together with Richard Kweskin of Hellug. We made a simple booth outside of NTUA at Stournari str., with leaflets and stickers and started to inform people about free and open source software. We started at around 11.30 and finished at 2.30. In the mean time Richard gave as a copy of a licence to have presence at the corner of Stadiou str. and Aiolou str., where we also went for the last 30 minutes.

Some photos here [3]

Next event, Athens Digital Week [4]. See you there!

==In Greek/Στα ελληνικά==

Εχθές ήταν  η παγκόσμια ημέρα ελεύθερου λογισμικού. Έτσι, το Fedora δεν μπορούσε να μην συμμετάσχει ενεργά σε αυτό το γεγονός. Και όταν λέμε ενεργά, το λιγότερο που μπορεί να κάνει κανείς είναι να δώσει το παρόν κοντά στον κόσμο για ενημέρωση. Έτσι και έγινε στην οδό Στουρνάρη έξω από το Πολυτεχνείο (αρχίσαμε κατά τις 11.30). Μάλιστα είχε κανονιστεί και ανακοινωθεί στο site του SFD [1](Software Freedom Day). Παρόντες είμασταν μέλη της ελληνικής ομάδας του Fedora [2] και ο Richard Kweskin του Hellug που μας έφερε φυλάδια αλλά και μια άδεια του Δήμου Αθηναίων  για να μιλήσουμε στην γωνία Σταδίου και Αιόλου στο κέντρο όπου και πήγαμε στις 2 το μεσημέρι για τα τελευταία 30 λεπτά (έτσι για δοκιμή και για να μην πάει χαμένη η άδεια).

Μερικές φωτογραφίες εδώ [3]

Το μόνο παράπονο, ότι δεν είμασταν αρκετοί για να ενημερώσουμε τον κόσμο. Ελπίζω την επόμενη φορά του χρόνου να είμαστε πιο ενεργοί όλοι σε εκδηλώσεις όπως το SFD και όχι μόνο στα μεγάλα events όπως το Athens Digital Week[4] που έρχεταιιιιι 😀 .

[1]  http://wiki.softwarefreedomday.org/2010/Europe/Greece/Athens

[2]  https://fedoraproject.org/wiki/FedoraEvents/SoftwareFreedomDay2010Athens

[3] http://picasaweb.google.com/anton.cost/SoftwareFreedomDay2010Athens#

[4] http://athensdigitalweek.org/

I really really gnome-do

Short story : I installed gnome-do on Fedora. Do your self a favour and install it too.

How?

For Fedora users go to Add/Remove Applications and type gnome-do. Select the application and press “Apply” to install it 🙂

or for keyboard-lovers (the 1st way is more simple) just type (or paste) in your terminal:    su -c ” yum install -y gnome-do” , give your root password and you are good to go.

Actually, I don’t really like -y inside the command ( “-y” means yes to any message that occurs after you tell yum you want to install a package). I like to see what I install  (dependencies etc). But it’s faster this way for gnome-do. Gnome-do is similar to Mozilla’s Ubiquity for Firefox.

By default it is activated automatically at start-up and afterwards you need to press a keyboard shortcut (<Super>+space). Gnome-do is of course customizable. You can also add plug-ins. (For KDE fans, the default krunner -thanks Andrew-)

In Greek:

Με λίγα λόγια : Εγκατέστησα το gnome-do στο Fedora. Βάλτε το!  Πως? (1o link πάνω) [1]

[1] http://do.davebsd.com/wiki/Installing_Do Μεσω του γραφικού περιβάλλοντος πηγαίνουμε System->Administration->Add/Remove Software και γράφουμε στου κουτάκι της εύρεσης “gnome-do” επιλέγουμε το πακέτο και έπειτα πατάμε κατω δεξιά το Apply.

Αλλιώς για τους λάτρεις του terminal su -c ” yum install -y gnome-do”  🙂

Είναι προεπιλεγμένο να ξεκινάει με την εκίνηση του Fedora και ενεργοποιήται (σε περίπτωση που το χρησιμοποιήσετε και χαθεί) με το <Super>+Space (το Super είναι συνήθως το εικονιδιάκι των Windows -_- ) .Έχει και plugins (προεκτάσεις).Για τους λάτρεις του ΚDE (μπλιαχ :P) υπάρχει προεγκατεστημένο το krunner.

Drawing arrows with GIMP

Today I desperately needed to draw arrows in a picture to point parts of an Arduino stack with an Ethernet and Xbee shield.

So, I took the picture of the stack, increased the contrast and made other adjustments to perfect the pictures, and I was ready to place the arrows. Arrows? How? OK, I googled and found this http://registry.gimp.org/node/20269

You just have to download the .scm file. If you are a Linux user (obviously I use Fedora), go to your Home Folder and press Control+H to unhide the hidden folders. Next, go to the “.gimp-2.6” (1st: Yes there is a full stop, 2nd: 2.6 is the name of the folder right now according to GIMP’s current version). Inside this folder find the folder “scripts” and place there the .scm file. Now, open GIMP (or re-open if already running), go to Tools and you are good to go 🙂

(Tip: To draw an arrow you must use the path tool at the toolbox. Just click one time to point the start of the arrow and a second time to point the end. You will just make a straight line that will be used as a path)

In Greek : Στον σύνδεσμο που υπάρχει παραπάνω μπορείτε να κατεβάσετε το .scm αρχείο που θα σας επιτρέψει να σχεδιάζετε βέλη με το GIMP αυτόματα. Για να λειτουργήσει το αυτό το script πηγαίνουμε στο Home Folder, πατάμε Control+H για να αποκαλυφθούν οι κρυφοί φάκελοι και στη συνέχεια πηγαίνουμε στον φάκελο “.gimp-2.6″ (1ον ναι υπάρχει τελεία, 2ον το όνομα προέρχεται από την τωρινή έκδοση”). Μέσα σε αυτόν τον φάκελο υπάρχει ο φάκελος “scripts” όπου και τοποθετούμε το .scm αρχείο. Ανοίγωντας το GIMP τώρα μπορούμε να δούμε στο Tools το Arrow 🙂

(Συμβουλή: Για να φτιάξετε το arrow πρέπει να σχηματίσεται ένα μονοπάτι με το path tool. Αν απλά κάνετε ένα κλικ για την αρχή και άλλο ένα για το τέλος του βέλους εκεί που επιθυμείτε είστε έτοιμοι να φτιάξετε το βέλος με το Arrow που βρίσκεται στα Tools)

GFOSS Conference 2010

Yesterday ended the GFOSS Conference 2010 that took place in Athens at NTUA (National Technical University of Athens). It was an event that started on Friday, but yesterday was special because of the workshop I was organising this week together with Anastasis (anast)! The subject was (in translation) “Fedora Project : Remix and Spin it! The Fedora operating system you own (and not only that)”. Furthermore, we also had booth presence on both days with the usual swag 🙂

The workshop lasted 1 hour ( the schedule said 2 hours) but I think something more than that would be boring. Some setbacks occurred previously that day and affected the workshop a little bit. First, I tried to create an iso image using a kicksart file I made that unfortunately needed a bit of time to be created due to yesterday’s bad signal of the wifi where the booth of Fedora was (damn near fields), so I didn’t make it in time for the “Takis OS” Live CD I wanted to create. Second, I didn’t expect my laptop to fail me when I tried to plug in the dvi cable. I count it as a setback but, ok I overcame it thanks to the laptop of Anastasis 🙂

I think it was around 15 people that joined the workshop (thanks to everybody). I tried to pass the knowledge of what is a remix, a spin, their differences (and similarities), guidelines, processes, kickstart files, livecd-tools, cobbler…but not to the extent of getting down with too much coding, configurations and setting many arameters. In a few words I tried to show the way for a simple creation of a Remix from the kickstart file until the creation of a LiveCD and told a few words about the magic things cobbler can do. Anastasis talked about Geo Spin and Security Lab spin. I couldn’t miss the chance to talk about Fedora Electronic Lab too. Also, I am happy that Nikos (comzeradd) and Pantelis (pant) joined us as well!

click for more photos