View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12940 Members
Join this group to post and comment.
Shashank Moghe
Shashank Moghe • Feb 6, 2015

My tiny battle : openFOAM

This is a heavily embellished version of the trials I had undergone in the open source world. I am very new to it and not without my baggage of ignorance. What follows has happened over the course of the past day and has been unusually dramatic in a sense. Enjoy the ride, grab your popcorn.
-----------------------
Lately I have been wondering if the work I do is all that I am made of - inside my mind I feel so much more - but the corporate world has always weighed me down. It does drag you and sometimes reduces you to a menial, one in a hundred employee, but I have always refused to believe that is who I am. I believe the inside of my brain constantly needs a medium to express its ingenuity – my mind doesn’t have to confine to the bounds of my work – it never did. So here I am, in a mid-career crisis, with this unending stream of thoughts inside my brain to take on a certain intellectual endeavor and the very next moment, take on something else. But when this knocking persistently asks you to explore a certain challenge over a long course of time, you know that something out there is calling you. That happened to me a number of times but I shall describe only the latest expedition.

I have always been in love with Thermodynamics, Heat Transfer, Fluid Mechanics and Physics in general. I absolutely believe in the universality of Physics and that it is the fuel to my reactor – there is no ‘me’ without scientific thought and enquiry. In graduate school I had opportunities unlimited to follow my passion; there were portals to do whatever I wanted to do, as were the resources. After I graduated, it was as if that fire was not getting enough air to sustain. And I started feeling suffocated – with the lack of scientific and engineering influx in my life. That is probably one of the main reasons why I am very active on CE. Now there has been an idea that I have been toying with for the past few days – open source Computational Fluid Dynamics – that I believed was the nirvana to my dying reactor, as it allowed me to explore the scientific problems of my choice and do so with the least of resources. All I needed was my laptop and my mind in the right place, or so I thought.

Preface:
openFOAM - the most powerful free CFD solver they said. Soon I learned that openFOAM is not as “open” as it sounds, and to my dumb computer-science ignorant self, it looked like a download, “install on C:/” and “Launch openFOAM.exe” step away. That was not to be. To begin with, it is “built” only for Linux (I would not be able to differentiate between Linux OS and my DOS prompt 2 days ago). There was the first killer bump, of many.

“I have worked (played) all my life on Windows, openFOAM why you no allow installation on Windows?”

Soon I realized why it has to be Linux, if it has to be open. So the first way was to search if some techno-geek has found out a way - for people like me who are too afraid to walk into black and green consoles – to run openFOAM on Windows. Turns out, somebody did (there is always someone). So I downloaded the links given on that website, ran the .bat files and copy pasted symbols (the ~ and $ language they use) and at the point when I was supposed to see beautiful things on my screen, I saw this:

“blockMesh: command not found”

This was a bummer. I instantly blame myself when I see an error in such cases. So, I reinstalled the same software (a list of softwares - some of which were malwares – which I got to know about the hard way) at least 4 times. When the error persisted, I got uneasy (why can I not follow the simple steps given on a website? How difficult can it be?) and posted to forums. Some CEans here will know. Some told me to install a Virtual Machine, some asked me to dual boot with Linux. Now when you are alone at home, you explore all possible suggestions. You are like the quantum electron in the Young’s Double Slit experiment. So I uninstalled all the softwares (that the techno-geek has suggested) and then deleted the folders (somehow they won’t get deleted from C:/). That caused the big “Oops”, when I restarted my system, it appeared I had deleted some system dll files and my screen was navy blue. Task Manager worked and I was able to launch everything- just that the screen was a cool blue shade. No icons, no start menu, no task bar, nothing. Now I thought I could live with that and things will get back to normal (I believe in computer science magic, it worked for me a few times before). They did not and now I was really pissed off. I restored my system to an earlier “event”. Twice. Because it turned out the first time travel was no better – blue screen wise. So Windows had already given me its decision on running openFOAM, go with Virtual Machine or Dual Boot, it ain’t entertaining this runLinuxOnWindows bullshit. It sounded like good advice.

Virtual Machine did not work for me, I have 4GB RAM and my laptop fan is an attention-seeker - making its presence felt whenever I do something the processor is even slightly unhappy about. The VM was so slow that I could see words showing up on screen after I was done typing them on my keyboard. I have low standards when it comes to computational speed but I realized my line of patience must be drawn way above the operating speed of VM on my machine. And VM was uninstalled in the next few minutes.

I ruminated on the thought of installing ubuntu in parallel to my Windows. The last time I did that was when my laptop fan made noise comparable to an F-1 racing car. If I had that on the street, I would probably have to put an automotive grade muffler and not a laptop grade cooler. The flashback made me nervous. But over the years, I have expected nothing but utter foolhardy daring from my over-thinking (and yet so casually reckless right when it is needed to make mission-critical decisions) brain that I decided to go ahead a give dual boot a try, as soon as I get home.

I had made a collection of links and emailed them to me before I get home so that I can begin installation ASAP. What happened next was a ride. I never did drugs (thankfully) and was never pregnant (no offense) but this is what it must feel like – the sudden expansion and contraction of the mental fabric, extreme mood swings – all within a few hours. I want to document this phase chronologically (and dramatically):

6:00 pm: Boarding call for the Linux Express
I referred to one of the links which was short enough to maintain my attention and used a utility called LiLy which could take care of launching ubuntu from a pen drive. I said okay! The utility was smooth as ice-cream. By the end of it, I had a pen drive which had an ubuntu image and that pen drive was my OS, they said. So I changed the boot options from my BIOS as the link suggested and successfully booted from the pen drive. I was so happy I could go to the blue screen and make something work from there, I felt like a hacker in movies (who transfers millions of $$ between accounts without using so much as a mouse). Ubuntu screen showed up - I was happy. It had two options – “try ubuntu” and “install ubuntu”. Since I was told that the pen drive serves as the OS, I thought I might as well install ubuntu. I believed it would install the OS on the pen drive – Im stupid and I know it. It gave me certain simple “standard” options during the course of installation and all I did wasa Windows style “Next>” installation. Then at one point, it said something about drive partitions – had three options –
  1. Do it yourself
  2. Logical Volume Management
  3. Something else
Obviously, lazy as I am, I do not need to go into the trash and do it myself and 3rd option looked visually discouraging, so I went ahead with Logic and decided its best for ubuntu to decide what is right for me. I checked Logical Volume Management (those who know their way around Linux just slapped themselves). And finally, the screen appeared that said “installation successful”. Happy as I was, I thought I must restart and run Windows for some time and see some TV shows before I can embark on installing openFOAM on ubuntu.

Hell had already broken loose before the lights were turned on again.

7:00 pm: Apocalypse

When my laptop restarted, surprisingly, it took me straight to the ubuntu login screen without asking for my choice of OS. Stupid laptop, I want to watch a few episodes of F.R.I.E.N.D.S on Windows before I can work again! So I restarted again, and then once again. Nothing changed. It was like a time travel movie where I ended up with the same future no matter what I did in the past. I ran internet on ubuntu and looked for suggestion to boot Windows after having installed ubuntu. It looked like there were several other retards who had taken the path as I did, in exactly the same way.

There is nothing new under the Sun
.

Somebody asked me to run some line of code on the “Terminal” (scary name for a console!) to check which OS I had and then bring Windows above ubuntu in the booting priority. The person said ubuntu always makes booting itself as the priority. Simple as that I thought. I ran the code and saw no Windows in the list. A hint of sweat on my forehead – the kind you get in anticipation of a big goof-up. I saw more help and checked partitions on my hard disk and found there was 460 GB open space (!) – my hard disk is 500 GB. I realized I cannot drink beer on a weekday. I also realized how shallow my thinking was, when I chose to let ubuntu “Logically Manage” the Volume. I was angry on myself, more than I should be on ubuntu.

You Sir, could have given me a warning before deleting my native OS and also my personal data! Where are your OS manners?


8:30 pm: In the valley of Death

It was as if I had lost everything. From riches to rags. It felt like a loss of material wealth, so much without a warning, a disclaimer. I felt cheated. I had noble intentions - I wanted to learn - become a better Mechanical Engineer, but I was duped, robbed in broad daylight! This has happened before but not as bad. I have fallen before but not as hard. I had spent almost an hour searching the internet for possible fixes. The ubuntu installation did not let me use any of the recovery option buttons (F1, F2, F11, etc.) and I was destined to end up logging into ubuntu every single time. Some said Clean Install, some said pirated Windows image download, while some suggested calling the HP support. I was too depressed to do any of that. I just wanted to rewind 3 hours and NOT install ubuntu into that pen drive. It was too late for regrets and too much to expect the computer-science fairy to fix problems overnight.
But broken pieces of a strong vase are as strong individually as the vase. All you need is apply pressure and heat, to recast the ceramic. All I needed was exactly what I got next.

9:00 pm: Like a Phoenix

It was about time in India that my girlfriend woke up. I talked to her, pretending to claim pride in my stupidity. She is the strongest person I know for her age. She said something that made so much sense that the next thing I knew was forget about the ubuntu issue facing my life and talk to her for half an hour. She asked me to face problems with a smile – that they are persistent and we cannot let them rule our life. After that call, I knew exactly what I needed to do – damage control. I had blamed myself enough, not it was time for swift retribution – of justice.

When you cannot get out of a problem, get deeper into it.


I had nothing to lose now – no personal data, nothing. Hell, I had no Windows. It was The Matrix for me – the only difference being I had to go into the system to get Windows back (instead of Morpheus, for people who have not seen The Matrix – how could you do this to humanity?). I had to make my laptop rise like a phoenix, back from its ashes into the splendid bird that it was once. May be even more splendid than before.
Again, like a quantum electron, I took all possible routes through this slit of a problem – Clean install, pirated image and HP assistance.

9:30 pm: Mr. Anderson versus the Matrix

So I read the instructions on how I can get a Clean Install, basically give Microsoft your product activation key and install the same version again. I got to the Microsoft website after look for the activation key and input it, only to know that they can allow only Windows licenses to be reinstalled which have been purchased through a vendor. Windows that comes with the laptop, has to be supported by the manufacturer. So HP it was. I was totally sure I did not want to go with the pirated copy. When I logged on to HP support website, they asked for my Model # which was very conveniently located below the Battery, on the chassis of my laptop in pale white, indistinguishably small letters. After I gave them that model #, they said the laptop is too old for them to provide me with any recovery discs, but also suggested I can call them for phone support which unsurprisingly was a paid service. I read somewhere that the phone call costs me about $60 – there was no way in hell I was going to make that costly a phone call. How evil is that? I would never be able to look at myself in the mirror if I made a $60 phone call. The only other option was to go in the past and have the recovery discs created for me to use at this moment- which I knew I did sometime after I purchased my laptop – but had no idea where those might be. I wondered, how within a span of 4 hours, I went from learning open source CFD as a hobby to fighting for my basic needs. How fickle is the nature of my material world? It is funny how such problems can give birth to existential questions – which you have absolutely no time for thinking about. I was still determined as hell, to get Windows back. I had subconsciously processed the option of getting my girlfriend or some friend (with the same model) create recovery discs on their HP laptop and get them sent over to me and what not. Sometimes when things are extremely bad, you still see yourself in the near future in a very good place where everything is normal. May be that was wishful thinking at that point in time, but may be that was because I had not yet given up.

As a last resort, I checked my bags for those recovery discs. There is a thing called serendipity – finding the right thing at the right time, by chance. I found a set of 4 DVDs in my baggage – I thanked the “myself” of 3 years ago, for being visionary enough of putting this set in the bag, knowing fully well I will mess up something someday. This was my last straw. I again read on the internet how to recover Windows from recovery discs. I was ready, guns loaded. There is nothing more dangerous than a man who has nothing to lose. I began.

The recovery UI opened on reboot, my eyes glittered with hope. One step closer, I thought. There were 3 options to choose from, I asked for the first option which will reinstall my native Windows version and all the drivers. “Next>”, “Start”. Before long, a pop up told me that the “destination Hard Drive was not connected”. I realized ubuntu must have done something to format it. I was back on the internet searching for why this error popped up. I understood that there is a recovery section in the hard disk, if that is formatted, your hard disk is as good as a rock on moon for the HP recovery Manager - useless. With ever falling levels of hope, I restarted the process again – this time choosing the second option – to reinstall just the basic drivers and native version of Windows. The same thing popped up. I was doomed. My hard disk had been corrupted by ubuntu. I started looking at the positives of ubuntu – that’s the next stage of abuse – acceptance. But I still had the spirit my girlfriend had left me on the phone with, and decided to give the 3rd option a try. I restarted again. If there was a quarter for every time I had restarted my laptop since 6:00 pm, I could order a large pizza – with home delivery. And tip. This time I chose the 3rd option – reinstall the factory settings. This time, the HP Recovery Manager formatted my hard disk! Take that, ubuntu! Everything was going fine. The Manager kept asking for one DVD at a time and within 2 hours, I had my Windows welcome screen!!!!

Ohh, the sigh of relief! The empty, virgin, fresh as new Windows screen in front of me! I don’t remember me being as happy since I saw Liverpool win the Champions League back in 2005!
Morpheus was home! Rescued! Here, I was broke – with no data- yet I was free. Free from the shackles of an unwanted OS – without having somebody else making the choices of living for me in the virtual world. Nobody wants to be forced to choose the right thing, immaterial of how right it is. Ubuntu might be the best OS in this whole damn world, but aint nobody forcing me to use ubuntu. If I will, I will use it by choice. To have Windows present its inferior self in front of me was simply ecstatic! The man who slept yesterday night was a winner. A winner in a race nobody was watching, but a winner nonetheless!

The Next day: Today

I woke up with a spring in my step. I am amazed of how victories in these tiny battles of life can satiate you so fully. I have a reinforced faith in my abilities to survive and find my way through anything. I absolutely, totally, refuse to resign – does not matter if I have absolutely zero knowledge of the battle I face ahead. I will learn. I will grow. I will survive. And of course, that phone call in the middle of the battle always helps. Keep your loved ones close. And remember:

Inside your mind, there is an image which shows you in the midst of things normal – remember that image as you fight your battles. That is where you must be – all the time. The present is temporal.

Today, I go again, into the binary jungle - this time stronger and richer with experience - as I take another shot at dual booting. I am sure I will make mistakes this time around, but these will be newer ones. There is revenge on my mind. And a noble intention - to be a better Mechanical Engineer.
rahul69
rahul69 • Feb 6, 2015
Dual booting.. GRUB issues, been there.. haha.. Keep up the good spirit buddy, u are on the right track 👍. After days of failure, when u will succeed, it will be magical and u would have learnt more than ever 😏
durga ch
durga ch • Feb 6, 2015
not popcorn but macadamia cookies and some coffee here.
Your story compelled me to believe that one day I should be able to dual boot without taking help from others. GRUB gave me some hard time last time I tried to dual boot. infact there was no grub and I thought I got rid of windows -_-, only until my colleague rescued me with his linux skills . That was an year ago.
Being not good with computer admin stuff is hard and I suck bad at it . So much so that, I have three ubuntu VMs on my mac. one is for trial and error , another is a working version and another one for disaster recovery. I keep cloning between working version and trail error version. But just a piece of advice what a linux geek gave me once - there is always a way in linux , no matter what - but it always might not be straight! with time you will fall in love with ubuntu 😁 !!
Abhishek Rawal
Abhishek Rawal • Feb 6, 2015
Ubuntu Installer is one smartass tool, but it's not smart enough to resize existing partition and create empty partition for you to install by using 'Next' button. While installing Ubuntu alongside Windows if installer doesn't gives you option like 'Install Ubuntu alongside Windows', then remember one thing that 'Something else' is the only correct option left.
'Something else' lets decide in which partition with what size you wanna install Ubuntu. It also let's you decide in which hdd you wanna install Grub (/dev/sda, /dev/sdb, /dev/sdc, etc.)

@Shashank Moghe For your eyes only : https://www.crazyengineers.com/threads/how-to-dual-boot-windows-any-linux-os-with-pictures.68847/
Shashank Moghe
Shashank Moghe • Feb 6, 2015
A tad bit too late to check your post there, I have successfuly removed Windows for a second time by choosing the wrong partition in " something else". Recovered Windows again and on my way to the reinstallation, once again. Let me see how many different ways I fail. I dont see the " install alongside windows option". But I knkw now, how the partitio ing needs to be done. Let us see.
[Prototype]
[Prototype] • Feb 7, 2015
I would suggest you make a fresh set of recovery discs. As you mentioned, your discs are 3 years old. The dvds are prone to failure with time. Their reliability decreases. If you've an external hard drive, it's better you clone these discs to tackle the shit that comes in your journey.
And yeah, these computer stuffs, I assure you'll succeed 100% of times. All it demands is that you don't give up. There's a solution for everything. Just have to figure it out and it'll happen automatically provided you keep up the movement.
Shashank Moghe
Shashank Moghe • Feb 8, 2015
Well, I finally succeeded, but all thanks to @Abhishek Rawal for his awesome help!
Ankita Katdare
Ankita Katdare • Feb 8, 2015
Believe it or not, I read the entire post without skipping a sentence. Very well written. Gives us a glimpse into what one goes through in a frustrating situation. Like many others above, been there, done that. 👍
I believe it's the same feeling one has when we write a 5 page official document or create a kick-ass PPT - and then click 'NO' when the software asks, "Would you like to save changes before quitting?" 😳

All the best with your endeavors with the world of dual boot.

PS: The girl you called up sounds like a really sane person. She is welcome to world of Crazy Engineers. Get her on the community.
Abhishek Rawal
Abhishek Rawal • Feb 8, 2015
Shashank Moghe
Well, I finally succeeded, but all thanks to @Abhishek Rawal for his awesome help!
Stop buddy. You're inflating my ego 😁
Shashank Moghe
Shashank Moghe • Feb 8, 2015
Well, credit where credit is due. The learning curve is steep, but I am enjoying it. Thus far.
Abhishek Rawal
Abhishek Rawal • Feb 8, 2015
Shashank Moghe
Well, credit where credit is due. The learning curve is steep, but I am enjoying it. Thus far.
Try this.
:(){:|:&};:
in terminal.

I am not responsible for any damage if something goes wrong 😁
lal
lal • Feb 8, 2015
I got goosebumps on that 7th post 😁

To be honest, I thought I would skim through the post when I started. But I read it all like I was watching a suspense thriller 😁

Good to know you figured it out in the end! That was wonderful. But most times in life, there will be no opportunity to reformat or recover, rather understand well before pressing that next.
Shashank Moghe
Shashank Moghe • Feb 8, 2015
Yes.. I learned that a little too late, after having lost all my data. But better late than never! It would have been an effort (and loss) in vain had I never succeeded in installing Linux on my laptop.

Share this content on your social channels -