AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  copy lpar mksyb from NIM to tape as bootable os image

    Posted Thu December 24, 2009 06:09 AM

    Originally posted by: apple08


    Dear AIX gurus,
    I would like to seek your advice. how to copy the bootable os lpar image that currently backup to NIM (/export/images/mksyb_serverA01dec2009 to tape. i can't backup directly for that lpar since the dynamic tape drive service can't be move accross the server having different network segment. only NIM can attach to tape drive resource and i need the os image backup on tape to restore to new machine in different site.
    I have found this link, can I use the step:
    http://unix.derkeiler.com/Newsgroups/comp.unix.aix/2006-12/msg00342.html

    dd if=/path/to/desiredmksysb_image_file of=/dev/rmt0.1 obs=1024 conv=sync

    will it still retain inside the dds tape as bootable os image backup and i can go straight to maintenance mode to restore the os from that tape which copied from nim image file?

    or do we have NIM utility that can perform this? Many thanks

    Hope to hear from you. Many thanks in advance.
    Regards
    #AIX-Forum


  • 2.  Re: copy lpar mksyb from NIM to tape as bootable os image

    Posted Thu December 24, 2009 06:24 AM

    Originally posted by: apple08


    Dear AIX gurus,
    I read this:
    http://www.unix.com/aix/94046-mksysb-file-image.html

    by using this method: # dd if=/mnt/backup/lpar2.image of=/dev/rmt0 bs=4194304
    it says:
    "If the "mksysb" does not write to a tape device or a NIM server it does not include the boot code to the image as far as i know. Therefore the tape will not be bootable if you transfer it that way - the boot code would still be missing. One would have to provide this boot code via a floppy disk or CD-ROM to boot off the tape."

    where the boot code stores? is it inclusive inside the mksyb image file from nim that is copied before? is it store at different location? how to copy manually.

    would really appreciate you can shed some light. Mnay thanks in advance.
    Happy holidays
    #AIX-Forum


  • 3.  Re: copy lpar mksyb from NIM to tape as bootable os image

    Posted Mon December 28, 2009 02:54 PM

    Originally posted by: SystemAdmin


    In order for a mksysb tape backup to be bootable, it has some additional files that are created in addition to the backup file that is created when one does a mksysb to a file system. Each of these files is stored on a mksysb tape as a different file mark on the tape.

    According to the mksysb man page, these files on the tape are:
    1 - Boot image file
    2 - bosinstall image
    3 - empty table of contents
    4 - backup/restore formated file starting with the data and then any optional map files.

    To create a bootable mksysb tape, using an existing mksysb data file that was written to disk, I would suggest the following approach:
    • Create the mksysb on the desired system, saving it to disk. Then copy the mksysb file to a system that has a local tape drive.
    • On the system with the local tape drive, create a mksysb to tape.
    • use "dd" to save files 1,2,3 from the mksysb tape to a local file system for future use.
    • position the tape to the start of file 4, then use "dd" to overwrite file 4 on the tape with the mksysb from the desired system.

    For future tapes, you can use the saved files 1,2,3 from the first tape so that you don't have to recreate the original "template" mksysb tape. Use "dd" to write the 3 template files, plus the 4th mksysb data file to the tape.

    Note, this will probably have the same kind of limitations as a NIM installation, the OS version and TL level of the boot image and bosinstall image will probably need to match the version of AIX on the mksysb file.

    Note 2: I have not actually tested this method, but I have worked with mksysb files and extracted individual files from mksysb tapes, and appended other backups to the end of a mksysb tape, so I have successfully worked with individual file marks on a mksysb tape before.

    Note 3: I have just read over the man page for bosboot, and it looks like you might be able to create the boot image file on the same system as the disk based mksysb and transfer it to the system with the tape drive via ftp/scp. I'm not sure what the format is for the bosinstall and empty table of contents yet. From the bosboot man page:

    # To create a bootable image called /tmp/tape.bootimage for a tape device, type:

    bosboot -ad /dev/rmt0 -b /tmp/tape.bootimage
    #AIX-Forum