ENDIAN, Y U NO PROVIDE DEV ENVIRONMENT ?It seems like getting VMware tools on Endian community has always been difficult due to missing development libraries, and getting a proper development environment was notoriously difficult for unknown reasons. After persistently fighting with every single version of the the community edition, i am happy to say that I've finally got VMware tools, and a kernel development environment going on EFW 2.5.1.
Getting Started- Download and install Endian EFW 2.5.1 in VMware. Assign the Endian VM 2 nics, 25 GB disk and as much RAM and CPU you can afford. This box will be recompiling the kernel.
- Download the Endian 2.5.1 Source Code package, you only need the kernel source code (kernel-2.6.32.43-57.e43.src.rpm).
- Extract kernel-2.6.32.43-57.e43.src.rpm from the downloaded source tgz and place it in your home directory.
- Make sure the Endian VM has internet access, and enable SSH through the web administration console.
- You must have a valid Endian development account. If you don't have one, sort it out before you begin.
Prepare and Customize Endian KernelDownload and install devel environment:
cd ~
uname -a # take note of the current kernel version (write it down!)
efw-upgrade -s # Upgrade to Bleeding Edge Dev channel.
curl -O autoinstall.plesk.com/PSA_9.2.2/update-rpm-RedHat-el4-i386/glibc-devel-2.3.4-2.41.i386.rpm
curl -O vault.centos.org/4.6/apt/i386/RPMS.os/ncurses-devel-5.4-15.el4.i386.rpm
mkdir -p /usr/src/redhat/SOURCES
mkdir -p /usr/src/redhat/BUILD
mkdir -p /usr/src/redhat/RPMS/i386
mkdir -p /usr/src/redhat/SRPMS/
rpm -i kernel-2.6.32.43-57.e43.src.rpm
rpm -i ncurses-devel-5.4-15.el4.i386.rpm
rpm -i --nodeps glibc-devel-2.3.4-2.41.i386.rpm # Ignore errors
smart install kernel-headers make patch gcc4 rpm-build m4 glibc-headers gcc
Make GCC4 default:
cd /usr/bin/
mv gcc gcc3
ln -s gcc4 gcc
Prepare the kernel source tree:
cd /usr/src/redhat/SPECS/
rpmbuild -bp --target=$(uname -m) kernel.spec
ln -s /usr/src/redhat/BUILD/kernel-2.6.32/linux-2.6.32.i686 /usr/src/linux
cd /usr/src/linux
sed -i 's/CONFIG_MODVERSIONS=y/CONFIG_MODVERSIONS=n/g' .config # loosen up the kernel, disable modversions.
make menuconfig
At this point, you can configure your kernel, and generally optimise your system. In my case, I:- Removed wireless support, ISDN support, various other uneeded modules and drivers.
- Set the processor type to Core2 / Newer Xeon.
- Disabled PAE.
- Disabled MODVERSION support in the kernel.
Compile kernel and modules, reboot:
make -j4 all # assuming you have 4 cores on the box (j4)
make modules_install
make install
reboot
Install VMWare toolsAfter the reboot, SSH back into the Endian VM and initiate a VMware Tools install on the guest.
uname -a # make sure your new kernel has booted and is running.
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom/
cp -rf /mnt/cdrom/VMwareTools-9.2.1-818201.tar.gz /tmp/
cd /tmp/
tar zxpf VMwareTools-9.2.1-818201.tar.gz
cd vmware-tools-distrib/
./vmware-install.pl # Proceed with VMware tools install as usual!
Having vmware-tools start on boot:I hacked up some init scripts to have vmware tools start reliably on boot time. Probably not the best way, but it works.
Edit the /etc/rc.d/rc.ipac and add a reference to a vmware startup script.
nano /etc/rc.d/rc.ipac
Change :
echo "Setting up ip accounting"
/etc/rc.d/helper/writeipac.pl
/usr/sbin/fetchipac -S
exit 0
to:
echo "Setting up ip accounting"
/etc/rc.d/helper/writeipac.pl
/usr/sbin/fetchipac -S
. /etc/rc.d/init.d/rc.vmware
exit 0
Save and exit the file. Next, create the vmware startup script, reboot:
echo /etc/init.d/vmware-tools start > /etc/rc.d/init.d/rc.vmware
chmod 755 /etc/rc.d/init.d/rc.vmware
reboot
Log back into SSH after the reboot, wait for a good 2 - 3 minutes for all the startup scripts to complete, and verify vmware-tools was installed properly:
root@efw-1351283599:~ # ps -ef |grep vm
root 5120 2 0 12:20 ? 00:00:00 [vmmemctl]
root 5270 1 0 12:20 ? 00:00:00 /usr/sbin/vmtoolsd
root 5526 5517 0 12:24 pts/0 00:00:00 grep vm
root@efw-1351283599:~ # lsmod |grep vm
vmmemctl 4973 0
vmci 55997 1 vsock
vmxnet 14479 0
vmxnet3 23693 0
Enjoy vmware-tools on your Endian EFW 2.5.1 Virtual Machine!