Mandatory device lost after moving guest OS in virtualbox to new hardware

October 29, 2012

After exporting and importing a linux guest OS from virtual box between two MacBook. I got

  waiting for mandatory devices eth0 __nsc__ 

Solution: cd to the /etc/udev/rules.d directory

grep for the network interface that is missing, eg. grep eth0 *

and comment out all the offending device from the old hardware in file 70-persistent-net.rules.

Reference

 


Programming Lessons

April 4, 2010

After implementing a 2D registration scheme in a substantially long bash script,  a refreshment of  good programming style seems necessary:

1. If…else… is a pig, especially if the switch is passed as a function argument. If there is a lot of if-else with similar structure, it’s time to refactor the code.

2. Sloppy variable naming will eventually come back to haunt you. That’s why namespace is so important in big projects. If you can’t use find…replace-all for a variable, even if it’s protect in local scopes, time to consider redefine the variables and separate their meanings.

3. Always test driven, and there is no escape. Even if you cheap out initially, Murphy’s law will eventually bend you down to your knees. So why not do it from the outright.

4. Parallelize the function structures and logical flows of similar objects as much as possible, even if this may sometimes mean a couple of extra function calls at the beginning or end of the main units.


Trip in Europe – Royal Bath and West Show, UK

December 8, 2008
May 31, 2007. It’s an agriculture show/carnival by and for farmers – the real England country lives. There are still fun things out there other than city life!

Trip in Europe – Bath, UK

December 8, 2008
May 30, 2007. Bath (巴斯) famous for its spa. It’s a pity we didn’t get prepared that day. Otherwise it would have been perfect to lay down in a spa instead of walking in a typical British drizzling day.

Trip in Europe – London, UK (2nd)

December 8, 2008
May 28. It’s our second time to this city, but now with a British guide. Can’t imaging we missed so much last time. It’s a city worth multiple visits.
… 

Trip in Europe – Bristol, UK

December 8, 2008
May 27 – June 4, 2007. Visiting in-laws (Ugh …!).
Nice peaceful city. The little touch of delicacy transpired through its royal tradition is unmatchable.

Trip in Europe – Portsdam, Germany

December 8, 2008
May 26, 2007. A one day trip to this famous palace close to Berlin. Nothing too impressive though.