Custom Search
Bloggers Activos
Dani people's vaio chilicuil
Una Canción Triste vendaval
¡Lo hemos conseguido! der_teufel
Log continuacion del curso de BD.. rnstux
F.A.Q. del borracho mandrake
Logotipo de Apple mandrake
Hola mundo en 366 lenguajes de programación mandrake
Descargando videos de Youtube como todo un master chilicuil
Impedir ataques de dic. por ssh mandrake
Log de la platica de BD en IRC rnstux
Last Download
Segunda Fundación
Segunda Fundación
Continuación del Curso de DB
rnstux
FreeBSD hacking (Kernel Modules Programming)
vendaval
ZFS - A Smashing Hit
asarch
Primer Curso de BD en IRC
rnstux
Powered by Blender!
rnstux
Seguimiento de Cuba...
vendaval
Screencast
aarkerio
Nokia liberará a Symbian
asarch
Salva un libro
aarkerio
Bolsa de trabajo
asarch
Google Groups Karamelo
Visit this group
GNU/Linux
GNU/Linux
Hacktivismo
Hacktivismo
Debian
Debian
NetBSD
NetBSD
WWW
WWW
Guia Linux
Guia Linux
Server Side
Server Side
Ofimatica
Ofimatica
Despabilando...
Despabilando...
Mundo Maya
Mundo Maya
Literatura
Literatura
Agora
Agora
Psicologia
Psicologia
Economia
Economia
Ambientalismo
Ambientalismo
Desarrollo
Desarrollo
Biologia
Biologia
Ubuntu: Linux fácil
Ubuntu: Linux fácil

Hacktivism

LinuxChix button

NetBSD \ Instalar OpenBSD 3.7
NetBSD
Instalar OpenBSD 3.7

Este artículo ha sido consultado en 1,029 ocasiones.

OpenBSD 3.7


Tabla de contenidos



Introducción

Al hablar de la configuración por omisión del sistema base, OpenBSD es el sistema operativo más seguro del mundo. Sin embargo, no hay razones para que un Debian, o incluso Mandriva, alcancen el mismo nivel de seguridad, si caen en las manos adecuadas. Por otro lado, algunas personas opinan que SE linux es más seguro y más escalable que OpenBSD.

Pero dejemos que otros discutan: OpenBSD es una excelente sabor de BSD, rápido, pequeño, modular y terriblemente lógico. A diferencia de otros proyectos (tanto de Linux como de BSD), OpenBSD no hace concesiones al newbie, no es un club elitista... pero es un club, y sólo la tarjeta de ser un usuario con experiencia y autodidacta puede permitirle el ingreso. Pero no se preocupe, como ya dijimos, OpenBSD es un sistema muy lógico y si usted está leyendo esto es porque seguramente ya posee los hábitos que necesita para dominar este sistema.

El equipo de OpenBSD libera una nueva versión cada seis meses, siendo las fechas tentativas el 1 de mayo y el primero de noviembre de cada año. OpenBSD 3.7 fue liberada el 19 de mayo del 2005.

Lo que sigue es una demostración de una instalación de OpenBSD 3.7 en un equipo x86. La instalación puede variar según la arquitectura que se trate, pero por lo general una búsqueda en Google arroja luz si surge algún problema. (Esta misma instalación ha sido probada con un equipo Sparc Station5, con procesador sparc y disco duro SCSI).

El ejemplo supone un equipo donde OpenBSD será el único sistema operativo en el disco, de modo que todo lo que tenga en él será eliminado. Por supuesto OpenBSD puede estar en un equipo con Linux o Windows, pero el tema del booteo dual no se cubre aquí.

Nota: Este tutorial asume un usuario que es nuevo en OpenBSD pero no nuevo en sistemas tipo Unix (Linux, FreeBSD, etc.). La experiencia en equipos Unix es indispensable para instalar y trabajar con OpenBSD.

Este es el hardware que utilicé:

  • CPU: AMD Athlon 1GHz
  • RAM: 128MB
  • HD: 40GB IDE SEAGATE
  • CD-ROM: LG 32X
  • FD: 1.44MB
  • NIC: 3Com 3059 10/100 Ethernet Card
  • Monitor: HP S70
  • Tarjeta gráfica: nVidia TNT 8MB
  • Sonido: ninguno

1 - Obteniendo OpenBSD

OpenBSD es un proyecto cuya principal fuente de ingresos se encuentra en la venta de CDs y camisetas. Por este motivo no existen imagenes ISO como las de Linux, en las cuales está el instalador, la documentación y todos los paquetes necesarios. En lugar de ello se puede descargar el instalador, bootear con él, particionar y descargar los set de paquetes que se requieren. Como supongo que usted sólo desea probar OpenBSD y conocerlo, esto es lo que haremos en este ejemplo. No obstante, si eventualmente encuentra útil OpenBSD (y dado que usted es un buen tipo ;-) ), le animamos a adquirir un souvenir de OpenBSD y apoyar a este interesante proyecto. En México, la empresa Compugraf vende los CD's y las camisetas para apoyar.

2 - El instalador

Si su equipo ya tiene sus ayeres y no bootea desde CD-ROM, deberá descargar una imagen fs y copiarla a un floppy. Existen diferentes imagenes para bootear los diferentes tipos de sistemas: laptops, desktop, server. Vaya a a la página de descargas de OpenBSD 3.7 para ubicar la imagen que le corresponde.

Si está usando una PC típica probablemente debe descargar esta imagen.
Para pasar la imagen al floppy desde un Windows XP, necesitará el programa ntrw.exe. Luego de descargarlo, cree el floppy con el siguiente comando:

ntrw floppy37.fs a:

Para crear el floppy desde Linux:

$ cp floppy37.fs /dev/fd0

3 - Iniciando la instalación

Bien, ahora bootearemos con nuestro floppy o CD. Recuerde tener el cable de red conectado a la tarjeta. Esta conexión será configurada durante la instalación para ser usada al momento de ir por los sets que necesitaremos. Recuerde que en los sistemas BSD los discos duros IDE se nombran como wd0,wd1,wd2 y no hda, hdb, hdc.

La primera pantalla del instalador es como sigue, el texto en rojo es lo que debe teclear. (Mi teclado está en inglés pero si el suyo es español o latinoamericano, deberá responder "yes" a la pregunta Do you wish to select a keyboard encoding table? y seleccionar la opción es:

erase ^?, werase ^W, kill ^U, intr ^C, status ^T
(I)nstall, (U)pgrade or (S)hell? i

Welcome to the OpenBSD/i386 3.7 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>
Do you wish to select a keyboard encoding table? [no] <enter>

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
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>
Do you want to use *all* of wd0 for OpenBSD? [no] y
Putting all of wd0 into an active OpenBSD MBR partion (type 'A6')...done.

You will now create an OpenBSD disklabel inside the OpenBSD MBR
partition. The disklabel defines how OpenBSD splits up the MBR partition
into OpenBSD partitions in which filesystems and swap space are created.

The offsets used in the disklabel are ABSOLUTE, i.e. relative to the
start of the disk, NOT the start of the OpenBSD MBR partition.

disklabel: no disk label
WARNING: Disk wd0 has no label. You will be creating a new one.

# using MBR partition 3: type A6 off 63 (0x3f) size 53464257 (0x32fccc1)

Treating sectors 65-53464320 as the OpenBSD portion of the disk.
You can use the 'b' command to change this.



4 - Particionado

El instalador entra automáticamente a la herramienta de particionado. Para ver las particiones actuales teclee p m. Luego de hacer esto, veo que mi disco ya tiene 6 particiones (la partición C es especial y no cuenta):

Initial label editor (enter '?' for help at any prompt)
> p m

device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: WDC WD273BA
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 53464320
free sectors: 0
rpm: 3600

16 partitions:
# size offset fstype [fsize bsize cpg]
a: 80.2M 0.0M 4.2BSD 2048 16384 162
b: 300.2M 80.2M swap
c: 26105.6M 0.0M unused 0 0
d: 80.2M 380.5M 4.2BSD 2048 16384 164
e: 80.2M 460.7M 4.2BSD 2048 16384 164
g: 2048.0M 540.9M 4.2BSD 2048 16384 328
h: 23516.7M 2588.9M 4.2BSD 2048 16384 328

Usted puede ver otro tipo de particiones, dependiendo de lo que su disco hubiese tenido anteriormente. Sea como sea, ahora debo borrar todas las particiones con la indicación d (de del):


> d a
> d b
> d d
> d e
> d g
> d h
> p m
device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: WDC WD273BA
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 53464320
free sectors: 0
rpm: 3600

16 partitions:
# size offset fstype [fsize bsize cpg]
a: 26105.6M 0.0M unused 0 0

Ahora crearemos las particiones que serán usadas para instalar OpenBSD con la indicación a (de add). Recuerde que la partición C no se usa. Luego de concluir debo escribir los cambios al disco con w y salirme del particionador con q. El instalador me pregunta de nuevo los punto de montaje, por si quiero cambiar algo, pero como no es asi, escribo "done" y enter. Luego me hará la pregunta definitiva, contesto y y empieza el formateo del disco duro:

 

> a a
offset: [63] <enter>
size: [53464257] 640m
FS type: [4.2BSD] <enter>
mount point: [none] /
> a b
offset: [1310400] <enter>
size: [52153920] 300m
FS type: [swap] <enter>
> a d
offset: [1925280] <enter>
size: [51539040] 640m
FS type: [4.2BSD] <enter>
mount point: [none] /tmp
> a e
offset: [3235680] <enter>
size: [50228640] 640m
FS type: [4.2BSD] <enter>
mount point: [none] /var
> a g
offset: [4546080] <enter>
size: [48918240] 16g
FS type: [4.2BSD] <enter>
mount point: [none] /usr
> a h
offset: [38100384] <enter>
size: [15363936] <enter>
FS type: [4.2BSD] <enter>
mount point: [none] /home
> w
> q
No label changes.
Mount point for wd0d (size=320k)? (or none or done) [/tmp] done <enter>
Mount point for wd0e (size=320k)? (or none or done) [/var] done <enter>
Mount point for wd0g (size=16777018k)? (or none or done) [/usr] done <enter>
Mount point for wd0h (size=9954000k)? (or none or done) [/home] done <enter>
Mount point for wd0d (size=320k)? (or none or done) [/tmp] done <enter>
No more disks to initialize.

OpenBSD filesystems:
wd0a /
wd0d /tmp
wd0e /var
wd0g /usr
wd0h /home

The next step *DESTROYS* all existing data on these partitions!
Are you really sure that you're ready to proceed? [no] y
  
/dev/rwd0a: 1310336 sectors in 1300 cylinders of 16 tracks, 63 sectors
639.8MB in 4 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0d: 1310400 sectors in 1300 cylinders of 16 tracks, 63 sectors
639.8MB in 4 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0e: 1310400 sectors in 1300 cylinders of 16 tracks, 63 sectors
639.8MB in 4 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0g: 33554304 sectors in 33288 cylinders of 16 tracks, 63 sectors
16383.9MB in 102 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0h: 15363936 sectors in 15242 cylinders of 16 tracks, 63 sectors
7501.9MB in 47 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Sun Jan 10 21:
50:36 2005)
/dev/wd0h on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid,
ctime=Sun Jan 10 21:50:36 2005)
/dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid,
ctime=Sun Jan 10 21:50:36 2005)
/dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Su
n Oct 10 21:50:36 2005)
/dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid,
ctime=Sun Jan 10 21:50:36 2005)


5 - Configuración de la red

En los BSD las interfaces de red no se llaman eth0 sino que el nombre del dispositivo varia según el módulo del kernel que las controle, lo cual es muy útil para identificarlas y al momento de compilar el kernel. En este ejemplo la tarjeta es sis0, el equipo es parte del segmento 192.168.1.0 y sale a Internet a través del gateway en 192.168.1.254:



System hostname (short form, e.g. 'foo'): longhorn
Configure the network? [yes] <enter>
Available interfaces are: sis0.
Which one do you wish to initialize? (or 'done') [sis0] <enter>
Symbolic (host) name for sis0? [openbsd] <enter>
The media options for sis0 are currently
media: Ethernet autoselect (100baseTX full-duplex)
Do you want to change the media options? [no] <enter>
IP address for sis0? (or 'none' or 'dhcp') 192.168.1.7
Netmask? [255.255.255.0] <enter>
No more interfaces to initilaize.
DNS domain name? (e.g. 'bar.com') [my.domain] longhorn.unam.mx
DNS nameserver? (IP address or 'none') [none] <enter the ip for your nameserver here>
Default IPv4 route? (IP address, 'dhcp' or 'none') 192.168.1.254
add net default: gateway 192.168.1.254
Edit hosts with ed? [no] <enter>
Do you want to do any manual network configuration? [no] <enter>
Password for root account? (will not echo) IL0veUnics
Password for root account? (again) IL0veUnics



6 - Instalación de los sets

Ahora el instalador pregunta donde encontrará los sets o "partes" que se requieren para instalar OpenBSD. Existen varios mirrors FTP con los paquetes asi que elegire FTP como el protocolo de descarga:

You will now specify the location and names of the install sets you want to
load. You will be able to repeat this step until all of your sets have been
successfully loaded. If you are not sure what sets to install, refer to the
installation notes for details on the contents of each.

Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape
device; or a (f)tp, (n)fs or (h)ttp server.
Where are the install sets? f
HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] <enter>
Display the list of known ftp servers? [yes] y

En este punto una lista de servidores FTP aparecerán, elija uno cerca de usted (el de Buffalo-USA, es bastante rápido). A continuación verá una lista de los sets disponibles. En este ejemplo, voy a instalarlos todos con all:



Server? (IP address, hostname, list# or 'done') [q] 61
Using ftp5.usa.openbsd.org/pub/OpenBSD Redwood City, CA, USA
Server? (IP address, hostname , list#, 'done' or '?') [ftp5.usa.openbsd.org] <enter>
Does the server support passive mode ftp? [yes] <enter>
Server directory? [pub/OpenBSD/3.7/i386] <enter>
Login? [anonymous] <enter>
The following sets are available. Enter a filename, 'all' to select
all the sets, or 'done'. You may de-select a set by prepending a '-'
to its name.

[X] bsd
[X] bsd.rd
[ ] bsd.mp
[X] base36.tgz
[X] etc36.tgz
[X] misc36.tgz
[X] comp36.tgz
[X] man36.tgz
[X] game36.tgz
[ ] xbase36.tgz
[ ] xetc36.tgz
[ ] xshare36.tgz
[ ] xfont36.tgz
[ ] xserv36.tgz

File Name? (or 'done') [bsd.mp] all

The following sets are available. Enter a filename, 'all' to select
all the sets, or 'done'. You may de-select a set by prepending a '-'
to its name.

[X] bsd
[X] bsd.rd
[X] bsd.mp
[X] base36.tgz
[X] etc36.tgz
[X] misc36.tgz
[X] comp36.tgz
[X] man36.tgz
[X] game36.tgz
[X] xbase36.tgz
[X] xetc36.tgz
[X] xshare36.tgz
[X] xfont36.tgz
[X] xserv36.tgz

File Name? (or 'done') <enter>
Ready to install sets? [yes] <enter>
Getting bsd ...
100% |**************************************************| 5232 KB 00:26
Getting bsd.rd ...
100% |**************************************************| 4614 KB 00:25
Getting bsd.mp ...
100% |**************************************************| 5285 KB 00:23
Getting base36.tgz ...
100% |**************************************************| 31396 KB 02:39
Getting etc36.tgz ...
100% |**************************************************| 1655 KB 00:08
Getting misc36.tgz ...
100% |**************************************************| 2193 KB 00:14
Getting comp36.tgz ...
100% |**************************************************| 18232 KB 01:36
Getting man36.tgz ...
100% |**************************************************| 6792 KB 00:30
Getting game36.tgz ...
100% |**************************************************| 2536 KB 00:12
Getting xbase36.tgz ...
100% |**************************************************| 10121 KB 00:51
Getting xetc36.tgz ...
100% |**************************************************| 430 KB 00:03
Getting xshare36.tgz ...
100% |**************************************************| 1888 KB 00:10
Getting xfont36.tgz ...
100% |**************************************************| 31742 KB 02:41
Getting xserv36.tgz ...
100% |**************************************************| 15460 KB 01:26

Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape
device; or a (f)tp, (n)fs or (h)ttp server.
Where are the install sets? (or 'done') [done] <enter>

Son algo así como 140 MB de descarga. Se tarda unos 25 minutos. Por supuesto si no desea el ambiente gráfico, no descargue los sets para las X. Ahora finalizamos la instalación:

Start sshd(8) by default? [yes] <enter>
Do you expect to run the X Window System? [yes] <enter>
Change the default console to com0? [no] <enter>
Saving configuration files......done.
Generating initial host.random file ......done.
What timezone are you in? ('?' for list) [Canada/Mountain] ? America/Los_Angeles
Setting local timezone to 'America/Los_Angeles' ...done.
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 63; inode block 24, offset 1704
using MBR partition 3: type 166 (0xa6) offset 63 (0x3f)
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.
# halt
syncing disks... done

The operating system has halted.
Please press any key to reboot.

Retire el CD o el floppy de la unidad y reinicie

!Diviértase!.

Nota: Ahora puede instalar programas como Apache, PostgreSQL, etcétera. Tenga presente que OpenBSD hace un uso extensivo del chroot para enjaular programas, esto incrementa la seguridad pero dificulta un poco la administración, por ejemplo, puede que los scripts de Python no se conecten con PostgreSQL si coloca el host como "localhost" pero si lo hagan cuando lo hace con 127.0.0.1. Esto sucede porque la configuración que se ubica en el directorio /etc no afecta a las instancias chrooteadas. Si no está muy enterado de qué es y cómo funcionas chroot lea está página

Última actualización: 2007-04-29 10:57:00-05

Printable version

Add comment:



Captcha




Que estas haciendo?
chilicuilchilicuil está:
bambi, bambi, te espero
3 hours, 20 minutes ago

starkadstarkad está:
ayer lo baje y estuve jugando el wesnoth, deja le agarro la onda y vemos
5 hours, 41 minutes ago

chilicuilchilicuil está:
entonces que pedo, quien se rifa la reta de wesnoth conmigo?
18 hours, 3 minutes ago

rnstuxrnstux está:
downloading
18 hours, 13 minutes ago

rnstuxrnstux está:
buscaminas???
18 hours, 13 minutes ago

vendavalvendaval está:
Nexuiz..umm..downloading
18 hours, 45 minutes ago

Que estuvimos haciendo >>
Chipotle Software

Uso OpenOffice.org
Una vez a la semana
Nunca
Uso otra ofimática
Todos los días
Una vez al mes
Rapiditas
Problemas de Lenguaje en niños
13569 lecturas
Anticoncepción de Emergencia
11324 lecturas
Sexualidad infantil y juvenil
11005 lecturas
Rompiendo cualquier clave WEP en unos pocos minutos
8563 lecturas
Sinapsis y exocitosis
8030 lecturas
Mi primer CakePHP, mmmmm cakeee
6276 lecturas
Evolución filética en las hepáticas
5887 lecturas
BASH y Primeros Comandos
4853 lecturas
CakePHP II Active Record
4611 lecturas
Cómo convertirse en hacker
4206 lecturas
Add to Technorati Favorites

ir arriba
La sencillez y naturalidad son el supremo y último fin de la cultura. F. Nietzsche

The Queen is here Mozilla Firefox The Best DataBase CakePHP Framework XHTML GNU Hacker Chipotle Software

Too Cool for Internet Explorer