Pages

Sunday, February 28, 2016

Ubuntu VMware guest stuck/hangs on boot

Apparently there is a bug in one of the recent Linux kernel update on Ubuntu running as a guest OS on VMware. To be exact, the affected kernels are versions 4.2.0-30.35, 3.19.0-51.57, and 3.16.0-62.82 (mine was Ubuntu 14.10 on Linux kernel v3.19.0-51.57). The bug report is here, and in this blog I am going to show the way to solve it (credits to the answer on this askubuntu Q&A forum).

First, you need to get into the Advanced boot options, which you can access from the GNU GRUB menu.
  1. Start the problematic Ubuntu VM. Hold the shift key on your keyboard until you are redirected to the GNU GRUB menu. If you see the command-prompt-like log that you usually see when you boot your VM up, you missed the point where you should get redirected to the GNU GRUB menu. Restart and try again. Note that when you restart the VM sometimes the VM redirect your keyboard inputs to the host OS instead. Click the VM screen repeatedly to ensure that your keyboard inputs is sent to the guest OS.
  2. Choose Advanced options for Ubuntu
  3. You will be brought to a screen where there are a list of Ubuntu you can boot into with different kernels and boot mode. Choose any that uses the Linux kernel that is not buggy (refer to the list of buggy kernels I show at the start of this post). You can just choose the default boot mode (no upstart/recovery mode).
  4. Congratulations! Now you have managed to boot up to your OS!
  5. There should be an update to the Linux kernel if you check your software updater (I was notified without needing to check manually). Just update and the problem should not occur anymore. If there isn’t any update, you can try Googling to make your VM to boot using the old Linux kernel by default for the time being.
That is all. Note that not all Ubuntu is affected; seems like only Ubuntu on VMware is affected, and only if you happened to update your Ubuntu with the buggy kernel.
Hopefully it helps!

Saturday, February 27, 2016

Integration or Isolation? That's the question

I happened to stumble upon this blog post written by a friend of mine who is also my group mate for the FBOA module I am taking in NUS this semester. The background of the post is actually that he deactivated his Facebook account sometime last year because he feels that Facebook is rather pointless and not the best choice out there as a platform to find information, share his thoughts, or to keep in touch with friends.

I agree with him that Facebook is one of the worst options out there to find information and share your thought. I mean, it is filled with people from all walks of life, and not everyone is as educated as you are, and not everyone is as thoughtful as you are by not sharing pictures of every cat or corgi they saw on the Internet, borderline explicit videos, and those "X things that only YYY understand; number N will make you shocked!" kind of posts. It can be toxic too, seeing the highlights of your friends' lives going for exchange, going on dates, outings, getaway to some exotic place etc etc, while you were there in front of your laptop in your room, living a boring life.

But those are not the main reason I am writing this post (maybe we can discuss about it another day). The post I am talking about is the first one I hyperlinked (or alternatively, here). It was about how one service is tightly integrated to another such that if one service for some reason, God forbid, is down, it will trigger a chain reaction and render us unable to access many of other services. The personal example he mentioned in the post was that he was then unable to use his Spotify because he used Facebook to sign up for his Spotify account.

That brings the question: should different services be isolated from one another? Or should they be integrated with as many others as possible? An argument for isolation is already mentioned above. An argument for integration is that it frees user from filling in the registration/sign-up form and verification hassle that is just way too common. Also, users do not need to remember yet another login ID, nickname, password, or PIN for the new platform he/she is signing up for.

There is no right or wrong answer to this question just yet. This friend of mine seems to be more inclined towards the isolation side, judging from that post. Me, I actually more inclined isolation too, but there are benefits of integration that I do not want to lose (such as no need to remember yet another password).

So what about you? You can just take my (and my friend's) post as fruit for thought, or alternatively you can express your opinion on the comment section! But then again this is just a personal blog that happens to be maintained as I am currently using it for one of my course in university, so don't expect too much discussion except perhaps with me :p.

Wednesday, February 24, 2016

SQL Server Management Studio installation error: "wait on the database engine recovery handle failed"

When I was installing SQL Server Management Studio 2014 a few days ago, I was shown a pop-up at the end of the installation: "wait on the database engine recovery handle failed", and followed by some of the SQL Server MS features failed to be installed.

To be exact, here are the screenshot of the error notifications (not on my computer, credits to the blog who provided me with the solution)

"wait on the database engine recovery handle failed"

Features failed to be installed
To solve this, the TL;DR version is to just uninstall it and install it again but when you are shown the Server Configuration page, change the Account Name of SQL Server Database Engine service to "NT AUTHORITY\NETWORK SERVICE". After that just click next and everything should be installed correctly.

For me, the above paragraph was sufficient to fix my installation. However, if somehow it does not solve your issue (something about validation error pops up, or anything else), go to the blog where I found this solution and try to follow the complete steps provided.

Hopefully it helps!

Tuesday, February 16, 2016

FBOA Module: Technical Expertise - Git workflow

As part of the CS3281/2 module requirement I am currently taking in NUS, I have to establish myself as an expert in a topic/field/technology of my choice. Because version control systems are going to stay, and Git is currently (arguably) the most popular version control systems out there, and I have had some experience in it, and I have friends who are good at it (I have one too many and's), it is just natural that I choose Git to fulfil that requirement. This is going to be the first of the series of Git tips and tricks that I will post in this blog, so stay tuned!

Officially, my tech expertise is "Git workflow" because if I declare as just "Git", apparently I am expected to know Git inside out or something. Nevertheless, my Git-related blogposts will not be limited to just Git workflow, but also Git tips and tricks in general.

Some topics that I plan to write about in the next 1-2 months (which is basically the rest of the semester):

1. Git workflow best practices
2. Git rebase + push --force safely
3. Git rebase vs merge, and what is happening in the background

To get the ball rolling, here's a neat trick I got from @rauchg's Retweet on Facebook if you need to find the first commit where a given string first appeared in the source code.

git log --source --all -S <string>
What it returns is basically a list of all commits that contains the string you input as changes (both as addition and deletion). The first  commit where it appears is of course, the one at the bottom of the list. If you only need the commit's hash, you can shorten the output by adding the --one-line option to the command. Also, if you want a string longer than one word, you can put the string within quotation marks.

If you want to know what each option actually does, you can refer to git-log documentation page.

That is all for now. Stay tuned for more Git workflow goodness! Happy coding!

Wednesday, February 10, 2016

ENOSPC error when running zuul locally

Today I encountered an error when I tried to running zuul locally. It throws an error on a function call to watch a file with error code ENOSPC.

After a quick Google search, I found out that ENOSPC just means that there is insufficient space (probably it stands for Error NO SPaCe). Apparently it happens when you are opening a large number of programs/files. However, at the time I received the error, I only got File Explorer, Terminal, and Sublime Text opened, which is not a large number of programs at all. Further research told me that Sublime is actually implicitly opening a large number of programs if you are using its Open Folder feature so what I did to solve the problem was to close Sublime whenever I wanted to run a zuul test locally.

Hope it helps someone out there who can't figure out what's wrong with their zuul!