Sunday, April 20, 2008

Ubuntu 8.04 Notes and Tips

I currently run Ubuntu 8.04 on an old eMachines desktop, and on my Toshiba A215-4767 laptop.

Here I will update the Linux community with my experiences installing and maintaining this crazy operating system on two machines.

Getting VirtualBox set up

For getting VirtualBox properly set up and configured, this guide will point you in the right direction. The steps are pretty much the same for 8.04 (Hardy Heron).

The highlights of the guide are these -

(1) Two versions to choose from - OSE vs Non-Free

"There are two versions of VirtualBox, the OSE (opensource edition) and the closed source, binary one. The OSE edition is the one you will find in the Ubuntu repositories (add/remove programs), but it lacks some features of the binary one, most notably, USB support. For this reason, I would advice using the binary. For Hardy, download it here (link many change eventually)

(2) Add yourself to vboxusers group

After installing, you will get a warning that you need to add users to the vboxusers group. Let's do so now:

System menu > administration > users and groups > manage groups

Select the “vboxusers” group > properties > check any users you want to be able to use VB.

Now log out, and log in again for these changes to become effective.

(3) Fix USB error #1 - VERR_FILE_NOT_FOUND

You may at some point get the error - "Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND)":

To fix it, we need to enable usbfs. Open a terminal and type:

sudo gedit /etc/init.d/mountdevsubfs.sh

Find this part:

# 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


remove the # sign in front of the last 4 lines so it looks like this:

# 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

Reboot Ubuntu.

Restart virtualbox, select your VM, then click settings. You should have no error messages now.

(4) Fix USB Error #2 - Permissions

You might also encounter a USB permissions problem with VirtualBox. (see here)

The fix? Open up a terminal and type in the following -

sudo gedit /etc/fstab

Add the following to the bottom of the text file -

 none  /proc/bus/usb  usbfs  devgid=46,devmode=664  0  0

(This assumes the group plugdev is group ID 46 on your machine - that's the default group ID for pulgdev anyway, so it shoulden't be a problem)

Now, plugdev, which handles plugable devices, can interact correctly with VirtualBox (after a reboot, probably)


Toshiba A215-4767 Specific Notes

Installing Ubuntu 8.04 on the Toshiba A215-4767 is a fairly simple process. There are only two components that take any real configuration - the wireless and sound setup.

Be sure to attach an Etherent wired connection to your laptop before the install or directly after it. You need to do this because you need to install ndiswrapper to get wireless access, and the simplest way to get it is from the online repositories. (You can install it from the installer CD, but I have been unable to determine how to set that up properly)

(1) Wireless setup (per this site)

Instructions for Atheros wireless card:

Download drivers:

XP 32-bit
XP 64-bit

Extract the drivers and take note of where you extracted them.
Open a terminal a type in the following -

Code:
sudo -i
echo "blacklist ath_pci" >> /etc/modprobe.d/blacklist
rmmod ath_pci

apt-get install ndiswrapper-utils-1.9 ndiswrapper-common

ndiswrapper -i net5211.inf

ndiswrapper -l
look for something like this:
net5211 : driver installed
device (168C:001C) present (alternate driver: ath_pci)


modprobe ndiswrapper
echo "ndiswrapper" >> /etc/modules

After a reboot wireless should work. You should see available wireless networks in the network manager. Note: every few bootups, Ubuntu doesn't get the MAC Address for the wireless card correctly. (Andrew's note - haven't noticed this problem yet) So far it looks like the easiest way to correct this is to go into /etc/ndiswrapper/net5211 and look for the file with a symbolic link. Edit it and replace the line that says
mac_address|XX:XX:XX:XX:XX:XX
and replace the X's with your MAC address.


(2) Sound setup (per this site)

After the inital boot and some updates, but you notice that the sound stops working after a reboot.

To fix this issue, you need to upgrade to the cutting edge version of Alsa. The easiest way to do this is to just use the backports modules.

1) Enable backports in software sources (System Menu> Administration> Software Sources--> Updates--> check "Enable Backports")

2)Then open a terminal and type in uname -r (this will tell you what kernel you're running (eg 386 or generic)

2) In a terminal, type -

sudo aptitude install linux-backports-modules-hardy-generic

OR

sudo aptitude install linux-backports-modules-hardy-386

depending on what kernel you have.

4) In a terminal
sudo gedit /etc/modprobe.d/alsa-base
this will open a file in gedit(the text editor). scroll down the page and
add this as the last line
options snd-hda-intel model=toshiba

(5) Reboot. This will upgrade your alsa to the 1.0.15RC3 and your sound will be fixed.


2 comments:

buy generic cialis online said...

Well worth to read this article, thanks for sharing this information. With this article you offered me got a chance to know about this, anyway i say Great Article! and waiting for you next article about this interesting subject.

airbnb clone said...

Nice post. Thanks for sharing. It was very interesting and meaningful. Keep posting. I follow you.
Clone Scripts| Angry birds flash| Angry birds flash|