Thursday, 13 April 2017

Creating Random password using powershell

$Ragx=$NULL;For ($a=33;$a –le 126;$a++) {$Ragx+=,[char][byte]$a }

Function GET-Temppassword() {

Param(

[int]$length=10,

[string[]]$sourcedata

)



For ($loop=1; $loop –le $length; $loop++) {

            $TempPassword+=($sourcedata | GET-RANDOM)

            }

return $TempPassword

}

$Raghu = GET-Temppassword –length 3 –sourcedata $Ragx


Write-host "P@SS$($RAGHU)"

Monday, 27 March 2017

Converting AP to autonomous and configuring the AP AIR-CAP2702I-D-K9


AP00f6.6325.b4cc>
AP00f6.6325.b4cc>en
Password:

AP00f6.6325.b4cc#$oad tftp://192.168.30.117/ap3g2-k9w7-tar.153-3.JD4.tar
examining image...
Loading ap3g2-k9w7-tar.153-3.JD4.tar from 192.168.30.117 (via BVI1): !
extracting info (282 bytes)
Image info:
    Version Suffix: k9w7-.153-3.JD4
    Image Name: ap3g2-k9w7-mx.153-3.JD4
    Version Directory: ap3g2-k9w7-mx.153-3.JD4
    Ios Image Size: 10568192
    Total Image Size: 13670912
    Image Feature: WIRELESS LAN
    Image Family: AP3G2
    Wireless Switch Management Version: 8.3.112.0
MwarVersion:08037000.First AP Supported Version:07066E02.

Image version check passed

Extracting files...
ap3g2-k9w7-mx.153-3.JD4/ (directory) 0 (bytes)


extracting ap3g2-k9w7-mx.153-3.JD4/img_sign_rel_sha2.cert (1371 bytes)
extracting info.ver (282 bytes)
[OK - 13721600 bytes]



ap>
ap>en
Password:

ap(config)#fot11 ssid WLAN8
            ^
% Invalid input detected at '^' marker.

ap(config)#dot11 ssid WLAN8
ap(config-ssid)#authentication open
ap(config-ssid)#guest-mode

ap(config-ssid)#exit

ap(config)#inter dot11Radio 0
ap(config-if)#ssid WLAN8
ap(config-if)#
*Mar  1 00:05:08.843: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
ap(config-if)#en

ap(config-if)#encryption mode  ciphers aes-ccm
ap(config-if)#
*Mar  1 00:05:24.343: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
ap(config-if)#exit

ap(config)#inter dot11Radio 1

ap(config-if)#encryption mode  ciphers aes-ccm
ap(config-if)#
*Mar  1 00:05:43.535: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface resetssid WLAN8
ap(config-if)#
*Mar  1 00:05:51.335: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface reset
ap(config-if)#exit
ap(config)#dot11 ssid WLAN8


ap(config-ssid)#authentication key-management wpa ?
  cckm     allow CCKM clients
  version  Specify WPA version
  <cr>


ap(config-ssid)#authentication key-management wpa version 2
ap(config-ssid)#
*Mar  1 00:06:43.795: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface reset
*Mar  1 00:06:43.795: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
ap(config-ssid)#
ap(config-ssid)#au
ap(config-ssid)#en

ap(config-ssid)#wpa-psk ascii ?
  0     Specifies an UNENCRYPTED key will follow
  7     Specifies a HIDDEN key will follow
  LINE  Clear WPA password

ap(config-ssid)#wpa-psk ascii 0 ?
  LINE  Clear WPA password

ap(config-ssid)#wpa-psk ascii 0 OrranGE@123
ap(config-ssid)#
*Mar  1 00:07:34.495: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface reset
*Mar  1 00:07:34.495: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
ap(config-ssid)#

ap(config-ssid)#exit
ap(config)#exit
ap#
*Mar  1 00:07:46.575: %SYS-5-CONFIG_I: Configured from console by consolewr
Building configuration...
[OK]
ap#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
BVI1                       192.168.44.56   YES DHCP   up                    up
Dot11Radio0                unassigned      YES unset  administratively down down
Dot11Radio1                unassigned      YES unset  administratively down down
GigabitEthernet0           unassigned      YES TFTP   up                    up
GigabitEthernet1           unassigned      YES TFTP   up                    down
ap#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.

ap(config)#inter dot11Radio  0
ap(config-if)#no shut
ap(config-if)#
*Mar  1 00:08:04.343: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to interface reset
*Mar  1 00:08:04.347: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to reset
*Mar  1 00:08:05.431: %DOT11-6-FREQ_SCAN: Interface Dot11Radio0, Scanning frequencies for 11 secondsexit
ap(config)#inter do 1
ap(config-if)#no shut
ap(config-if)#
*Mar  1 00:08:13.359: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to interface reset
*Mar  1 00:08:13.363: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
ap(config-if)#

*Mar  1 00:08:18.235: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio1 due to configuration change
*Mar  1 00:08:18.243: %DOT11-6-FREQ_USED: Interface Dot11Radio1, frequency 5825 selected
*Mar  1 00:08:18.255: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to up
*Mar  1 00:08:18.263: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to downt
ap(config)#
*Mar  1 00:08:18.271: %LINK-5-CHANGED: Interface Dot11Radio1, changed state to reset
*Mar  1 00:08:19.299: %LINK-6-UPDOWN: Interface Dot11Radio1, changed state to up
*Mar  1 00:08:20.299: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio1, changed state to up
ap(config)#
ap(config)#
*Mar  1 00:08:22.431: %DOT11-5-EXPECTED_RADIO_RESET: Restarting Radio interface Dot11Radio0 due to configuration change
*Mar  1 00:08:22.439: %DOT11-6-FREQ_USED: Interface Dot11Radio0, frequency 2452 selected
*Mar  1 00:08:22.451: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to up
*Mar  1 00:08:22.459: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to downex
*Mar  1 00:08:22.467: %LINK-5-CHANGED: Interface Dot11Radio0, changed state to resetit
ap#
*Mar  1 00:08:23.495: %LINK-6-UPDOWN: Interface Dot11Radio0, changed state to up
*Mar  1 00:08:24.091: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 00:08:24.495: %LINEPROTO-5-UPDOWN: Line protocol on Interface Dot11Radio0, changed state to up
ap#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
BVI1                       192.168.44.56   YES DHCP   up                    up
Dot11Radio0                unassigned      YES unset  up                    up
Dot11Radio1                unassigned      YES unset  up                    up
GigabitEthernet0           unassigned      YES TFTP   up                    up
GigabitEthernet1           unassigned      YES TFTP   up                    down
ap#wr
Building configuration...
[OK]
ap#show dot11 ass
ap#
*Mar  1 00:08:50.359: %DOT11-6-ASSOC: Interface Dot11Radio1, Station   8879.7e2a.6922 Associated KEY_MGMT[WPAv2 PSK]
ap#
ap#
ap#show dot11 ass

802.11 Client Stations on Dot11Radio1:

SSID [WLAN8] :

MAC Address    IP address      IPV6 address                           Device        Name            Parent         State
8879.7e2a.6922 192.168.44.62   ::                                     unknown       -               self           Assoc

ap#wr
Building configuration...
[OK]
ap#

Wednesday, 11 January 2017

Powershell Script to check file exist or not ([IO.Directory])

if([IO.Directory]::Exists($DestinationPath1))
{
write-output "Destination folder exists"
}
else
{
$DestinationPath1= New-item -type directory D:\**\$(get-date -f dd.MM.yyyy)\ -ErrorAction SilentlyContinue                      
}

Powershell to create log file


##LOGFILE CREATION

$LogFile = "D:\**.log"
function Logw([string]$var)
    {
    $Date =(Get-date).ToString();
    $Date + $var | out-file $LogFile -append -encoding utf8
    }

PowerShell Creating Time Stamp with date


##TIMESTAMP CREATION

$ScripName = "   "
$ydt = get-date -date $(get-date).adddays(-1) -format yyyyMMdd
$dt = date -f yyyyMMdd
$timeStamp= $(get-date -f MM-dd-yyyy_HH_mm_ss)
$path = "D:\\LOGS\$timeStamp"
if([IO.Directory]::Exists($path))
{
write-output "The folder exists"
}
else
{
$folCreate= New-item -type directory D:\LOGS\$(get-date -f MM-dd-yyyy_HH_mm_ss)
}

Monday, 9 January 2017

Dynamically specifying source location for Hyperlink in excel


TO FIND LOCATION OF EXCEL FILE :

=MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)

CONCATENATING FILE LOCATION AND FILE NAME:

=HYPERLINK(P10&"index.html")

Monday, 26 December 2016

Pxeboot

Contents




Introduction

This document is based on the requirement from me. I have gathered all the details from different websites and prepared this document.
 At the end of this document you will be able to setup a RHEL/Fedora/Centos Pxeboot server through which we can install OS for Windows XP, 2003, Win7, 2008, 2008 R2, Win8, 2012 , Linux RHEl, Fedora, Centos, Solaris, Ubuntu and Esxi 4.1,5.0 through network.

Requirements:

1.       RHEL Server:
a.       DHCP service
b.      TFTP service
c.       Samba service
d.      VSFTPD service
e.      NFS service
2.       Binaries:
a.       Windows AIK
b.      Windows XP,2003,Win7,2008,2008 R2,Win8,2012
c.       Linux RHEl,Fedora,Centos,Solaris,Ubuntu
d.      Esxi4.1,5.0
You can setup all of the above mentioned services in a single server or multiple servers with different OS.
Install a RHEl server. Minimum requirements are 3GB RAM and Dual core processor 2.7 GHz or more. For details about installation of RHEL server step by step click here. For installing service create a YUM repository, for details about creating YUM repository click here. Here we use different services for installing different OS, e.g. Samba for installing Windows OS, FTP for Linux RHEL/Fedora/Centos, NFS for Solaris.

Setting up DHCP service:

Install DHCP in RHEL machine.
#Yum install –y  dhcpd*
After installing dhcp service go to
#Vim /etc/dhcpd.conf
It will ask you to go to /usr/share/doc/dhcp*/dhcpd.conf.sample.
Copy the file to /etc/ as dhcpd.conf and replace the old file.
#cp  /usr/share/doc/dhcp*/dhcpd.conf.sample   /etc/dhcpd.conf
Now open the dhcpd.conf
#Vim /etc/dhcpd.conf
#####################################################################################ddns-update-style interim;
ignore client-updates;

subnet 192.168.XX.XX netmask 255.255.255.XX {

allow booting;
allow bootp;
next-server 192.168.XX.XX;
filename "pxelinux.0";

     option routers             192.168.XX.XX;
     option subnet-mask         255.255.255.XX;

     option nis-domain          "domain.org";
     option domain-name         "domain.org";
     option domain-name-servers 192.168.XX.XX;

     option time-offset         -18000;    # Eastern Standard Time
     option ntp-servers         192.168.XX.XX;
#    option netbios-name-servers     192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#    option netbios-node-type 2;

     range dynamic-bootp 192.168.XX.XX 192.168.XX.XX;
     default-lease-time 3600;
     max-lease-time 3601;

host xxxxx {
   option host-name xxxxx.domain.org";
   hardware ethernet 00:A0:78:8E:9E:AA;
   fixed-address 192.168.XX.XX;
}
}
#####################################################################################
Subnet: you can specify your own subnet e.g.: 10.xx.xx.xx and 255.xx.xx.xx.
Allow booting: this will allow the DHCP server to give IP to any adapter which is pxe enabled.
Allow bootp:
Next server: this is the ip of your tftp server. You can keep same server or server ip in which you installed tftp server.
Filename: when your client machine asks for ip DHCP server gives the information about both next server and boot file name it should look for.
Then give the remaining options like gateway router, DNS server, NTP server if you want.
Adjust the default lease time and max lease time in my case I kept it as one hour. (Note here time is calculated in seconds).
If you are running multiple servers for this setup you need to have a static IP for all of the servers  so you can bind it using client MAC address.

Now save the file and restart the service.
#Service dhcpd restart
#Chkconfig dhcpd on

Setting up TFTP service:

Install TFTP in RHEL machine.
#Yum install –y tftp*
Now restart the service.
#Service xinetd restart
#Chkconfig tftp on
The folder for keeping all the boot files is /tftpboot/.

Setting up Samba service:

Install Samba in RHEL machine.
#Yum install –y samba*
Create a folder named share under /.
Open the configuration file and add a sample share at the end of the file.

######################################################################
[example]
comment = example
path = /share
public = yes
writable = yes
printable = no
write list  = user
browseable = yes
######################################################################

Add a user named “user” and give a password.
#Useradd user –p <password>
#Smbpasswd –a user
It will ask for password give same password.
Now restart the service.
#Service smb restart
#Chkconfig smb on

Then try to access the share from a Windows machine using samba server IP address. You will be seeing a share named example.

Note:
1.       In case if you are using a windows machine for pxe-booting like windows 7 you can get dhcp service and tftp service installed using “serva” or “solarwinds tftp server” applications and samba share by sharing any folder.
2.       But only drawback you should work hard to make linux machines to boot from windows pxeboot server.

Setting up FTP service:

Install TFTP in RHEL machine.
#Yum install –y ftp*
Now restart the service.
#Service vsftpd restart
#Chkconfig vsftpd on
Open browser and type url as ftp://<IPaddress> it will show pub which is a default folder in ftp. We  can access the pub folder from /var/ftp/pub.

Setting up NFS service:

Install TFTP in RHEL machine.
#Yum install –y nfs*
Now restart the service.
#Service nfs restart
#Chkconfig nfs on
Open file /etc/exports and add an entry for nfs server.
e.g.
#vim /etc/exports
#####################################################################################
/var/ftp/pub/solaris    192.168.11.0/24(rw,sync)
#####################################################################################



Preparing RHEL Server as PXE boot server

Copy the below files to /tftp boot by making respective folders.
# cp /usr/share/syslinux/pxelinux.0 /tftpboot
# cp /usr/share/syslinux/menu.c32 /tftpboot
# mkdir /tftpboot/pxelinux.cfg
# touch /tftpboot/pxelinux.cfg/default

Preparing Windows 7 for Network boot

First install Windows Automated installation kit in any of windows 7 machine and copy the below script to a text file and save it as .bat file (e.g. copy the below script and save it as winpe.bat on your desktop). Run the "Deployment Tools Command Prompt" as administrator (should be located in your start menu).
For installing 32-bit or 64-bit operating system you should run the below script by changing set ARCH in below script to “x86” for 32bit and “amd64” for 64-bit. I recommend “x86”.
#####################################################################################
@echo off
:: This script prepares a Windows 7 image for PXE
:: This assumes you have the WAIK installed
:: Author: Louis A
:: Date: 3/31/2013
:: Modified: 6/26/2013

:: Any modification of this file is strictly on you and is not recommended.
:: Modify only if you know what you're doing.

:: Variables below.
:: The next few reference file and directory paths that are essential
:: Change BASEDIR if you would like a different directory to deploy the PE environment
:: Change ARCH to x86 if you need a 32 Bit PE instead
set WAIKPATH=%ProgramFiles%\Windows AIK
set ARCH=amd64
set BASEDIR=C:\winpe
set PEPATH=%BASEDIR%\winpe_%ARCH%
set TFTPPATH=%BASEDIR%\tftp\Boot
set BCDSTORE=%TFTPPATH%\BCD
:: These were created because of errors that came up (due to missing variable references)
:: Do not remove these, otherwise you'll see errors that may confuse you, even though they're harmless.
set WAIKMISSING=0
set ARCHMISSING=0
set NOTSANE=0
set ERROR=0

:: Checking if we're elevated
net session >nul 2>&1
if %errorLevel%==0 ( echo Admin Success ) else ( set ERROR=2 && goto :exit )

:: Making sure our environment is sane.
:: We need to make sure our working directory is empty. If it's not, we'll empty it and start over.
if not exist "%WAIKPATH%" ( set WAIKMISSING=1 && goto :end )
if not exist "%WAIKPATH%\Tools\PETools\%ARCH%" ( set ARCHMISSING=1 && goto :end )
if not exist "%BASEDIR%" ( md C:\winpe )
if exist "%PEPATH%" ( echo Temporary working directory is not empty! && rd %PEPATH% /S )
if exist "%PEPATH%" ( echo Temporary working directory is still not empty! Are you serious? Trying to delete... again. && cd

"%WAIKPATH%\Tools\%ARCH%" && imagex /unmount %PEPATH%\mount && rd %PEPATH% /S /Q )
if exist "%PEPATH%" ( set NOTSANE=1 && goto :end )
if exist "%TFTPPATH%" ( echo TFTP boot directory is not empty! && rd %TFTPPATH% /S )
if exist "%TFTPPATH%" ( set NOTSANE=1 && goto :end )
if exist "%BCDSTORE%" ( echo BCD store already exists! && del /P %BCDSTORE% )
if exist "%BCDSTORE%" ( set NOTSANE=1 && goto :end )

:: Environment appears to be sane... beginning work.
:: This is the grunt work. Do not change anything below unless you know what you're doing.
cd "%WAIKPATH%\Tools\PETools"
echo "Copying the PE Files"
call copype %ARCH% %PEPATH%
echo "Mounting the PE image with imagex"
:: This was added because I forgot the concept of mounting in Linux :) The folder must exist.
if not exist "%PEPATH%\mount" ( md %PEPATH%\mount )
imagex /mountrw %PEPATH%\winpe.wim 1 %PEPATH%\mount
md %TFTPPATH% > NUL
copy %PEPATH%\mount\Windows\Boot\PXE\*.* %TFTPPATH% > NUL
copy "%WAIKPATH%\Tools\PETools\%ARCH%\boot\boot.sdi" %TFTPPATH% > NUL
copy %PEPATH%\winpe.wim %TFTPPATH% > NUL
bcdedit /createstore %BCDSTORE%
bcdedit /store %BCDSTORE% /create {ramdiskoptions} /d "Ramdisk Options"
bcdedit /store %BCDSTORE% /set {ramdiskoptions} ramdisksdidevice Boot
bcdedit /store %BCDSTORE% /set {ramdiskoptions} ramdisksdipath  \Boot\boot.sdi
for /f "Tokens=3" %%x in ('bcdedit /store %BCDSTORE% /create /d "Windows 7 Installation" /application osloader') do set GUID=%%x
bcdedit /store %BCDSTORE% /set %GUID% systemroot \Windows
bcdedit /store %BCDSTORE% /set %GUID% detecthal Yes
bcdedit /store %BCDSTORE% /set %GUID% winpe Yes
bcdedit /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
bcdedit /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
bcdedit /store %BCDSTORE% /create {bootmgr} /d "Windows 7 Boot Manager"
bcdedit /store %BCDSTORE% /set {bootmgr} timeout 30
bcdedit /store %BCDSTORE% /set {bootmgr} displayorder %GUID%
bcdedit /store %BCDSTORE%
:: This was added because at BCD loading, it will freeze and then complain of missing fonts
md %TFTPPATH%\fonts
copy %PEPATH%\ISO\boot\fonts\*.* %TFTPPATH%\fonts
pause
:: If the command below fails, make sure to use imagex to unmount C:\winpe\winpe_amd64\mount
imagex /unmount mount
goto :exit

:end
:: Environment was not sane.
if %WAIKMISSING%==1 ( echo Your WAIK directory was not found. Execution aborted. && set ERROR=1 && goto :exit )
if %ARCHMISSING%==1 ( echo Architecture is either missing or is not recognized.  && set ERROR=1 && goto :exit )
if %NOTSANE%==1 ( echo Your environment was not clean. Execution aborted. && set ERROR=1 && goto :exit )

:exit
if %ERROR%==1 ( echo There was an error and execution was aborted. )
if %ERROR%==2 ( echo You were not elevated. Please launch an elevated command prompt. )
#####################################################################################
Then go to desktop, in my case.
>Cd “c:\users\administrator\Desktop”
Then run winpxe.bat
>winpxe.bat

Then a folder named winpe will be created in your “C dive” inside there will be boot folder, copy the whole content to /tftpboot/Boot/ of TFTP server.
Now keep both WIN 7 (32 bit, 64 bit) dvd or an iso images and extract the sources folder in /share/WIN7/
It should be like:
#/tftpboot/
                -Boot
#/share/WIN7/
                           -sourcesx86
                            -sourcesx64
Note: you can create booting files for both 32bit or 64 bit, I recommend to keep 32-bit files because if you are keeping 64bit booting files and if you processor is not a 64 bit processor then it will fail at the starting itself. So keep 32 bit boot files and when installing you can change to 64 bit setup.

Next, open the following file and add content.
#Vim /etc/tftpd.map

#####################################################################################
re ^pxeboot\.n12 Boot/pxeboot.n12
re ^pxeboot\.com Boot/pxeboot.com
re ^pxeboot\.0 Boot/pxeboot.n12
re ^bootmgr\.exe Boot/bootmgr.exe
rg \\ /
#####################################################################################
The purpose of this file is that when it is booting it will asks for following files in /tftpboot/ folder but we will tell to search files in /tftpboot/Boot/ and the last statement is to convert all the backward slashes of windows to forward slashes which are compactible for linux.

Then Edit /etc/xinetd.d/tftp and add an entry
It will be as
server_args          = -s /tftpboot
Change it to
server_args          = -m /etc/tftpd.map -s /tftpboot

Finally go to /tftpboot/Boot/ and create two soft links.

#Cd /tftpvoot/Boot
#ln -s pxeboot.n12 startrom.0
#ln -s winpe.wim boot.wim
Then open /tftpboot/pxelinux.cfg/default and add entry as:
######################################################################
default menu.c32
prompt 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000

LABEL Windown7x32x64
MENU LABEL Windown7x32x64
KERNEL Boot/startrom.0

LABEL Boot from HDD
MENU LABEL ^Boot from local disk
LOCALBOOT 0x80
MENU end
######################################################################

Now start the installation in your client machine. Restart the system and keep lan/network boot in the first priority or start boot from network. Then wait for DHCP server to assign IP and then select Windows 7 from PXEMENU.

Then it goes to command prompt.
Then type:
>Net use z: \\<IPaddresss-of-samba-server->\win7
>z:

Here you will find two folders if you type dir. If you want to install 32 bit win7 go to sourceX86 and run setup.exe
Example:
Z:>\sourcesx86\setup.exe

That’s it continue with your installation……..

Preparing Fedora for Network boot

Create the directories to store Fedora 10.
# mkdir -p /var/lib/tftpboot/fedora/12/i386
# mkdir -p /var/lib/tftpboot/fedora/12/amd64
# mkdir -p /srv/install/fedora/12/i386
# mkdir -p /srv/install/fedora/12/amd64 
Mount the Fedora 12 64-bit DVD ISO and copy the kernel and initrd to the previously created location.
# mkdir /mnt/loop
# mount -o loop -t iso9660 /location/of/ISO/Fedora-12-x86_64-DVD.iso /mnt/loop
# cp /mnt/loop/images/pxeboot/vmlinuz /var/lib/tftpboot/fedora/12/amd64
# cp /mnt/loop/images/pxeboot/initrd.img /var/lib/tftpboot/fedora/12/amd64
# cp -R /mnt/loop/* /srv/install/fedora/12/amd64
# umount /mnt/loop 
Mount the Fedora 12 32-bit DVD ISO and copy the kernel and initrd to the previously created location.
# mkdir /mnt/loop
# mount -o loop -t iso9660 /location/of/ISO/Fedora-12-i386-DVD.iso /mnt/loop
# cp /mnt/loop/images/pxeboot/vmlinuz /var/lib/tftpboot/fedora/12/i386
# cp /mnt/loop/images/pxeboot/initrd.img /var/lib/tftpboot/fedora/12/i386
# cp -R /mnt/loop/* /srv/install/fedora/12/i386
# umount /mnt/loop 

Then add Entry in /tftpboot/pxelinux.cfg/default
LABEL Fedora 12 (64-bit)
MENU LABEL Fedora 12 (64-bit)
        KERNEL fedora/12/amd64/vmlinuz
        APPEND method=nfs:10.10.1.10:/srv/install/fedora/12/amd64/ lang=us keymap=us ip=dhcp ksdevice=eth0 noipv6 initrd=fedora/12/amd64/initrd.img
       

Preparing Solaris for Network boot

At your NFS server
Mount the iso file:
# mount  -o loop /sol-10-u9-ga-x86-dvd.iso /mnt

Created and shared file in directory /share/solaris
Create a NFS entry for /share/solaris.
Check required file in your shared directory, place the below mentioned files to in its respective directories by making directories.
Under /tftpboot/ folder should look like this
solarisx86/`-- boot
                        `-- multiboot
                        `-- x86.minirootboot/
boot/`-- grub
                        `-- menu.lst
                        `-- menu1.lst
                        `-- pxegrub.0

label SolarisX86
menu label Install Solaris 10 X86
kernel /boot/grub/pxegrub.0

7. Configure file /tftpboot/boot/grub/menu.lst

######################################################################
default=0
timeout=60
min_mem64 1024
title Oracle Solaris
     kernel$ /solarisx86/boot/multiboot kernel/unix v -m verbose install nfs://192.168.11.66/var/ftp/pub/solaris/jumpstart/config.tar -B install_media=192.168.11.66:/var/ftp/pub/solaris/
     module$ /solarisx86/boot/x86.miniroot
title Oracle Solaris Serial Console ttya
        kernel$ /solarisx86/boot/multiboot kernel/unix -B install_media=192.168.11.66:/var/ftp/pub/solaris/,console=ttya
        module$ /solarisx86/boot/x86.miniroot
title Oracle Solaris Serial Console ttyb (for lx50, v60x and v65x)
        kernel$ /solarisx86/boot/multiboot kernel/unix -B install_media=192.168.11.66:/var/ftp/pub/solaris/,console=ttyb
        module$ /solarisx86/boot/x86.miniroot
################################################################
Get back to NFS server,We still missed config.tar that contain 4 files in /share/solaris/jumpstart (create new dir)

1.      rules file
#cat rules
any - - any_machine -
2.      rules.ok file
]# cat rules.ok
any - - any_machine -
version=2 checksum=num
3.       sysidcfg file
# cat sysidcfg
system_locale=en_US
install_locale=en_US
terminal=vt100
name_service=NONE
network_interface=PRIMARY {protocol_ipv6=no}
security_policy=NONE
timeserver=localhost
4.       any_machine file
# cat any_machine
install_type initial_install
cluster SUNWCXall
package SUNWaccr add
fdisk all solaris all
partitioning explicit
filesys any free /
filesys any 4096 swap
system_type server
5.      Then tar all file

# tar -c rules rules.ok any_machine sysidcfg > /share/solaris/jumpstart/config.tar 

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...