Sunday, February 14, 2010

CentOS 5.4 netinstall on Virtualbox

This is applicable to both CentOS 5.4 and 5.5, maybe applicable to older versions as well.

One of the installation methods possible in installing CentOS 5.4 is network installation or NetInstall. There are good reasons why one would like to do NetInstall and not install from the full CDs. Installing from CD means you have to download monster files. In CentOS 5.4, NetInstall iso file is only 8.9MB whereas the CDs (6 sets) are ~700MB each. So if you are planning to install just once or if you are going to use VirtualBox (note snapshot functionality, branching and cloning), then netinstall would really make sense.

Note that to have good installation experience you have to have a fast connection to internet or a mirror in your intranet.

To start with, you need to have VirtualBox installed. I am using W7 Home Premium with 8GB as the host machine. This should not matter much actually if you are familiar with VirtualBox.

Then download netinstall iso from and select the appropriate mirror. I have downloaded my copy from You should try to select the mirror that is close to you and hopefully that mirror is running on a fast machine with huge pipes.

We should now be ready to install. Run Virtual GUI and create a new guest machine. Since CentOS is essentially a RedHat rebuild less the trademarks and associated graphics and icons (etc), you should be fine selecting Redhat as the Linux version. Note that for these exercise we will be using 32bit version of CentOS.

Below is my VirtualBox configuration:
Base Memory: 512 MB
Processor(s): 1
Boot Order: CD/DVD-ROM, Hard Disk
VT-x/AMD-V: Enabled
Nested Paging: Enabled
Video Memory: 12 MB
3D Acceleration: Disabled
2D Video Acceleration: Disabled
Remote Display Server: Disabled
IDE Primary Master: centos54.vdi@80GB
Audio Host Driver: Windows DirectSound
Audio Controller: ICH AC97
Network 1: Intel PRO/1000 MT Desktop bridged to Microsoft Loopback Adapter


Step 1.
Power-up CentOS 5.4 guest machine. Then mount CentOS netinstall iso. Screen capture follows with values I used to setup CentOS.
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6. You can unselect IPv6 if you are only using IPv4 here.
Figure 7. Select appropriate mirror for your location. Note that when I tried to poke around CentOS 5.5 three days after it was announced, I was having all sorts of errors using, to the point that I can't even get a clean install. I am guessing that it is still syncing with the source. I switched to the mirror shown below and it was fantastic.
Web site name: CentOS directory: pub/linux/distributions/centos/5.5/os/i386

Figure 8.
Figure 9.
Figure 10.
Figure 11.
Figure 12.
Figure 13.
Figure 14.
Figure 16.

Step 2: Updating the base install
yum update
Step 3: Installing Guest Additions
yum install gcc -y yum install kernel-devel -y
Mount VirtualBox guest additions using the GUI, then in CentOS terminal running as root do:
[root@localhost timus]# sh /media/VBOXADDITIONS_3.1.4_57640/
Of course, for the above command, it changes depending on the version of VirtualBox you are using.

1 comment:

Anonymous said...

Thanks for the article! Following the instructions, I was able to complete step1, when it says "Congratuations... reboot to complete". I rebooted, and saw the installation screen all over again!

Do you happen to know what might be the problem?