Installation av en brygga


2008-08-21  av ajla


Nu skall vi installera en brygga som kan tex. användas för koppla ihop två nätverk.

Installationen är enkel och snabb. Bryggan har tre nätverkskort, ett för LAN1, ett för LAN2 och ett admin nät. Adminnätet är viktigt då du inte kan connecta till bryggan via någon LAN. Detta är normalt och du skall inte kunna detta heller. Om du kan det har du gjort fel.

Det sitter det en 40 GB disk i denna burken. Först skall vi installera OpenBSD, och ni kommer att märka att vi sätter IP under installationen och att den är inkopplad till ett lokalt nätverk. Detta för att vi kommer hämta ee. Men detta behöver du självklart inte.

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

Welcome to the OpenBSD/i386 4.3 install program.

This program will help you install OpenBSD. At any prompt except password
prompts you can 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, but exiting during an install can leave your
system in an inconsistent state.

Terminal type: [vt220] <enter>
kbd(8) mapping? ('L' for list) [none] sv

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.

# Inside MBR partition 3: type A6 start 63 size 80292807

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


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

device: /dev/rwd0c
type: ESDI
disk: ESDI/IDE disk
label: Maxtor
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total bytes: 38.3G
free bytes: 0.3G
rpm: 3600
16 partitions:
#             size        offset  fstype [fsize bsize  cpg]
   c:         38.3G          0.0G  unused      0     0      
> a a
offset: [63] <enter>
size: [000000000] 1G
Rounding to nearest cylinder: 000000000
FS type: [4.3BSD] <enter>
mount point: [none] /
> a b
offset: [000000000] <enter>
size: [000000000] 512M
Rounding to nearest cylinder: 000000000
FS type: [swap] <enter>
> a d
offset: [000000000] <enter>
size: [000000000] 512M
Rounding to nearest cylinder: 000000000
FS type: [4.3BSD] <enter>
mount point: [none] /var
> a e
offset: [000000000] <enter>
size: [000000000] 512M
Rounding to nearest cylinder: 000000000
FS type: [4.3BSD] <enter>
mount point: [none] /var/log
> a g
offset: [000000000] <enter>
size: [000000000] 2g
Rounding to nearest cylinder: 000000000
FS type: [4.3BSD] <enter>
mount point: [none] /usr
> q
No label changes.
Mount point for wd0a (size=1GB)? (or 'none' or 'done') [/] <enter>
Mount point for wd0d (size=512MB)? (or 'none' or 'done') [/var] <enter>
Mount point for wd0e (size=512MB)? (or 'none' or 'done') [/var/log] <enter>
Mount point for wd0h (size=1GB)? (or 'none' or 'done') [/usr] done
No more disks to initialize.

OpenBSD filesystems:
wd0a /
wd0d /var
wd0e /var/log
wd0g /usr

The next step *DESTROYS* all existing data on these partitions!
Are you really sure that you're ready to proceed? [no] y
/dev/rwd0a:     000000000 sectors in 000000000 cylinders of 16 tracks, 63 sectors
        1024.0MB in 64 cyl groups 
/dev/rwd0d:     000000000 sectors in 4161 cylinders of 16 tracks, 63 sectors
        512.0MB in 13 cyl groups
/dev/rwd0e:     000000000 sectors in 12483 cylinders of 16 tracks, 63 sectors
        512.0MB in 39 cyl groups 
/dev/rwd0g:     000000000 sectors in 20805 cylinders of 16 tracks, 63 sectors
        1024.0MB in 64 cyl groups 
/dev/wd0a on /mnt type ffs
(rw, asynchronous, local, ctime=Fri Aug 15 04:32:41 2008) /dev/wd0d on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Fri Aug 15 04:32:41 2008) /dev/wd0e on /mnt/var/log type ffs
(rw, asynchronous, local, nodev, ctime=Fri Aug 15 04:32:41 2008) /dev/wd0e on /mnt/usr type ffs
(rw, asynchronous, local, nodev, nosuid, ctime=Fri Aug 15 04:32:41 2008)

System hostname (short form, e.g. 'foo'): brygga
Configure the network? [yes] <enter>
Available interfaces are: fxp0, fxp1, fxp2.
Which one do you wish to initialize? (or 'done') [fxp0] <enter>
Symbolic (host) name for fxp0? [fxp0] lan1_if
The media options for fxp0 are currently
      media: Ethernet autoselect (1000baseTX full-duplex)
Do you want to change the media options? [no] <enter>
IPv4 address for fxp0? (or 'none' or 'dhcp') dhcp
Netmask? [255.255.255.0] <enter>
IPv6 address for fxp0? (or 'rtsol' or 'none') [none] <enter>
Available interfaces are: fxp1, fxp2.
Which one do you wish to initialize? (or 'done') [fxp1] <enter>
Symbolic (host) name for fxp1? [fxp1] lan2_if
The media options for fxp1 are currently
      media: Ethernet autoselect (1000baseTX full-duplex)
Do you want to change the media options? [no] <enter>
IPv4 address for fxp1? (or 'none' or 'dhcp') 10.10.10.10
Netmask? [255.255.255.0] <enter>
IPv6 address for fxp1? (or 'rtsol' or 'none') [none] <enter>
Available interfaces are: fxp2.
Which one do you wish to initialize? (or 'done') [fxp2] <enter>
Symbolic (host) name for fxp2? [fxp2] admin_if
The media options for fxp2 are currently
      media: Ethernet autoselect (1000baseTX full-duplex)
Do you want to change the media options? [no] <enter>
IPv4 address for fxp2? (or 'none' or 'dhcp') 10.20.30.230
Netmask? [255.255.255.0] <enter>
IPv6 address for fxp2? (or 'rtsol' or 'none') [none] <enter>
No more interfaces to initilaize.
DNS domain name? (e.g. 'bar.com') [my.domain] Din.domain
DNS nameserver? (IP address or 'none') [none] Dina DNSer (dhcp)
Default IPv4 route? (IP address, 'dhcp' or 'none') Din Gateway (dhcp)
add net default: gateway DIN GATEWAY's IP
Edit hosts with ed? [no] <enter>
Do you want to do any manual network configuration? [no] <enter>
Password for root account? (will not echo) PASSWORD
Password for root account? (again) PASSWORD


Let's install the sets! Location of sets? (cd disk ftp http or 'done') [cd] <enter>
Available CD-ROMs are: cd0.
Which one contains the install media? (or 'done') [cd0] <enter>

Pathname to the sets? (or 'done') [4.3/i386] <enter>
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 labelled '[X]'.

        [X] bsd
        [X] bsd.rd
        [ ] bsd.mp
        [X] base43.tgz
        [X] etc43.tgz
        [X] misc43.tgz
        [X] comp43.tgz
        [X] man43.tgz
        [X] game43.tgz
        [ ] xbase43.tgz
        [ ] xetc43.tgz
        [ ] xshare43.tgz
        [ ] xfont43.tgz
        [ ] xserv43.tgz
Set name? (or 'done') [bsd.mp] -all

        [X] bsd
        [ ] bsd.rd
        [ ] bsd.mp
        [ ] base43.tgz
        [ ] etc43.tgz
        [ ] misc43.tgz
        [ ] comp43.tgz
        [ ] man43.tgz
        [ ] game43.tgz
        [ ] xbase43.tgz
        [ ] xetc43.tgz
        [ ] xshare43.tgz
        [ ] xfont43.tgz
        [ ] xserv43.tgz
Set name? (or 'done') [bsd.mp] bsd

        [X] bsd
        [ ] bsd.rd
        [ ] bsd.mp
        [X] base43.tgz
        [ ] etc43.tgz
        [ ] misc43.tgz
        [ ] comp43.tgz
        [ ] man43.tgz
        [ ] game43.tgz
        [ ] xbase43.tgz
        [ ] xetc43.tgz
        [ ] xshare43.tgz
        [ ] xfont43.tgz
        [ ] xserv43.tgz        
Set name? (or 'done') [bsd.mp] ba*

        [X] bsd
        [ ] bsd.rd
        [ ] bsd.mp
        [X] base43.tgz
        [X] etc43.tgz
        [ ] misc43.tgz
        [ ] comp43.tgz
        [ ] man43.tgz
        [ ] game43.tgz
        [ ] xbase43.tgz
        [ ] xetc43.tgz
        [ ] xshare43.tgz
        [ ] xfont43.tgz
        [ ] xserv43.tgz         
Set name? (or 'done') [bsd.mp] et*

        
Set name? (or 'done') [done] done
Ready to install sets? [yes] <enter>

Getting bsd ...
100% |**************************************************|  5972 KB    00:24    
Getting base43.tgz ...
100% |**************************************************| 41437 KB    02:01    
Getting etc43.tgz ...
100% |**************************************************| 1210  KB    00:06    

Location of sets? (cd disk ftp http or 'done') [done] done

Start sshd(8) by default? [yes] <enter>
Start ntpd(8) by default? [no] <enter>
Do you expect to run the X Window System? [no] <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] Europe/Stockholm
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.
# reboot

syncing disks... done

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

Nu är den minimala grundinstallationen färdig.

:: Fortsätt