Instalación básica de OpenBSD
Introducción
Completar
¿Que es la instalación?
Completar
Instalación básica de OpenBSD
Lo primero que necesitamos a la hora de instalar OpenBSD http://www.openbsd.org/, es bajar desde el mirror (http://www.openbsd.org/ftp.html http://www.openbsd.org/ftp.html) más cercano la imagen booteable de OpenBSD http://www.openbsd.org/, el archivo cd41.iso (el numero varia, según la versión -STABLE en ese momento), luego de tener el CD BOOTEABLE, también podemos bajar los paquetes de instalación (y demás):
CKSUM MD5 base40.tgz bsd bsd.mp bsd.rd cdboot cdbr cdemu40.iso comp40.tgz etc40.tgz game40.tgz man40.tgz misc40.tgz pxeboot xbase40.tgz xetc40.tgz xfont40.tgz xserv40.tgz xshare40.tgz
Una vez que ya tenemos los 2 CD´s ponemos el CD BOOTEABLE en la lectora iniciamos la PC (obviamente con el booteo desde el CDROM habilitado) y nos va aparecer algo así:
rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02 erase ^?, werase ^W, kill ^U, intr ^C, status ^T (I)nstall, (U)pgrade or (S)hell? i <-- Seleccionamos i de Install
(I)nstall = Instala el Sistema completamente (U)pgrade = Actualiza el Sistema actuamente instalado (esta opcion es genial) (S)hell = Te da la opción de reparar o modificar algo del Sistema actual
Luego de seleccionar (i) aparecerá algo como esto:
Welcome to the OpenBSD/i386 4.0 install program.
This program will help you install OpenBSD in a simple and rational way. At
any prompt except password prompts you can run a shell command by typing
'!foo', or escape to a shell by typing '!'. Default answers are shown in [[]]'s
and are selected by pressing RETURN. At any time you can exit this program by
pressing Control-C and then RETURN, but quitting during an install can leave
your system in an inconsistent state.
Specify terminal type: [[vt220]] Enter <-- Acá seleccionamos el tipo de terminal
kbd(8) mapping? ('L' for list) es Enter <-- Acá el tipo de teclado, en nuestro caso es(pañol)
Después de ese paso continuamos con el siguiente donde ya nos pregunta si estamos seguros de lo que vamos hacer, si tenemos backup de todo nuestros datos, etc…
IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this program can cause SIGNIFICANT data loss. It is often helpful to have the installation notes handy. For complex disk configurations, relevant disk hardware manuals and a calculator are useful. Proceed with install? [[no]] y <-- Obviamente ponemos que y (Si)
Ahora vamos a empezar a “tocar” los discos:
Cool! Let's get to it... You will now initialize the disk(s) that OpenBSD will use. To enable all available security features you should configure the disk(s) to allow the creation of separate filesystems for /, /tmp, /var, /usr, and /home. Available disks are: wd0. Which one is the root disk? (or done) [[wd0]] Enter <-- Acá decimos que disco vamos a usar para instalar OpenBSD y como esto no es GNU/Linux el disco primario se llama wd0 (lo que en GNU/Linux seria hda)
Luego de seleccionar nuestro disco (wd0) pasamos a otra pregunta importante:
Do you want to use *all* of wd0 for OpenBSD? [[no]] yes Enter <-- Deseamos usar TODO el disco para instalar OpenBSD? obvio que SI.
Si tienen dos o mas discos que quieren usar para poner distintas particiones del sistema en cada uno, primero deberan elegir el root disk y al terminar el proceso de formateo, le preguntara si quieren seguir formateando los demas discos que que tengan en el sistema. Ahora empezamos con las particiones, esto es todo un tema, porque muchas personas suelen separar varios directorios en particiones, en mi caso, solo lo separo en 3 /, /home y /var, seria algo así:
> p m <-- Primero vemos la información del disco y las particiones q tiene
device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: ST320011A
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 39102336
free sectors: 36030960
rpm: 3600
# size offset fstype [[fsize|bsize cpg]]
a: 17593.2M 1498.7M unused 0 0
c: 19092.9M 0.0M unused 0 0
Luego vamos ajustar unos detalles:
> d a <-- Eliminamos la particion a (ahora solo quedaria "c" como el disco ENTERO)
> a a <-- Creamos (con la "a" creamos una partición) la partición "a"
offset: [[3069360]] Enter
size: [[36030960]] 2g <-- De 2 Gb
Rounding to nearest cylinder: 307440
FS type: [[4.2BSD]] Enter <-- Con el FS de BSD
mount point: [[none]] / <-- Lo montamos como /
> a b <-- Creamos la partición "b" ("b" = swap)
offset: [[3376800]] Enter
size: [[35723520]] 300m <-- De 300 Megas
Rounding to nearest cylinder: 614880
FS type: [[swap]] Enter <-- Como Swap (Partición de intercambio)
> a e <-- Creamos una partición "e"
offset: [[4237632]] Enter
size: [[34862688]] 300m <-- De 300 Megas
Rounding to nearest cylinder: 164304
FS type: [[4.2BSD]] Enter <-- Con el FS de BSD
mount point: [[none]] /var <-- Con el punto de montaje /var (donde se suele cargar el servidor Web)
> a d <-- Creamos una partición "d"
offset: [[16984800]] Enter
size: [[22115520]] 4g <-- De 4 Gb
Rounding to nearest cylinder: 8388576
FS type: [[4.2BSD]] Enter <-- Con el FS de BSD
mount point: [[none]] /home <-- Lo montamos en /home para el uso de nuestros (o el usuario) usuarios
> p m <-- Volvemos a ver el disco y las particiones
device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: ST320011A
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 39102336
free sectors: 22115520
rpm: 3600
Nuestras particiones quedarían algo así (no le den importancia al tamaño que aparece ahí, es solo demostrativo).
# size offset fstype [[fsize|bsize cpg]]
a: 2G 1498.7M 4.2BSD 2048 16384 16 # /
b: 300.2M 1648.8M swap
c: 19092.9M 0.0M unused 0 0
d: 4G 1949.1M 4.2BSD 2048 16384 16 # /home
e: 300.2M 2069.2M 4.2BSD 2048 16384 16 # /var
> q <-- Ponemos "q" para salir
Write new label?: [[y]] Enter <-- Ponemos que SI (y) guardar los cambios
Ahora el paso siguiente es confirmar la eliminación de TODOS los datos y formateo de la unidad de disco (y particionado):
(no le den importancia al tamaño que aparece ahí, es solo demostrativo)
Mount point for wd0e (size=82152k)? (or 'none' or 'done') [[/var]] Enter
Mount point for wd0d (size=4194288k)? (or 'none' or 'done') [[/home]] Enter
No more disks to initialize.
OpenBSD filesystems:
wd0a /
wd0d /home
wd0e /var
The next step *DESTROYS* all existing data on these partitions!
Are you really sure that you're ready to proceed? [[no]] y <-- Confirmamos que borre y formatee TODO.
/dev/rwd0a: 307440 sectors in 305 cylinders of 16 tracks, 63 sectors
150.1MB in 1 cyl groups (306 c/g, 150.61MB/g, 19328 i/g)
/dev/rwd0d: 245952 sectors in 244 cylinders of 16 tracks, 63 sectors
120.1MB in 1 cyl groups (244 c/g, 120.09MB/g, 15360 i/g)
/dev/rwd0e: 164304 sectors in 163 cylinders of 16 tracks, 63 sectors
80.2MB in 1 cyl groups (164 c/g, 80.72MB/g, 10368 i/g)
/dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Sat Oct 7 19:49:44 2
006)
/dev/wd0d on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid, ctime=S
at Oct 7 19:49:44 2 006)
/dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Sa
t Oct 7 19:49:44 2006)
Bueno, ya pasó lo peor, ahora vienen algunas configuraciones:
Enter system hostname (short form, e.g. 'foo'): puffy <-- Ponemos nuestro Hostname
Configure the network? [[yes]] Enter <-- Ponemos que queremos configurar la RED
Available interfaces are: fxp0 xl0. <-- Nos muestra las interfaces disponibles
Which one do you wish to initialize? (or 'done') [[fxp0]] xl0 <-- Tu Nic
Symbolic (host) name for fxp0? [[puffy]] Enter <-- Con que hostname inicializar la interface
The default media for fxp0 is
media: Ethernet autoselect (100baseTX full-duplex)
Do you want to change the default media? [[no]] Enter
IPv4 address for fxp0? (or 'dhcp') 199.185.137.55 <- Nuestra IP o DHCP
Netmask? [[255.255.255.0]] Enter <-- Aceptamos la Netmask
IPv6 address for fxp0? (or 'rtsol' or 'none') [[none]] Enter <-- Ponemos que NO queremos una IP x IPv6
Available interfaces are: fxp0.
Which one do you wish to initialize? (or 'done') [[fxp0]] Enter <-- Iniciamos con la interface fxp0
Symbolic (host) name for fxp0? [[puffy]] Enter <-- Con que hostname inicializar la interface
The media options for fxp0 are currently
media: Ethernet autoselect (10baseT)
Do you want to change the media options? [[no]] Enter
IPv4 address for fxp0? (or 'none' or 'dhcp') dhcp <-- Obtenemos la direccion IP por DHCP
Issuing hostname-associated DHCP request for fxp0.
DHCPDISCOVER on fxp0 to 255.255.255.255 port 67 interval 1
DHCPOFFER from 73.34.136.1
DHCPREQUEST on fxp0 to 255.255.255.255 port 67
DHCPACK from 73.34.136.1
bound to 69.241.244.76 -- renewal in 1800 seconds.
IPv6 address for fxp0? (or 'rtsol' or 'none') [[none]] Enter <-- Ponemos que NO queremos una IP x IPv6
No more interfaces to initialize.
DNS domain name? (e.g. 'bar.com') [[my.domain]] openbsderos.org <-- Ponemos nuestro Dominio
DNS nameserver? (IP address or 'none') [[68.87.77.130|68.87.72.130]] Enter
Use the nameserver now? [[yes]] Enter <-- Confirmamos los DNS
Default route? (IP address, 'dhcp' or 'none') [[dhcp]] Enter <-- Selecc. que obtenga la IP por DHCP
Edit hosts with ed? [[no]] Enter <-- Ponemos que NO queremos editar los HOST
Do you want to do any manual network configuration? [[no]] Enter
Ahora seleccionamos la contraseña de root:
Password for root account? (will not echo) pAssWOrd <-- Ponemos el password Password for root account? (again) pAssWOrd <-- La confirmamos
Ahora pasamos a instalar los paquetes “básicos” del sistema:
Let's install the sets! Location of sets? (cd disk ftp http or 'done') [[cd]] Enter Available CD-ROMs are: cd0. <-- Nos dice que CD-ROMs estan disponibles Available CD-ROMs are: cd0. Which one contains the install media? (or 'done') [[cd0]] Enter Pathname to the sets? (or 'done') [[4.0/i386]] Enter <- El PATH donde están los paquetes
Ahora seleccionamos los paquetes a instalar:
Select sets by entering a set name, a file name pattern or 'all'. De-select
sets by prepending a '-' to the set name, file name pattern or 'all'. Selected
sets are labeled '[[x]]'.
[[X]] bsd
[[X]] bsd.rd
[[|]] bsd.mp
[[X]] base40.tgz
[[X]] etc40.tgz
[[X]] misc40.tgz
[[X]] comp40.tgz
[[X]] man40.tgz
[[X]] game40.tgz
[[|]] xbase40.tgz
[[|]] xetc40.tgz
[[|]] xshare40.tgz
[[|]] xfont40.tgz
[[|]] xserv40.tgz
Set name? (or 'done') [[bsd.mp]] all <-- "all" para instalar todos.
base40.tgz para instalar solo base40.tgz
o
-base40.tgz para desinstalar base40.tgz y asi con los que querramos.
[[X]] bsd
[[X]] bsd.rd
[[X]] bsd.mp
[[X]] base40.tgz
[[X]] etc40.tgz
[[X]] misc40.tgz
[[X]] comp40.tgz
[[X]] man40.tgz
[[X]] game40.tgz
[[X]] xbase40.tgz
[[X]] xetc40.tgz
[[X]] xshare40.tgz
[[X]] xfont40.tgz
[[X]] xserv40.tgz
Set name? (or 'done') [[done]] Enter <-- Done para terminar y empezar la instalación
Ready to install sets? [[yes]] Enter <-- yes para instalar los paquetes
Getting bsd ...
100% |**************************************************| 5904 KB 00:09
Getting bsd.rd ...
100% |**************************************************| 4889 KB 00:03
Getting bsd.mp ...
100% |**************************************************| 5952 KB 00:03
Getting base40.tgz ...
100% |**************************************************| 40675 KB 00:33
Getting etc40.tgz ...
100% |**************************************************| 1133 KB 00:01
Getting misc40.tgz ...
100% |**************************************************| 2233 KB 00:02
Getting comp40.tgz ...
100% |**************************************************| 77933 KB 01:03
Getting man40.tgz ...
100% |**************************************************| 7427 KB 00:07
Getting game40.tgz ...
100% |**************************************************| 2548 KB 00:02
Getting xbase40.tgz ...
100% |**************************************************| 10341 KB 00:08
Getting xetc40.tgz ...
100% |**************************************************| 90762 00:00
Getting xshare40.tgz ...
100% |**************************************************| 2027 KB 00:03
Getting xfont40.tgz ...
100% |**************************************************| 32455 KB 00:25
Getting xserv40.tgz ...
100% |**************************************************| 19418 KB 00:16
Location of sets? (cd disk ftp http or 'done') [[done]] Enter <-- Done una vez terminada la instalación
Ahora seleccionamos algunos servicios al inicio de nuestro OpenBSD:
Start sshd(8) by default? [[yes]] y <-- Ponemos que SI al inicio de ssh
Start ntpd(8) by default? [[no]] y <-- Ponemos que SI al inicio de ntpd (para no llegar nunca tarde)
Do you expect to run the X Window System? [[no]] y <-- Ponemos que SI vamos a necesitar X Window
Change the default console to com0? [[no]] Enter <-- Ponemos que SI a com0 como consola predeterminada
Saving configuration files......done.
Generating initial host.random file ......done.
What timezone are you in? ('?' for list) [[Canada/Mountain]] America/Buenos_Aires
Setting local timezone to 'America/Buenos_Aires'...done.
Y finalmente:
Making all device nodes...done. Installing boot block... boot: /mnt/boot proto: /usr/mdec/biosboot device: /dev/rwd0c /usr/mdec/biosboot: entry point 0 proto bootblock size 512 /mnt/boot is 3 blocks x 16384 bytes fs block shift 2; part offset 3069360; inode block 152, offset 4136 using MBR partition 1: type 166 (0xa6) offset 3069360 (0x2ed5b0) done. CONGRATULATIONS! Your OpenBSD install has been successfully completed! To boot the new system, enter halt at the command prompt. Once the system has halted, reset the machine and boot from the disk. <-- Ya tenemos TODO instalado y listo # halt <-- Ponemos "halt" para terminar syncing disks... done The operating system has halted. Please press any key to reboot.
Aquí podemos ver un video de una rápida instalación de OpenBSD (en mucho menos de 5 minutos!):
Instalación de OpenBSD en menos de 5 minutos.