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

 

Advertisement

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.

Trip in Europe – Berlin, Germany

December 8, 2008
May 19 – 25, 2007. 15th ISMRM annual meeting. I love Germany more and more. Later

Trip to Mexico – Ciudad Juarez

December 8, 2008
Apr 3 – 6, 2007. Just for the purpose of renewing US visa for the upcoming Berlin trip. It’s an absolutely boring place. If was not for the fact that mimi was joining me, there was nothing worth recording at all.

Trip to Mexico – Cozumel

December 8, 2008
Feb 17- 20, 2007 ISMRM 1st Molecular Imaging workshop. Cruise from Galveston, TX – Cozumel, Mexico. Not so impressed by things in the final destination (e.g., Maya ruining, beach, etc), but you can’t complain much about a free cruise.