0 Replies Latest reply on Apr 16, 2009 9:23 PM by Yoway Buorn

    Jumpstart Disk Partition Script

      When creating a Jumpstart profile, how do you script the partition to size to a multiple of memory?  If I place the following in the disk partition script:

       

      #!/bin/sh
      swapsize=`expr ${SI_MEMSIZE} \* 2`
      echo "pool rpool auto $swapsize auto any"
      echo "bootenv installbe bename S10U6-ZFS"

       

      The Jumpstart profile that BL generates from this is as follows:

       

      install_type initial_install
      system_type server
      locale en_US
      #disk layout
      #!/bin/sh
      swapsize=`expr ${SI_MEMSIZE} \* 2`
      echo "pool rpool auto $swapsize auto any"
      echo "bootenv installbe bename S10U6-ZFS"

       

      #package list
      cluster SUNWCXall

       

      Which is not a valid Jumpstart profile - you can't just insert code into a profile, only the keywords and values that it recognizes.  So, the way you handle this with stock Jumpstart is, you tell Jumpstart you're using a dynamic profile ( specify "=" for the profile's filename in the 'rules' file ), and then you have your begin script output the text of the profile to a special environment variable, ${SI_PROFILE}, which Jumpstart understands grab and use for the profile text.

       

      It looks like whatever I put into the text box for the script will just get copied into the Jumpstart profile, which would be useful if I wanted to hardcode some particular partitioning layout, but not if I want to dynamically generate one based on amount of memory, number and size of disks, etc.