Annotated Typescript for: Unofficial Guide How to Install OpenBSD on a 1and1.com Dedicated Server
|
|
This is the typescript for the guide: Unofficial Guide How to Install OpenBSD on a 1and1.com Dedicated Server
Following the Guide, we just booted into debian 2.6 kernel rescue from @
1and1. Here is about what you would see on the serial console:
... snip ...
Debian GNU/Linux 3.1 rescue ttyS0
rescue login: root
Password:
... snip ...
rescue:~# wget http://myutil.com/guides/1and1bsd/cdrom39serial.fs
... snip ...
rescue:~# dd if=cdrom39serial.fs of=/etc/hda bs=64k
45+0 records in
45+0 records out
2949120 bytes transferred in 0.018098 seconds (162951789 bytes/sec)
rescue:~# sync
... snip ...
---[ in your 1and1 control panel reboot to "Normal system". we see: ]---
rescue:~#
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2006 OpenBSD. All rights reserved. http://www.OpenBSD.org
... snip ...
rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02
erase ^?, werase ^W, kill ^U, intr ^C, status ^T
(I)nstall, (U)pgrade or (S)hell? I
Welcome to the OpenBSD/i386 3.9 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.
Terminal type? [vt220] xterm
kbd(8) mapping? ('L' for list) [none]
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.
|
|
Here is the Start of the fdisk drive layout reffered to in the Guide:
Available disks are: wd0.
Which one is the root disk? (or 'done') [wd0]
Do you want to use *all* of wd0 for OpenBSD? [no] y
Putting all of wd0 into an active OpenBSD MBR partition (type 'A6')...wd0: no disk label
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 4294967233
Treating sectors 63-0 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)
> z
> w
> q
No label changes.
ERROR: No root partition (wd0a).
Do you want to use *all* of wd0 for OpenBSD? [no] y
Putting all of wd0 into an active OpenBSD MBR partition (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 234436482
Treating sectors 63-234436545 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)
> a a
offset: [63]
size: [234436482] 1G
Rounding to nearest cylinder: 2097585
FS type: [4.2BSD]
mount point: [none] /
> a b
offset: [2097648]
size: [232338897] 2G
Rounding to nearest cylinder: 4194288
FS type: [swap]
> a d
offset: [6291936]
size: [228144609] 1G
Rounding to nearest cylinder: 2097648
FS type: [4.2BSD]
mount point: [none] /tmp
> a e
offset: [8389584]
size: [226046961] 2G
Rounding to nearest cylinder: 4194288
FS type: [4.2BSD]
mount point: [none] /home
> a f
offset: [12583872]
size: [221852673] 4G
Rounding to nearest cylinder: 8388576
FS type: [4.2BSD]
mount point: [none] /usr
> a g
offset: [20972448]
size: [213464097]
FS type: [4.2BSD]
mount point: [none] /var
> w
> q
No label changes.
Mount point for wd0d (size=1048824k)? (or 'none' or 'done') [/tmp] done
No more disks to initialize.
OpenBSD filesystems:
wd0a /
wd0d /tmp
wd0e /home
wd0f /usr
wd0g /var
The next step *DESTROYS* all existing data on these partitions!
Are you really sure that you're ready to proceed? [no] y
/dev/rwd0a: 2097584 sectors in 2081 cylinders of 16 tracks, 63 sectors
1024.2MB in 7 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0d: 2097648 sectors in 2081 cylinders of 16 tracks, 63 sectors
1024.2MB in 7 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0e: 4194288 sectors in 4161 cylinders of 16 tracks, 63 sectors
2048.0MB in 13 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0f: 8388576 sectors in 8322 cylinders of 16 tracks, 63 sectors
4096.0MB in 26 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/rwd0g: 213464096 sectors in 211770 cylinders of 16 tracks, 63 sectors
104230.5MB in 646 cyl groups (328 c/g, 161.44MB/g, 20608 i/g)
/dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Mon Jun 5 11:57:45 2006)
/dev/wd0e on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Mon Jun 5 11:57:46 2006)
/dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Mon Jun 5 11:57:46 2006)
/dev/wd0f on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Mon Jun 5 11:57:46 2006)
/dev/wd0g on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Mon Jun 5 11:57:46 2006)
|
|
And here is the start of the network configuration reffered to in the Guide:
System hostname? (short form, e.g. 'foo') foo
Configure the network? [yes]
Available interfaces are: vr0.
Which one do you wish to initialize? (or 'done') [vr0]
Symbolic (host) name for vr0? [foo]
The media options for vr0 are currently
media: Ethernet autoselect (100baseTX full-duplex)
Do you want to change the media options? [no]
IPv4 address for vr0? (or 'none' or 'dhcp') dhcp
Issuing hostname-associated DHCP request for vr0.
DHCPDISCOVER on vr0 to 255.255.255.255 port 67 interval 1
DHCPOFFER from 217.160.255.249
DHCPOFFER from 217.160.255.250
DHCPOFFER already seen.
DHCPREQUEST on vr0 to 255.255.255.255 port 67
DHCPACK from 217.160.255.249
bound to 217.160.249.240 -- renewal in 86400 seconds.
IPv6 address for vr0? (or 'rtsol' or 'none') [none]
No more interfaces to initialize.
DNS domain name? (e.g. 'bar.com') [onlinehome-server.com] bar.com
DNS nameserver? (IP address or 'none') [217.160.249.251 195.20.224.99 195.20.224.234]
Use the nameserver now? [yes]
Default IPv4 route? (IPv4 address, 'dhcp' or 'none') [dhcp]
Edit hosts with ed? [no]
Do you want to do any manual network configuration? [no] y
Type 'exit' to return to install.
# route add -llinfo -iface -net 10.255.0.0/16 10.255.255.1 -ifp vr0
add net 10.255.0.0/16: gateway 10.255.255.1
# route add -net default 10.255.255.1
add net default: gateway 10.255.255.1
# ping -c 1 www.yahoo.com
PING www.yahoo.akadns.net (216.109.118.66): 56 data bytes
64 bytes from 216.109.118.66: icmp_seq=0 ttl=56 time=5.722 ms
--- www.yahoo.akadns.net ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 5.722/5.722/5.722/0.000 ms
# exit
Password for root account? (will not echo)
Password for root account? (again)
Let's install the sets!
Location of sets? (disk ftp http or 'done') [disk] http
HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none]
Display the list of known http servers? [yes] n
Server? (IP address, hostname or 'done') www.myfavoritemirror.com
Server directory? [pub/OpenBSD/3.9/i386]
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] base39.tgz
[X] etc39.tgz
[X] misc39.tgz
[X] comp39.tgz
[X] man39.tgz
[X] game39.tgz
[ ] xbase39.tgz
[ ] xetc39.tgz
[ ] xshare39.tgz
[ ] xfont39.tgz
[ ] xserv39.tgz
Set name? (or 'done') [bsd.mp] all
[X] bsd
[X] bsd.rd
[X] bsd.mp
[X] base39.tgz
[X] etc39.tgz
[X] misc39.tgz
[X] comp39.tgz
[X] man39.tgz
[X] game39.tgz
[X] xbase39.tgz
[X] xetc39.tgz
[X] xshare39.tgz
[X] xfont39.tgz
[X] xserv39.tgz
Set name? (or 'done') [done] done
Ready to install sets? [yes] y
Getting bsd ...
100% |**************************************************| 5332 KB 00:00
Getting bsd.rd ...
100% |**************************************************| 4622 KB 00:00
Getting bsd.mp ...
100% |**************************************************| 5374 KB 00:00
Getting base39.tgz ...
100% |**************************************************| 39523 KB 00:11
Getting etc39.tgz ...
100% |**************************************************| 1126 KB 00:00
Getting misc39.tgz ...
100% |**************************************************| 2222 KB 00:00
Getting comp39.tgz ...
100% |**************************************************| 73524 KB 00:13
Getting man39.tgz ...
100% |**************************************************| 7258 KB 00:03
Getting game39.tgz ...
100% |**************************************************| 2538 KB 00:00
Getting xbase39.tgz ...
100% |**************************************************| 10313 KB 00:02
Getting xetc39.tgz ...
100% |**************************************************| 90404 00:00
Getting xshare39.tgz ...
100% |**************************************************| 2029 KB 00:02
Getting xfont39.tgz ...
100% |**************************************************| 32456 KB 00:07
Getting xserv39.tgz ...
100% |**************************************************| 19410 KB 00:02
Location of sets? (disk ftp http or 'done') [done] done
Start sshd(8) by default? [yes]
Start ntpd(8) by default? [no] yes
Do you expect to run the X Window System? [yes] y
Change the default console to com0? [no] y
Available speeds are: 9600 19200 38400 57600 115200.
Which one should com0 use? (or 'done') [9600] 57600
Saving configuration files...done.
Generating initial host.random file...done.
What timezone are you in? ('?' for list) [Canada/Mountain] EST5EDT
Setting local timezone to 'EST5EDT'...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 1960
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.
rebooting...
[ using 493460 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2006 OpenBSD. All rights reserved. http://www.OpenBSD.org
... snip ...
|
|
This is the beginning of section 4. Post Installation Tasks:
You have mail.
Terminal type? [vt220] xterm
# echo inet `ifconfig vr0 | sed -n 's/.*inet \(.*\) netmask.*/\1/p'` 255.255.255.255 NONE > /etc/hostname.vr0
# echo '!route add -llinfo -iface -net 10.255.0.0/16 10.255.255.1 -ifp vr0' >> /etc/hostname.vr0
# echo 10.255.255.1 > /etc/mygate
# route add -llinfo -iface -net 10.255.0.0/16 10.255.255.1 -ifp vr0
add net 10.255.0.0/16: gateway 10.255.255.1
# route add -net default 10.255.255.1
add net default: gateway 10.255.255.1
# ping -c 1 www.yahoo.com
PING www.yahoo.akadns.net (216.109.118.66): 56 data bytes
64 bytes from 216.109.118.66: icmp_seq=0 ttl=56 time=5.722 ms
--- www.yahoo.akadns.net ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 5.722/5.722/5.722/0.000 ms
# lynx -source http://myutil.com/guides/1and1bsd/pf.conf > /etc/pf.conf
# lynx -source http://myutil.com/guides/1and1bsd/ntpd.conf > /etc/ntpd.conf
# pfctl -e -f /etc/pf.conf
#
back to the Guide
|