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

 

Advertisements

USB wireless adaptor

January 25, 2008

Update: debian contrib does provide the kernel module named rt73-modules-<kernel-version-arch> (arch=686 in my case) and rutilt packages.

To configure the Level One WNC-0301USB 802.11bg wireless dongle.

Many places, e.g. linuxwireless, lists the chipset inside as ZyDAS 1211 . This misinfo sent me off wasting couple of hours wondering why the zd1211rw driver didn’t work. Not until the device ID was examined, had it became apparant that the chipset inside was actually Ralink 2573.

cat /proc/bus/usb/devices

Vendor=148f ProdID=2573 Rev= 0.01
Manufacturer=Ralink
Product=802.11 bg WLAN

The corresponding driver is rt73. It’s a legacy driver and only CVS tarball is available. (Btw, there is an effort in linux-kernel git tree to provide a unified driver rt2x00 to support all ralink wireless devices. However, that driver, included in 2.6.24 is still too experimental at the time of writing.) While at the download page, I also grabbed RutilT, a wireless configuration utility, which turns out to be quite handy. To compile the rt73.ko kernel module, I need kernel-headers. One shortcut is to use module-assistant

apt-get install module-assistant

Although module-assistant doesn’t have rt73 as an opition, I used it to prepare the necessary compile environment (just lauch it and choose “prepare). It will downlaod linux-kernel-headers.

cd rt73-cvs-xxxx/Module; make; make install

It will place the firmware file rt73.bin under /lib/firmware and rt73.ko under /lib/modules/2.6.xx-x/extra.

cp /lib/modules/2.6.xx-x/extra/rt73.ko /lib/modules/2.6.xx-x/kernel/driver/net/wireless

modprobe rt73

The dongle should be recognized and the wlan0 interface should be opened.

To complie Rutilt

apt-get libgtk2.0-dev
./configure.sh --launcher=nopasswd; make; make install


Chinese fonts in Debian

November 13, 2007

Desired effect: Everything (menu, console, etc.) in default locale (i.e. English). Able to display Chinese web page and emails nicely. Switchable Chinese input for any application. References [1], [2], [3]. and [4] (for scim setup).

1. generate locales

dpkg-reconfigure locales

en_US.ISO-8859-1
en_US.UTF-8
zh_CN.GB2312
zh_CN.UTF-8
zh_CN.GBK
zh_TW.BIG5
zh_TW.UTF-8

I use en_US.UTF-8 as my default locale.

2. add deb http://apt.debian.org.tw/ unstable main/ttf-arphic-newsung to /etc/apt/sources.list. ttf-arphic-newsung appears to be the font edited by firefly.

Install these essential Chinese fonts

apt-get install ttf-arphic-newsung
apt-get install ttf-arphic-ukai ttf-arphic-uming
apt-get install ttf-arphic-gbsn00lp ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gkai00mp

Optional English fonts

apt-get install ttf-bitstream-vera ttf-dejavu
apt-get install msttcorefonts

I don’t recommend editing the font.conf and local.conf as suggested in Ref 4, since doing so will render the English fonts ugly. IMHO, the Chinese fonts, with anti-aliasing, look just as good, if not better, without the modification.

3. scim input set up

apt-get install scim scim-pinyin

4. creates ~/.xinput.d/en_US symbolic link to /etc/X11/xinit/xinput.d/scim.

im-switch -z en_US -s scim

It will complain about not finding scim-pinyin configuration, but works correctly after next login.


elog 2.7.0 in Debian

November 12, 2007

Unfortunately Elog did not pass the security scrutiny of Debian yet. Hence it is categorized as unstable. For security reason, instead of apt-get install elog from sid, It’s better to get the latest tarball and build from source.

1. Build and install elog to the default location /usr/local/ with user:group as root:staff.

cd elog-2.7.0 && make && sudo make install

2. Take care of user privilege

useradd -G staff gordon
chmod -R g+w /usr/local/elog

add to the [global] section of /usr/local/elog/elogd.cfg

Usr = gordon
Grp = staff

3. Start elog daemon and view the logbooks @ localhost:8080

sudo elogd -p 8080 -c /usr/local/elog/elogd.cfg -D


Cisco VPN in Debian

November 12, 2007

Connecting to the WUSTL NIL VPN service. A good tutorial can be found here .

apt-get install vpnc
sudo cp /etc/vpnc/example.conf /etc/vpnc/nil.conf

Fill in all the information in the conf file with the help from .pcf file, and comment out the line with “IKE Authmode hybrid” because “vpnc was built without openssl: Can’t do hybrid or cert mode.”

sudo vpnc nil.conf

To disconnect:

sudo vpnc-disconnect


JRE and flash plugin for Mozilla (Firefox/Iceweasel)

November 11, 2007

Currently both JRE5 and JRE6 are viable options. Install either one from the non-free section

apt-get install sun-java5-jre
or
apt-get install sun-java6-jre

link java plugin library to mozilla plugin directory, e.g., JRE6.

ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/plugins/libjavaplugin_oji.so

This works only for i386. On amd64 system

apt-get install java-gcj-compat-plugin

usually gives most people what they want. If it’s necessary to run sun java-plugin on amd64, a chrooted ia32 env is probably the only solution.

to have flash plugin, which is only available from the unstable (sid) branch

apt-get -t sid install flashplugin-nonfree

to use predefined priorities to automatically select one implementation of “flash”
between the multiple installed alternatives (this usually works for most people)

update-alternatives --auto flash-mozilla.so

to manually select one implementation of “flash” between the multiple installed alternatives :

update-alternatives --config flash-mozilla.so


Read/Write ntfs in Debian

November 11, 2007

Seems there are now two packages claiming to provide full read/write support of windows ntfs. One is ntfsprogs from linux-ntfs.org, the other is ntfs-3g from ntfs3g.org , which is based on FUSE. While the former alleges the latter an obsolete fork, the latter bashes reliablility issue in the former’s 2.0.0 release. Without knowing which one performs superior, I’m sticking with ntfsprogs simply because of its longer track-record and wishing the two will merge someday.

A how-to is only a google away, such as Howto for ntfs-3g

apt-get install ntfs-3g
or
apt-get install ntfsprogs

mount -t ntfs-3g /dev/hda1 /media/win -o umask=0,nls=utf8
or
mount -t ntfs /dev/hda1 /media/win -o umask=0,nls=utf8

entry for /etc/fstab

/dev/hda1 /media/win ntfs-3g umask=0,nls=utf8 0 0
or
/dev/hda1 /media/win ntfs umask=0,nls=utf8 0 0