paint-brush
The Tale of My First Linux Crash: Fixing a File System Error in Ubuntuby@oliveremeka
624 reads
624 reads

The Tale of My First Linux Crash: Fixing a File System Error in Ubuntu

by Oliver IfediorahAugust 22nd, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Linux OS is often promoted as the free, safe and efficient OS of the people. Hence, many people who adopt the OS do so out of the need to secure themselves and their files from the devastation of an OS crash - a safe haven from the desolation of Satan. Hence, to many who adopt the OS, Linux is a panacea. Linux is heaven come to finally end the reign of crashing terror. This was what i thought when i adopted Ubuntu after my devastating Windows crash. However, this has proven to be an exaggeration as Linux OS, despite its numerous advantages is nowhere near being rid of imperfection.

Company Mentioned

Mention Thumbnail
featured image - The Tale of My First Linux Crash: Fixing a File System Error in Ubuntu
Oliver Ifediorah HackerNoon profile picture


Prelude

“After a windows crash deals with you, no one will advice you to switch to Linux!”


That was the exact statement from a coursemate of mine that made me begin to take Linux OS seriously. Not like I immediately ran to get my Linux “vaccine” against crashes though. Being a stubborn-headed geek, you definitely could trust me to first debate and defend the dignity of my OS.


“What do you mean?” I protested. “Windows is owned and maintained by a reputable tech behemoth, how can you suggest that a proprietary software maintained by one of the biggest tech companies in the world is less reliable than an open source OS like Linux? Surely, for every one crash suffered on Windows, Linux should have a hundred!” I concluded, feeling like a general that had just launched a successful counterstrike to avenge a great dishonor to his side.


It wasn’t applause that greeted my response, however. To my shame, the small team of Linux users around just bust into laughter. The truth was that I didn’t really know much about Linux. My coursemate then explained that he used to think that way too until his Windows crashed and he lost all his important files. When he took the PC for repair, the engineer advised him to install Linux and rid himself of crashes like that. Since he installed Linux, it had remained smooth sailing for him.


His story seemed to make sense but my stubbornness wouldn’t allow me to take his advice. Actually, I had become a lover of Windows graphics and ease. Windows being the dominant operating system where I grew up was just the OS that I and almost everyone else I knew had gotten used to. Also, everyone knew that windows had more readily available software programs than Linux. How could I give up all that? No! This general wouldn’t sully his windows honor because of the seductions of Linux. I was a windows man through and through!


Being a careless browser and downloader of materials from the internet, my coursemate had warned that my device would soon get a virus infection from all the random sites was visiting online. But I was determined to prove him wrong. All I had to do was use an antivirus program. Or so I thought.


A couple of months later my OS began to slow down immediately i put on my internet connection. I made the mistake of ignoring it and it got worse and worse. One day my windows just froze. I took it for repairs and the engineer just shrugged and asked me to format the device. He had gotten used to complaints like that.


But not me. I stood speechless as the terrible realization dawned on me. I was about to lose all my sweet files. Games and movies and documents, all. My coursemates’ prophesy had come to pass. I had seen the face of Satan. It haunted me now;


The famous windows crash!


It was now time to move to the security of Linux. And that was exactly what i did by adopting Ubuntu OS to replace my windows.


Linux the myth, Linux the OS

It is well known in the tech industry that Windows OS, which is the dominant OS on desktops (used by about 75% of desktop operators) is susceptible to a wide range of viruses and malware. These dangerous programs can hijack the OS through corrupt files gotten from the internet or through corrupt hardware media like flash drives.


A virus infection can cause a world of pain to a computer user as it can compromise the functioning of their device or even crash it entirely. Hackers can also use malicious software to either steal information or hijack a device and demand for ransom to free the device. Hence, computer users are obviously terrified of their devices becoming compromised, especially as a crash can lose them important and sometimes irreplaceable files.


The crashing of a windows device is a well-known horror story that haunts users of the OS. It’s basically the devil of the windows world. Thus, it can be said that people who use windows don’t eat with a long spoon as they often get lazy with using antivirus software - which commonly has to be paid for by the way - and often run into Satan, as the OS crashes a lot. One would imagine that a seriously commercialized OS like Windows will also be well secured.


Should we now say that the devil is in the retails?


Funny eh?


Well, not to many Windows users when their OS crashes and they loose precious files which may not be backed up somewhere else. Because of this looming threat, many computer users begin to look for a savior OS, and not necessarily an expensive one which runs on high cost devices like Macs OS.


Enter, Linux which is freely given for the salvation of tech lovers.


Linux OS is often promoted as the free, safe and efficient OS of the people. Hence, many people who adopt the OS do so out of the need to secure themselves and their files from the devastation of an OS crash - a safe haven from the desolation of Satan. Hence, to many who adopt the OS, Linux is a panacea. Linux is heaven come to finally end the reign of crashing terror.


This was what i thought when i adopted Ubuntu after my devastating Windows crash. However, this has proven to be an exaggeration as Linux OS, despite its numerous advantages is nowhere near being rid of imperfection. Linux also has its disadvantages but considering its promise of security, i wouldn’t have really been bothered by any little inconvenience from the OS, if not that i found Linux to also be susceptible to the devil that i ran to it to hide from.


Yes, Linux OS can also crash!


So what is one to do in such a situation? How do you react when you stumble upon Satan in heaven?


Subsequently, i describe my first Linux crash and how to resolve such unpleasant surprise.


My Linux boot crash and how it was fixed with fsck

Adopting Linux (Ubuntu 16.4) proved to be an exciting experience for me as the OS has many advantages that continued to impress me as i continued to discover them over several months.


I found the OS to be surprisingly efficient as it ran smoothly and speedily even on the low end device i was using. I also found that my worry about not being able to use some cool software programs i enjoyed on Windows was quite exaggerated. Many if not most of those programs had Linux versions and there were also ways of running actual windows programs on Linux. Linux just rocked!


Imagine my horror when suddenly i was thrown down from the height of this Linux utopia by the very thing i had adopted the OS to avoid. A shocking OS crash.


I had just returned from somewhere and was excited to turn on my device and melt away into Linuxy software bliss. However, minute after minute passed and my Ubuntu was still booting. After waiting for about 5 minutes i got tired of waiting and abruptly shut down my computer using the power button.


I then restarted the computer relieved of the little worry that had built up in my head from the delayed booting. It was going to start now i believed. But what happened next was devastating. My beloved Linux crashed while booting up with a display similar to the error screen below.



Source: Ask Ubuntu.com


After seeing this screen, i just shut down the system and abandoned the device for the next several weeks because i believed that i had lost all my files from the OS crash.


However, i would eventually google how to fix a Linux boot crash and after some encouraging findings i came back to fix the OS. Turns out that my file system was compromised and the error message was actually trying to help me fix the issue.


fsck is short for File System Consistency check and its a tool for file system maintenance in Unix based operating systems like Linux. The crash i experienced was from a file system issue and below is the simple procedure i used to fix an error like that.


In the (initramfs) prompt above, run the exit command as shown below to list the partitions on your hard disk and identify the file system with error ( e.g. your Linux partition).


(initramfs) exit


Now run a fsck scan on the partition identified to have errors (e.g. /dev/sda2) using the command below.


(initramfs) fsck /dev/sda2 -y


After running this command, wait for the scan to finish repair of all components shown in the activity dialog and bring up the (initramfs) prompt again. Once the prompt comes up, run the reboot command below to restart your OS.


(initramfs) reboot


Your OS should now boot up without any issues.


Conclusion

Linux OS is often described by enthusiastic fans as a panacea to all OS worries. Though the OS has numerous advantages over other brands, it is also not perfect. In fact Linux OS can crash just like Windows, even though many people leave Windows for Linux to avoid this particular issue.


However, Linux crashes like the file system issue described above are often less damaging and easier to fix. Hence, a Linux crash should not terrify a new user as a simple google search will likely help to fix the issue.