lunes, 8 de marzo de 2010

WAN BOOT para sun

He aquí el procedimiento que para configurar un wan boot server y olvidarnos de que el cliente esté en el mismo segmento de red, la ventaja de esto es que usa http para instalar.

Para hacer esto debemos saber si nuestros clientes son capaces de soportar arranque con http, como root en la maquina debelos teclear

#eeprom network-boot-arguments
Si el regresa algo como esto:
network-boot-arguments: data not available
Significa que nuestro servidor es capaz de levantar usando http. Ahora, ya estamos seguros que nuestro server va a levantar usando wanboot, pero debemos configurar nuestro servidor de arranque que es el que se va a encargar de atender las peticiones de http, para bajar el miniroot y así poder levantar.

Primero debemos tener un dvd/cd de Solaris 10 o una imagen iso montada y debemos instalar apache o apache2. (Aquí no se discute como instalar apache).

Una vez instalado apache debemos decidir dónde van a estar nuestros documentos (por así llamarles a los archivos de arranque) y configurarlo en el httpd.conf. Para esto yo decidi ponerlos en /var/apache2/ bajo este directorio esta cgi-bin htdocs y conf.

Debajo de /var/apache2/htdocs debemos crear:

#mkdir wanboot10
#mkdir flashdir
#mkdir config

Una vez hecho esto deberemos crear el miniroot filesystem
cd /cdrom/cdrom0/s0/Solaris_10/Tools
./setup_install_server -w /var/apache2/htdocs/wanboot10/wpath /var/apache2/htdocs/wanboot10/ipath

Este comando depende de la velocidad del sistema, puede tardar hast 45 minutos en crearse deberá aparecer una salida como esta:



Verifying target directory... Calculating the required disk space for the Solaris_10 product Calculating space required for the installation boot image Copying the CD image to disk... Copying Install Boot Image hierarchy... Starting WAN boot Image build Calculating space required for WAN boot Image Copying WAN boot Image hierarchy... 782048 blocks Removing unneeded packages from WAN boot Image hierarchy Creating the WAN boot Image file Image size is 214139904 bytes Copying WAN boot to Image file... 421200 blocks WAN boot Image creation complete The WAN boot Image file has been placed in /var/apache2/htdocs//wanboot10/wpath/miniroot Ensure that you move this file to a location accessible to the web server, and that the WAN boot configuration file wanboot.conf(4) for each WAN boot client contains the entries: root_server= where is an HTTP or HTTPS URL scheme pointing to the location of the WAN boot CGI program root_file= where is the path and file name, relative to the web server document directory, of 'miniroot' You should also make sure you have initialized the key generation process by issuing (once): # /usr/sbin/wanbootutil keygen -m Install Server setup complete

Después de haber hecho este paso debeeremos copiar las reglar de algún jumpstar server tradicional que ya tengamos funcionando, estas reglas hay que copiarlas debajo de /var/apache2/htdocs/config


Poner el wantboot en el los htdocs del servidor web (Ojo depende de la arquitectura que qerramos levantar puede ser sun4u, sun4v etc)

# cd /cdrom/cdrom0/s0/Solaris_10/Tools/Boot/platform/sun4u Server
# cp wanboot /var/apache2/htdocs/wanboot10/

Ahora debemos poner los cg-bin en su lugar
# cd /usr/lib/inet/wanboot/
# cp bootlog-cgi wanboot-cgi /var/apache2/cgi-bin/

Crear el directorio /etc/netboot
# mkdir /etc/netboot
#cd /etc/netboot
vi system.conf
SsysidCF=http:///config
SjumpsCF=http:///config

Debemos ahora crear nuestro wanboot.conf (Ojo las rutas son relativas a la configuración del htdocs y cg-bin en httpd.conf)

boot_file=/wanboot10/wanboot
encryption_type=
signature_type=
server_authentication=no
client_authentication=no
resolve_hosts=
root_server=http:///cgi-bin/wanboot-cgi
root_file=/wanboot10/wpath/miniroot
boot_logger=http:///cgi-bin/bootlog-cgi
system_conf=system.conf



Copiar el miniroot dentro del servidor web
#cd /var/apache2/htdocs/wanboot10/wpath
#cp miniroot /var/apache2/htdocs/wanboot10/


Ahora dentro del directorio /var/apache2/htdocs/config hay que crea el sysidcfg, igual que en un JS normal

Algo como esto:
network_interface=hme0 { primary hostname=bab8 ip_address=10.156.5.12 netmask=255.255.255.0 protocol_ipv6=no default_route=10.156.5.254 }
timezone=US/Central
system_locale=C
terminal=dtterm
timeserver=localhost
name_service=none
security_policy=none





creen un profile debajo del mismo directorio


install_type flash_install
archive_location http:///flashdir/install.flar
partitioning explicit
filesys c0t0d0s0 free /
filesys c0t0d0s1 512 swap

Ojo:
Deshabilitar el checksum
ndd -set /dev/ip ip_lso_outbound 0


Una vez creado el profiles deben crear el rules file (no discutido aquí)

Ya una vez todo configurado deberemos indicarle al cliente a nivel de OBP que como levantar


ok setenv network-boot-arguments host-ip=, router-ip=, subnet-mask=, hostname=foo, file=http://www.example.com/cgi-bin/wanboot-cgi

Una vez hecho esto
ok> boot net install

No hay comentarios:

Publicar un comentario