Creating self contained jumpstart / flash install DVD

Creating self contained jumpstart / flash install DVD

Post by Mark Sturteva » Thu, 15 May 2003 14:15:04



I am posting this to help out anyone attempting to create a standalone
install DVD,  this worked for me very  well and with DVD media it
could be a very useful tool for anyone looking to do a hands off
install when a jumpstart server cannot be used.

Creating a self contained Solaris DVD install for Solaris 8 or 9

1) First you will need to setup a Solaris flash (flar) image. See the
Sun Blueprints document "WebStart Flash" by John Howard & Alex
Noordergraaf, November 2001 online issue for more information.

2) Next you will need a Solaris DVD, for this document I will be using
a Solaris 9 DVD.  Note: You can use Solaris 9 to install a flash image
of  Solaris 8 as well.  We will be coping the DVD, it's vtoc and all
slices. Keep in mind that we will not want to change the vtoc of the
DVD just to be safe.  We will be using dd, cpio, mkisofs, cat,
prtvtoc, DVD burning software and a DVD burner to create your image. I
used DVD-R media as  I was unsure of support for DVD+R on Sun drives.

  Also for more good information on this subject, see the Sun
Blueprints  document "Customizing JumpStart Framework for Installation
and Recovery", by John Howard & Alex Noordergraaf, August 2002 online
issue.  Most of what is below comes from that document, same concept
just different media. You can find all the Blueprints archives at
http://www.sun.com/blueprints

3) First you will want to copy the contents of slice 0 before turning
off  volume management (or mount the DVD manually if it's not being
used):

        # mkdir /local-filesystem/s0
        # cd /cdrom/cdrom0/s0
        # find . -print |cpio -pudm /local-filesystem/s0

Remove anything not needed from slice 0 to make room for your new
flash image,  you should be able to remove the following as needed:

        # rm -rf s0/1of2_Doc_CD
        # rm -rf s0/2of2_Doc_CD
        # rm -rf s0/SW_Supp_CD
        # rm -rf s0/Solaris_9/ExtraValue
        # rm -rf s0/Solaris_9/EarlyAccess

        Note: You only need to remove enough to allow for the flash image, if
you need more space you can also remove the Solaris 9 packages from
s0/Solaris_9/Product, there is no need to remove more than you need as
the DVD needs to stay the same size, the more that is removed just
needs more padding later in the process.

Turn off volume management so you can use dd to copy the slices we do
not need to modify:

        # /etc/init.d/volmgt stop

   Copy the DVD vtoc:

        # dd if=/dev/dsk/c0t6d0s1 of=sol9.dvd.vtoc bs=512 count=1

Since you will need to know the size of slice 0 later save a printout
of the DVD vtoc:

        # prtvtoc /dev/dsk/c0t6d0s0 > /local-filesystem/sol9.vtoc.txt

*Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      4    10          0   5532800   5532799
                                   ^^^^^^^
        Make note of the sector count for slice 0 as the rest of the
        DVD will remain the same.

Now take a copy of slice 1 - 5 using dd, here is what they contain:

        Slice 1: the generic kernel and is the (root) directory
        Slice 2: boot for sun4c
        Slice 3: boot for sun4m
        Slice 4: boot for sun4d
        Slice 5: boot for sun4u & sun4us

        # for SLICE in 1 2 3 4 5
        > do
        > dd if=/dev/dsk/c0t6d0s${SLICE} of=sol9.s${SLICE} bs=512
        > done
        1036800+0 records in
        1036800+0 records out
        2560+0 records in
        2560+0 records out
        2560+0 records in
        2560+0 records out
        2560+0 records in
        2560+0 records out
        2560+0 records in
        2560+0 records out

4) Next you need to modify slice 0 and put your flash image(s) on it:

  a) Copy over the new flash image that you would like to use for
installs:

        # cp /path/to/sol8.flar /local-filesystem/s0

  b) Add a new profile that uses the new flash image and create a new
rules.ok file so that it can be used:

        # cd /local-filesystem/s0/.install_config
        # cp ../Solaris_9/Misc/jumpstart_sample/check .
        # vi new-server.profile

        install_type    flash_install
        archive_location local_file /cdrom/sol8.flar
        partitioning    explicit
        filesys         rootdisk.s0     free    /
        filesys         rootdisk.s1     16384   swap
        filesys         rootdisk.s6     6144    /var

        # mv rules.ok rules.ok.orig
        # vi rules

        any - - new-server.profile -

        # ./check
        Validating rules...
        Validating profile new-server.profile...
        The custom JumpStart configuration is ok.

  c) Now edit the s0/Solaris_9/Tools/Boot/usr/sbin/install.d/profind
file so that your new DVD will install using the new flash image:

        # cd /local-filesystem/s0/Solaris_9/Tools/Boot/usr/sbin/install.d/
        # cp profind profind.orig
        # vi profind

cdrom()
{

    if [ -f /tmp/.preinstall ]; then
        mount -o ro -F lofs ${CD_CONFIG_DIR} ${SI_CONFIG_DIR}

>/dev/null 2>&1

        if [ $? -eq 0 ]; then
            verify_config "defaults" "CDROM"
        fi
    fi
# Start of edit
        gettext "<<< using CD default >>>";echo
        rmdir ${SI_CONFIG_DIR}
        ln -s /cdrom/.install_config ${SI_CONFIG_DIR}
        exit 0
# End of edit

}

   For what I needed to do I wanted the install to prompt for things
like timezone, IP address, netmask, root password, etc.  If you wish
to have a completely hands off install you can mount up slice 1
read-write and modify the sysidcfg file using lofiadm.  This is
possible as slice 1 is a UFS filesystem,  none of the other slices can
be modified in this fashion.

   Note: I did not test this step but it should work, just keep in
mind it may not be 100% correct.

        # lofiadm -a /local-filesystem/sol9.s1
        /dev/lofi/1
        # mount /dev/lofi/1 /mnt
        # cd /mnt/etc
        # mv sysidcfg sysidcfg.orig
        # vi sysidcfg

        system_locale=en_US
        timezone=US/Central
        timeserver=192.168.1.60
        root_password=GZMmGcnI..J1g
        name_service=NIS {domain_name=my.domain.com}
        network_interface=primary {netmask=255.255.255.0
                                  protocol_ipv6=no}
        security_policy=none
        terminal=vt100

        # cd /
        # umount /mnt
        # lofiadm -d /dev/lofi/1

   If you would like to have it grab it's own IP address you can also
add a /etc/ethers (or NIS,NIS+ ethers map) and an entery into a hosts
file just as you would do for Jumpstarting a system, it will pick it
up when booting from the DVD.

5) Take the modified slice 0 directory and convert it to a HSFS
filesystem:

        mkisofs -R -d -L -l -o sol9.s0.pre `pwd`/s0

6) Use dd to get rid of the first block so you can put the vtoc back:

        # dd if=sol9.s0.pre of=sol9.s0 bs=512 skip=1
        4681215+0 records in  (this number is needed for the next step)
        4681215+0 records out

  Go ahead and remove the sol9.s0.pre file as we no longer need it:

        rm sol9.s0.pre

7) Since we do not want to modify the vtoc we will need to create a
pad to put between slice 0 and slice 1.

        Take the original sector count for slice 0 from the prtvtoc you took
before and subtract the vtoc record and the size of the new slice 0
that was just created:

        # bc
        5532800 - (4681215+1)
        851584

        Now create a pad file using this record count, this will preserve
the     validity of the DVD's vtoc, remember that you are only changing
slice 0 of the DVD, the vtoc and other slices must stay intact for
this procedure to work correctly.

        # dd if=/dev/zero of=sol9.pad bs=512 count=851584
        851584+0 records in
        851584+0 records out

8) Now you are ready to put the DVD image (ISO) back together:

        # cat sol9.dvd.vtoc sol9.s0 sol9.pad sol9.s1 sol9.s2 sol9.s3 sol9.s4
\
        sol.s5 > custom_sol9.iso

That's it, you are now ready to burn your new install DVD, this can be
done with any DVD burning software that understands this type of
image.

9) When installing the system with this DVD, all you will need to do
is boot  the system with the following options:

        # boot cdrom - install

 
 
 

Creating self contained jumpstart / flash install DVD

Post by Joerg Schilli » Thu, 15 May 2003 22:42:59



....
Quote:>5) Take the modified slice 0 directory and convert it to a HSFS
>filesystem:

>    mkisofs -R -d -L -l -o sol9.s0.pre `pwd`/s0

...

Quote:>8) Now you are ready to put the DVD image (ISO) back together:

>    # cat sol9.dvd.vtoc sol9.s0 sol9.pad sol9.s1 sol9.s2 sol9.s3 sol9.s4
>\
>    sol.s5 > custom_sol9.iso

This is too complex and not needed....

Please simply read README.sparcboot to learn ho mkisofs will create
a _complete_ Sparc boot image with the ISO-9660 and _all_ UFS slices in
a single step.

--



URL:  http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily

 
 
 

Creating self contained jumpstart / flash install DVD

Post by Mark Sturteva » Sun, 25 May 2003 14:43:09


j...@cs.tu-berlin.de (Joerg Schilling) wrote in message <news:b9th53$a1k$1@news.cs.tu-berlin.de>...
> In article <595ae45f.0305132115.6a4a9...@posting.google.com>,
> Mark Sturtevant <goo...@thesturt.com> wrote:
> ....
> >5) Take the modified slice 0 directory and convert it to a HSFS
> >filesystem:

> >       mkisofs -R -d -L -l -o sol9.s0.pre `pwd`/s0
> ...

> >8) Now you are ready to put the DVD image (ISO) back together:

> >       # cat sol9.dvd.vtoc sol9.s0 sol9.pad sol9.s1 sol9.s2 sol9.s3 sol9.s4
> >\
> >       sol.s5 > custom_sol9.iso

> This is too complex and not needed....

> Please simply read README.sparcboot to learn ho mkisofs will create
> a _complete_ Sparc boot image with the ISO-9660 and _all_ UFS slices in
> a single step.

Thanks to Joerg Schilling's help I have streamlined my document and
with some extensive testing it's working great,  Thanks Joerg for
letting me know about
your mkisofs option to create the boot image in one step!  Also thanks
for
the cdrecord utilities,  I've been using them for years but never
needed to
do anything this advanced,  I should have known that you would have
already taken care of this for us,  great job and Thanks again!

Here's my updated document for all that are looking to try this,  it's
been extremely helpful on the project I am currently working on.
------------------------- Updated Document
-----------------------------------
Creating a self contained Solaris DVD install for Solaris 8 or 9

1) First you will need to setup a Solaris flash (flar) image. See the
   Sun Blueprints document "WebStart Flash" by John Howard & Alex
Noordergraaf,
   November 2001 online issue.

2) Next you will need a Solaris DVD, for this document I will be using
a
   Solaris 9 DVD.  Note: You can use Solaris 9 to install a flash
image of
   Solaris 8 as well.  You will be coping DVD's slices individually.
   You will be using dd, cpio, mkisofs, cat, prtvtoc, DVD burning
software and
   a DVD burner to create our image. I had problems with Sun's version
of
   mkisofs so I recommend downloading Joerg Schilling's cdrecord 2.0
or higher
   to make your DVD. I have tested DVD+R, DVD-R, DVD+RW and DVD-RW and
all
   formats seemed to work with Sun's (Toshiba) DVD-ROM drives.  At the
time I
   tested I was using a Sun V480 and V1280.

3) First you will want to copy the contents of slice 0 before you turn
off
   volume management:

        # mkdir /local-filesystem/s0
        # cd /cdrom/cdrom0/s0
        # find . -print |cpio -pudm /local-filesystem/s0

   Remove anything you will not need from slice 0 to make room for
your new
   flash image and to speed things up, you can remove the folowing if
you will
   only be installing a flash image or just for a boot disk:

        # rm -rf s0/1of2_Doc_CD
        # rm -rf s0/2of2_Doc_CD
        # rm -rf s0/SW_Supp_CD
        # rm -rf s0/Solaris_9/ExtraValue
        # rm -rf s0/Solaris_9/EarlyAccess
        # rm -rf s0/Solaris_9/Patches
        # rm -rf s0/Solaris_9/Docs
        # rm -rf s0/Solaris_9/Product

   Note: Make sure to keep all of the . directories as well as the
following:
         s0/Solaris_9/Misc
         s0/Solaris_9/Tools

   Turn off volume management so you can use dd to copy the slices you
do not
   need to modify:

        # /etc/init.d/volmgt stop

   Now let's take a copy of slice 1 - 5, here is what they contain:

        Slice 1: the generic kernel and is the ufs (root) directory
        Slice 2: boot for sun4c
        Slice 3: boot for sun4m
        Slice 4: boot for sun4d
        Slice 5: boot for sun4u

        # for SLICE in 1 2 3 4 5
        > do
        > dd if=/dev/dsk/c0t6d0s${SLICE} of=sol9.s${SLICE} bs=512
        > done
        1036800+0 records in
        1036800+0 records out
        2560+0 records in
        2560+0 records out
        2560+0 records in
        2560+0 records out
        2560+0 records in
        2560+0 records out
        2560+0 records in
        2560+0 records out

4) Next you need to modify slice 0 and put your new flash image on it:

  a) Copy over the new flash image that you would like to use for
installs:

        # cp /path/to/sol8.flar /local-filesystem/s0

  b) Add a new profile that uses the new flash image and create a new
rules.ok
     file so that it can be used:

        # cd /local-filesystem/s0/.install_config
        # cp /local-filesystem/s0/Solaris_9/Misc/jumpstart_sample/check
./check
        # vi new-server.profile

        install_type    flash_install
        archive_location local_file /cdrom/sol8.flar
        partitioning    explicit
        filesys         rootdisk.s0     free    /
        filesys         rootdisk.s1     16384   swap
        filesys         rootdisk.s6     6144    /var

        # mv rules.ok rules.ok.orig
        # vi rules

        any - - new-server.profile -

        # ./check
        Validating rules...
        Validating profile new-server.profile...
        The custom JumpStart configuration is ok.

  c) Now edit the s0/Solaris_9/Tools/Boot/usr/sbin/install.d/profind
file so
     that our new DVD will install using your new flash image:

        # cd /local-filesystem/s0/Solaris_9/Tools/Boot/usr/sbin/install.d/
        # cp profind profind.orig
        # vi profind

cdrom()
{
    # Factory JumpStart is only allowed with factory
    # stub images, indicated by the file /tmp/.preinstall
    #
    if [ -f /tmp/.preinstall ]; then
        mount -o ro -F lofs ${CD_CONFIG_DIR} ${SI_CONFIG_DIR}

>/dev/null 2>&1

        if [ $? -eq 0 ]; then
            verify_config "defaults" "CDROM"
        fi
    fi
        gettext "<<< using CD default >>>";echo                     #Added to file
        rmdir ${SI_CONFIG_DIR}                                  #Added to file
        ln -s /cdrom/.install_config ${SI_CONFIG_DIR}           #Added to
file
        exit 0                                                  #Added to file

}

   For what I needed to do I wanted the install to prompt for things
like
   timezone, IP address, netmask, root password, etc.  If you wish to
have
   a completely hands off install you can mount up slice 1 read-write
and
   modify the sysidcfg file using lofiadm.

   Note: I did not test this step but it should work, just keep in
mind it may
         not be 100% correct.

        # lofiadm -a /local-filesystem/sol9.s1
        /dev/lofi/1
        # mount /dev/lofi/1 /mnt
        # cd /mnt/etc
        # mv sysidcfg sysidcfg.orig
        # vi sysidcfg

        system_locale=en_US
        timezone=US/Central
        timeserver=192.168.1.60
        root_password=GZMmGcnI..J1g
        name_service=NIS {domain_name=my.domain.com}
        network_interface=primary {netmask=255.255.255.0
                                  protocol_ipv6=no}
        security_policy=none
        terminal=vt100

        # cd /
        # umount /mnt
        # lofiadm -d /dev/lofi/1

   If you would like to have it grab it's own IP address you can also
   add a /etc/ethers (or NIS,NIS+ ethers map) and an entery into a
hosts
   file just as you would do for Jumpstarting a system, it will pick
it up
   when booting from the DVD.

5) Take the modified s0 and s1-s5 and create a new ISO image:

   mkisofs -R -d -L -l -sparc-boot
sol9.s1,sol9.s2,sol9.s3,sol9.s4,sol9.s5 -o sol9_boot.iso ./s0

   Note: See README.sparcboot in the cdrecord's mkisofs source
directory
         for more info.

   That's it, you are now ready to burn you new install DVD, at the
time I
   wrote this I only had a Windows 2000 workstation with a Sony
DRU-500AX
   with Veritas RecordNow DX ver 4.6 software, it created the DVD from
the
   ISO file so I would assume most DVD writers could take care of it
as well.
   If you have a Pioneer DVD A03-A05 you could probably use
cdrecord-prodvd,
   I attempted to use it but I had errors with the Sony drive.

6) When installing the system with this DVD, all you will need to do
is boot
   with the following options:

        # boot cdrom - install

 
 
 

Creating self contained jumpstart / flash install DVD

Post by albemut » Sun, 06 Feb 2005 08:50:13


Anyone know how to do this (create a Solaris bootable DVD with flar
image) with a PC, Windows XP and Nero? Got no portable DVD burner...
 
 
 

Creating self contained jumpstart / flash install DVD

Post by Bernd.Schemme » Fri, 11 Feb 2005 04:00:44



> Anyone know how to do this (create a Solaris bootable DVD with flar
> image) with a PC, Windows XP and Nero? Got no portable DVD burner...

You can't create the image on a PC; you must create it on a SPARC
machine (I assume you're talking about SPARC machines).

But you can burn the image to a CD/DVD on a PC; the image is a "normal"
ISO image.

There are some Blueprints about how to create a bootable CD/DVD

regards

Bernd