These are more just notes for myself, but maybe someone else will find it useful.
So I got a Samsung Galaxy S2 I9100 to play with and it had Android 4.0.4 (Ice Cream Sandwich) on it which was pretty easy to root with CF-ROOT, but I wanted to use to latest official Android firmware for this phone, which is by the time of this post is Android 4.1.2 (Jelly Bean).
Auto update was not an option, since I had CF-ROOT on it, so I had to find a stock firmware and use Odin for the update. Getting a stock firmware was the easy part. You can get it for example here: http://samsung-updates.com/. So in my case, I needed one from here: http://samsung-updates.com/device/?id=GT-I9100 and for me it was a I9100XWLSW.
So you just download, extract the files, and use Odin3_v1.85 to Download the stock firmware. You can easily find a howto on this, but here's one for example: http://theunlockr.com/2013/04/09/how-to-unroot-the-samsung-galaxy-s2/
Next, rooting the 4.1.2. Again, lots of howtos can be found on this too, but most of them suggest you to use Odin3_v3.07. Well, when I tried it, SuperSU was not correctly installed, and the whole system got a little slow, so I tried with Odin3_v1.85 and it worked like a charm.
So basically you can follow this howto: http://www.teamandroid.com/2013/07/28/root-xwlsw-android-412-galaxy-s2-i9100-stock-firmware/ but instead of Siyah-s2-v6.0b4.tar I would recommend using the SiyahKernel S2-v6.0beta5 which you can find here: http://d-h.st/frK.
And that's all! Happy hacking!