Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

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

Thursday, December 26, 2013

Nvidia şi Nouveau

Strict despre IT.

Nvidia este cel mai mare producător de cipuri video pentru computere şi nu numai. Pe placa de baza sau pe placa video a computerului dvs. se va găsi, foarte probabil, un cip cu acest logo. http://en.wikipedia.org/wiki/Nvidia


Nouveau este numele unui driver (program, soft) din Linux care acoperă cu diferitele versiuni toate tipurile de cipuri Nvidia. (Driverele sunt nişte programe realizate chiar de producătorii de cipuri ca Nvidia şi asigură o legătură standardizată între sistemele de operare ca Windows şi Linux şi aceste cipuri).

Până la Vista cred, Windows necesita de multe ori instalarea manuală a majorității driverelor audio şi video fie de pe CD-urile incluse de producătorii de chip-uri sau plăci sau de pe site-urile acestora. Când am instalat 7, prin 2009, când a apărut, am avut plăcuta surpriză să văd că Windows are inclus sau descarcă la primele update-uri automat driver-ele necesare. Şi de atunci aşa a rămas. Un punct bun pentru Microsoft. Dar 7 a avut pentru mine o listă lungă de dezamăgiri, inclusiv spațiul necesar pentru instalare şi funcționare, care la un moment dat a depășit partiția alocată de 22 GB.

Nvidia, invocând legea copyright-ului, nu le dă voie la cei de la Linux (Fedora) să includă driver-ele sale în lista pachetelor care formează Linux.

Linux vine instalat cu driver-ul Nouveau care acoperă majoritatea configurațiilor, dar pentru cipuri mai slabe ca viteză apar probleme, driver-ul Nouveau, nefiind realizat de producătorii de hardware (cipuri) video nu are aceleaşi performanţe ca driver-ele Nvidia.

Nouveau este ca şi Linux un soft gratuit însă a fost realizat de entuziaşti Linux prin decompilarea sau descompunerea sau "reverse engineering" a cele 3 drivere furnizate de Nvidia pentru Linux care acoperă toate cipurile sale. Lista este aici http://www.nvidia.com/object/IO_32667.html unde se poate găsi, în funcție de tipul cipului grafic, numele driverului necesar.

Dar acest "reverse engineering" nu s-a putut realiza complet şi rezultatul este că Nouveau are cam jumătate din performanța oricărui driver Nvidia din cele 3 din lista de mai sus. Deci la cipuri mai slabe, sau pentru jocuri, este necesară instalarea manuală a unui driver Nvidia care nu este simplă şi necesită muncă suplimentară pe lângă la instalarea Linux-ului.

O altă problemă a Nouveau este inexistenţa unui program care să gestioneze fişirerul xorg.conf care conţine o parte din setările grafice, orice setări necesare în acest fişier fiind făcute (sau de cele mai multe ori nu) manual. O listă de setări fine pentru tunarea acestui fişier se găseşte aici

http://ovekarlsen.com/Blog/turning-ubuntu-12-04-into-a-professional-low-jitter-os/

Driverele Nvidia pentru Linux (Fedora) se găsesc sau la site-ul Nvidia sau la un site afiliat cu Fedora, şi trebuie făcuţi nişte paşi manuali destul de ne-confortabili pentru instalarea lor. La Ubuntu, aceasta se face mai uşor, Ubuntu găsind pe net şi instalând driverul automat, sau cu un clic, dar în cazul configuraţiei computerului la care scriu acum, a instalat unul greșit (din cele 3).


Şi acesta este cred motivul principal pentru care lumea nu se aventurează să schimbe Windows pe Linux pentru calculatoare de uz general. Păcat fiindcă Linux este ca performanță comparabil cu Apple OS X, care este de fapt un OS similar cu Linux, sau cu Android, care este o versiune de Linux. Şi este gratuit, incluzând licenţa de folosire.

Friday, January 4, 2013

Goodbye Windows

Yesterday i tried and chose the option to boot Windows. Because i had a dual Windows and Fedora computer and hadn't done it in a long time. Windows on a set of partitions and Fedora on a different set. After, i spent two hours downloading and installing Windows updates. I mean watch the computer while downloading and installing 138 updates. About 4 times more time than Fedora 17. Then that i tried and launched whatever version of Explorer is the last one for Windows 7 and tried to see my blog in Explorer. But i ran into the problem of having to re-zoom each site cause by default i think Explorer does not remember the last zoom you used for a site.

Then i had sort of a revelation, fueled by and developed in the waiting time. Since most of the employers nowadays let programmers chose whether to use Windows or Linux and some force you to use Linux, i realized. Linux is more productive in an office environment. You get more things done. Is that simple. I couldn't possibly write 277 posts in one year on my blog while pampering Windows and falling in a trance every time seeing the animation at boot time.

 Then, i used a partitioning program, cleaned those partitions and installed Fedora as the second boot. Yes, Fedora 17, for the second time. I spoke before of the advantages. By doing so instead of plainly re-installing you can have a clean install and a very smooth transitioning. You can always choose the old one at boot time. You can share data while transitioning. You can pick only what you need from the mess left behind.

But this time for me it was just for experimenting. What i was anxious about is i could not imagine how you can have on a hard drive two / partitions, two /boot, two /home, etc. and not confuse the two OS.

Here's how it's done. At installation, (i used the live CD), the installer sees only the Linux partitions you just formatted on the free chosen space. The others belonging to the older installation are at that moment just some unmounted partitions on a hard drive. It will also find the other Fedora loader on the other boot partition and add it to the grub boot menu, with a slightly different name (and maybe a warning, i can't remember). After booting one of the two, each will see only its own partitions and the other's will be just unmounted devs with the option to mount them and transfer whatever data you need.

Actually, nothing to do but install the second instance of Fedora.

Actually, i never tried and chose the other, older Fedora from the boot menu. I just did now, after i wrote the first paragraphs, to make sure it works. What happens is because of some minor problem, instead of Fedora animated logo at boot time, i get to see the some messages scrolling while the boot happens. Boot time is the same, it's working the same. With file manager i'm seeing the newer partitions, with their corresponding sizes but not named, as unmounted. But i'm not going to try to fix that one, i don't need it anymore.

1/6/13 5:32 PM PDT. Just fixed the "minor" problem. Manually added the newest kernel entry from the older grub.cfg into the newer grub.cfg. Now i can boot them both with no problem. Two identical OSs on a same computer!

1/6/13 11:12 PM PDT. Thought maybe i should write what i think is exciting about this. Although i accidentally discovered the possibility while trying to learn partitioning with an XP installation disk long time ago, when i installed XP twice (LOL) by mistake and got a menu at boot time asking me which one to boot, i never thought of the advantages until a few month ago.

Any OS, including Fedora, although not nearly as much as Windows, degrades irreversibly in time. Although there are numerous softwares out there that claim that can restore your system as it was when you first installed it (bought it for the most people), the problem is too vast and complex to be solved like this.

Every time you install and un-install software, or work with sizable amounts of data, the hard disk gets fragmented, the registry file gets corrupted and remnants of the older softwares haunt your hard drive. When nowadays on an average computer you have hundreds of thousands of of files, it is very hard for any cleaning software to automatically undo the mess.

And then there's the updates. Every time you update a package, the newer files pile up in top of the others, often leaving your computer with several versions of the same packages, of course, the older ones being useless, but hard to remove due to the precision and the know how required to only delete the useless not the usable or the current version.

And then there's the internet temporary files. Every time you open a site, scores of files are being saved on your hard drive and depending on your browser's settings they are being rolled out like in a first in last out basis. If you don't use administrative measures like i am keeping all of them on a separate partition, they will populate every empty space of your hard drive contributing to the fragmentation.

And on a Windows computer with no separate partitions no matter how big the hard drive is, the mess is unimaginable.

And i am not pretending here to finish the list of problems that add to the cluttering of an OS in time.

That's why among administrators the concept of a clean install has been born. What that means? It means you save whatever data you need, wipe clean the hard drive and install it anew, then the programs and then try to restore everything you added up into a workable status by putting the data back little by little. But this is a very time consuming process, and although you will have a faster computer, you will never have it the same way as it was before you cleaned it.

(Actually that's what i believe cloud computing would be so successful, because it keeps your data away from your own messy computer.)

So why all this talk in this post? Because what i've stumbled upon could bring a totally new prospective into maintaining a computer.

Supposedly you or the manufacturer reserved some space for this purpose when first installing the OS. Supposedly you have all your data separated from the programs in a different partition or partitions (not absolutely necessary).

All you have to do is install for the second time your OS into the reserved space with the programs and try and pick the data from the other partition without deleting nothing on as needed basis while still keeping the option of booting the computer with the old system that might be slow but you are so familiar with. The transition will be much smoother and you can delete the old partition(s) when you feel you don't need them anymore or when you think you need that space for anything else including repeating the above cycle.

And above all, no emotions from the possibility of loosing data while totally and truly renewing your computer.

As an example, what i just did, i installed Fedora 17 and the updates and all the programs for the second times on some free space on the hard drive, creating some sort of a mirroring of the old system, then copied the username directory from the old installation /home into the new /home partition, and voila, all the familiar icons popped on the desktop, and i was ready to go in about 2 hours in total, and this while keeping the option of booting the old system. Everything was done mostly automatically by the Fedora installer (except choosing the free space and partition types and sizes, from the live CD, with only a one time manually editing of the grub.cfg file, as mentioned above.

Wednesday, October 3, 2012

Linux Desktop

"Provided you are lucky and don't have to rebuild the grub to make the boot options menu appear like i did (in case you want dual boot), there is a 99% percent chance that you will install it in about 15 minutes in total likeness of Windows installation. Then you can do too a bit of desktop customization."



We all have to thank the webmaster or the succession of webmasters at infoworld.com for the continuity of their database. After all, it has now proven its usefulness. I found what i was looking for. The prophetic words of Torvalds that never became reality. Except for some. I never knew until today what Torvalds said 8-9 years ago, that "he thinks Linux on the desktop is at least five years, maybe 10 years, away".

But since last year's spring i had it with Windows. It couldn't be contained anymore in a gigantic 22 GB partition. It wanted to download SP1 after it already had all the updates overfilling the partition that still had some 2 GB free space. I lost a long email i was writing for a couple of hours because i didn't hit in time the postpone updates button or whatever it's called for the 5th time in a raw while i was writing it.

Don't get me wrong. I have enough space on my hard drive, in fact close to TB. But as somebody who wrote his first programs in 64 KB total memory for Z80 processors, this is in the area of insanely big.

I read so many times in zdnet.com comparison articles between Windows and many flavors on Linux that i thought i was already familiar with and it's going to be piece of cake, i will install it in no time and go with it and some day i'll even have the opportunity to start learning scripting languages for Linux. So i ordered an Ubuntu CD from an online store and installed it as a second boot while keeping Windows. For non IT professionals that means there is a menu at boot time that lets you choose between the two.

But i ran into first trouble right away, the menu wasn't showing at the beginning the same as it does now with Fedora because the video mode on the monitor was not compatible with what grub was doing at boot time, in absentia of a video driver. (A minor bug that was preventing for showing the dual boot menu. And i lost, i don't know, a half day or more trying to fix it with help from the forums, i had to learn the different Linux directories, can't remember exactly what i've done but in Fedora now i go to etc/default/grub and add a line GRUB_TERMINAL_OUTPUT=console, then rebuild the grub with the command $ grub2-mkconfig -o /boot/grub2/grub.cfg then the menu shows on the screen).

But even if the menu is not showing on the screen, in 5 seconds it picks the default option which is booting Linux. So you don't have dual boot anymore and loose 5 seconds boot time but your computer will still boot.)

Why multiple boot? I once said in a different post on this blog about the advantages of partitioning and multiple boot. You can even have dual Windows boot with the same version of Windows, provided you keep your data like email and documents on different partitions separate from Windows. You can mess up Windows how much you want and you will after installing and uninstalling a number of applications no matter what. Then you can move all your data on a different data partition and go and install a fresh Windows of the same version and all your applications on the other specially reserved partition and point all your apps's storing options to the data on the data partition, like by example the store folder in Live Mail and voila! In no time you're back in business... Windows at the second installation on a different partition will even build automatically a menu for you like Linux does at install letting you choose between the two so you can have a smooth transition... No time meaning a busy afternoon or two... And having to learn the very basics of partitioning and using the option at installation which is half hour learning time for the daring non IT professional...

With dual Linux-Windows you cannot share your email but you can everything else. I will write about later when writing about the plethora of free, verified applications on Linux.

Then the partitioning on Linux. I will pass over it because partitioning as i came to realize lately it's more an art then an exact science. There are so many types and possible combinations that you will never finish optimizing your computer for not so much gain.

Right now i'm using 128 MB for boot, 1024 for swap, 1024 for tmp, 4086 var, 8092 root and the rest untill 18 GB (I had at the beginning of the hard drive two partitions for operating systems, one of 22 with Windows now and one of 18 for the second OS, at first they were 20/20 but i gave it more room for Windows thinking i will get away before if overfilled again) for home.

So i ended up with about 4 GB free out of the 18 for the home partition for data and the other partitions are 1/10 to half occupied and lots of room for years of updates and applications as opposed to Windows that overfilled a 22 GB partition in one year and a half with the automatic updates option always on and with most basic applications.

But Fedora and Ubuntu give you the option of automatically installing themselves alongside Windows or alone with nothing much to do except choosing the locales, a root password, and create a (few) user profile(s), very much like Windows.

(I forgot to tell why i ended up with Fedora over Ubuntu. Out of paranoia. And because i couldn't learn to profile a new application with AppArmor, the security application that comes with Ubuntu. Cause this is what you have to do. In Fedora, my current understanding is that Selinux that is enabled here by default, takes care of newly installed applications automatically. And then out of paranoia too i learned a bit of IP tables. But there is a firewall program in Fedora which is enabled by default.)

Provided you are lucky and don't have to rebuild the grub to make the boot options menu appear like i did (in case you want dual boot), there is a 99% percent chance that you will install it in about 15 minutes in total likeness of Windows installation. Then you can do too a bit of desktop customization.

Then again out of paranoia, i chose to go withe the XFCE spin of Fedora because gnome3 has some social networking built in and inseparable from its windows manager. After, i furtherly downgraded it by uninstalling a list of softwares mostly social networking that have minds of their own and want to connect by themselves to the internet. I don't understand why or maybe i do but now i do everything i need with the browser (Firefox) and this way i have only one security nightmare that i chose not to think about anymore. They might be still others i'm not aware of. After all most applications nowadays jump on the internet without asking permission or even notifying you.

A major problem with Linux in the past was the video drivers. On a 7 years old computer with no graphics card like mine, if i choose to go with the built in quasi universal Nouveau driver (built by reverse engineering of the nVidia drivers as nVidia doesn't give away the source code for them), i loose about 30 percent of performance over downloading and installing manually the nVidia driver. Because it's proprietary and cannot be distributed by Red Hat Linux. With Ubuntu things are smoother because it automatically installs the appropriate driver that chooses itself from its enabled repositories, i think. So with Fedora you can choose again to do nothing about it if you are not into gaming or other heavy graphics. But then if you are, things can get a bit complicated but there's help on forums.

Now let's talk a bit about the benefits. A much leaner OS. Overall it feels about twice faster as i can say after the last few year of heavy using for storing photographs and blogging and social networking. (Never had problems with security but i have two custom firewalls, one on the DSL gateway and one on Linux and Selinux enabled by default on Linux. But never had any known ones on a Windows XP computer with no other security than the the gateway's firewall for years (now i have Security Essentials on that one too)).

Free Office-like application - LibreOffice.

Free Photoshop-like application - Gimp (not that i use it, don't have it installed).

Free AutoCad-like application (currently don't use it, don't have it installed).

And every major application for Windows you can think of. And more. Available from Fedora repositories and installable with a click or a command after a secure download.

And you can share your data with Windows since all above apps can import/export data from and to Windows partitions and formats if you choose so.

So  you still think Torvalds was wrong?

http://fedoraproject.org

http://www.ubuntu.com

http://www.debian.org

Monday, May 14, 2012

Windows

Last time when my Windows (7) crashed it was when it overfilled my 20 GB partition with SP1, about 1 year ago. It downloaded it and then increased my partition occupancy by 1 to 2 GB. Although i had all updates contained in SP1 already on my computer as i had my automatic updates turned on. Since i wasn't expecting anything like that, i knew i had about 1 GB free on my partition it definitely pissed me off and i started seriously thinking on migrating to Linux. Not that i love Linus Torvalds or any in the community so much. Seriously. I think they're OK and they're doing a good job trying to put up a competition to Microsoft, for free.

But now this morning something crossed my mind. I used to run Windows at idle in about 350 MB out of my 2 GB. Those are Windows processes only on a pretty typical if not outdated hardware.

So out of my 20 GB of Windows code on my hard drive, i'm using about 0.15%. Now we know those dlls have many copies in there as 7 and other Windows versions keeps all the dll versions for reversing updates, and all the downloads for some reason if not for reference in case of lawsuits, saving at each restore point, i don't know, i think overall there's 4-5 identical copies of each piece of code in there.

But my computer most of the time doesn't use not even 10% of those 50-100 processes in those 350MB of memory i just mentioned as they don't do anything most of the time. Most of the time there's 4 or 5 processes running, one probably manages memory, the video driver, network manager, windows manager and the one that actually does something. That one is probably the browser, but of course, the most overlooked and active and ubiquitous is the free and famous Flash from Adobe, formerly from Macromedia, that runs inside the browser, that uses about 90% of the processor time compared to all other processes and, of course, annoys us the most and most of us don't even know it exists. We can only feel its presence on the flashing commercials on the screens. Now flash washes some if its sins by powering youtube, and who of us would give that one up!

Some people write emails or input data. That doesn't even scratches the back of the enormous power of today's computers. Most of the load occurs when scrolling up and down or moving windows on the screen when the system has to redraw the window with everything on it so many times per second.

Why that loads it so much? That is another mis(t)ery. I once wrote a piece of code, a stereo spectrum analyser based on a fast Fourier transform, similar to the one in iTunes (the optional animated bars in top of it). Not using any of the graphic libraries, just API calls as i remember, for initialisations and drawing a line. It was calculating the fast Fourier transform in ten points for each channel in a loop about ten times a second redrawing anything at the same pace in a resizeable window, with colours to chose and scale. It was all 44K, but i think that's because you cannot write in Windows programs with API calls much shorter that that. It is still out there iguess on softpedia anyone to see. I will put a link. It is still buggy as i abandoned it but it works enough to show it's working. But the point is i once launched it ten times on the screen and it was working on each window and it wouldn't even "move" the processor. And that was a 400 MHz computer.

The irrational use and reuse of libraries at Windows got them to the point that there's probably more than 90% overhead on most of their software from the programming point of view, those discussed above are separate issues, but they should at least have taken care and brushed up the graphical part of it, especially since this is all it is, a graphical OS with other vague capabilities, and on top it's called Windows!

So a whole industry that builds hardware, memory, hard drives, motherboards, monitors, modems, routers, fiber optics, etc, i'm too mad to think of now, that works efficiently just to piss the crap out of everybody. I mean to run Flash.

And they didn't even took enough care to design those as to be IMPOSSIBLE to get viruses or malware or whatever it's called now. Or maybe they had their reasons. IBM designed the first PC and put if out there for every manufacturer. Once out there it never changed, only improved.

Now after all the technological wonders they really achieved as far as speed and performance, we have to migrate our personal data to cloud as it is not safe and portable on our own devices.

So let's summarize for Windows:
Efficiency of hard drive occupancy: 0.015%
Efficiency of RAM memory real use: 10%
Efficiency as using the processor (competing against flash): 1-10%
Overhead in irrational use/reuse of libraries? probably over 90%
Overhead of needles machine code instructions in most used code: probably 90%
Efficiency of running Flash: up to 90% on older hardware
Built in by design malware protection: little
Efficiency as saving us time as being maintenance free: it depends on everybody's perception.
Efficiency of being worry free?
Efficiency of keeping our data safe?
Efficiency in pissing everybody off?
Efficiency in spying?

Now isn't this the most impressive technological blunder of all human enterprises ever?

Now i remember this conversation with the manager of a small software division i worked for, and he convinced me about the necessity of using object oriented programming as being a technique of reusing code. Anyways i had to agree with him cause he was the boss.

That might be true for small and custom projects when you have readily available libraries, but now looking at Windows through a historical prospective, i think it would have been rational to write and rewrite everything from scratch, because we are not interested in that type of efficiency and economy and using can programming when talking about software that repeats that overhead continuously and as we speak on hundreds of millions of computers.