Posts filed under ‘linux’

Fedora 15 on Acer 3680

This blog documents my experience with running Fedora 15 on Acer Aspire 3680-2633. Previously, this laptop had been running Linux Fedora 14. I decided t reformat all of the drives to ext4 and reinstall from scratch.

Why use Fedora 15?

Fedora is for people who wants to run on the bleeding edge. It is for people who want to try new things. In this case, Fedora 15 is one of the few distro at the moment using Gnome 3. Fedora is not for people who wants a mission critical system because it can be unstable.

Installation experience

The instruction is fairly straightforward so I won’t rehash the basic install here. According to uname -a, my machine is running kernel 2.6.38.8-35.fc15.i686. This is after we apply all of the updates.

Hardware Component Status under OS Notes
Intel Celeron M520 1.6 Ghz CPU Working Note that there is no frequency or voltage scaling on this Celeron.
Intel 943 GML Video Working Gnome 3 is able to use the 3D mode.
14 inch LCD Working Brightness function keys works.
Intel 82801G HDA Audio Working Correctly detected headphone and disable speaker.Volume function keys work. For some bizarre reason, you can set your volume control to 150%, which makes the laptop speaker actually audible (this laptop has terrible speakers). Mute function key works.
2 Gb RAM, DDR2 Working The full 2 Gb ram is available.
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
Marvel 88E8038 PCI-E Ethernet Working
Atheros AR2413 802.11bg Wireless(Keep in mind that Acer used several different type of wireless, so your hardware may be different) Working with modifications I encountered a problem where the wireless is discovered but i unavailable. The front switch to turn on and off network apparently does not work under Fedora 15. This appears to be the only distro where the native ath5k appears to work properly and I didn’t need to install madwifi.
Battery Working
Modem Untested I can see the soft modem driver, but did not test it.
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. Note that this is a third party module.
Laptop Power Management Working Note that Celeron do not have frequency scaling. Sleep and hibernation works properly.Gnome 3 apparently remove the option to set your laptop lid close.
Suspend to RAM (suspend) Working
Suspend to Disk (hibernation) Working However, there is no suspend menu item, so you end up programming the sleep or power button to trigger a hiberation.
Multimedia playback Working with modification Fedora never comes with flash and codec. I had to manually install flash and VLC.

 

Problems with Wireless
The Atheros AR2413 was detected, but failed to detect any wireless. This was because the wireless was turned off. Pressing on the physical switch did not switch it on. I fixed it by doing the following:

  1. Open a terminal and su to root.
  2. Run yum install rfkill to install rfkill.
  3. Remove the driver by running rmmod ath5k, apparently we have to run rfkill when ath5k is down.
  4. Run rfkill unblock all.
  5. Reinstall the ath5k by using modprobe ath5k.

July 18, 2011 at 8:57 pm Leave a comment

Novell Opensuse 11.2 on Acer 3680-2633

This blog documents my experience with running Novell Opensuse 11.2  on Acer Aspire 3680-2633. Previously, this laptop had been running Linux Mint 8. I decided to give Opensuse a tried again.

Why Opensuse

Suse used to be one of the most popular distros. It is still popular but its popularity has been eclipsed by Ubuntu. One reason to try Opensuse is that it’s a fairly Gnome / KDE neutral distro. Unlike Ubuntu and Mint, which comes in separate Gnome and KDE editions, Opensuse allow you to install either Gnome and KDE from the same disc.

Opensuse also worked a bit to tweak their desktop and supposedly have better integration with Microsoft stuff. They also have a build service where different developers can share build packages. I used it to get a build of the wicd. My reason for trying Opensuse again was to play around with mono and just plain curiousity since I use Suse a long time ago and was wondering how they improved.

Installation Instructions

According to uname -a, my machine is running kernel 2.6.31.12-0.1-desktop2.6.31.12-0.1-desktop. Note that I install the Gnome desktop.

Hardware Component Status under OS Notes
Intel Celeron M520 1.6 Ghz CPU Working Note that there is no frequency or voltage scaling on this Celeron.
Intel 943 GML Video Working Compiz seems to work perfectly.
14 inch LCD Working Brightness function keys works.
Intel 82801G HDA Audio Working with slight modifications Correctly detected headphone and disable speaker.Volume function keys work. For some bizarre reason, you can set your volume control to 150%, which makes the laptop speaker actually audible (this laptop has terrible speakers).

You can mute by pressing Fn+F8, but cannot unmute. This is apparently a Gnome configuration issue.

2 Gb RAM, DDR2 Working The full 2 Gb ram is available.
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
Marvel 88E8038 PCI-E Ethernet Working
Atheros AR2413 802.11bg Wireless Working with modifications Connection is only reliable if you install madwifi,which is available as a package, but the package turned out to be unreliable. I ended up building madwifi from source.You’ll also need to use wicd to maintain a steady connection. Wicd is available through the Opensuse build service.
Battery Working
Modem Untested Unlike Linux Mint, no soft modem driver is offered.
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. Note that this is a third party module.
Laptop Power Management Working Note that Celeron do not have frequency scaling. Sleep and hibernation works properly.
Suspend to RAM Working with Modification Suspends works fine with ath5k. Too bad ath5k doesn’t work with the wireless. Need to add ath_pci to the unload modules list.
Suspend to Disk Working
Multimedia playback Working Was unable to get Totem to work, but was able to install vlc and mplayer and play virtually all of the video formats without issues.

Unlike Fedora 12,  I encountered no strange install errors during installation. Unlike Linux Mint, there were no mysterious kernel panic lockups. Madwifi was also available as a package, which means I didn’t have to compile madwifi. Wicd package was available in Opensuse’s build service, but was more tricky to install than Linux Mint.

If you like Mono, this may be the distribution to use since MonoDevelop is almost always available for Opensuse. However, I was able to easily found the latest MonoDevelop for Ubuntu based distros.

Install instruction

You will need an ethernet connection since your wireless will not be working during the install. One gotta to watch out for is that Opensuse defaults to automatic login. If you don’t like automatic login, you should keep an eye out of the option and uncheck it. The automatic installation option makes the installation faster, but it doesn’t give you an option to set the host name. You can set it later. Another nice touch is that Opensuse automatically detected my “/”, “/home”, and swap partitions on my hard drive.

  1. Install Opensuse 11.2 on the laptop. I used the default options except for partitioning, which I setup with a 3 partition for “/”, “/home”, and swap. When setting up partition, make sure you have a swap that’s at least 2 Gb. The reason is that when you hibernate, it will save the memory to swap and you will need swap space that’s the same size as your RAM or larger. I also make sure that I did not use automatic login. I also disabled UTC because I plan to run windows under Virtualbox. It’s not easy to make windows use UTC time.
  2. Shutdown and hook  the laptop to Ethernet.
  3. Restart the laptop. The Opensuse installer will use the connection to download the rest of the software.
  4. After installation, login, click on YAST and go to Network Settings and set your host name (since I didn’t like the default one set by the installer.
  5. Do a software update.

Opensuse has GUI method of installing madwifi, but it’s faster to copy and paste from the command line. So a lot of the following madwifi install will be using the command line.

Fixing the Unmute issue

When you press Fn+F8, the volume mutes, but pressing the hotkey again does not unmute. According to Novell, this is because they are following Thinkpad convention; this is contrary to the behavior on the other distros. To correct, do the following:

  1. Run Gnome Configuration Editor.
  2. Go to /apps/gnome_settings_daemon/
  3. Set toggle_mute to true (default is false).

Installing MadWifi

As in both Linux Mint 8 and Fedora 12, ath5K is not yet reliable enough for use with the Acer 3680’s Atheros wireless. I encountered massive drop outs and low performance of less than 1 Mb. Based on my previous experience with Linux Mint, the NDISwrapper will not work with WPA authentication. Note that I am using WPA2 with AES.

I originally use the wireless from the repository in http://download.opensuse.org/repositories/driver:/wireless/openSUSE_11.2 using the madwifi madwifi-kmp-desktop. Initially, it worked great, but then would mysteriously stop working completely for several hours. WPA authenication which worked fine before would stopped working. Reboots and removing the battery did not resolve the issue. Eventually the problem will clear on its own only to return again. To resolve the problem, I downloaded the madwifi and installed it.

  1. Download the madwifi to your home directory. I use the following driver: http://snapshots.madwifi-project.org/madwifi-0.9.4-current.tar.gz
  2. Extract the archive.
  3. Open a terminal window and become super user.
  4. cd to the madifi directory you extracted and run the following commands:
    zypper install gcc make linux-kernel-headers kernel-desktop-devel
    make clean
    make
    make install
  5. Add a file “50-blacklist-ath_pci.conf” to the /etc/modprobe.d directory with the following lines:
    blacklist ath5k
  6. Add a file “60madwifi” to /etc/pm/config.d and add the following line:
    SUSPEND_MODULES="ath_pci"

    This will tell the OS to unload ath_pci during suspend, otherwise suspend may fail.

  7. Reboot the computer.

Installing wicd

The Gnome network manager does not work reliably with the madwifi. Every 10 minutes or so, it would drop the wireless connection and then reconnect. Normally, this will not interrupt a download because it recovers before download times out, but it is very annoying to get URL not found when you are web surfing and will disconnect your remote desktop sessions. From my experience with Linux Mint, the KDE network manager has the same problem. There is an alternate network manager call wicd which appears to be entirely stable and do not have the disconnect issue.

Wicd is not available in the standard repository, but it appears that it is available through the Opensuse build service.

Wicd do not co-exists well with Network Manager. After install wicd, the Network Manager should be removed to avoid conflict.

  1. Open a terminal window and become super user.
  2. Enter the following lines:
    zypper -v ar http://download.opensuse.org/repositories/home:/dmitry_serpokryl:/Enlightenment-cvs-core-metapackage/openSUSE_11.2/ Wicd
    zypper mr -r Wicd
    zypper install wicd
  3. When prompted about the key, enter a and return.
  4. Answer y to install the package.
  5. We need to delete the network manager:
    zypper remove NetworkManager
  6. Answer y to remove the package.
  7. Reboot.
  8. In YAST, Network Configuration. change the network method to “Traditional Method with ifup”. Click on OK.

Install Multimedia

Like most Linux distros, Opensuse comes with no restricted codec support. Fortunately, Opensuse now offers a one-click install. However, part of the installation can be confusing.

  1. Go to http://opensuse-community.org/Restricted_Formats/11.2.
  2. Click on the one-click for your desktop (gnome, kde, etc).
  3. Press OK to use the Yast Meta Package Handler to open the ymp file.
  4. Keep clicking on next until you get a warning asking if you review the changes. Press Yes. You may need to enter your admin password.
  5. When prompted to enter a key, press Import.
  6. At some point, you will receive several prompt stating “There are some conflicts on the transaction that must be solved manually”. The dialog wil list a bunch of packages with a conflict issue. Each package listed will be have several options including options to install, not install, and break dependency. For each package, make sure you select the radio button for install (with vendor change).
  7. Press Apply to do the actual installation.

Unfortunately, after you complete the installation, you’ll find that streaming from your web bowser does not work for a lot of the podcast. Many of the podcast will start playing and then stop with an error. Apparently, the built-in Totem browser plug-in does not work very well. An alternative is the vlc browser plug-in, but that is unacceptable because player has no visual controls, forcing you to navigate by keys. I eventually settle on the using the Gecko Media Player. It should available in the Packman repository that you have setup using the one-click.

  1. You have to had run the one-click for multimedia to add the Packman repository before you start.
  2. Open a terminal, and go to root.
  3. Next you want to remove the totem plug-in and replace it with the Gecko Media Player plug-in. You don’t want to remove totem entirely. The Nautilus file manager uses a Totem plug-in (a different one than the browser plug-in) to generate thumbnails. Remove just the Totem plugin by running the following command:
    zypper remove totem-browser-plugin
  4. Once removed, we can install the Gecko Media player by running:
    zypper install gecko-mediaplayer
  5. This should install both Gnome MPlayer and the Gecko plug-in.
  6. When you first run the Gnome MPlayer, you may get this error:
    Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
    

    This is caused by Gnome MPlayer attempting to use the default VDPAU for outpput, which does not exists. To fix, open Gnome Mplayer, select Edit->Preference, and enter xv into the video output.

  7. You may need to go into the browser’s preference and Manage Content Plug-in to add set each MIME type to use the new plug-in.

March 9, 2010 at 6:21 pm 14 comments

Linux Mint 8 Helena on an Acer 3680-2633

This blog documents my experience with running Linux Mint 8 Helena on Acer Aspire 3680-2633. Previously, this laptop had been running Linux Mint 5. I decided t reformat all of the drives to ext4 and reinstall from scratch.

Why use Linux Mint?

In my opinion, Linux Mint offers the best out of the box experience out of all of the Linux distros. On just about every other distro, you have to figure out how to add the repository for the restricted formats and load the codec and libraries just to play back dvd and multimedia files. Linux mint will play just about everything. Since it’s based on Ubuntu, you are likely to have your application in a supported package.

Installation experience

According to uname -a, my machine is running kernel 2.6.31-19-generic. The initial kernel version on Linux Mint 8 is 2.6.31-14-generic.

Hardware Component Status under OS Notes
Intel Celeron M520 1.6 Ghz CPU Working Note that there is no frequency or voltage scaling on this Celeron.
Intel 943 GML Video Working Compiz seems to work perfectly.
14 inch LCD Working Brightness function keys works.
Intel 82801G HDA Audio Working Correctly detected headphone and disable speaker.Volume function keys work. For some bizarre reason, you can set your volume control to 150%, which makes the laptop speaker actually audible (this laptop has terrible speakers).Mute function key works.

Pulse audio seems to be working without issues unlike in Linux Mint 5.

2 Gb RAM, DDR2 Working The full 2 Gb ram is available.
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 If you use the KDE edition, there is no controls to turn off touchpad tapping.
Marvel 88E8038 PCI-E Ethernet Working
Atheros AR2413 802.11bg Wireless

(Keep in mind that Acer used several different type of wireless, so your hardware may be different)

Working with modifications The default ath5k is unreliable, Attempts to use the latest ath5K from March 1, 2010 failed. Ath5K does work, but transfer rate is less than 1 Mps and randomly drops out.

Linux Mint also allow you to select the windows drivers. However, the windows drivers do not appear to work with WPA.

I have managed to get reliable wireless using Madwifi. I used the Feb 1, 2010 snapshot at http://snapshots.madwifi-project.org/madwifi-0.9.4/.In addition, the gnome network manager is unreliable even under Madwifi. The wireless would disconnect and reconnect once every 10 min or so. You should use synaptic to install wicd, which does not have a disconnect issue.

Note that if the kernel is upgraded through mint update, you will need to get the new kernel header and recompile the driver.

Battery Working
Modem Untested I can see the soft modem driver, but did not test it.
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. Note that this is a third party module.
Laptop Power Management Working Note that Celeron do not have frequency scaling. Sleep and hibernation works properly.
Suspend to RAM Working with Modification Suspends works fine with ath5k. Too bad ath5k doesn’t work with the wireless. Need to add ath_pci to the unload modules list.
Suspend to Disk Working
Multimedia playback Working Note that if you use the 64-bit version of Linux Mint, WMAP audio playback will not work.

Initially, the laptop would mysteriously crash. The screen and control would be frozen and there is no error logs and the caps lock would be blinking indicating a kernel panic. The problems have gone away, I haven’t figure out which of my actions fix this problem. It’s either:

  1. Upgrade from 2.6.31-14-generic to 2.6.31-19-generic kernel through Mint updates.
  2. I minimized my Compiz animation settings.
  3. Change to Madwifi and wicd.

Other Distros

I have also tried the following distro with this machine

  • Fedora 12 – Although previous version of Fedora worked before, this release had numerous problems. During install, I had a mysterious error when it attempted to load the storage. This happened numerous times until it mysteriously went away. There were madwifi and wicd rpm on the http://atrpms.net/dist/f12/madwifi, but neither  rpm  installed properly due to dependency issues.
  • Opensuse 11.2 – Installed without an issue but you’ll need to install madwifi and wicd. Unlike Linux Mint, the soft modem driver is not displayed during install.

February 25, 2010 at 10:09 pm 1 comment

Which version of Linux Mint 8 Helena should I run?

There are several different editions of Linux Mint 8 Helena. I decided to try the 32-bit and 64-bit Gnome and KDE edition. The following are my opinion.

32bit vs. 64-bit Edition

Linux Mint 8 comes in 32-bit and 64-bit editions. In the old days, it was risky to run a 64-bit Linux because there would be no drivers available and flash wouldn’t work, and there weren’t that many 64-bit applications. Today, 64-bit Linux works pretty much out of the box and there is 64-bit flash. Is there a reason not to go with 64-bit?

64-bit Pros

  • Can address over 3 Gb of memory (32-bit OS can address 4 Gb of memory, but part of it gets used up by the ROM and I/O so you only see 3 to 3.5 Gb).
  • Some programs, particular rendering programs and compression program can run quite a bit faster.

64-bit Cons

  • 64-bit program may take up more memory than 32-bit programs because of the larger pointer. Supposedly, the size increase is around 15 to 30% but will vary from program to program.
  • WMAP encoded audio (used in some window audio and movies) doesn’t run on 64-bit. You can probably get around this by installing 32-bit player, but you can’t play WMAP audio out of the box.

I decided  to stick with 32-bit Linux Mint. I only have 2 Gb on the laptop so I don’t need 64-bit to maximize my memory. With normal usage, I don’t think I’ll notice performance differences between the 32-bit and 64-bit. If I encode a lot, then may be 64-bit would be better, but not being able to play WMAP seemed like a loss of functionality even though WMAP audio isn’t all that common. If they ever fix the WMAP issue, I’ll go with 64-bit since give me the flexibility to run both 32-bit and 64-bit program, but there are currently no 64-bit program that I must use.

Gnome vs KDE

Gnome vs KDE has long been a religious issue. In a nutshell, KDE proponents tout KDE’s configuration flexibility, while Gnome proponent cite Gnome’s usability. Frankly, you should try out both to see which one you like. Since I tend to leave everything on its default settings, one would assume that I would pick Gnome. After using both, I decided that I like KDE better. The following are my brief observation of both:

  • Mint KDE looks better than Mint Gnome, but that is of course purely subjective.
  • I like the Mint KDE’s menu better than Mint Gnome. I find it navigating Gnome menu’s third level menu items.
  • Gnome seemed slightly faster and more responsive, but then again this could be my imagination. They are fairly similar in performance and memory.
  • Gnome is more stable. When I was using KDE, Dolphin would occasionally die and I would get these mysterious Plasmoid errors.
  • I like Gnome’s resource monitor. KDE has several resource monitors but none seemed to display the information in a manner that I find useful. Actually, I find a lot of the KDE widget not to be all that useful. What does that bouncing ball do?
  • Gnome’s mouse control has a touchpad control that allow you to turn off touchpad tapping. and disable touchpad during typing. I was unable to find a touchpad control in KDE. By editing some fdi files, I was able to disable touchpad during typing, but couldn’t figure out how to turn off touchpad tapping in KDE. In Linux Mint 5 / Ubuntu 8.04, you can do this by editing the xorg.conf, but there was no xorg.conf in Linux Mint 8.
  • Mint Gnome doesn’t come with a graphical remote desktop client and I can’t find one in the mint portal or mint’s software manager. To install a graphical remote desktop client, I had to launch synaptics and install tsclient. KDE comes with krdc, which doesn’t work as well as TSClient, but at least it’s installed by default. You can probably install TSClient in KDE any way using synaptics.

I eventually settle on Gnome even though I like KDE better. While KDE 4.3 is vastly more stable than the first KDE 4 release, it still some stability issue. The KDE GUI is still changing. Even though I like KDE 4 more than KDE 3.5, I like to jump on the KDE train when it isn’t travelling so fast. Another factor is the touchpad tapping, which I really want to turn off.

Obviously, since your needs are different, your final choice will most likely be different than mines. I just wanted to give you something to think about.

February 25, 2010 at 10:02 pm Leave a comment

Problems upgrading from CentOS 5.2 to 5.3

CentOS 5.3 has recently been released and the update appears to automatically upgrades my machine to 5.2 to 5.3. the problem is that the update ends with the following error:

kernel - 2.6.18-128.1.6.el5.i686: failure: RPMS/
kernel-2.6.18-128.1.6.el5.i686.rpm from updates: [Errno 256] 
No more mirrors to try.

This error usualy indicate that there is a problem with the yum cache. I took a look at the release notes and it indicated that we may need to update glibc first. Here’s what I did.

  1. In CentOS, start a terminal window.
  2. su to root.
  3. Run the following commands:

    yum clean all
    yum update glibc
    yum update

The first command clears the cache and all of the stale packages. I am not sure why you need to install glibc first, but it’s in the release notes.

April 3, 2009 at 4:05 pm 1 comment

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

Creating and Managing CentOS virtual machine under Virtualbox

In this article, I will describe how I created a CentOS virtual machine under Virtualbox. The CentOS virtual machine will deviate from a default virtual machine create in the following way:

  • The CentOS virtual machine will use SATA instead of IDE drives. This will increase flexibility and performance.
  • We will use separate virtual disks instead of partitioning a single virtual disk. The separate disks will simplify maintenance and upgrades.
  • The virtual disk will be allocated as a very large dynamic disk. A partition will be created within the virtual disk that uses only a small part of the virtual disk. The virtual disk for example may be created to be a 200 Gb dynamic disk and then we allocate only 5 Gb as a partition, leaving the rest free. Because it is a dynamic disk, there is actually no wasted space. The free space can be used later to expand the partition.

The article is meant as a tutorial. Generally, here are the following steps.

  1. Create the Virtual disks.
  2. Creating the Virtual Machine.
  3. Installing CentOS.
  4. Installing the guest addition.
  5. Correcting the Video Resolution
  6. Expanding the Partition Size

Create the Virtual Disks

We’ll do things a bit differently than the default by creating the virtual disk first. We will create 3 virtual disks: root, home, and swap. The reason we have separate disk is to give us flexibility than having all 3 partitions on the same drive. If you run of out space on home for example, you can swap in a larger virtual disk without disturbing the other two volumes.

In addition, we will create a much larger drive than we need. Once created, you cannot extend a virtual disk volume. You have to create a new volume and copy the content over to the new volume. We will solve this problem by creating a really large volume like 200 Gb. Because we will be using dynamic size disk, the initial disk will be quite small.

  1. Launch the Virtualbox application.
  2. Select File->Virtual Disk Manager.
  3. Click New. This brings up the wizard. Press Next. Select dynamic disk and press Next. Enter the name of the your VM and append ” root” at the end. So if you name your machine “CentOS”, this disk would be called “CentOS root.vdi”. Set the disk size to a really large number like 200 Gb and press Next. Press Finish to complete.
  4. Click New. This brings up the wizard. Press Next. Select dynamic disk and press Next. Enter the name of the your VM and append ” home” at the end. So if you name your machine “CentOS”, this disk would be called “CentOS home.vdi”. Set the disk size to a really large number like 200 Gb and press Next. Press Finish to complete.
  5. Click New. This brings up the wizard. Press Next. Select fixed size disk and press Next. Enter the name of the your VM and append ” swap” at the end. So if you name your machine “CentOS”, this disk would be called “CentOS swap.vdi”. Set the disk size to 2x your intended virtual machine RAM (so if you intended to us 1 Gb RAM in your VM, use a disk size of 2x) and press Next. Press Finish to complete. Unlike home and root, you want swap to be a fixed disk size so that you won’t have an extend disk operation when you need virtual memory.

After these steps, you should have 3 different disk: root, home, and swap.

Creating the Virtual Machine

The follow step will create the virtual machine. We will also attached the disks we created earlier to the virtual machine.

  1. Launch Virtualbox.
  2. Select the menu Machine->New to create a new virtual machine. This will bring up a wizard.
  3. Click next to go to the next screen.
  4. You will be prompted for VM name and type. Enter the name like “CentOS”, and select the OS Type of RedHat (since CentOS is a derivative of RedHat). Press Next.
  5. You will be prompted to set the memory. I set mines to 512 Mb. Press Next.
  6. Now we are at the virtual disk screen. Click Next, you will be warned that you didn’t attach a hard disk. Press Continue. You will attach the disk later.
  7. Press finish.
  8. Select the machine and press on the settings button.
  9. Select Hard disks to bring up the hard disk settings.
  10. Check the “enable SATA controller”. The virtual SATA controller has greater flexibility and faster performance than the virtual IDE.
  11. Click Add disk button. Select the SATA Port 0 from the Slot’s drop down field. Assign the root disk you created.
  12. Click Add disk button again. Select the SATA Port 1 from the Slot’s drop down field. Assign the home disk you created.
  13. Click Add disk button again. Select the SATA Port 2 from the Slot’s drop down field. Assign the swap disk you created.
  14. Press OK to close the hard disk settings.
  15. Click on the audio setting. Check enable audio settings and select the appropriate audio driver.

Install the CentOS

Now we have a virtual machine but no operation system. Our next step is to install CentOS and configure it.

  1. Download CentOS. For this tutorial, I used CentOS 5.2.
  2. Launch Virtualbox.
  3. Select the new virtual machine you created and click on settings.
  4. Click on CD-ROM and mount the CentOS 3.2 image.
  5. Start the virtual machine.
  6. Once the CentOS title screen appears. Press Enter.
  7. Click on the Skip test button. Although it’s better to check your media, the test often result in the CD-ROM being ejected. After the CD is ejected, there seemed to be no easy way to get it to reappear.
  8. On the CentOS splash screen, press Next.
  9. Select the appropriate language and press Next.
  10. Select the appropriate keyboard and press Next.
  11. You will be warned that sda is unreadable and ask if it can format and erase all of the data. Press Yes (since your new virtual disk has no data).
  12. You will be warned that sdb is unreadable and ask if it can format and erase all of the data. Press Yes.
  13. You will be warned that sdc is unreadlable and ask if it can format and erase all of the data. Press Yes.
  14. On the partition screen, select custom layout and press Next.
  15. Click on the New button. Set the mount point to “/”. Uncheck all volume except sda. Set the size to what you think you will need. Press OK. We are meant to use a small percentage of the virtual disk for the partition. The idea is if we need to a larger disk, we can use a partition program to extended it.
  16. Click on the New button. Set the mount point to “/home”. Uncheck all volume except sdb. Set the size to what you think you will need for the home directory. Press OK.
  17. Click on the New button. Set the File System type to swap. Uncheck all volume except sdc. Set the size to fill to maximum size since we want to use all of it for swap. Press OK.
  18. Press the Next button.
  19. You will be prompted to ask if you want to install Grub. Press Next to select the default option of installing Grub on /dev/sda
  20. Press Next to use the active device of eth0 and DHCP.
  21. Select the appropriate country and press Next. WARNING: If you plan to run a mix of Linux and Windows machine, make sure you uncheck “System Clock uses UTC”. Press Next.
  22. Enter the root password and press Next. Make sure you record this somewhere.
  23. You will be prompted to select the software. The system will default to Gnome Desktop. Select the option “Customize Later” and press Next.
  24. The installer will check for dependencies and then display a screen telling you to press Next to continue the installation. Press Next.
  25. Installation will continue for half an hour and then you are presented with an option to reboot. Click on the reboot button and boot from the hard drive instead of the CD.
  26. After reboot, your configuration will continue on a welcome screen. Press Forward.
  27. Press Forward to accept the default firewall configuration.
  28. Press Forward to accept the default for SELinux.
  29. Press Forward to accept the date (note: do not turn on NTP).
  30. Enter the info for a user other than root. Press Forward.
  31. Press Forward to accept the sound config.
  32. Press Finish to complete configuration.
  33. Login as the user you just created.
  34. Wait until you get a notice that there are updates.
  35. Click on the notification and view update. Enter the root password when prompted.
  36. Click on the package updater’s apply updates. You may be prompted about dependencies. Press Continue if that is the case.
  37. Now wait for a while. The update may take several hours for the updates to complete.
  38. Open up a command line window and su to root by typing su and then entering the root password.
  39. Type the following commands to install the compiler and kernel source.yum install gcc -y
    yum install kernel-devel -y
  40. Select the menu Devices->Install Guest Additions from the virtual machine menus.
  41. In the command line, cd to the /media. There should be a Vbox folder within media. Change directory into that folder. There should be a .run file for your machine. For example, on my guest, I did the following:cd /media/VBOXADDITIONS_2.0.0_36011
    sh ./VBoxLinuxAdditions-x86.runYour actual command will vary according to your version of virtualbox.   
  42. Reboot your virtual machine.

Correcting the Video Resolution

On my laptop with a 1280×800 screen, the resolution was not correctly detected. Even when I went in and manually set my Monitor type to 1280×800 in Administrator->Display Settings. I had to manually set the xorg.conf file. Backup your config file and add or modify a subsection in the section screen.

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

The important line to add is ‘Modes “1280×800″‘. The addition of this line causes CentOS to go into 1280×800.

Virtualbox supports a dynamic video display where the size of the desktop is automatically adjusted with the size of the window. However, this is supported only on Xorg server version 1.3 or later. CentOS is using version 1.1, so it does not support dynamic display.

Expanding the Partition Size

Suppose you run out of space later on. If you use the default way of creating virtual disk, you will have to create a new disk, copy the content from one virtual disk to another. This is not trival to do.

If you have followed my instructions, we have created a really large virtual disk, but we really only use a small percentage of the disk. Now if we want to expand, we can boot your virtual machine into a live CD that has a partition editor like gparted. You wan to boot into your live CD because you can’t modify a partition when it is in use. You can use the gparted utility to expand your partition.

September 8, 2008 at 8:33 am 25 comments

Older Posts


Calendar

June 2017
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
2627282930  

Posts by Month

Posts by Category