Showing posts with label installation. Show all posts
Showing posts with label installation. Show all posts

Prepare sample jumpstart server

Introduction

This guide is directed to create very sample JumpStart server for almost unattended installation of Solaris.


Steps

  1. Create directory where will be created image of CD or DVD for installation - /export/install
  2. Go to cdrom directory contain tools /cdrom/sol_10_606_x86/Solaris_10/Tools
  3. Run setup_install_server with parameter directory, created at point 1 - ./setup_install_server /export/install This process can take long time, but you can continue with the rest of process meanwhile
  4. Let's prepare file sysidcfg with answers of questions during installation for creating automatic installation
    • Create directory for storing configuration files /export/config
    • Create sysidcfg file, where netmask_value – usually this is netmask of the server i.e. Server and client are in the same network, gateway – just set the same default gateway as server (see above), for name_service set none. It's possible to define DNS, NIS, etc., but you can configure them later. For the timezone value, enter time zone for your location. Time zone files are located in directory tree below /usr/share/lib/zoneinfo. For me the zone is Europe/Sofia. Set locale value as you prefer. You can choose en_US.UTF-8 which is enough common for many purposes and do not interfere with not localized software. For the timeserver_IP value, enter the IP address of the system that will provide the time-of-day to the JumpStart client. This string (y5KqWP1EnT5Es) for root_password is hash of my password, you should set your
  5. Next step is to create rules and profile files for clients in the same directory
    • Sample rules file looks like(see examples), where hostname is keyword, c1 is just name of client, and p1 is filename of profile, applied to this client. First dash mean no pre-installation script, second dash mean no post-installation script
    • Create profile file, where install_type is actually type of installation :-), system_type is standalone (let's make thinks sample), partitioning is explicit to force repartitioning of disks, filesys describe filesystems to be created. In my case I use IDE harddisks, if you have SCSI, set in appropriate way. Cluster mean which cluster of packages to install. In my case - everything
    • Add record in /etc/inet/hosts for client (same host name as in rules file)
    • Add record in /etc/ethers in format (see ecamples)
    • Copy utility for checking if profile and rules files are ok: cp /export/install/Solaris_10/Misc/jumpstart_sample/check /export/config
    • run check utility: cd /export/config; ./check
    • everything is OK continue, otherwise correct the error and start program again
    • Run add_install_client (see examples), where -c is for place where rules and profile files reside, -p is for place where sysidcfg file next is hostname of client and at the end architecture of client
    • After this export config directory: share -o ro /export/config
    • For x86 installation you should create a grub floppy and edit GRUB menu to contain the following entry (see examples)
    • After this reboot client machine with this floppy and voila – you have installed Solaris over the network :-)


Examples

sysidcfg file:
network_interface=primary {protocol_ipv6=no
netmask=255.255.255.0
default_route=192.168.30.1}
security_policy=none
name_service=none
timezone=Europe/Sofia
system_locale=en_US.UTF-8
timeserver=192.168.30.1
root_password=y5KqWP1EnT5Es



sample profile file:
install_type initial_install
system_type standalone
partitioning explicit
filesys c0d0s0 free /
filesys c0d0s1 512 swap
cluster SUNWCXall



Grub entry:
title Solaris netinstall
rarp
kernel /I86PC.Solaris_10-1/multiboot kernel/unix -B install_media=192.168.30.2:/export/install
module /I86PC.Solaris_10-1/x86.miniroot



/etc/ethers in format:
MAC_ADDRESS hostname


Run add_install_client
./add_install_client -c t1:/export/config -p t1:/export/config t3 i86pc

Practical guide for minimalistic Solaris installation

Preamble

When you install Solaris (and any other UNIX/Linux) in generally there are 2 ways: make full install of all packages from media and install as little as possible. Each of the ways have pros and cons, but discussion about this is outside the theme of this text. This article is directed to create custom, minimalistic installation of Solaris 10. For security resons we will use ssh as “communication” way, for support of international charsets we will install en_US.UTF-8 codepage, but for compatibility will set the default language to C




Installation

We will start core installation and after this add the packages and clusters: SUNWCssh, SUNWladm, SUNWxcu6. Of course is possible to add the packages and clusters on time of the installation and get ssh key generation done on the time of first boot. But for demonstration we will do this work on “hard” way i.e. install packages and generate keys by hand. Do not forget to edit your /etc/ssh/sshd_config file to enable root logins via ssh. I know this can is security problem, but for tests is OK. As Software Group choose Core Group. Set disk map as follow
/ - 2048
/opt – 2048
swap - =RAM
/home – 64
The above disk layout is just example, for your installation follow rules, defined in your company or by policies from product you want to install later (for filesystems sizing take a look here: Suggestions_and_ideas_about_filesystem_sizing_on_Solaris)




Install additional packages (SUNWCssh, SUNWladm, SUNWxcu6)

Mount CDROM (DVDROM) and install package. Be aware the order is important.
mount –o ro –F hsfs /dev/dsk/c1t0d0s0 /mnt
cd /mnt/Solaris_10/Products
pkgadd –d . SUNWsshcu SUNWsshr SUNWsshu SUNWsshdr SUNWsshdu 
pkgadd –d . SUNWxcu4 SUNWxcu6
pkgadd –d . SUNWladm



Generate ssh server keys

cd /etc/ssh
ssh-keygen –t rsa –f ssh_host_rsa_key
ssh-keygen –t dsa –f ssh_host_dsa_key
svcadm enable ssh
In process of generation when ask for password just press enter. The length of the keys is 768 bits. Change it in case of need.




Install additional packages

pkgadd -d . SUNWctpls
pkgadd -d . SUNWmfrun
pkgadd -d . SUNWxwrtl
pkgadd -d . SUNWxwice
pkgadd -d . SUNWxwfnt
pkgadd -d . SUNWxwplr
pkgadd -d . SUNWxwplt
pkgadd -d . SUNWbtool
pkgadd -d . SUNWarc
pkgadd -d . SUNWhea
pkgadd -d . SUNWtoo
pkgadd -d . SUNWlibmr
pkgadd -d . SUNWlibm
pkgadd -d . SUNWlibms
pkgadd -d . SUNWsprot
pkgadd -d . SUNWi1of
pkgadd -d . SUNWi1cs
pkgadd -d . SUNWeurf
pkgadd -d . SUNWi15rf
pkgadd -d . SUNWi15cs
pkgadd -d . SUNWxwfnt
pkgadd -d . SUNWadmfr
pkgadd -d . SUNWadmc
pkgadd -d . SUNWadmfw
pkgadd -d . SUNWadmr
pkgadd -d . SUNWadmap
Part of the packages are need for i18n support, part are need for installing and running java, the rest are need for proper Oracle (database server/client) installation. Of course you can decide for self, but most of them are need for installation and running almost every additional software. Again be aware the order is important.



install java SDK packages

When you need java (JRE/JDK) you can install it on 2 different ways: from standard packages and download and install from Oracle site. If you need to track changes and patch it the simplest way is to use java, bundled in installation. But if you need to run some specific version for some software you can download it from Oracle site (see remark #1), copy it on special place (even under directory tree of the product and set JAVA_HOME and PATH variables.
pkgadd -d . SUNWj5rt
pkgadd -d . SUNWj5man
pkgadd -d . SUNWj5cfg
pkgadd -d . SUNWj5dev

 

Final notes

This article give you just start point. For your product maybe you will need additional packages. The advantage of this type of installation is you have less packages to care (change, patch) about, you get only 500 MB disk space of installation, you get only 30 processes (may vary) started and only 150 MB memory used (may vary too).




Remarks

1. On the Oracle Java site you can see two kind of packages: jdk-6u4-solaris-i586.sh and jdk-6u4-solaris-i586.tar.Z (names are just examples). Difference between them is the first archive (.sh) after agree with license create directory with java files you can move (directory) wherever you want (see listing).
# ls -l
drwxrwxr-x  10 root     root         687 Dec 14 15:08 jdk1.6.0_04
The second archive (tar.Z) create few directories, containing packages you can install with pkgadd program (see listing).
# ls -l
-r--r--r--   1 10       143         4140 Dec 14 17:15 COPYRIGHT
-r--r--r--   1 10       143        14097 Dec 14 17:15 LICENSE
-r--r--r--   1 10       143        28599 Dec 14 17:15 README.html
drwxr-xr-x   4 10       143          226 Dec 14 17:14 SUNWj6cfg
drwxr-xr-x   4 10       143          226 Dec 14 17:14 SUNWj6dev
drwxr-xr-x   4 10       143          226 Dec 14 17:14 SUNWj6dmo
drwxr-xr-x   4 10       143          226 Dec 14 17:14 SUNWj6jmp
drwxr-xr-x   4 10       143          226 Dec 14 17:14 SUNWj6man
drwxr-xr-x   4 10       143          226 Dec 14 17:14 SUNWj6rt
drwxrwxr-x   4 10       143          226 Dec 14 17:14 SUNWjavadb-client
drwxrwxr-x   4 10       143          226 Dec 14 17:14 SUNWjavadb-common
drwxrwxr-x   4 10       143          226 Dec 14 17:14 SUNWjavadb-core
drwxrwxr-x   4 10       143          226 Dec 14 17:14 SUNWjavadb-demo
drwxrwxr-x   4 10       143          226 Dec 14 17:14 SUNWjavadb-docs
drwxrwxr-x   4 10       143          226 Dec 14 17:14 SUNWjavadb-javadoc

Should I trust AI

 Should I trust AI? So far no, sorry.  I tested for the moment (May, 2025) most advanced model for programming and ask very simple question:...