Changing 32 bit and 64 bit mode on AIX

Recently I’ve been asked to boot an AIX system into 32 bit mode. Switching back and forth between 32 and 64 bit is quite easy with AIX. You need to create a link to the corresponding kernel. Officially IBM advises to boot into service mode first but it’s also possible without that step.

First check which kernel is currently running:
bootinfo -K

To boot from 64 bit into 32 bit:
ln -sf /usr/lib/boot/unix_mp /unix
ln -sf /usr/lib/boot/unix_mp /usr/lib/boot/unix
bosboot -ad /dev/ipldevice
shutdown -r

To boot from 64 bit into 32 bit:
ln -sf /usr/lib/boot/unix_64 /unix
ln -sf /usr/lib/boot/unix_64 /usr/lib/boot/unix
bosboot -ad /dev/ipldevice
shutdown -r