Wednesday, December 31, 2014

Fedora 21 Before And After Installation

I know this looks scary for the novice. But is not difficult. It took me a lot of time (wouldn't dare to say how much) to figure all these. I also wrote this here because i need to save me some head scratching during the next installation.

This customization is described here is down to command level for Fedora 21 XFCE live installation (a few commands are good only for AMD64). That is you can paste and execute the commands provided here in a terminal, but for that you need first to paste this whole post in a text file in a partition unaffected by installation (unformatted). Or print it. XFCE because i don't need an animated desktop and all the inconveniences (processor load) that come with it.

This whole new custom Fedora 21 installation as described here should not take more than 3 hours. That time is the only expense for a free and extremely performant and secure OS complete with free multimedia, internet and office software.

If i did it, everybody could.

Without customization and manual partitioning, it should take less than an hour and that is for the complete IT ignorant.

Here it starts. Download and burn on a DVD as an ISO file the live version of the XFCE from this page (any burner on a Windows or Linux computer should have that option). The size is a bit less then 1 GB.

http://spins.fedoraproject.org/xfce/

Boot from live installation disk created as described above.  (You may first probably have to enter the BIOS by pressing repeatedly the delete key during normal boot-up and choose the DVD reader as the first booting device. Then, insert the DVD with the live image in the DVD player and restart the computer). If you don't want any of the customization described below, choose the default or common sense answers at each step, which BTW are similar to a Windows installation, and stop here.

But Fedora live DVD is much more than an installation kit. Once you boot from that DVD as described above, you get a functioning operating system with which you can even get online and browse the web. To start the installation process, you have to double click the Install icon on the desktop.

Any of the steps described below are optional and independent of each other.

Fedora (F) 21 installer has been modified since F20. There is an option to keep the old partitioning. There is an option for LVM. (There are other more options as partitioning.)

Don't know about LVM. I chose standard partitioning to keep the old partitioning from F20 which is similar to this in the link below.
 https://docs.fedoraproject.org/en-US/Fedora/17/html/Installation_Guide/s2-diskpartrecommend-x86.html

So in the first screen there is a partitioning option (i always forget after i am done with, can't save that screen). Left lower icon. I write here for those familiar with manual partitioning. After choosing that icon, i choose standard partitioning at top and select the manual partitioning button. Then i hit the Done button, that for some strange reason in this installer for F21 is at the upper left corner. Then i get to see the old Fedora installation with all its partitions that is hidden behind a drop menu. To grab a partition in the new installation all i have to do is click on it and rewrite the mounting point (/, /home, /tmp, etc.) and choose to format it or not.

These are the most critical moments. On an installation i always choose to keep the old /home and /var partitions unformatted. That is i don't make the mistake to check the format box near each. If i do so i would wipe out all my recent data and many settings, including desktop, browser, the last file i've been editing and all the others.

By keeping /home partition unformatted and creating when asked an non-privileged user name identical to the one in the old installation, there is very little work to be done for settings and after a clean install of a new version (or the same version), by keeping the /home and /var partitions unformatted, the desktop and the browser will look similar, bookmarks included, so the rest of your computer.

The non-privileged user is needed for doing everything on the computer except maintenance, for security reasons - if a non-privileged account is hacked, there is less they can do without the root password, pretty much like in Windows.

However, all commands (mostly with yum) described here are given in privileged a root terminal, that is a terminal after the command su has been issued and the root password introduced. (You can open a terminal in any directory found with the File Manager by right clicking and choosing Open terminal here). For the privileged (root) File Manager session, after issuing the su command in that terminal and introducing the root password, can type the command #thunar (that invokes the file manager, named like this in XFCE) and get into a privileged session with File Manager, that in turn can open (by clicking) privileged files for editing.

First thing that i do is i get rid of the annoying log-in for the non-privileged user at every boot (and the need to enter a 16 characters password each time, that number being my choice) by going in etc/lightdm/ and modifying and uncommenting two lines towards the end of the file lightdm.conf. By getting rid of the log-in and not needing to enter the password each time at boot time you don't compromise security except if somebody you don't trust has physical access to your computer.

autologin-user=george
autologin-user-timeout=0

After this, a graphical local install from a /var location (by double clicking on the rpm package in the the File Manager) of the yum plugin remove-with-leaves (among others, yes that's why i kept /var unformatted). If you don't have it saved for this purpose from the previous install, you may briefly go online by activating the network from the icon in the taskbar then install it by privileged terminal command

#yum install yum-plugin-remove-with-leaves

(yum is the name of the installation and removing program of choice in Fedora 21. The other one is rpm but more difficult to work with. yum-plugin-remove-with-leaves is a plugin that insures the removal of any useless (and potentially unsafe) packages that are linked only to the main packages removed so the cleanup is more complete).

Then i do this:

#yum remove claws-mail pidgin libpurple spice-vdagent sendmail pragha remmina tigervnc-server-minimal transmission liferea midori samba* openssh* --remove-leaves

By doing these two last steps i get rid of about 100 packages that i don't use, of which many are trying to connect to the internet on their own will. That is about 10% of the whole OS. Some of the packages on the list above are present only in Fedora 20 but the command will still work for the rest.

Then i copy the files iptables and ip6tables in etc/sysonfig from a location in /home which i kept from the F20 installation for this purpose. Later i will disable firewalld and install and enable iptables.

Then there is still a weird setting i will never understand. In etc/yum.conf there is a line keepcache=0. I modify it to 1 so all the rpm packages i ever download and install remain on my hard drive. However, lately this proved less and less useful. It was so while i was still installing it many times and tried to do the updates locally. It is possible by forcing yum to update locally.

#yum install iptables-services

#systemctl stop firewalld

#systemctl disable firewalld

#systemctl enable iptables

#systemctl start iptables

#yum update

Reboot to make sure everything works. Check iptables with

#iptables -S

About hosts file i wrote here http://georgesblogforfriends.blogspot.com/2013/04/hosts-file.html

About moving Chrome cache in RAM i wrote here https://www.facebook.com/george.ion.7505/posts/206431952892995

This is one setting that probably affects only my computer but i still write it

Go Chrome/Settings/Avanced and remove the check on Use hardware acceleration when available.

I create the files and paste in each

/etc/yum.repos.d/google-chrome.repo

[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1

/etc/yum.repos.d/google-earth.repo

[google-earth]
name=google-earth
baseurl=http://dl.google.com/linux/earth/rpm/stable/x86_64
enabled=1
gpgcheck=1

then

#yum install google-chrome-stable --nogpgcheck

#yum install google-earth-stable --nogpgcheck

For the more advanced user, here is the installation of the video drivers from Nvidia. This is critical as if you are not successful, your system will most like become useless and will need to be reinstalled and rely on the 30% slower, reverse engineered generic nouveau driver.

First, and the most important, you have to know exactly which of the drivers from nvidia you need, according to your video card. 340.xx, 304.xx, 173.14.xx, 96.43.xx or 71.86.xx This page will help you. http://www.nvidia.com/object/IO_32667.html

To find out what video card you have you do

#lspci -v | less

Then you go to this page

http://rpmfusion.org/Configuration

And install the free and non-free repos necessary to download the drivers, under the title

Graphical Setup via Firefox web browser

Then, after

#yum list *nvidia*

you will choose which driver you need, depending on the kernel version and video card found in the Nvidia web page above.

to find out which kernel version you have you do

#yum kernel list

Then installation of the driver. I think for my system the command was

#yum install kmod-nvidia-304xx-3.17.4-301.fc21.x86_64.x86_64

Then i install the optional programs like

#yum install gthumb (basic pictures management and adjusting).

#yum install audacity (audio recorder)

#yum install vlc (a complete media player)

#yum install stellarium (planetarium software)

#yum install libreoffice (Office equivalent for Linux

#yum install lmms (trackers, sequencers and synthesizers)

Last few times i had a problem with google earth. A conflict with a file, had to rebuild the rpm first by installing rpmrebuild

#yum install rpmrebuild

then

# rpmrebuild -ep /home/geek/Downloads/google-earth-stable_current_x86_64.rpm

Scroll down and remove line: %dir %attr(0755, root, root) "/usr/bin"

Save / exit the editor, with the command <ESC>:wq

After a while you will be asekd if to contine, should answer yes.

see rpmrebuild exiting saying something like: result: /root/rpmbuild/RPMS/x86_64/google-earth-stable-7.1.2.2041-0.x86_64.rpm

Then go cd  /root/rpmbuild/RPMS/x86_64/ and run #yum localinstall google-earth-stable-7.1.2.2041-0.x86_64.rpm
etc.

Here is a version of the text file iptables that is needed in /etc/sysconfig for the iptables to work

# Generated by iptables-save v1.4.21 on Sat Dec 27 23:21:37 2014
*filter
:INPUT DROP
:FORWARD DROP
:OUTPUT DROP
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p udp -m udp --sport 53 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 80 --dport 30000:65535 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 443 --dport 30000:65535 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 1935 --dport 30000:65535 -j ACCEPT
-A INPUT -j LOG --log-prefix "[-P BLOCK] "
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j LOG --log-prefix "[-P BLOCK] "
-A OUTPUT -p icmp -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -p udp -m udp --sport 20000:65535 --dport 53 -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 30000:65535 --dport 80 -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 30000:65535 --dport 443 -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 30000:65535 --dport 1935 -j ACCEPT
-A OUTPUT -j LOG --log-prefix "[-P BLOCK] "
COMMIT
# Completed on Sat Dec 27 23:21:37 2014

Tuesday, December 23, 2014

Amnezia de dimineață

Ieri noapte, în jur de ora 12 și după îmi era foarte rău. În mintea mea, un singur gând. Spital. Simptome: durere în partea inferioară a cutiei toracice, palpitații. Probabil, hernie hiatală (când stomacul trece prin diafragmă și apasă organele din cutia toracică, inclusiv inima). Sau vreo condiție fiziologică ne-întâlnită în practica curentă, greu de descris. Chiar înainte de a mă culca, am avut ceva activitate fizică. Simptome care seamăn foarte mult însă cu cele de la un atac de inimă pe care le văd mereu descrise peste tot.

Ierti am spălat caloriferele. Am scris pe fb despre procedură. https://www.facebook.com/george.ion.7505/posts/316931218509734:0

Acu vreo 3 zile stăteam noapte târziu pe la 2 în pat și nu puteam să adorm. A trecut o mașină pe alee și a intrat în parcare. Avea toba modificată. Au vibrat pereții, a pornit termostatul care e mecanic și sensibil și la vibrații, probabil era pe cale să pornească. Ceva extra praf de la vibrații a căzut pe calorifer, care a pornit și s-a umplut camera de fum, care a ținut vreo oră. Am oprit caloriferul ca să pot dormi.

Au trecut 2 luni de când le-am spălat ultima oară. Din cauza temperaturii mari la care lucrează, de fiecare dată când termostatul le pornește, de obicei declanșat de vibrații când e pe aproape, se umplu camerele de fum. Pentru că în timp se acumulează pe aripioarele acele din aluminiu praf care arde lent și scoate din ce în ce mai mult fum. Probabil și ceva monoxid de carbon, din moment ce ieri mă durea capul când porneau.

Deci durere în partea inferioară a pieptului, între omoplați, palpitații, greutate în respirații, senzația că mi se oprește inima.

Mi s-a întâmplat de atâtea ori. Acu zece ani n-aș fi ezitat să mă duc la spital. Dar după ce am fost de atâtea ori și am văzut că tot ce fac e să mă țină câteva ore în camera de urgențe până îmi revin și apoi mă lasă să plec, îmi este greu să mă hotărăsc să mă duc. Încă nu am folosit asigurarea anul acesta și co-plata e de vreo mie de dolari. Mai sunt câteva zile și se termină anul. Mă gândeam la orele suplimentare pe care le face nevastă-mea și am preferat, ca de atâtea ori anul acesta, să stau acasă.

La fiecare respirație îmi venea să strig: Ajutor!

Mi-am luat tensiunea. 15/9 sau așa ceva. Puls normal. M-am mai liniștit.

Am stat vreo jumătate de oră într-un scaun până ce probabil stomacul s-a mai lăsat în jos, s-a diminuat cantitatea de gaze din intestine și am simțit că pot să respir.

 M-am așezat în pat și eram aproape să adorm când mi-am amintit că nu am băgat covorul la loc sub un calorifer. Era ridicat lângă și era ceva risc de foc. Deci m-am dus, am ridicat caloriferul, am băgat covorul, am trezit-o pe Angela, m-a înjurat, după care au început aceleași simptome. Mai rău. Eram și foarte obosit. Stăteam pe marginea patului când am simțit o vibrație temporară în cameră, de la o mașină. O perioadă scurtă de timp când turația motorului a rezonat cu pereții, când am simțit cum îmi vibrează tot corpul, coloana și o durere ascuțită în piept și mi s-au agravat toate simptomele. Și m-am gândit că e posibil ca în timp ce fac un efort sau mă concentrez la ceva sau scriu să apară asemenea vibrații și să mă facă să mă simt rău. În ultimele zile de multe ori m-am ridicat brusc de la calc simținând că leșin și am ieșit afară fiindcă înauntru era plin de fum.

Am fost sub foarte mare tensiune zilele acestea. În legătură cu schimbările din România, aniversarea revoluției și ce am descoperit referitor la asemănări cu actori de personaje din viața publică din România și alte țări.

Ca de obicei după faza cu probleme la culcare, care mi se întâmplă o dată la o săptămână poate, în medie.

M-am trezit dimineața, după 6 ore de somn (în ultimele zile am dormit 8 dar cu fum), cu un fel de amnezie mult mai accentuată decât normală. Căci dimineața îmi trebuie ore ca să-mi amintesc unde sunt, ce fac, de s-a întâmplat în ultimele zile, ce am scris. De obicei, se risipește în timp ce citesc știrile, ce îmi ia cel puțin o oră. Dar azi am uitat de câte ori mi-am promis să nu mai sun dimineața în România.

Toate conversațiile pe care le am la această oră relaxată sunt în defavoarea mea. Pe lângă faptul că atunci când se termină îmi vine să arunc telefonul. Toți cu care vorbesc par a adopta un fel de tactică. Schimbarea subiectului în momentele când spun ceva important sau o concluzie. Întreruperi dese. Aluzii, amenințări, divagații, subiecte paralele. Ei vorbesc din ce în ce mai prescurtat, mai agramat și mai nepoliticos până când încep să vorbesc și eu la fel. Totdeauna au altceva de făcut în momentul acela și imediat după. Să spun în grabă ce am de spus. Zgomote de fond. Tuse, mașini, alte persoane. Minimalizarea a ce spun, deși sunt niște subiecte care zic eu ar trebui să trezească atenția oricui.

Cu alte cuvinte scot de la mine suficient material care dacă ar fi editat sau chiar așa cum e fiindcă e editat live de întreruperi, să poată însemna orice sau măcar să-i schimbe înțelesul, așa cum am văzut de atâtea ori în show-uri la TV. În mintea mea, după asemenea conversații, totdeauna aceeași concluzie. Este posibil că vorbesc cu roboți (boți) sofisticați. Un celular cu număr de România poate fi oriunde în lume. După care mă gândesc să pun un afiș mare pe perete "Bă tâmpitule nu mai vorbi la telefon de dimineață!".

Astăzi Aurel m-a făcut să-i promit că voi șterge ceva de pe blog. Ceva vechi, fără importanță în comparație cu ce am scris recent. Mi-a smuls fraza. "Bine, voi șterge."

Am scris această postare ca să spun că nu voi șterge nimic, pentru că fraza poate fi folosită pentru a face ascunse prin ceva metode IT postări din blog. Mă gândesc la ultima.

Dar dacă tot am scris, aș vrea să pun în evidență faptul că este foarte posibil ca să se intervină asupra mea cu metode ne-ortodoxe și probabil în afara eticii și legii pentru a mi se crea tot felul de stări fiziologice, pe lângă totala izolare socială în care trăiesc, care pot fi foarte aproape de clasificările citite zilele aceste în presă. În principal prin sunete, vibrații. Mă gândesc la numărul neobișnuit de mare de mașini care circulă pe această stradă neprincipală din Lake Oswego. Unele din ele s-ar putea să fie chiar din acelea care se conduc singure. Am văzut șofer care nu ținea mâna pe volan. La fel și fumul din numărul mare de coșuri la înălțime mai joasă decât clădirea aceasta. Odată declanșat un calorifer care scoate o cantitate neînsemnată de fum, mult mai mult vine de afară (știu pentru că am încercat să deschid geamul când apare fum de la calorifer), pe sub ușă sau chiar de la vecini prin pereți. În 2012 și 2013 un număr mare de persoane s-au mutat în zonă. Am văzut asta după numerele de la mașini din alte state îndepărtate, care uneori erau până la un sfert din numărul total de mașini pe stradă. Bine, nu mai vorbesc de vecini și infinitele șicanări prin zgomote, parcări aiurea, interferențe la urcat, coborât, etc.

Aceasta poate să-mi influențeze mult comportamentul și conversațiile în timp real, nu însă și starea de spirit când mă aflu în fața monitorului și scriu ceva. Pentru că scrisul nu e în timp real iar cine a scris mult la tastatură știe că e mai ușor să scrii decât să vorbești, probabil este folosită o mai mică parte a creierului și în același timp poți să citești imediat ce ai scrii și să corectezi eventuale greșeli.