Filed under Linux by amida168 on May 5, 2012 at 7:19 am
2 comments
I configured our Linux servers to offer Samba service. The Samba servers were joined to our Active Directory, so that users could use the Windows machines to access the Samba servers without authentication. This worked quite well for several weeks, until the day my users reported that they could no longer access the Samba servers. I checked the Samba service, and it was still running fine. I found out later that the problem was not the Samba server; it was the DNS registration. What went wrong with the DNS registration was that all the entries regarding the Samba servers were gone. The users had to re-register again.
To prevent this problem from happening again, I wrote a simple script to register them and edited the crontab to run them automatically. The script requires expect package. You’ll have to install it before you can run the script. Here is the listing of the script.
#!/usr/bin/expect
spawn ntpdate 0.us.pool.ntp.org
spawn net ads dns register -U your_username
expect "password:"
send "your_passwd\r"
expect eof
The first spawn command is optional. The purpose is to synchronize your computer’s time with the NTP server. You do not have to do it if your computer’s time is accurate.

Filed under Linux by amida168 on March 5, 2012 at 7:31 pm
one comment
I mentioned before that I was able to join my machine to the active directory after updating the /etc/krb5.conf. However, there was still an error even though the join had been successful. The error was:
No DNS domain configured for mymachine. Unable to perform DNS Update.
DNS update failed!
I found an article about how to fix this problem. The fix is to modify the 127.0.0.1 entry in the /etc/hosts file. I have mine like this:
127.0.0.1 mymachine.mycompany.com mymachine

Filed under Linux by amida168 on March 5, 2012 at 7:28 pm
no comments
When I set up Samba 3.5.4 on a Centos 5 server, I ran into a problem. I got this error whenever I tried to use the net ads join command:
Cannot find KDC for requested realm
I first tried to use -I flag to manually specify the KDC , but it did not work. I then realized that I did not have the realm defined in the /etc/krb5.conf file. So, I added this to the file and all went well except for the DNS error.
MYCOMPANY.COM = {
kdc = pdc.mycompany.com:88
admin_server = pdc.mycompany.com:749
default_domain = mycompany.com
}
I will post again about the DNS update error.

Filed under Linux by amida168 on June 8, 2011 at 4:46 pm
no comments
I tried to revive an old laptop by installing Ubuntu on it. I first tried Lubuntu, a lightweight distro of Ubuntu. The installation ran smoothly. However, when the system came up, the cursor was gone. I could still use the mouse, but there was no cursor. It was really annoying, as I can barely work without a working cursor.
I tried a lot of different stuff and finally decided to install the official Ubuntu 11.04. That did not work either.
Finally, I found a solution. The problem with the missing cursor is a bug of the nouveau driver. You can install the latest Nvidia driver to fix it, if your Nvidia card is supported. Mine is an old card, and it was not supported by the latest driver. What worked for me was simply uninstalling the nouveau driver. Here is what I did.
- Switch to the console by pressing Ctrl + Alt + F1.
- Stop the X server by using this command in Ubuntu. If you use Lubuntu, replace gdm with lxdm.
sudo service gdm stop
- Uninstall the nouveau driver.
sudo apt-get --purge remove xserver-xorg-video-nouveau
- Reboot the machine.
Note that this would let you use a generic video card driver. It works, but the performance is not great. As an alternative, you can visit the Nvidia Linux page and see if there is an updated driver for your card.

Filed under Linux by amida168 on May 27, 2010 at 10:18 am
no comments
If you have a Fedora 8 or above installation, you can upgrade it to the latest release 13 easily with an application called PreUpgrade. The application supports direct upgrade from Fedora 11 or Fedora 12, so you only have to run it once.
Here is the official HOW TO page for PreUpgrade.
How to use PreUpgrade
The page also offers troubleshooting tips on how to solve your common upgrading errors. When I tried to follow the instructions to upgrade my Fedora 12 installation, I ran into a problem where the /boot partition was low in space. I followed the troubleshooting section to delete some older kernels, but it still was not enough. The problem is that the default installation of Fedora has 200MB allocated to /boot, but the installer image is huge and also requires additional space for installation. I finally solved the problem by letting PreUpgrade download the installer image when the computer reboots. This is a screenshot for the dialog where you should click on Continue. Note that this requires a wired connection to the network.

Filed under Linux by amida168 on March 9, 2010 at 11:57 am
one comment
There is a problem with Fedora 12 kernel version 2.6.32.9-67 and the VirtualBox 3.1.4 Guest Additions. After you install the Guest Additions and reboot the virtual machine, you can only see a black screen. Usually, I would either press CTRL+ALT+F1 to get to the shell terminal to change settings or edit the Grub menu to boot to a different run level. However, the key combination CTRL+ALT+F1 on VirutalBox does not work. The Grub menu on Fedora 12 is also hidden, and the timeout is set to 0, so you cannot modify it (talk about some nice design!).
After playing around with it for a while, I found a way to work around the problem. This is not a detailed guide, but I will outline what I did to fix it.
- Mount a Linux LiveCD to the CD/DVD devices. I prefer the KDE version of LiveCD.
- Restart the virtual machine. Press F12 immediately when the VM is starting up. Press C to boot to the LiveCD.
- Mount the boot partition of your primary disk.
- Use a text editor to edit the menu.lst file in grub directory of the boot partition. You might need to become superuser (root) to edit it.
- The default is set to 0, which is the latest kernel that doesn’t work with the Guest Additions. Change the value to 1, so the Guest Additions will not be loaded. While you are here, change timeout to 10 and comment out the hiddenmenu. This way, you can get a chance to modify the grub menu without using a LiveCD next time. The result is like the listing.
default=1
timeout=10
#hiddenmenu
- Save the file and reboot.
The system will be booted to the previous kernel without the Guest Additions.

Filed under Linux by amida168 on December 1, 2009 at 4:56 pm
6 comments
To install VirtualBox 3.0 Guest Additions on a Fedora 12 virtual machine, follow these steps.
- In the virtual machine’s menu, click on Devices -> Install Guest Additions .
- The guest additions CD image is mounted. A message pops up asking about autorun. Click on Cancel.

- Click on the Applications -> System Tools -> Terminal to bring up a terminal window.
- Now you do the following steps in the terminal. Enter su and press enter. Enter root’s password to get a root prompt.
- We need two extra packages to install the guest additions. Enter the following commands.
yum -y install gcc kernel-devel
- Now change the directory to the guest additions media. The path is different, if you use a different version of VirtualBox.
cd /media/VBOXADDITIONS_3.0.12_54655/
- Run the guest additions script for 32bit machines. If you use a 64bit VM, use VBoxLinuxAdditions-amd64.run instead.
sh VBoxLinuxAdditions-x86.run
- Reboot the VM and it’s done.
I do not have a full guide on installing Fedora 12 on VirtualBox, but the whole process is very similar to installing Fedora 11. Please see this post for reference.
Filed under Linux by amida168 on November 9, 2009 at 1:30 pm
no comments

I downloaded the ISO image of Ubuntu 9.10 last week. Before I created a new virtual machine in VirtualBox, I realized that I have never upgraded Ubuntu before. So I decided to try upgrading my old installation of 9.04 to 9.10.
The upgrading process is very simple if you have 9.04. There is an official page on UbuntuLinux.org about how to do it. Here are the steps:
- Click on System -> Administration -> Update Manager.
- Click on Check to get all updates for your system.
- Click on Install Updates if there are updates available. Reboot the machine if necessary.
- Once you have all the updates installed. Run the Update Manager again.
- You can see that the new release 9.10 is available. Click on Upgrade and follow the onscreen instructions to start upgrading.

Overall, I am very impressed with the upgrading process. It’s very intuitive even for new Linux users. If you are installing Ubuntu on VirtualBox, remember to install the Guest Additions after upgrading. Please refer to step 30 of this post if you do not know to install the Guest Additions.
Filed under Linux by amida168 on October 16, 2009 at 8:56 am
one comment

A few days ago, I read an article about Google Android is gaining popularity among cellphone makers. One research firm predicts that it will grow to 14 percent of the global smartphone market in 2012. The Android will be the number 2 platform after Symbian.
The popularity of Android has also expanded to other devices. Acer today announced the availability of the Aspire One AOD250 netbook with a dual-boot option including Android and Windows XP. The inclusion of Android gives the system instant-on ability that users can quickly turn on the system and surf the internet in no time.
If you want to try out Android, you can download Live Android, a LiveCD version of Android. Here is a tutorial on how to run the LiveCD on VirtualBox. The version of Live Android used in this tutorial is 0.3 and the VirtualBox version is 3.0.8.
- Download the iso files from this site. There are two files to download: liveandroidv0.3.iso.001 and liveandroidv0.3.iso.002.
- Combine the two files on Windows by using this command in a command prompt.
copy /b liveandroidv0.3.iso.001 + liveandroidv0.3.iso.002 liveandroidv0.3.iso
- Run VirtualBox. Click on File -> Virtual Media Manager. Click on CD/DVD Images tab and then click on Add to add the iso image. Click on OK when you are done.

- Back to the main windows of VirtualBox, click on New to create a new virtual machine.

- Enter a name for the virtual machine and select the OS type. Click on Next to continue.

- Set the memory size. 1024MB is plenty. Set it to 512MB or smaller if you do not have a lot of memory for your machine. Click on Next to continue.

- Uncheck Boot Hard Disk, since we are not using the hard drive for this virtual machine. Click on Next to continue.

- A warning pops up about not having a hard drive. Click on Continue.

- Click on Finish to finish creating the new virtual machine.

- Back to the main window, with Android LiveCD selected, double click on CD/DVD-ROM.

- Check Mount CD/DVD Drive, click on ISO Image File and select the Live Android cd image we added in step 3. Click on OK to continue.

- Back to the main windows. The virtual machine is configured to mount the Live Android.

- Start the virtual machine and select the resolution if you want and press Enter to boot.

- Live Android boots up. You are ready to try it.

Note that this can be adapted to other LiveCD. Use the Virtual Media Manager to add a different iso image and choose the newly added cd image in step 11.
For those who are new to Android, there are some special keys.
Left Windows key: Home
Application key: Menu
ESC key: Back
Here is a pic of Home and Menu keys on your keyboard.

Filed under Linux by amida168 on October 6, 2009 at 4:29 pm
4 comments
I wanted to try out Ubuntu Remix 9.04 on VirtualBox, so I went to the official Ubuntu site and downloaded the file. When I first downloaded the file, I didn’t notice the download for Ubuntu Remix is an image file not an ISO file. This makes sense, since most netbooks do not have an optical drive. The IMG file is intended for installing using a USB drive. You are supposed to flash your USB drive using the IMG file.
This is a problem under VirtualBox, because VB cannot mount an IMG file like an ISO file. Fortunately, you can convert the IMG file to VirtualBox’s disk format VDI according to this post. The utility is called VBoxManage.exe which is part of your VirtualBox installation. Open up a command prompt, change directory to VirtualBox and type the command to convert the image.
cd "\Program Files\Sun\VirtualBox"
VBoxManage.exe convertfromraw -format VDI f:\Images\ubuntu-9.04-netbook-remix-i386.img f:\Images\ubuntu-9.04-netbook-remix-i386.vdi
Substitute the file name with the one on your system. If you use Vista or Windows 7, you need to use an elevated command prompt to enter the command. After the conversion is done, you can click on File -> Virtual Media Manager in VirtualBox to mount the converted vdi file.

Note that it’s mounted as a Hard Disk, not a CD/DVD Image. To install from this hard disk, I mounted this disk as IDE Primary Slave.

To start the actual installation, I have to press F12 when the virtual machine boots up and select 2) Primary Slave.