Home > Solaris > Solaris Flash Archives on X86 machines

Solaris Flash Archives on X86 machines

July 7th, 2007

Here is a tip for those doing flash archives on solaris x86 machines with a separate /usr file system… More than likely it is “not” going to work straight from the start. I recently tried to create some flash archives on machines that had separate file systems for /, /usr, /opt and /var… (Not my design but had to deal with it).

The problem you will encounter is when you are installing the flash archive to another machine. It will go along and then all of the sudden say it can’t stop the extraction.. and some other errors which I have forgot the exact syntax of at this moment.

Anyways the true “root” of the problem is the seperate /usr partition. See in Solaris X86 land, if you are running the 32 bit kernel a 32 bit optimized libc will be mounted:

#df -k

Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0d0s0      25211519 3166728 21792676    13%    /
/devices                   0       0       0     0%    /devices
ctfs                       0       0       0     0%    /system/contract
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 2433012     652 2432360     1%    /etc/svc/volatile
objfs                      0       0       0     0%    /system/object
/usr/lib/libc/libc_hwcap1.so.1
                     25211519 3166728 21792676    13%    /lib/libc.so.1
fd                         0       0       0     0%    /dev/fd
swap                 2432644     284 2432360     1%    /tmp
swap                 2432392      32 2432360     1%    /var/run
home                 1383975424 1246740999 137234425    65%    /home
tempspace            117669888      38 117669687     1%    /tempspace

In the above the /usr/lib/libc/libc_hwcap1.so.1 is mounted to /lib/libc.so.1 . As such on an 64 bit box, the libc_hwcap1.so.1 changes to a libc_hwcap2.so.1… So you have a 64 bit optimized libc.

So what does this have to do with flash archives then? Well because that /usr/lib/libc/libc_hwcap[12].so.1 is mounted to /lib/libc.so.1 and the /usr partition is a separate partition you get a semi corrupted flash archive file. So how do you fix it?

  1. Don’t make a separate /usr partition. In this day with such large disk sizes, there is no need to make /usr separate from /. I never do that any more, in fact I usually make / about 20 gig and then any data goes in separate mount points, along with third party applications, (i.e. oracle)
  2. You can umount it (umount /lib/libc.so.1) and then create the flash archive, and then remount it by doing a :
    mount -O -F lofs /usr/lib/libc/libc_hwcap2.so.1 /lib/libc.so.1

    which I haven’t tried yet, I was just rebooting the box, but will have to try remounting it this week.

Once you do one of the two above, then you should be able to make a “good” flash archive of the machine.

Solaris

  1. July 14th, 2007 at 22:57 | #1

    I tried the remounting and it did work….

  1. No trackbacks yet.
Comments are closed.