Thursday, April 17, 2014

Sun Sparc Install solaris with DHCP on Mac OS

Step 1:  Prepare File System

$ hdiutil create -size 1g -type SPARSE -fs HFSX -volname "install" install
$ hdiutil attach install.sparseimage -mountpoint /install


Step 2: Open file ISO

$ open sol-10-u8-ga-x86-dvd.iso

$ df -h
/dev/disk3     2.1Gi  2.1Gi    0Bi   100%        0        0  100%   /Volumes/SOL_10_811_SPARC

Step 3: NFS config

$ sudo vi /etc/exports

/install                  -alldirs -maproot=root
/Volumes/SOL_10_811_X86  -alldirs -maproot=root


Start NFS 
$ sudo nfsd checkexports && sudo nfsd disable
$ sudo nfsd checkexports && sudo nfsd enable


Check export 

$ showmount -e
Exports list on localhost:
/Volumes/SOL_10_811_SPARC             Everyone
/install                            Everyone

Step 4, TFTP

$ sudo vi /System/Library/LaunchDaemons/tftp.plist


[...]
    ProgramArguments
    
        /usr/libexec/tftpd
        -i
        -s
        /install/tftpboot
    
[...]


$ mkdir /install/tftpboot
$ sudo launchctl unload -w /System/Library/LaunchDaemons/tftp.plist
$ sudo launchctl load -w /System/Library/LaunchDaemons/tftp.plist

Test tftp
echo "testing" >/install/tftpboot/testfile
printf "verbose\ntrace\nget testfile\n" | tftp localhost
rm /install/tftpboot/testfile


Step 5 rsync

$ rsync -av /Volumes/SOL_10_811_SPARC/Solaris_10/Tools/Boot/platform
/install/tftpboot/boot_sparc/



View file  
 
TRUNGs-MacBook-Pro:tam lptrung$ cd
/install/tftpboot/boot_sparc/platform/
TRUNGs-MacBook-Pro:platform lptrung$ ls
sun4u    sun4us    sun4v
TRUNGs-MacBook-Pro:platform lptrung$ cd sun4u
TRUNGs-MacBook-Pro:sun4u lptrung$ ls -ltr
total 2584
-rw-r--r--  1 root  wheel  1092272 Aug 23  2011 wanboot
-rw-r--r--  1 root  wheel   221584 Aug 23  2011 inetboot
lrwxrwxrwx  1 root  wheel       34 Aug 23  2011 boot_archive -> ../../../../../boot/sparc.miniroot


Step 6 Config network server

$ ifconfig -a

en1: flags=8863 mtu 1500
    ether 4c:8d:79:e0:59:ac
    inet6 fe80::4e8d:79ff:fee0:59ac%en1 prefixlen 64 scopeid 0x4
    inet 192.168.100.1 netmask 0xffffff00 broadcast 192.168.100.255
    media: autoselect
    status: active
 

Step 7, DHCP with ISC DHCP

$ cat /etc/dhcpd.conf
option domain-name "example.com";
option domain-name-servers 192.168.100.1;
option subnet-mask 255.255.255.0;

ddns-update-style none;
authoritative;
default-lease-time 43200;
max-lease-time 86400;
server-name "servername";

###########SOLARIS SPARC 10 ######################

subnet 192.168.100.0 netmask 255.255.255.0 {
  pool {range 192.168.100.5 192.168.100.254;}
  option routers 192.168.100.1;
}


option space SUNW;
option SUNW.root-mount-options code 1 = text;
option SUNW.root-server-ip-address code 2 = ip-address;
option SUNW.root-server-hostname code 3 = text;
option SUNW.root-path-name code 4 = text;
option SUNW.swap-server-ip-address code 5 = ip-address;
option SUNW.swap-file-path code 6 = text;
option SUNW.boot-file-path code 7 = text;
option SUNW.posix-timezone-string code 8 = text;
option SUNW.boot-read-size code 9 = unsigned integer 16;
option SUNW.install-server-ip-address code 10 = ip-address;
option SUNW.install-server-hostname code 11 = text;
option SUNW.install-path code 12 = text;
option SUNW.sysid-config-file-server code 13 = text;
option SUNW.JumpStart-server code 14 = text;
option SUNW.terminal-name code 15 = text;
option SUNW.root-mount-options "rsize=32768";

group {

        filename "/boot_sparc/platform/sun4u/inetboot";

        vendor-option-space SUNW;

        next-server 192.168.100.1;

        option SUNW.JumpStart-server "191.168.100.1:/Volumes/SOL_10_811_SPARC/Solaris_10/";
        option SUNW.install-server-hostname "191.168.100.1";
        option SUNW.install-server-ip-address 191.168.100.1;
        option SUNW.install-path "/Volumes/SOL_10_811_SPARC";
        option SUNW.root-server-hostname "191.168.100.1";
        option SUNW.root-server-ip-address 191.168.100.1;
        option SUNW.root-path-name "/Volumes/SOL_10_811_SPARC/Solaris_10/Tools/Boot/";

        host v445 {
                hardware ethernet  00:14:4f:a0:c0:dc;
                fixed-address 192.168.100.10;
                option host-name "TT4-V445-A";
                option SUNW.sysid-config-file-server "191.168.100.1:/install/jumpstart";
        }

}


#########END SOLARIS SPARC 10 ################################

subnet 192.168.2.0 netmask 255.255.255.0 {
        option broadcast-address 192.168.2.255;
        option subnet-mask 255.255.255.0;
        option routers 192.168.2.1;
        pool { range 192.168.2.116 192.168.2.254; }
}

host client3 {
  filename "/boot/grub/pxegrub";
  server-name "servername";
  next-server 192.168.2.166;
  hardware ethernet 00:1C:42:C4:CF:1D;
  fixed-address 192.168.2.100;
}
----------------------------------------------------------------------------------------------------

 Test DHCP
$ sudo dhcpd
Listening on BPF/en1/4c:8d:79:e0:59:ac/192.168.100.0/24
Sending on   BPF/en1/4c:8d:79:e0:59:ac/192.168.100.0/24

$sudo /opt/local/sbin/dhcpd -q -f$ ps -ef |grep dhcp
    0   187     1   0  2:25PM ??         0:00.56 /opt/local/sbin/dhcpd -q -f
  501  1815   990   0 10:03AM ttys001    0:00.00 grep dhcp

Note: if dhcpd not start, You can kill -9 ID DHCP and start it

Step 8: Boot Server V890 and boot net dhcp
Testing /pci@8,600000/network@1
Testing /pci@8,600000/SUNW,qlc@2
Testing /pci@9,700000/ebus@1/i2c@1,2e
Testing /pci@9,700000/ebus@1/i2c@1,30
Testing /pci@9,700000/ebus@1/i2c@1,50002e 
  


- Send break load ok mode
  
ok show-nets
ok cd /pci@8,600000/network@1
ok .properties  => find search mac address
ok device-end
ok boot /pci@........:dhcp

Step 9: After install config network ipmp
$ dladm show-dev

$ vi /etc/hostname.bge0
10.151.100.240 netmask + broadcast + group ipmp0 up

$ vi /etc/hostname.bge1
group ipmp0 standby up

$vi /etc/netmasks
10.151.100.192  255.255.255.192

$vi /etc/defaultrouter
10.151.100.193

$ svcadm restart network/physical

After ping test network, if not run please reboot and test ipmp


Step 10: Enable SSH for root
$ vi /etc/ssh/sshd_config
You can change PermitRootLogin yes

$svcadm restart svc:/network/ssh:default

Step 11: Map disk from SAN to server and scan device create ZFS

$echo | format

Use the command to find the newly created drive and load its drivers.
$devfsadm

Check port
luxadm -e port
prtconf -vp | grep wwn
fcinfo hba-port


No comments: