I know this is common stuff for most people here but considering my extremely limited knowledge in smart phones, I was proud of myself for accomplishing this with little trouble.
I have a HTC desire HD. a old phone and htc decided not to roll an update from android 2.3.5 to 4.x eventhough there is enough space.
so I found out on google there is a procedure called rooting and it is possible to do from linux. I don't need to have windows installed.
I found this website with a good procedure on how to do it. I had to download something called a hack kit, plug in the phone into the PC USB port open a terminal su to root and run the hack script.
The hack script downgraded the phone to 2.3.2 and it installed something called cyanogenmod recovery.
then I went to http://forum.xda-developers.com and downlaoded a 4.2.1 rom and google apps zip file and put them on the sdcard
the guide said hold the volumedown key and power the phone to boot to recovery. this wasn't reliably working for me but the hack script somehow managed to boot me into recovery mode and I formatted /system /data and /cache and pointed the recovery application to the zip file containing the 4.2.1 rom and it installed correctly. I did the same with the google apps zip file. and rebooted.
It was stuck for an hour at the boot screen
so I ran the hack script again, repeated the same procedure and this time I did a reboot between the android update and the google apps package.
after this reboot, I booted into android 4.2.1 / kernel 3.0.57
everything worked fine apart from auto screen rotation which seemed broken.
today they released an updated rom with kernel 3.0.58 and I formatted /system /data /cache and installed it.
auto screen rotation worked again!

I had never tried this before and I was surprised how easy and (noob friendly) the guides were :)