What should I do with my mksysb if I have no NIM?
I have a small environment and no NIM server!
Yes, it happens. Not everyone has a NIM server in their environment. Maybe they have just a few AIX servers that were installed two zillion years ago manually, and nobody thought about the NIM server at that time. Or they may have no AIX servers at all - only VIOSes that serve Linux or IBM i LPARs. Why should someone wish to buy an additional AIX license only to create an AIX NIM LPAR?
In the second situation, if you have only VIOSes and completely no AIX environments, I would suggest to skip mksysb part completely. Not because you don’t need it. But because you don’t need to execute AIX commands.
You can create a backup of your VIOS using HMC:
mkviosbk -t vios -m MYMANAGEDSYSTEM -p MYVIOS -f myvios.mksysbNo, I don’t remember where to find this command in the HMC web interface. If you know, write it down in the comments.
In case you want to restore it, you use the HMC’s rstviosbk command to restore the configuration or installios to restore the full backup.
You can read more about this procedure in the official IBM documentation or in the article on IBM’s community site.
Of course, you must have enough space on your HMC to save all your VIOS backups. If you don’t have it, welcome back to the previous article about how to create mksysb AIX-way, and this article about how to restore mksysb without a NIM server.
Option 1: Create a DVD image
If you have an mksysb backup, you can always create a DVD or CD image from it. I don’t think it is feasible to create a CD image, because an mksysb usually takes more space than one CD. It can even take more space than one DVD. If it is the case, remember - don’t place everything in rootvg! Only what you really need.
Creating a DVD image from mksysb is easy:
mkdvd -S -m /nim/mksysb/mymksysb -I /nim/mksysbThe command above creates a DVD image - or several if mksysb is too big- in the directory /nim/mksysb. The original mksysb file is /nim/mksysb/mymksysb.
The resulting images are called cd_image_<some magic number>.vol<number>.
I have no idea how to predict the names of the images and set them in the command line. But you can see the names during the operation:
Initializing mkdvd log: /var/adm/ras/mkcd.log...
Verifying command parameters...
Populating the CD or DVD file system...
Building chrp boot image...
Copying backup to the CD or DVD file system...
..
Creating Rock Ridge format image: /nim/mksysb/cd_image_8257990.vol1
Running mkisofs ...
.
mkrr_fs was successful.
Making the CD or DVD image bootable...
Copying the remainder of the backup to the CD or DVD file system...
Creating Rock Ridge format image: /nim/mksysb/cd_image_8257990.vol2
Running mkisofs ...
mkrr_fs was successful.After you get the images, you can burn them on your laptop or where you have a DVD burner. Then you boot your VIOS from the DVD and restore the system.
If you used AIX mksysb to burn the images and want to restore an AIX LPAR, it is even easier. You don’t need a DVD burner. You only need a VIOS.
On the VIOS you create a media repository. If you don’t have any disks, except rootvg disks on your VIOS, then create it in rootvg. But remember to exclude the media repository from backups. Otherwise, they will be too big.
If you have a spare disk in your VIOS, create a separate volume group and create the media repository there:
mkrep -sp isovg -size 20GAfter you created the repository, you can copy your DVD images there. The repository is usually mounted in /var/vio/VMLibrary. If you put any images into the directory, they appear in the repository. You can check them by using lsrep.
Now, you create a file-based optical device for your AIX LPAR. You must know the vhost adapter for your LPAR, and then:
mkvdev -fbo -vadapter vhostX -dev myaixcdThe last step is to load the image into our virtual CD-ROM (or DVD-ROM) device:
loadopt -disk cd_image_8257990.vol1 -vtd myaixcdHere we are! You can boot your AIX LPAR from the virtual CD-ROM device and start restoring it.
If it is too many AIX commands to write in the command line, you can do the same using the HMC web interface.
Option 2: Restore to a spare disk
To use the option, you need an AIX or VIOS server and a spare disk.
No worries, you don’t need any downtime on the server. You temporarily use the server to restore mksysb to the disk.
It works best if you use SAN storage. You create a LUN on your SAN storage device and assign the LUN to a server.
It doesn’t matter if the server is VIOS or AIX. If it is VIOS, switch to oem_setup_env mode to get access to all AIX commands.
First, find the new disk. Usually, you need to run cfgmgr to find new devices, and then you probably see the disk in the lspv output.
After you have identified the disk, you can restore mksysb to the disk:
alt_disk_mksysb -B -m /nim/mksysb/mymksysb -d hdiskXAfter some time, the mksysb is restored to the disk, and you can remove the disk from the system.
The command may fail if you already have alt_rootvg on your system. Clean up or rename another altinst_rootvg by using alt_rootvg_op command.
I remove the disk first and then clean up the volume groups:
rmdev -Rdl hdiskX
exportvg altinst_rootvgMaybe it is not the best way, but it works.
The next step is to unzone the SAN disk from your AIX server and zone it to the server you want to restore to. Reboot the AIX server from the new disk, and you restored your AIX from the mksysb.
Support the Power DevOps Newsletter!
If you like reading technical articles about IBM Power, AIX, and Linux on IBM Power, consider upgrading to the paid tier to show your support. As a paid subscriber, you not only get regular posts, but you will get additional posts with the full code and further explanations, access to the whole archive of the blog, and take part in our monthly calls where you can ask your questions and propose topics for future newsletters. Be an active member of our community!
Do you know more ways to restore mksysb without a NIM server?
Write them down in the comments!
Don’t forget to test your system backups!
Have fun restoring mksysb!
Andrey
Hi, I am Andrey Klyachkin, IBM Champion and IBM AIX Community Advocate. This means I don’t work for IBM. Over the last twenty years, I have worked with many different IBM Power customers all over the world, both on-premise and in the cloud. I specialize in automating IBM Power infrastructures, making them even more robust and agile. I co-authored several IBM Redbooks and IBM Power certifications. I am an active Red Hat Certified Engineer and Instructor.
Follow me on LinkedIn, Twitter and YouTube.
You can meet me at events like IBM TechXchange, the Common Europe Congress, and GSE Germany’s IBM Power Working Group sessions.



