Today I got an interesting request, a user needed to change his 64 bit non-SMP VM image (running RedHat 4.0) to a SMP machine, problem is, I don’t really want to have to go through reconfiguring the kernel and rebuilding it, so here’s the easy way to do it (it’s pretty simple):
- Power the image down
- Right-click and edit the settings for the VM image (if you don’t know how to do this, this article is beyond your scope)
- Change the CPU settings from 1 to >1 (2 or 4 or 8 or whatever you want to use) (see picture)
- Power the VM image back on
- Put the RedHat CD #2 in your desktop CD drive (or using the ISO), connect the disc to the VM image (see picture, note that I selected the wrong ISO, should be disc #2)
- On the vmware image, mount the cd with: mount /media/cdrom
- Enter the directory: cd /media/cdrom/RedHat/RPMS
- In my case, I’m using a 64-bit kernel, so I would use the 64-bit SMP kernel:
[root@lava2057 RPMS]# rpm -Uvh kernel-smp-2.6.9-42.EL.x86_64.rpm
- Unmount the CD, dettach the CD/ISO
- Run up2date to make sure the new kernel you installed is up to date (chances are that it isn’t, since RedHat has pushed out a new kernel since putting out the CDs)
- Edit the
/boot/grub/grub.conf
file, mine looks something like this before changes:
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-67.0.1.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-67.0.1.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-67.0.1.ELsmp.img
title Red Hat Enterprise Linux ES (2.6.9-42.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-42.ELsmp.img
title Red Hat Enterprise Linux ES (2.6.9-67.0.1.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-67.0.1.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-67.0.1.EL.img
title Red Hat Enterprise Linux ES (2.6.9-42.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-42.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-42.EL.img - I have 4 kernels installed, the initial install 64-bit (non-SMP), the 64-bit SMP I just installed and the most recently updated versions of each of these, as you can see, the line “
default=2
” is still pointing to our non-SMP image. We need to use the 2.6.9-67.0.1.ELsmp kernel, so I’m going to change it to “default=0
“ - Reboot the machine
- After it’s rebooted, log in and check ‘
uname -a
‘, mine shows:
Linux lava2057.lss.emc.com 2.6.9-67.0.1.ELsmp #1 SMP Fri Nov 30 11:57:43 EST 2007 x86_64 x86_64 x86_64 GNU/Linux
Simple eh? I know it’s not related to security, but I figured it’d be helpful to someone out there.
Tony wrote:
Thanks Lee, It worked great for me! I had no problem following your instructions.
Link | July 24th, 2008 at 9:32 am