Posts filed under ‘mandriva’

Switching to the Open source Athero driver after Mandriva 2009 upgrade

Mandriva 2009 comes with a new open source Athero driver, but because I upgraded rather than reinstall, it was still stuck on the old madwifi driver. Here’s what I did to get rid of it and switch to the new driver.

  1. Install and Remove software and type in madwifi to search for all instances of madwifi. Uninstall all instances of madwifi.
  2. Reboot the laptop.
  3. For some reason, it doesn’t automatically detect the athero. I opened up a command line, login as root and typed:modprobe ath5k

The laptop should now be on the new open source driver from now on. You may need to re-enter your wireless configurations.

October 12, 2008 at 11:29 am 1 comment

Mandriva 2008.1 on Acer Aspire 3680-2622 Laptop

To This blog documents my experience with running Mandriva 2008.1 on Acer Aspire 3680-2622. Note that I started out with Mandriva 2008.0 Powerpack and then upgraded via the standard repository to 2008.1. Since powerpack is essentially Mandriva plus some proprietary software, I assume that most of the blog applies to the standard Mandriva and probably other versions of Linux.

According to uname -a, my machine is running kernel 2.6.24.4-laptop-lmb.

Hardware Component Status under OS Notes
Intel Celeron M520 1.6 Ghz CPU Working  
Intel 943 GML Video Working Conpiz 3D works perfectly but has compatibility problems with video playback if turned on.
14 inch LCD Working Brightness control works. Brightness control did not work in Mandriva 2008.0.
Intel 82801G HDA Audio Working Correctly detected headphone and disable speaker. Make sure you configure the volume control to Master and adjust the volume in the mixer.
2 Gb RAM, DDR2 Working  
Western Digital WD800BEVS 80 Gb SATA Hard Drive Working  
Optiarc CD-RW CRX880A Working  
Keyboard Working Many of the Hot keys works.
Synaptics Touchpad Working Require manual editing of Xorg to change Touch pad configuration like tapping.
Marvel 88E8038 PCI-E Ethernet Working  
Atheros AR2413 802.11bg Wireless Working WPA works.
Battery Working  
Modem Not working Does not even appear in hardware detection list.
USB Working  
TI 5-in-one Card Reader Working Tested only with SD card
TI Cardbus Untested Probably works
Sitecom Bluetooth (third party install) Working This is a USB module that plugs into the Acer 3680’s internal bluetooth connector. It did not come with the laptop.
Laptop Power Management Working Note that Celeron do not have frequency scaling.
Suspend to RAM Working with Modification Laptop often failed to resume because it crashes while loading ALSA. You need to turn off Pulse audio.The module ath_pci needs to be unloaded during suspend or the wireless will be lost when we resume.
Suspend to Disk Working with Modification The module ath_pci needs to be unloaded during suspend or the wireless may be lost when we resume.

Possible strange interaction with the Wireless Switch

When I first boot up, the wireless did not work. Rebooting it did not work either. Finally, I reboot while holding down the network switch. Since then, the wireless has worked for most of the time but fail to be detected some of the time. Whenever Linux failed to detect the device, I have shut off the machine and repeat the procedure to restore the wireless.

Unload the wireless module during suspend

One problem encountered is when you suspend, sometimes the wireless goes dead and cannot be restarted. To get around this problem, you can tell the power management utility to unload the Atheros module during suspend and reloaded it during resume.

  1. Open a command line window.
  2. Type cd /etc/pm/config.d
  3. Type su root and enter the root password to become root.
  4. Create a file defaults with the following line:
    SUSPEND_MODULES=”ath_pci”
  5. Close the command window.

Even with this fix, suspend to RAM does not work reliabily. It appears to hang 50% of the time during resume and appears to crash during resuming ALSA. Suspend to Disk appears to be working.

Turn off Pulse Audio to fix Resume from suspend to RAM

By default, Pulse Audio is turned on. When it is turned on, resume often failed when reloading ALSA. You can see this when you check the logs in /var/log/pm-suspend.log and /var/log/messages. To correct the problem, do the following

  1. Select menu Tools->System Tools->Configure Your Computer. Enter the root password.
  2. Click on Hardware.
  3. Click on Browse and Configure Hardware.
  4. Click on 82801G (ICH7 Family) High Definition Audio Controller under sound card.
  5. Click on Run Config Tool.
  6. Uncheck “Enable PulseAudio” and “Automatic routing from ALSA to PulseAudio” and press OK.

Synaptics Touchpad

The synaptic drivers appears to be detected and installed properly. However, unlike Ubuntu, I was unable to find a GUI interface for configuring the touchpad. In the end, I ended up configuring it manually in xorg.conf.

Setting the clock to local time instead of UTC

Normally, I like UTC better than local time. Unfortunately, if you plan to run windows as a guest under Virtualbox, you have to use local time or the clock under windows guest will be way off (apparently, even Vista still runs in local time). To set UTC, right-click on the clock and adjust the time. At some point, you will be ask if you want to use local or UTC.

Volume Control

When I first install the machine, it had no sound. I right click the volume control and selected Master Channel and select Master as the master volume. I then right-click again and select Show Mixer window and adjust the volume. This seemed to have corrected the problem with sound.

What’s nice about the implementation is when I plug in the headphone, the speakers are automatically muted. This is something that is common to Windows, but was rarely the case under Linux.

The hot key for muting the volume does not appear to work.

Video playback issue with Compiz

When you switch on Compiz, video playback always failed. When Totem, Kaffine, or VLC is use to playback a video, the program would crash immediately. The problem appears to be an incompatibility between Compiz and X Video extensions (XV). To correct the problem on players that rely on Gstreamer like Totem, you can do the following:

  1. Select “Run Command” from the menu and type “gstreamer-properties” without the quotes.
  2. Click on the Video tab.
  3. Select for the default output “X Window System (No Xv)” and press OK.

Now you can play back videos on Totem. The only problem is that with Xv acceleration off, video playback will require more cpu. However, the Celeron M520 should easily handled most movies. For Kaffeine, you can set the playback to not use XV by:

  1. Launch Kaffeine.
  2. Select menu Settings->Xine Engine Parameters,
  3. Click on Video.
  4. Set the video option to “xshm”.
  5. Press OK.

Remote Desktop

Most Linux distro these days come with a GUI RDesktop in their menu, which I use mainly to access windows machines on my network. Mandriva for some reason does not include a GUI version of RDesktop in their menu item, but it exists. It is call rfbdrake. To run it, execute rfbdrake from the run menu item or from the command line.

Setting up RAR

I often get files in the RAR format, but rar is apparently not in the regular repository. You can find rar in PLF repository. To setup this repository, open up a browser and go to go to http://easyurpmi.zarb.org/. Follow the instructions to add the PLF repository. Once it is added, you can find rar and install it.

Battery Life

A quick test indicated that battery life under Mandriva (with 3D turned off) is about 10-15 mins better than under Vista Basic. In my experience, this is often not the case. Windows typically have better battery life (probably due to better power management in their drivers). This is an unexpected bonus.

Update Dependency Problems

Mandriva automatically check for updates. During one of the updates, I got the following error:

Sorry, the following packages can't be selected:

- kdebase-common-3.5.9-37.2mdv2008.1.i586 (due to unsatisfied libkdebase4[*][== 1:3.5.9-37.2mdv2008.1])
- kdebase-kdeprintfax-3.5.9-37.2mdv2008.1.i586
- kdebase-kdm-3.5.9-37.2mdv2008.1.i586 (due to unsatisfied liblazy.so.1)
- kdebase-nsplugins-3.5.9-37.2mdv2008.1.i586 (due to unsatisfied kdebase-progs[== 1:3.5.9-37.2mdv2008.1])
- kdebase-progs-3.5.9-37.2mdv2008.1.i586 (due to unsatisfied libkdebase4[== 1:3.5.9-37.2mdv2008.1])
- libkdebase4-3.5.9-37.2mdv2008.1.i586 (due to unsatisfied libbeagle.so.1)

I was unable to make the problem go away. However, I find the problem only affects the graphical update. If I go to the command line and do the following:

urpmi -- auto-update

The update managed to figure out the dependencies.

Accessing Windows Share

Mandriva Linux Control Center has an icon to access Window SMB shared drives, but it does not work. There are two problems:

  1. Firewall block windows access.
  2. Access SMB in Mandriva Linux Control Center does not work.

To open up the firewall, do the following:

  1. Select Configure Your Computer. Enter the password for root.
  2. Click on Security.
  3. Click on Setup your firewall.
  4. Check Windows File Sharing (SMB). Press OK.
  5. Uncheck “Windows File Sharing (SMB)l” from the watch list, or you’ll be constantly pestered about port 137 and 138 being used. Press OK.
  6. Check both wireless and wire to be protected by firewall. Press OK.

Since Mandriva Linux Control Center did not work, we should use a different SMB client to access your Windows Shared directory. The best SMB client is smb4k.

  1. Select Configure Your Computer. Enter the password for root.
  2. Click on Software Management.
  3. Click on Install and Remove Software.
  4. Search for smb4k
  5. Check smb4k and press Apply.

Once smb4k is installed, you can select it from Menu->Internet->smb4k. Just remember the set your permission at the window server side correctly.

However, I notice that I am still unable to access Vista shared volumes.

NTFS access

Surprisingly, Mandriva does not come with NTFS support installed. If you plug in an USB external drive formatted in NTFS, it’s going to complaint that your volume is corrupted. To install NTFS support, do the following:

  1. Select Configure Your Computer. Enter the password for root.
  2. Click on Software Management.
  3. Click on Install and Remove Software.
  4. Search for NTFS-3g
  5. Check NTFS-3g and press Apply.

 

May 14, 2008 at 9:27 pm 9 comments

Tips on running Sun Virtualbox

The following are tidbits I have learn while running Virtualbox on various systems.

Host Related Issues

Running Virtualbox on an Ubuntu Host

There are two issues:

  1. When you click attempt to open the settings on a virtual machine, you get the following error:

    Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer.

    The cause of this problem is that usbfs is not turned on in Ubuntu. To fix this, you need to edit the file /etc/init.d/mountdevsubfs.sh (remember to use sudo). Search and uncomment out all of the code lines:

    #
    # Magic to make /proc/bus/usb work
    #
    #mkdir -p /dev/bus/usb/.usbfs
    #domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    #ln -s .usbfs/devices /dev/bus/usb/devices
    #mount --rbind /dev/bus/usb /proc/bus/usb
  2. Unfortunately, this does not solve the problem entirely. When I attempt to access the USB from the guest, I get the following error message.

    Failed to attach the USB device

    Even though you enabled usbfs, the user do not have permission to use USB. You can set up a rule to give each user access. Because everyone who use Virtualbox has to be in the group vboxusers. The easiest way to give every Virtualbox user access would be to give vboxusers access. Sudo edit the file /etc/udev/rules.d/40-permissions.rules, locate the following line:

    # USB devices (usbfs replacement)
    SUBSYSTEM=="usb_device", MODE="0664"

    Change the line to:

    # USB devices (usbfs replacement)
    SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"

Running Virtualbox on a Mandriva Host

When you install Virtualbox on Mandriva (I am using Virtualbox 1.6.2 on Mandriva 2008.1), it throws an exception when I run the VM:

Virtualbox kernel driver not installed.

This error is encountered if I install the Virtualbox OSE from the Mandriva repository or the Virtualbox rpm from Virtualbox.org (note: the version I am using is for Mandriva 2008.0, a 2008.1 was not available). The problem is that Mandriva needs a kernel package to compile the Virtualbox kernel driver. First, you need to determine what kernel module you are using. On a desktop, you are likely to be using kernel-desktop-devel-latest and on a laptop you are likely to be using kernel-laptop-devel-latest. When you boot up your machine, you can see which one you have in the boot menu. You should install Virtualbox in the following order.

  1. Install the kernel-desktop-devel-latest or kernel-laptop-devel-latest (depending on whether you have a laptop or desktop). This must be install first because Virtualbox need it to compile a new kernel module.
  2. Download and install the Mandriva Virtualbox rpm from Virtualbox.org
  3. Add the users that will use Virtualbox to the group vboxusers.

Guest Related Issues

Installing guest additions on CentOS / RedHat

The following have been tested on CentOS 5.2 and 5.4, which is a clone of RedHat enterprise Linux 5.2. You’ll need to install the gcc and kernel source by running the following command as root:

yum install gcc -y
yum install kernel-devel -y

When you run the Linux addition, you’ll get an error indicating that the Linux module cannot be built. Before you compile, you need to set the KERN_DIR variable. To figure out where the directory is, go to /usr/src/kernels. Inside should be the kernel version directories.
type the following command:

uname -rp

The command will return the kernel version and the type of processor. For example, mines return the following:

2.6.18-164.e15 i686

In the /usr/src/kernels is the directory 2.6.18-164.11.1.el5-i686, so we will set the directory using the command:

export KERN_DIR=/usr/src/kernels/2.6.18-164.11.1.el5-i686

Now you can run the Linux Additions.
After the installation, you may notice that the OS was unable to detect the correct resolution, so you have to manually add the the appropriate modes line to your display section. The following is an example from my laptop:

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth     24
	SubSection "Display"
		Viewport   0 0
		Depth     24
		Modes   "1280x800"
	EndSubSection
EndSection

Note that seamless and automatic guest display will not work because it requires xorg server 1.3 or later. CentOS / RHEL 5.2 only has version 1.1.

Installing guest Additions on Linux Mint

Install build-essentials. This will install the kernel header, source, and compiler so you can run the guest additions.

Installing guest Additions on Suse 10.3

When you try to run the guest addition, you’ll get an error message that you have to install header, source, and gnu c. You need to use YAST to do the following

  1. Use YAST and add OSS source to the repository list.
  2. Install the packages gcc, kernel-source, linux-kernel-headers.

After the header, source and compiler is installed, the guest additions seems to work only some of the time. Suse runs the init scripts in parallel and sometimes the vboxadd script end up running after the Xorg.

There are two way to fix this:

  1. Set RUN_PARALLEL=no in /etc/sysconfig/boot. This may cause a slight delay in runtime.
  2. You can add a dependency to /etc/init.d/.depend.start so that vboxadd is executed after xorg. To do this, find the line for xdm: and add vboxadd to the end of the line. If you reinstall the guest addition, you may have to do this again.

Shared Folder on a Linux Guest

Virtualbox allow you to pass data between host and guest through a shared folder. The instructions in the manual is not necessary very clear. The manual states that you are suppose to run the following command in a Linux host to mount the shared folder:

mount -t vboxsf [-o OPTIONS] sharename mountpoint

The trouble is that users may not understand what the sharename and mountpoint is and that shared folder under Linux is quirky and weird.

Here’s how it works, in the settings for each machine, you can add a shared folder. The process is fairly intuitive, you click on the add button and select a directory where the share directory will be a sharename is automatically created. This is the share name you will use in the mount command. The mount point is simply a directory that you will mount the share folder to. You will have to do this as root or use sudo. For example:

mount -t vboxsf vshare /home/paulsiu/vshare

The problem is when you tried this, you get the following error:

/sbin/mount.vboxsf: mounting failed with the error: Protocol error

If you look at syslog, you’ll see the following error:

Nov 8 19:28:09 wxbuilder kernel: vboxvfs: sf_glob_alloc: vboxCallMapFolder failed rc=-102
Nov 8 19:28:09 wxbuilder kernel: sf_read_super_aux err=-71

Apparently, you’ll only get this error if you use the default sharename. When you create a new shared folder, Virtualbox will ask where your shared directory is on the host. When you select the shared directory, the sharename will default to that directory. If I create a shared folder at “/home/paulsiu/vshare”, virtualbox will generate a sharename of “vshare”. Unfortunately, if you use this default sharename, you will get a protocol error, so you should rename the sharename to something other than default, such as “vboxshare” for example. I have no idea why, but that appears to be what’s happening.

With the new shared name, you can now mount the shared directory. Unfortunately, the directory is mounted as root with the group of root and read writable only by root. Since it is a bad idea to login as root, your shared directory is readonly.

The user manual suggests using the mount options and set the uid, gid, and mode. But the manual lies, you cannot set the mode. The permission on the shared directory is locked to writable by user only. This mean you cannot create a single persistent directory for all users on the system.

One way around this is to create a vshare directory in each of the user’s home directory and have the login script mount the shared directory to this home directory as the user.

mount -t vboxsf -o uid=<user> <sharename> /home/<user>/vshare

Seamless Mode or Auto-resize Guest Display is grey out on a Linux Guest

According to the user manual, you must have Xorg Server 1.3 or later. To check what version you have type the following command at the command line:

X -version

If the Xorg X server is lower than 1.3, Seamless and Auto-resizing will probably be disabled. Ironically, enterprise Linux like RedHat, CentOS, and SLED are likely to be using an older Xorg Server, so corporate users will most likely to be hit by this limitation.

Windows guest startup with a inaccessible boot device message

When I boot up windows 2000, I got the message “INACCESSIBLE_BOOT_DEVICE”. The problem was traced to the IDE controller type. I had set the IDE controller to PIIX4 when it was previously set to PIIX3. Setting it back to PIIX3 corrected the problem.

64-bit Guest Issue

You can only install 64-bit OS on a 64-bit host. In addition, you will need hardware virtualization support like Intel VT-x or AMD-V for your cpu. In the case of Intel, be real careful of what cpu you buy because Intel has multiple virtualization technologies. The Intel P7350 (used in popular machines like HP-DV5) is listed on the Intel web site of supporting hardware virtualization, but it appears that it has VT-d and not VT-x. Virtualbox needs Intel VT-x, so if you have a Intel processor and don’t have VT-x, you cannot use a 64-bit guest.

Setup Issues

Upgrading Virtualbox

On the Linux box, you generally uninstall the old version and install the new version. On windows, running the installer generally upgrade the old version. There are things to watch out for such as snapshot incompatibility. Follow the following instructions for best results.

  1. Close down all of the virtual machines.
  2. Go through each of the virtual machine and make sure that you get rid of snapshots. The reason is that snapshots are not necessary compatible from version to version. If you don’t do this, you may find that you cannot start your machine any more. To recover, you will have to reinstall the old version and then get rid of the snapshots.
  3. Virtualbox stores the the settings and virtual machine files in .VirtualBox in the user’s home directory on Linux. I am not sure where it is stored in windows. In any case, backup this directory in case somethings goes terribly wrong.
  4. Uninstall Virtualbox. If you are using Windows Host or a Linux with package management, all you need to do is to run the uninstall. If you installed Virtualbox from source, I have no idea how you would uninstall (the manual doesn’t list a way to do it). I assume you just halt Virtualbox and then install over the previous version.
  5. Install the new version of Virtualbox. With luck, all of your virtual machine should come up. When upgrading, I got the following error message:

    RTR3Init failed with rc=-1912 (rc=-1912)

    The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing

    '/etc/init.d/vboxdrv setup'

    may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.

    To fix this, do exactly as the mesage tell you to do:

    sudo /etc/init.d/vboxdrv setup

    Note that this only works if you have the compiler installed.

  6. You may find that your guest additions no longer work and will have reinstall the guest additions.

Virtual Disk setup

You can create virtual disk, but one problem is that they will run out of space and there is no easy way to extend them. The following are my recommendations:

  • Create a really large dynamic virtual disk (ex: 200 Gb), and then create a much smaller partition on it (ex: 5 Gb). Because the disk is dynamic, the actual VDI file is small initially no matter how “large” the drive is. Now, we create a small actual partition on it because we want to limit the actual size of the file. For example, if we run a disk defrag utility, it may cause the drive to take its full size. By keeping the actual partition small, you can avoid the disk from growing to the maximum size of the disk. When we start nearing the end of the partition, we can extend it by using an utility like gparted. By doing this, you can have tons of VDI file all at 200 GB, but actually taking up a fraction of actual disk space.
  • On a Linux guest, do not use UUID references in your /etc/fstab. A lot of distro these days try to be helpful and use UUID references. By using UUID reference, you can move the drive from hda to hdb and it would still reference the partition. While this is very helpful with hardware, this is not so useful on a VM since there’s really no disk to swap around. In addition, when you clone a drive, it will generate a new UUID. If you attempt to swap the new cloned drive with the old one and you use UUID, the OS will not be able to find the drive and crash.
  • Keep it simple by using one partition per virtual disk. With the new SATA configuration, you can have as many drives as you like,
  • For a lot of Linux virtual machines, I generally use a 3 disk configuration: root, home, and swap. This way, I will be able to reinstall without wiping out home. If home or root runs out of space, I can swap in a larger disk.

Bugs and workarounds

Disk Cloning corruption in Virtualbox 2.10

In release 2.1, the command to clone virtual disk change from clonevdi to clonehd. Normally, you can clone a virtual disk by running the command:

vboxmanage clonehd olddisk newdisk

However, this did not work in version 2.10 for some reason. The disk image is corrupted. To get around this problem do the following instead:

  1. Use your host’s copy command to make a copy of the virtual disk.
  2. The copy of the virtual disk has the same UUID as the old disk, so you will need to reassign a new UUID by using the following command:
    VBoxManage internalcommands sethduuid <newVirtualDiskFile>

See  http://www.virtualbox.org/ticket/2813

Keyboard corrupted by Linux Guest Addition in Virtualbox 2.1.0

Recently, I installed Linux Mint as a guest on Virtualbox 2.1.0. Whenever I type a space, Gnome Do would pop up. This happens when I type a space in any field. Normally, Gnome Do is triggered by <super>space, where <super> is the windows key. Virtualbox 2.1.0 addition apparently corrupted the keyboard so that the <super> key doesn’t exists any more. So far, it may only affect US keyboards. See http://www.virtualbox.org/ticket/2793

One work around is to install an earlier virtualbox 2.0.6 guest addition, which works with 2.1.0 and do not have this problem. The guest addition can be download here and you can mount it as a CD.

http://download.virtualbox.org/virtualbox/2.0.6/VBoxGuestAdditions_2.0.6.iso

November 20, 2007 at 10:00 pm 46 comments


Calendar

May 2017
M T W T F S S
« Jun    
1234567
891011121314
15161718192021
22232425262728
293031  

Posts by Month

Posts by Category