Monthly Archives: April 2015

How Ubuntu screwed me over and why I still love it

As humans, memories have a special place in our heart. Nothing can prepare us if something goes wrong and god forbid you lose them. It’s hard but imagine losing months of snaps that you shot over the trips you made across city or continent, documents accumulated over the course of your research on some project, also those rare songs and movies you got your hands on. It could be a frustrating experience if you didn’t have a backup of the data you lost.

Something like that happened with me over the last week. I was playing with Ubuntu Operating System from last few months but in a virtual environment. On one fine weekend I thought I am ready to finally install Ubuntu 14.04 LTS on a dedicated partition and to use it as my primary OS. I created a bootable USB and rebooted PC. Ubuntu asked me if I want to “Replace the OLD Ubuntu” with the new one. I thought, “Ok, Cool, sure do. I don’t need old Ubuntu”. And it did remove old Ubuntu and nicely completed the rest of the installation.

When the Unity desktop showed up, it was all too familiar since I have been working on it for quite some time. Except when I tried to watch an episode of “The Flash” kept on my Multimedia drive. I couldn’t find it. I was like, “Why isn’t my other drives showing up? Are those not mounted?”. I was use to unusual things over my time with playing Ubuntu in virtual environment. But nothing could prepare me for what lay ahead. It was when I opened the “Disks” application that the reality hit me hard. Ubuntu had not only replaced old Ubuntu, but it had also wiped the existence of every other partition and the data along with it while installing itself.

Do you know that feeling? At first you feel numb. You think, “WTH just happened?“. The denial phase, “No, it can’t be happening”. Then the shock overtakes you. “NOOO, MY DATA!”. It soon turns into rage, “WTF Ubuntu, HOW CAN YOU DO THIS?”. You try to remember,“Did I do something wrong?”. Then you realize you didn’t. You just selected the automated install as opposed to let you choose your own partition. It’s then when you realize you DID made a huge mistake by choosing the automated install. Finally, you try to remember when was the last time you did a backup. Eyes wide open, “It was long time ago!“.

I had backed up my data about 3-4 months before. 3-4 months was a long time. A lot had happened since then. “I must have my data back”, I thought with a determined look in my face. The following week I used my secondary PC to recover the data back from the HDD using application known as MiniTool Power Recovery. It took it’s time. Juggling day job in the morning I only had nights to work on the recovery. Complete night to scan for partitions and data. Next two nights to actually recover the data. Another night to make sure I had not left anything else.

As I found out later that Ubuntu wiping out whole of the physical HDD and all its partitions without so much so as a warning “You are going to loose ALL YOUR DATA”, was actually a bug in the version I was using: 14.04.1. This bug was discovered about a year ago and all it required to fix it was probably just to reword the statement “Replace Old Ubuntu” with something like, “All your disk is going to be wiped out. Please make sure you are not installing this OS while drunk”. Let me tell you, that would have made a lot of difference. Had Ubuntu said something like that, I could have chosen the custom install instead. This bug was recently fixed in the update 14.04.2 but only after making a lot of people who trusted “automated install” to get pissed in the process.

Anyway, what happened couldn’t be roll backed. But I did manage to recover all my data. Though all the software that I had accumulated as giveaways were lost, along with all the customization that I had on my Windows Server 2008 R2 OS, but those can be acquired again.

This incident taught me quite a few important lessons. Of course the first one is not to trust “Automated installations”, especially when it comes to installing a complete OS. Other was to keep regular backups. Importance of cloud backup is especially important considering that it happens automatically once you set it up.

Let’s see what things I had already backed up. I had all my:

  • Documents backed up to Dropbox,
  • Firefox Add-Ons/Passwords backed up via Firefox Cloud,
  • Firefox Speed Dials backed by via EverSync cloud backup,
  • Other Multimedia related stuff like, Movies and Pictures (until last year) backed up to external HDD.

So, the recovery program allowed me to recover all the data that was not synced to the cloud, and which probably couldn’t be synced either since those were very large files (especially with the kind of quality of Internet that we get in our country).

With recent accident of unlocking my phone’s bootloader without taking backup, this incident of wiping my PC off, April has been one hell of a month. And it’s not over yet. So I will try not to bite more than I could chew for the rest of the month.

In the end, Ubuntu did screw me over but it was mostly my fault. I takeaway a lot from this experience. Had I not faced it, I would probably be less careful while experimenting on Ubuntu. And that’s why I have started to like Ubuntu even more for it taught me that software isn’t perfect. To always have a backup plan is probably the best way to keep yourself and your data, out of harm’s way.

Concept of Installing Applications in Ubuntu

Until now we have discussed how to install Ubuntu, concepts around files, keyboard shortcuts to navigate easily and various ways to customize Ubuntu with Gnome shell. Today I am going to discuss how to install applications in Linux along with the various ways to do them, and will end with a special note that would explain how “running” applications in Ubuntu is fundamentally different than Windows.

You must be used to installing softwares in Windows by downloading .EXE files or .MSI installers. You open these files and click Next -> Next and viola. Installing applications in Ubuntu is a bit different and safer than Windows in some cases. But before we get into the steps its important to understand the concept of Packages in Ubuntu.

What is a Package?

A package can be considered a collection of files bundled into a single file. Package contains among other things, the installation script which tells where the files will be copied and what settings needs to be changed once the package is installed.

In essence, the output of a package is equivalent to .exe or .msi installers, that is they install a software on the OS. There are many ways to install a package on Linux. You can install a package using Package manager which itself are categorized in Low-Level and High-Level package managers. You can also download packages over the Internet and use it to install it on the system (more on this later in this article).

Low level package managers are dpkg (for Debian based Linux like Ubuntu) and rpm (for SUSE and Fedora). While high level package managers are apt-get (for Debian), zypper (for SUSE) and yum (for Fedora).

Packages can depend on other package to be installed first. Say if you want to install some software which was written in PHP, you may need to install the PHP package first. This concept is called dependency and is usually taken care of itself if you are using a high level package managers.

Advanced Packaging Tool (APT)

The underlying package manager in Ubuntu (or any Debian based Linux) is APT. You can use the command apt to install or remove packages on your system. APT is also used in background in GUI based package managers like Ubuntu Software Center and synaptic.

EDX have a pdf which lists some basic commands to using package managers. Download it here.

What is Source and Binary?

Continue reading Concept of Installing Applications in Ubuntu