niedziela, 12 września 2010

Solaris 10 u9 - jumpstart flash installation

  1. Creating flash archive

  2. For creating the flar archive for the root filesystem one should reboot the system into single user mode or if not possible disable as much application as possible (to avoid changes on the filesystem done during archive creation). The command below create the flar archive in the /export/flash directory. The archive is to be compressed (-c), without /export/flash directory (-x):

    # mkdir /export/flash
    # cd /export/flash
    # flarcreate -n flash_all -c -R / -x /export/flash inst_x86


  3. Copy flar image to the jumpstart server
  4. Configuring jumpstart

  5. The initial configuration of the jumpstart server has been described in my previous post. The only configuration change is referred to the profile:

    # cat x86-class
    install_type flash_install
    archive_location nfs 192.168.1.135:/export/home/install/flash/inst_x86
    partitioning explicit
    filesys mirror c1t0d0s0 c1t1d0s0 5120 /
    filesys mirror c1t0d0s1 c1t1d0s1 2048 swap
    filesys mirror c1t0d0s4 c1t1d0s4 6656 /var
    filesys mirror c1t0d0s5 c1t1d0s5 6656 /usr
    filesys mirror c1t0d0s6 c1t1d0s6 10240 /export
    filesys mirror c1t0d0s7 c1t1d0s7 free /u01
    metadb c1t0d0s3 count 5
    metadb c1t1d0s3 count 5


    Please double check if the flar archive directory is available via NFS otherwise the client will not be able to access it during jumpstart installation.

  6. Start the client machine
Now the automatic installation from the flar archive should be started. As far as the time is concerned - in my case it took about 30 minutes for the same installation as in the jumpstart article and 30 minutes for creating the archive. I will summarize both methods in separate article - right now I have to go to sleep ;)

Solaris 10 u9 Jumpstart

I had to do some investigation on installation procedures for installation of Solaris 10 on multiple machines and therefore wanted to refresh my knowledge on jumpstart and flash installation procedures. Since I do not own too much hardware to be sacrifaced for such experiments I decided to use virtualized one.


  1. Installation of virtualized jumpstart server - using standard installation from DVD using Core installation. In order to setup the jumpstart server one needs to install following additional packages:

    • bash (SUNWbash)

    • zsh (SUNWzsh)

    • java (SUNWj5rt, SUNWj6rt)

    • man+doc (SUNWdoc,SUNWman)

    • dhcp server (SUNWdhcsu, SUNWdhcsr, SUNWdhcm - optional)

    • install software e.g. chkprobe (SUNWinst)

  2. Mount installation DVD - in my case the cdrom was available as c0t0d0s0 and I mounted it under /cdrom (previously created) using:

  3. # mount -F hsfs -o ro /dev/dsk/c0t0d0s0 /cdrom

  4. Setup install server

  5. #cd /cdrom/Solaris_10/Tools
    #./setup_install_server /export/home/install


  6. Add client machine for installation


  7. Now you need to add client definition:

    # cd /export/home/install/Solaris_10/Tools
    # ./add_install_client \
    -d \
    -e 00:0c:29:04:b8:63 \
    -s 192.168.1.135:/export/home/install \
    -c 192.168.1.135:/export/home/config \
    -p 192.168.1.135:/export/home/config/ i86pc


    Very important is to leave the path to the sysidcfg without the file itself (last parameter) - otherwise it will not be used during jumpstart. Of course you need to adapt the IP addresses and MAC address of the client machine to your needs.
    It is important to store the info that will have to be used for the boot configuration:

    Boot server IP (BootSrvA) : 192.168.1.135
    Boot file (BootFile) : 01000c2904b863


  8. Set up sysidcfg

  9. Create the sysidcfg file for the client. Below I enclose the content of my file - the most important is the new property introduced in the Solaris 10 update 9: auto_reg. On the basis of this property the decision will be made if to send registration info to Oracle about the product and the user. I decided to completely disable this feature.

    # cd /export/home/config
    # cat sysidcfg
    keyboard=US-English
    nfs4_domain=dynamic
    system_locale=en_US.ISO8859-1
    timezone=US/Pacific
    timeserver=localhost
    terminal=vt100
    name_service=NONE
    security_policy=NONE
    service_profile=limited_net
    root_password=
    network_interface=e1000g0 { dhcp
    protocol_ipv6=yes
    }
    auto_reg=disable

  10. Configure DHCP

  11. Set up the DHCP server:
    # dhcpconfig -D -r SUNWfiles -p /var/dhcp
    Created DHCP configuration file.
    Created dhcptab.
    Added "Locale" macro to dhcptab.
    Added server macro to dhcptab - voyin.
    DHCP server started.
    # svcs dhcp-server
    STATE STIME FMRI
    online 14:16:10 svc:/network/dhcp-server:default

    Enable the PXE boot:
    # dhtadm -A -m 01000c2904b863 -d ':BootFile="01000c2904b863":BootSrvA=192.168.1.135:'

    Configure the static IP address to be assigned to the client machines:
    # pntadm -C 192.168.1.0
    # pntadm -A 192.168.1.45 \
    > -f PERMANENT \
    > -i 01000c2904b863 \
    > -m 01000c2904b863 \
    > -s 192.168.1.135 \
    > 192.168.1.0
    # pntadm -P 192.168.1.0
    Client ID Flags Client IP Server IP Lease Expiration Macro Comment
    01000C2904B863 00 192.168.1.45 192.168.1.135 09/12/2010


  12. Configure NFS

  13. You need also to share the direcotries with the configuration and installation packages via NFS so that all these will be available to the client machines during jumpstart installation:

    # vi /etc/dfs/dfstab
    ..
    share -F nfs -o ro,anon=0 /export/home/install
    share -F nfs -o ro,anon=0 /export/home/config
    # shareall
    # share
    - /export/home/install ro,anon=0 ""
    - /export/home/config ro,anon=0 ""

  14. Fine tune settings for GRUB

  15. The grub menu for client machines can be found in the/tftpboot/menu.lst.. In order to make the installation fully automatic one needs to add the install keyword to the kernel line. Additionally I have provided nowin option which indicates that the installation should be done in text mode. Below you can find the content of my grub menu file:

    default=0
    timeout=5
    min_mem64 1024
    title Solaris_10 Jumpstart
    kernel$ /I86PC.Solaris_10-1/multiboot kernel/$ISADIR/unix install nowin -B install_config=192.168.1.135:/export/home/config,sysid_config=192.168.1.135:/export/home/config/,install_media=192.168.1.135:/export/home/install,install_boot=192.168.1.135:/export/home/install/boot
    module$ /I86PC.Solaris_10-1/$ISADIR/x86.miniroot


  16. Configure rules & profile

  17. Now you need to specify the rules for the client machines. I decided to define only one general rule for x86 systems. The type of installation is initial with explicit partitioning (own mirrors defined). The set of packages to be installed is SUNWCuser (End User System Support).

    # cd /export/home/config
    # cat rules
    any - - x86-class -
    # cat x86-class
    #
    # Sample profile for an x86 machine. Installation will
    # provide default partitioning on a standalone system
    # with the end-user cluster.
    #
    # "@(#)x86-class 1.2 94/01/25"
    #
    install_type initial_install
    system_type standalone
    partitioning explicit
    filesys mirror c1t0d0s0 c1t1d0s0 5120 /
    filesys mirror c1t0d0s1 c1t1d0s1 2048 swap
    filesys mirror c1t0d0s4 c1t1d0s4 6656 /var
    filesys mirror c1t0d0s5 c1t1d0s5 6656 /usr
    filesys mirror c1t0d0s6 c1t1d0s6 10240 /export
    filesys mirror c1t0d0s7 c1t1d0s7 free /u01
    metadb c1t0d0s3 count 5
    metadb c1t1d0s3 count 5
    cluster SUNWCuser
    # cp /export/home/install/Solaris_10/Misc/jumpstart_sample/check .
    # ./check
    Validating rules...
    Validating profile x86-class...
    The custom JumpStart configuration is ok.


  18. Boot client machine

Boot the client machine via PXE and the jumpstart installation will begin. In my case in the virtualized environment (destination was also a virtual image) the installation took about 30 minutes (full installation of Solaris 10 update 9 without any additional patches).

sobota, 4 września 2010

Fedora: Package utilities - yum-utils

Using Fedora I encountered a problem, namely how to check which list files that belong to a specific package, how to check the package for a specific file from the filesystem, get the installation date of a package etc. (all these functionalities I found very useful while I was using Solaris operating system). The plain yum utility of Fedora seems to be very limited in that area but fortunately Fedora provides its extentions in the package called yum-utils, which can be installed as follows:

#yum install yum-utils

I did not have the opportunity to use all the utilities that come with this package but one that was extremely useful for me is called repoquery. Utility queries the YUM repositories in a similar way that the rpm does that. The example how to list the file for a specific package is presented below:

# repoquery -la yum-utils
/etc/bash_completion.d
/etc/bash_completion.d/yum-utils.bash
/usr/bin/debuginfo-install
/usr/bin/find-repos-of-install
/usr/bin/needs-restarting
/usr/bin/package-cleanup
/usr/bin/repo-graph
/usr/bin/repo-rss
/usr/bin/repoclosure
/usr/bin/repodiff
/usr/bin/repomanage
/usr/bin/repoquery
...
/usr/share/man/man8/yum-complete-transaction.8.gz
/usr/share/man/man8/yumdb.8.gz
#

The same utility cane be used also to check the name of the package for a specific file (one remark here -> the location with symbolic links did not work in my case):

#repoquery -af /etc/rc.d/init.d/rpcbind
rpcbind-0:0.2.0-5.fc13.i686
rpcbind-0:0.2.0-4.fc12.i686

For more options you can check the manual. So far I have not found any other way to display the installation date of a package than using the rpm:

# rpm -qa --last
...
# rpm -qa --last grep rpcbind
rpcbind-0.2.0-5.fc13 Sat 04 Sep 2010 05:01:39 PM CEST