20 November 2009

Step By step to installing the Indimail Server With Greylisting, DKIM sign.

IndiMail INSTALLATION STEPS

Quite often I find people doing a google search on IndiMail Installation Steps. I am not happy with the result which comes up in the search.

If you have learnt the art of being patient the read the file INSTALL-version. You can read the file INSTALL-RPM-version in case you want to install from RPM (version is the version of IndiMail you want to install).

If you are in a hurry to install and setup IndiMail, download the RPM and read the file Quick-INSTALL-version.

IndiMail RPM for various linux distros can be downloaded from
http://download.opensuse.org/repositories/home:/indimail/

The top level directory for current indimail source being maintained can be found at

https://sourceforge.net/projects/indimail/files/indimail


Using spamassassin program with IndiMail

Just few days back a user asked me whether spamassassin can be used with IndiMail.

IndiMail uses environment variables SPAMFILTER, SPAMEXITCODE to configure any spam filter to be used. All that is required for the spam filter is to read a mail message on stdin, output the message back on stdout and exit with a number which indicates whether the message is ham or spam.

The default installation of IndiMail creates a configuration where mails get scanned by bogofilter for spam filtering. bogofilter exits with value '0' in case the message is spam and with value '1' when message is ham. The settings for SPAMFILTER, SPAMEXITCODE is as below

SPAMFILTER="/var/indimail/bin/bogofilter -p -u -d /var/indimail/etc"
SPAMEXITCODE=0

Assuming that you have installed, setup and trained spamassassin, you can follow the instructions below to have IndiMail use spamassassin.

spamassasin has a client spamc which exits 1 when message is spam and exits 0 if the message is ham. To use spamassassin, just use the following for SPAMFILTER, SPAMEXITCODE

SPAMFILTER="path_to_spamassassin_spamc_program -E -U socket -d host -p port -u user"
SPAMEXITCODE=1
(see the documentation on spamc for description of arguments to spamc program)

If you are a lazy person like me then you can execute the following command to have the above environment variables set for qmail-smtpd to use spamassassin
% su
# /var/indimail/sbin/svctool --smtp=25 --servicedir=/service --qbase=/var/indimail/queue --qcount=5 --qstart=1 \
--cntrldir=control --localip=0 --maxdaemons=75 --maxperip=25 \
--persistdb --starttls --fsync --syncdir --memory=52428800 \
--chkrecipient --chkrelay --masquerade --min-free=52428800 \
--content-filter --virus-filter \
--qhpsi="/var/indimail/bin/clamdscan %s --quiet --disable-summary" \
--spamfilter="path_to_spamassassin_spamc_program -E -U socket -d host -p port -u user" \
--rejectspam=0 --spamexitcode=1 \
--localfilter --remotefilter --remote-authsmtp=plain --dmasquerade \
--dkverify=both --dksign=both --private_key=/var/indimail/control/domainkeys/indimail \
--rbl="-rzen.spamhaus.org -rdnsbl-1.uceprotect.net"


Since IndiMail uses envdir program to set environment variable, a simpler way would be to do the following

% su
# echo "path_to_spamassassin_spamc_program -E -U sock -d host -p port \
-u user
" > /service/qmail-smtpd.25/variables/SPAMFILTER
# echo 1 > /service/qmail-smtpd.25/variables/SPAMEXITCODE


Troublesome MySQL Configuration

Quite a few of users who attempt to install IndiMail first time, face the biggest issue with MySQL installation and configuration. Most of the issues relate to the following
  1. MySQL version less than 5.1: MySQL fails to startup under supervise
  2. MySQL version less than 5.1: svctool fails to create a default database for IndiMail during rpm installation.
  3. /etc/my.cnf uses socket=/var/lib/mysql/mysql.sock. IndiMail uses /tmp/mysql.sock. Connection to MySQL fails if you use mysql(1) (without -S opton).
The solution to the first problem is to delete the lines --general-log-file and the line --slow-query-log from the file /service/mysql.3306/run. After deleting the lines you can issue the command

/var/indimail/bin/svc -u /service/mysql.3306

to start up MySQL.

The solution to the second problem is to create a blank MySQL database by running the following command

/var/indimail/bin/svc -d /service/mysql.3306
/bin/rm -r /var/indimail/mysqldb/data
/usr/bin/mysql_install_db --user=mysql --datadir=/var/indimail/mysqldb/data

chown -R mysql:mysql /var/indimail/mysqldb/data
/var/indimail/bin/svc -u /service/mysql.3306
mysql -u root -p
mysql> use mysql;
mysql> update user set password=PASSWORD('some_pass') where user='root';
mysql> CREATE USER indimail identified by 'ssh-1.5-';
mysql> CREATE USER mysql identifed by '4-57343-';
mysql> CREATE USER admin identified by 'benhur20';
mysql> CREATE USER repl identified by 'slaveserver';
mysql> GRANT SELECT,CREATE,ALTER,INDEX,INSERT,UPDATE,DELETE, \
mysql> CREATE TEMPORARY TABLES, \
mysql> LOCK TABLES ON indimail.* to 'indimail';
mysql> GRANT RELOAD,SHUTDOWN,PROCESS,SUPER on *.* to admin;
mysql> GRANT REPLICATION_SLAVE on *.* to repl;


The third problem can be solved by replacing socket=/var/lib/mysql/mysql.sock with socket=/tmp/mysql.sock in /etc/my.cnf or equivalent file.

SLOC Directory SLOC-by-Language (Sorted)

106466 clamav-0.95.2 ansic=94967,sh=11300,perl=199
73173 qmail-1.03 ansic=68645,perl=2361,sh=2167
58207 indimail-1.6.2 ansic=51563,sh=6644
45914 indium-1.0 tcl=39628,sh=5604,ansic=682
41943 bogofilter-1.2.1 ansic=34807,sh=4629,perl=1842,lex=475,lisp=179
14670 flash-0.9.4 ansic=8346,sh=6324
9762 ucspi-tcp-0.88 ansic=9581,sh=181
9362 altermime-0.3.10 ansic=5963,sh=3399
9317 mpack-1.6 ansic=9292,perl=25
8131 ripmime-1.4.0.9 ansic=8116,sh=15
4256 pam-multi-1.0 ansic=3053,sh=1203
3318 libdkim-1.3 cpp=2316,ansic=924,sh=78
1833 nssd-1.0 ansic=1833
1772 fortune-1.1 ansic=1698,sh=74


Totals grouped by language (dominant language first):
ansic: 299470 (77.16%)
sh: 41618 (10.72%)
tcl: 39628 (10.21%)
perl: 4427 (1.14%)
cpp: 2316 (0.60%)
lex: 475 (0.12%)
lisp: 179 (0.05%)


Total Physical Source Lines of Code (SLOC) = 388,124
Development Effort Estimate, Person-Years (Person-Months) = 104.58 (1,254.96)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 3.14 (37.62)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 33.36
Total Estimated Cost to Develop = $ 3,011,907
(average salary = $12,000/year, overhead = 2.40).

Greylisting in IndiMail

Greylisting is a method of defending email users against spam, by temporarily rejecting any email from a IP/Sender which it does not recognize. As per SMTP, the originating server should after a delay retry. A server implementing greylisting should accept the mail if sufficient time has elapsed. If the mail is from a spammer it will probably not be retried since a spammer goes through thousands of email addresses and typically cannot afford the time delay to retry.

IndiMail 1.6 onwards implements greylisting using qmail-greyd daemon. You additionally need to have the environment variable GREYIP defined for the qmail-smtpd process. The environment variable GREYIP specifies on which IP and port, qmail-greyd is accepting greylisting requests. qmail-smtpd uses UDP to send a triplet (IP+RETURN_PATH+RECIPIENT) to the greylisting server and waits for an answer which tells qmail-smtpd to proceed ahead or to temporarily reject the mail. qmail-greyd also accepts a list of whitelisted IP addresses for which greylisting should not be done.

1. Enabling qmail-greyd greylisting server
% su
# svctool --greylist=1999 --servicedir=/service --min-resend-min=2 \
--resend-win-hr=24 --timeout-days=30 --context-file=greylist.context \
--save-interval=5 --whitelist=greylist.whitelist --use-greydaemon


2. Enabling greylisting in SMTP
  • Assuming you've setup your qmail-smtpd service with tcpserver and the -x option (as in LWQ), you just need to update the cdb file referenced by this -x option. The source for this file is typically /var/indimail/etc/tcp.smtp. For example,

    127.:allow,RELAYCLIENT=""

    192.168.:allow,RELAYCLIENT=""

    :allow

  • could become,

    127.:allow,RELAYCLIENT=""

    192.168.:allow,RELAYCLIENT=""

    :allow,GREYIP=":"

  • If you've setup qmail-greyd on a non-default address (perhaps you're running qmail-greyd on a separate machine), you'll also need to specify the address it's listening on - adjust the above to include GREYIP="192.168.5.5:", for example.
  • Finally, don't forget to update the cdb file corresponding to the source file you've just edited. If you have a LWQ setup that's,

    # qmailctl cdb

    otherwise (assuming /var/indimail/etc/tcp.smtp, /var/indimail/etc/tcp.smtp.cdb),

    # tcprules /var/indimail/etc/tcp.smtp.cdb /var/indimail/etc/tcp.smtp.tmp < /var/indimail/etc/tcp.smtp

  • Alternatively (and particularly if you're not using the -x option to tcpserver) you can enable greylisting for all SMTP connections by setting GREYIP in the environment in which qmail-smtpd is started - for example your variables directory for qmail-smtpd can contain a file with the name GREYIP

    # echo GREYIP=\":\" > /service/qmail-smtpd.25/variables/GREYIP

Creating Self-Signed Certificate for TLS/SSL encryption

If you have installed indimail using any of the RPM at

http://download.opensuse.org/repositories/home:/mbhangui/


you will get IMAPS, POP3S, SMTPS services installed by default. However Certificate are not installed by default. You may want to study the following google search. If you have not installed IndiMail using the RPM, then you can use svctool to create the IMAPS, POP3S, SMTPS services. Executing svctool without any option will give you a help screen.

You can save yourself a lot of trouble by using svctool to create self-signed certificate for IMAPS, POP3S, SMTPS (or starttls in smtp)

# /var/indimail/svctool --postmaster=postmaster@yourdomain --config=cert

You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank. For some fields there will be a default value, If you just hit Enter, the field will be left blank. Please note: The common name must be the name of the mail server so make sure you enter it on that line:

Country Name (2 letter code) [GB]:IN
State or Province Name (full name) [Berkshire]:Goa
Locality Name (eg, city) [Newbury]:Porvorim
Organization Name (eg, company) [My Company Ltd]:IndiMail
Organizational Unit Name (eg, section) []: Technology
Common Name (eg, YOUR name) []: yourdomain
Email Address []:user@domain.xxx

Once you have given the above input, your certificate will be generated

% ls -l /var/indimail/control/*.pem
-rw-------. 1 indimail indimail 245 2009-08-19 07:39 dh1024.pem
-rw-------. 1 indimail indimail 156 2009-08-19 07:39 dh512.pem
-rw-------. 1 indimail indimail 497 2009-08-19 07:38 rsa512.pem
lrwxrwxrwx. 1 root root 36 2009-08-19 07:38 clientcert.pem -> /var/indimail/control/servercert.pem
-rw-r-----. 1 indimail indimail 2197 2009-08-19 07:38 servercert.pem

Now you can use the following commands to test the services

To connect to IMAPS
openssl s_client -connect localhost:993

To connect to POP3S
openssl s_client -connect localhost:995

To connect to SMTPS
openssl s_client -connect localhost:465

Wednesday, April 1, 2009

How to set DKIM signature in IndiMail

What is DKIM
DomainKeys Identified Mail (DKIM) lets an organization take responsibility for a message while it is in transit. DKIM has been approved as a Proposed Standard by IETF and published it as RFC 4871. There are number of vendors/software available with provide DKIM signing. IndiMail is one of them. You can see the full list here.

DKIM uses public-key cryptography to allow the sender to electronically sign legitimate emails in a way that can be verified by recipients. Prominent email service providers implementing DKIM (or its slightly different predecessor, DomainKeys) include Yahoo and Gmail. Any mail from these domains should carry a DKIM signature, and if the recipient knows this, they can discard mail that hasn't been signed, or that has an invalid signature.

IndiMail from version 1.5 onwards, comes with a drop-in replacement for qmail-queue for DKIM signature signing and verification (see qmail-dkim(8) for more details). You need the following steps to enable DKIM. IndiMail from version 1.5.1 onwards comes with a filter dk-filter, which can be enabled before mail is handed over to qmail-remote or qmail-remote (see spawn-filter(8) for more details).

Create your DKIM signature
% mkdir /var/indimail/control/domainkeys
% cd /var/indimail/control/domainkeys
# openssl genrsa -out rsa.private 768
# openssl rsa -in rsa.private -out rsa.public -pubout -outform PEM
# mv rsa.private private
# chown qmailq:indimail private (name of our selector)
# chmod 440 private
Create your DNS records
$ grep -v ^- rsa.public | perl -e 'while(<>){chop;$l.=$_;}print "t=y; p=$l;\n";'
_domainkey.indimail.org. IN TXT "t=y; o=-;"
default._domainkey.indimail.org. IN TXT "DNS-public-key"
Set SMTP to sign with DKIM signatures

# cd /service/qmail-smtpd.25/variables
# echo "/var/indimail/bin/qmail-dkim" > QMAILQUEUE
# echo "/var/indimail/control/domainkeys/private" > DKIMSIGN
# svc -d /service/qmail-smtpd.25; svc -u /service/qmail-smtpd.25


Set SMTP to verify DKIM signatures

You can setup qmail-stmpd for verification by setting
DKIMIVERIFY environment variable instead of DKIMSIGN environment variable.
# cd /service/qmail-smtpd.25/variables
# echo "/var/indimail/bin/qmail-dkim" > QMAILQUEUE
# echo "" > DKIMVERIFY
# svc -d /service/qmail.smtpd.25; svc -u /service/qmail-smtpd.25

DKIM Author Domain Signing Practices

IndiMail supports ADSP. A DKIM Author Signing Practice lookup is done by the verifier to determine whether it should expect email with the From: address to be signed.

The Sender Signing Practice is published with a DNS TXT record as follows:

_adsp._domainkey.indimail.org. IN TXT "dkim=unknown"

The dkim tag denotes the outbound signing Practice. unknown means that the indimail.org domain may sign some emails. You can have the values "discardable" or "all" as other values for dkim tag. discardable means that any unsigned email from indimail.org is recommended for rejection. all means that indimail.org signs all emails with dkim.

You may decide to consider ADSP as optional until the specifications are formalised. To set ADSP you need to set the environment variable SIGN_PRACTICE=adsp. i.e

# echo adsp > /service/smtpd.25/variables/SIGN_PRACTICE

You may not want to do DKIM signing/verificaton by SMTP. In that case, you have the choice of using the QMAILREMOTE, QMAILLOCAL environment variables which allows IndiMail to run any script before it gets passed to qmail-remote, qmail-local respectively.

Setting qmail-remote to sign with DKIM signatures

On your host which sends out outgoing mails,
it only make sense to do DKIM signing and not verification.


# cd /service/qmail-send.25/variables
# echo "/var/indimail/bin/spawn-filter" > QMAILREMOTE
# echo "/var/indimail/bin/dk-filter" > FILTERARGS
# echo "/var/indimail/control/domainkeys/private" > DKIMSIGN
# svc -d /service/qmail-send.25; svc -u /service/qmail-send.25

Setting qmail-local to verify DKIM signatures


On your host which serves as your incoming gateway
for your local domains, it only makes sense to do
DKIM verification with qmail-local

# cd /service/qmail-send.25/variables
# echo "/var/indimail/bin/spawn-filter" > QMAILLOCAL
# echo "/var/indimail/bin/dk-filter" > FILTERARGS
# echo "/var/indimail/control/domainkeys/private" > DKIMVERIFY
# svc -d /service/qmail-send.25; svc -u /service/qmail-send.25


Testing outbound signatures

Once you have installed your private key file and added your public key to your DNS data, you should test the server and make sure that your outbound message are having the proper signatures added to them. You can test it by sending an email to sa-test (at) sendmail dot net. This reflector will reply (within seconds) to the envelope sender with a status of the DomainKeys and DKIM signatures.

If you experience problems, consult the qmail-dkim man page or post a comment below and I’ll try to help.

You can also use the following for testing.

All the above was quite easy. If you don't think so, you can always use the magic options

--dkverify
(for verification) or --dksign --private_key=domain_key_private_key_file to svctool (svctool --help for all options) to create supervice run script for qmail-smtpd, qmail-send.
References
  1. http://www.brandonturner.net/blog/2009/03/dkim-and-domainkeys-for-qmail/
  2. http://qmail.jms1.net/patches/domainkeys.shtml


Referense URL:

http://indimail.blogspot.com/
http://indimail.blogspot.com/2009/10/troublesome-mysql-configuration.html


Troublesome MySQL Configuration

Quite a few of users who attempt to install IndiMail first time, face the biggest issue with MySQL installation and configuration. Most of the issues relate to the following
  1. MySQL version less than 5.1: MySQL fails to startup under supervise
  2. MySQL version less than 5.1: svctool fails to create a default database for IndiMail during rpm installation.
  3. /etc/my.cnf uses socket=/var/lib/mysql/mysql.sock. IndiMail uses /tmp/mysql.sock. Connection to MySQL fails if you use mysql(1) (without -S opton).
The solution to the first problem is to delete the lines --general-log-file and the line --slow-query-log from the file /service/mysql.3306/run. After deleting the lines you can issue the command

/var/indimail/bin/svc -u /service/mysql.3306

to start up MySQL.

The solution to the second problem is to create a blank MySQL database by running the following command

/var/indimail/bin/svc -d /service/mysql.3306
/bin/rm -r /var/indimail/mysqldb/data
/usr/bin/mysql_install_db --user=mysql --datadir=/var/indimail/mysqldb/data

chown -R mysql:mysql /var/indimail/mysqldb/data
/var/indimail/bin/svc -u /service/mysql.3306
mysql -u root -p
mysql> use mysql;
mysql> update user set password=PASSWORD('some_pass') where user='root';
mysql> CREATE USER indimail identified by 'ssh-1.5-';
mysql> CREATE USER mysql identifed by '4-57343-';
mysql> CREATE USER admin identified by 'benhur20';
mysql> CREATE USER repl identified by 'slaveserver';
mysql> GRANT SELECT,CREATE,ALTER,INDEX,INSERT,UPDATE,DELETE, \
mysql> CREATE TEMPORARY TABLES, \
mysql> LOCK TABLES ON indimail.* to 'indimail';
mysql> GRANT RELOAD,SHUTDOWN,PROCESS,SUPER on *.* to admin;
mysql> GRANT REPLICATION_SLAVE on *.* to repl;


The third problem can be solved by replacing socket=/var/lib/mysql/mysql.sock with socket=/tmp/mysql.sock in /etc/my.cnf or equivalent file.



Changing the Port 25 to 587 for the security purpose:

/var/indimail/sbin/svctool --smtp=587 --servicedir=/service \
--qbase=/var/indimail/queue --qcount=5 --qstart=1 --authsmtp --antispoof \
--cntrldir=control --localip=0 --maxdaemons=150 --maxperip=25 --persistdb \
--starttls --fsync --syncdir --memory=104857600 --chkrecipient --chkrelay --masquerade \
--min-free=52428800 --content-filter --virus-filter \
--qhpsi="/var/indimail/bin/clamdscan %s --quiet --disable-summary" \
--dmasquerade --skipsend \
--dkverify=both --dksign=both --private_key=/var/indimail/control/domainkeys/indimail

19 November 2009

Mounting the NAS through NFS share.

Mounting NFS resources with the mount command

To mount a remote resource, provided the resource is shared and you can reach the server over the network, use the mount command. This may be done any time during client operations. However, you must be a privileged user to use mount.

To mount NFS resources, do the following:

  1. Create a mount point for the remote resource using the mkdir command.
    NOTE: As with a local mount, if you mount a remote resource on an existing directory that contains files and subdirectories, the contents of the directory are obscured.

  2. The syntax of the mount command, as it relates to an NFS mount, is:

    mount [-F nfs] [-o specific_options] {special | mount_point}

    mount [-F nfs] [-o specific_options] special mount_point

    Use the first form if you have entries in the /etc/vfstab file. See the mount(1Mnfs) manual page for details.

Resources accessed through the mount command stay mounted unless you unmount them with the umount command or exit init state 3. Also, if you exit and reenter init state 3, the resource will no longer be mounted (unless you edited the vfstab file to mount the resource automatically).

When you mount an NFS resource, we suggest that you do the following:

  • Use the hard option with any resource you mount read-write. Then, if a user is writing to a file when the server goes down, the write will continue when the server comes up again, and nothing will be lost. Refer to ``Hard and soft mounts'' for details of hard and soft NFS mounts.

  • Use the nosuid option with any resource you mount read-write, unless you have good reasons to do otherwise.
See ``Examples: mounting resources'' for an illustration of the mount command in use.

Hard and soft mounts

NFS supports two types of mounts -- hard mounts and soft mounts. If a mount is a hard mount, an NFS request affecting any part of the mounted resource is issued repeatedly until the request is satisfied (for example, the server crashes and comes back up at a later time). When a mount is a soft mount, an NFS request returns an error if it cannot be satisfied (for example, the server is down), then quits.

Examples: mounting resources


NOTE: The -F nfs option specified in these examples is not strictly required and could be omitted. Here it serves merely as a reminder of the filesystem type.

  • You want to soft mount online manual pages from remote machine dancer on the local directory /usr/man. You want the pages mounted read-only. Type the following command:

    mount -F nfs -o ro,soft dancer:/usr/man /usr/man/

  • You want to hard mount the resource /usr/local from the remote machine dancer on the mount-point /usr/local/dancer. You want the resource mounted read-write, with the set-uid bits ignored and the keyboard interrupt enabled. Enter the following, all on one line:

    mount -F nfs -o hard,nosuid,intr dancer:/usr/local /usr/local/dancer

Open Solaris Sparc Installation


Solaris Container Create and Configuration

Solaris 10 Zone create and confgure with step by step.

Example create the zone and configuration .

1.mkdir -p /export/zone1

mkdir /u00

mkdir /u01

mount /export/zone1



Create zone configure commands.

zonecfg –z zone1



create -b

set zonepath=/export/zone1

set autoboot=true

add fs

set dir=/u00

set special=/dev/md/dsk/d62

set raw=/dev/md/rdsk/d62

set type=ufs

end

add fs

set dir=/u01

set special=/dev/md/dsk/d63

set raw=/dev/md/rdsk/d63

set type=ufs

end

add net

set address=10.0.0.100

set physical=neg0

end

filesystem

add fs

set dir=/usr/local

set special=/path/to/some/storage/local/twilight

set type=zfs

end

commit

exit



Divece Add



zonecfg –z zone1

add device

set match=/dev/sound/*

end

exit







Memory add





# zonecfg -z zone1

add capped-memory

set locked=4g

end

exit



# zonecfg -z zone1

set max-locked-memory=4g

exit

Solaris 10 11/06: Yes, Oracle can use DISM in a Container. To enable the use of DISM, the global zone administrator must add the privilege "proc_lock_memory" to the Container. To do this, use zonecfg(1M) to add the line

set limitpriv=default,proc_lock_memory

2. zoneadm list -cv

3. zoneadm -z zone1 install

4. zoneadm list -cv

5. zoneadm -z zone1 ready

6. zoneadm list -cv

7. zoneadm -z zone1 boot

8. zlogin -C zone1







network configuration of a running zone



# ifconfig bge0 addif 192.168.200.202 zone zone1

# ifconfig bge0 removeif 192.168.200.202





To change the number of CPU shares associated with a container without re-booting it, use the prctl command, e.g.

# prctl -n zone.cpu-shares -r -v $SHARES `pgrep -z $ZONENAME init`

Delete or uninstall zone

# zoneadm -z uninstall

# zonecfg -z delete

at 11:34 PM 0 comments Posted by LinuxGuru
Links to this post
Opensolaris sparck Jumpstart
OPensolaris Jumpstart (Sparc)

Step 1. Install X86 OpenSolaris
Step 2. # pkg install SUNWinstalladm (Add package installadm)
Step3. Download Sparc 2009.06 (http://dlc.sun.com/osol/opensolaris/2009/06/osol-0906-ai-sparc.iso)
Step 4. installadm create-service -n 0906sparc -i 10.0.80.10 -c 10 -s /export/osol-0906-ai-sparc.iso /export/ai/0906sparc
Step 5. installadm list
Step 6. netstat -an | grep 5555
step 7. /usr/lib/inet/in.dhcpd -dv
Step 8. boot net:dhcp -s (Sparc Machine)



If in case You face Network unreachable issue please follow this step

What follows is a workaround to install OpenSolaris on older SPARC hardware using wanboot from the SXCE install media. This process assumes that you have correctly configured the AI server and client as documented in the OpenSolaris Automated Installer Guide.

To get started, you will need to download and burn the SXCE install media (snv_111 or higher is required due to a number of recent fixes to wanboot). Place the install media into your DVD drive, drop into the PROM, and issue:

{0} ok boot cdrom -F wanboot -o dhcp

At this point, the system will boot wanboot from the install media and pick up its configuration from DHCP.

Eventually, the boot process will fail with an error:

Rebooting with command: boot cdrom -F wanboot -o dhcp
Boot device: /pci@8,700000/scsi@6/disk@6,0:f File and args: -F wanboot -o dhcp
wanboot info: WAN boot messages->console
wanboot info: configuring /pci@8,600000/pci@1/network@0

1000 Mbps FDX Link up
wanboot info: Starting DHCP configuration
wanboot info: DHCP configuration succeeded

wanboot info: Default net-config-strategy: dhcp
wanboot progress: wanbootfs: Read 366 of 366 kB (100%)
wanboot info: wanbootfs: Download complete
Sat Jul 11 01:40:14 wanboot progress: miniroot: Read 175868 of 175868 kB (100%)
Sat Jul 11 01:40:14 wanboot info: miniroot: Download complete
SunOS Release 5.11 Version snv_111b 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
strplumb: open /devices/pseudo/clone@0:sd failed: 19
Hostname: opensolaris
Remounting root read/write
Probing for device nodes ...
Preparing automated install image for use
The AI image will be retrieved from /export/aiserver/osol-0906-ai-sparc/ directory
Downloading solaris.zlib archive
--18:41:16-- http://10.8.0.8:5555/export/aiserver/osol-0906-ai-sparc//solaris.zlib
=> `/tmp/solaris.zlib'
Connecting to 10.8.0.8:5555... failed: Network is unreachable.
FAILED
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
Console login service(s) cannot run

Enter user name for system maintenance (control-d to bypass):

At this point you will need to login as root (the password will be empty) and configure your network interfaces manually:

# ifconfig -a plumb
# ifconfig dhcp

You will also need to enable DNS; this is required for pkg(1) to locate and install packages. It should be noted that the wanboot miniroot is very minimal; you do not have access to some of the more common commands such as cp and rmdir. Also, the miniroot is using dcfs(7FS) which means some additional steps need to be taken to modify the filesystem contents:

# cat > /etc/resolv.conf
nameserver

^D
# rm /etc/nsswitch.conf
# cat /etc/nsswitch.dns > /etc/nsswitch.conf

At this point, the network has been configured correctly, however we will need to clean up state to allow the svc:/system/filesystem/root:live-media service to continue booting:

# umount /etc/netboot
# rm -rf /etc/netboot
# umount /tmp

Before clearing the svc:/system/filesystem/root:live-media service, I had to disable a couple of services for a clean boot. The svc:/platform/sun4u/dscp:default and svc:/platform/sun4u/sckmd:default services were not necessary for my hardware and if left enabled, caused the install process to fail. These services are safe to disable unless you have the hardware referenced in the services:

# svcadm disable dscp
# svcadm disable sckmd

You are now free to clear the svc:/system/filesystem/root:live-media service:

# svcadm clear root:live-media
Remounting root read/write
Probing for device nodes ...
Preparing automated install image for use

Before logging out, you will also want to clear the svc:/network/dns/multicast:default service to ensure service discovery works correctly:

# svcadm clear dns/multicast

Once you logout from the maintenance shell the AI process will continue:

# logout
The AI image will be retrieved from /export/aiserver/osol-0906-ai-sparc/ directory
Downloading solaris.zlib archive
--18:43:25-- http://10.8.0.8:5555/export/aiserver/osol-0906-ai-sparc//solaris.zlib
=> `/tmp/solaris.zlib'
Connecting to 10.8.0.8:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 83,334,656 (79M) [text/plain]

100%[====================================>] 83,334,656 50.36M/s

18:43:26 (50.28 MB/s) - `/tmp/solaris.zlib' saved [83334656/83334656]

Downloading solarismisc.zlib archive
--18:43:26-- http://10.8.0.8:5555/export/aiserver/osol-0906-ai-sparc//solarismisc.zlib
=> `/tmp/solarismisc.zlib'
Connecting to 10.8.0.8:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,857,408 (3.7M) [text/plain]

100%[====================================>] 3,857,408 --.--K/s

18:43:26 (47.53 MB/s) - `/tmp/solarismisc.zlib' saved [3857408/3857408]

--18:43:26-- http://10.8.0.8:5555/export/aiserver/osol-0906-ai-sparc//install.conf
=> `/tmp/install.conf'
Connecting to 10.8.0.8:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 61 [text/plain]

100%[====================================>] 61 --.--K/s

18:43:26 (2.44 MB/s) - `/tmp/install.conf' saved [61/61]

Done mounting automated install image
Configuring devices.
Reading ZFS config: done.

opensolaris console login: Service discovery phase initiated
Service name to look up: 0906sparc
Service discovery finished successfully
Process of obtaining configuration manifest initiated
Configuration manifest obtained
Automated Installation started
The progress of the Automated Installation can be followed by viewing the logfile at /tmp/install_log

At this point you should be good to go - Enjoy!
at 10:13 PM 3 comments Posted by LinuxGuru
Links to this post
Subscribe to: Posts (Atom)
Followers
Blog Archive



This work has done my one of colleague in Xerago E-Biz Pvt LTD. His name is Mr.Kumareasan.