Install OpenBSD On a Strato Root-Server
Updated: 07/15/2005
Disclaimer
Okay, here is a little howto to install OpenBSD Unix on a Strato root-server. If you are impatient, you won't need more than a piece of paper, and a ssh connection. If you got time, you will also need a local installation of OpenBSD to make a bootable installation floppy. ANYHOW, I CAN'T GIVE YOU ANY GUARANTEE THAT THIS WILL WORK! YOU ARE BASICALLY ON YOUR OWN OUT THERE, BUT IF YOU ARE AN ADVANCED BSD-DEVIL, SOME TIPS MIGHT COME IN HANDY.Installation Process
Serial console
First of all, get an account. Strato has the nice feature of a remote serial console, which actually CRIES out for installing a new Operating System. You have to activate it through the web-frontend. Do it, and read the instructions how to access your server.Write down network information
Boot your server into default mode. It is important that you write down all your network information, because somehow the dhcp support failed. DON'T LOSE IT! We will destroy your system a little later. Make sure you have:|
ipadress, broadcast, netmask -> run "ifconfig" hostname -> run "hostname" nameserver, domainname -> run "cat /etc/resolv.conf" defaultrouter -> run "route -n" serial port speed -> run "cat /etc/lilo.conf" |
Backing up
Now it is time to boot up the rescue system. Use the web-frontend to get it. It may take a few minutes until you can type in "reboot" to fire it up. If you want to play it safe, I recommend that you backup the first bytes of /dev/hda, just in case you chicken out, or something goes wrong with the floppy image:| # | dd if=/dev/hda of=harddiskbootimage.img bs=1k count=1440 |
Booting OpenBSD
Now it is time to boot up the rescue system. Use the web-frontend to get it. It may take a few minutes until you can type in "reboot" to fire it up. Anyhow, after it is done, you can write the image of an installation floppy directly to the harddisk. FOR THE IMPATIENT ONES: Use my floppyimage. ALL THE OTHERS: I will tell you later how to build up your own.| # | wget -O- http://www.dettus.net/floppy35_seriell.fs.gz | gzip -d -f >/dev/hda |
Testing the network
First of all, use the shell to setup all the network information you have written down. In my case, the netmask was wrong (255.255.255.255) so I ran into some trouble when I tried to setup up the default route. Don't worry about this, just set it to the 255.255.255.0-value, and everything works out fine. Leave the shell and choose "(I)nstall".Installing
Installing OpenBSD is straightforward, I recommend using the whole harddisk for it. Read http://www.openbsd.org/faq4 for more information, if you like. Use the network information you have written down (and verified *g*) and choose (f)tp as installation medium. Choose whatever package you like, and install it over the net. (This costs traffic, you know?) And wait. And choose your Timezone. <strong>BUT DON'T REBOOT YET!</strong>Setting up OpenBSD for a serial console
After you have installed everything, and the devices are set up, change to/mnt/etc and create a file called "boot.conf":|
# # |
echo "set tty com0" >>/mnt/etc/boot.conf echo "stty com0 57600" >>/mnt/etc/boot.conf |
| # | ed /mnt/etc/ttys |
|
tty00 "/usr/libexec/getty std.9600" unknown off |
|
tty00 "/usr/libexec/getty std.57600" vt220 on secure |
cat /mnt/etc/ttys" to check if the file is broken. If not... hooray!Rebooting your system
After all this trouble you have bin through, you are finally able to reboot your freshly handcrafted OpenBSD-Box. Just type in "reboot", and you'll be set.Setting up your netmask correctly (No guarantee and Strato-specific)
After booting up you may want to be able to reach all the users in your subnet which is impossible if you still have the /24-netmask. You actually need the /32 netmask at strato! So what Kili did was to write the following stuff into hostname.fxp0:|
inet 81.169.133.xxx 0xffffffff !route add 81.169.132.1 -link $if: -interface |
|
81.169.132.1 |
/etc/mygate. Replace 81.169.133.xxx with your ip-address and 81.169.132.1 with your routers. And done!APPENDIX A: Setting up your own bootfloppy
As I told you before here are some tips for making your own bootfloppy: Some of them are quite hazardous, and could be done in a much more proper way. Anyhow, this is how I did it:The simple way
Theoretically it is enough if you download the floppy35.fs from your favourite OpenBSD-mirror and set up a file/etc/boot.conf on it. To do this, mount it:|
# # |
vnconfig svnd0 floppy35_serial.fs mount /dev/svnd0a /mnt |
/etc:| # | mkdir /mnt/etc |
boot.conf" in it:|
# # |
echo "set tty com0" >/mnt/etc/boot.conf echo "stty com0 57600" >>/mnt/etc/boot.conf |
|
# # |
umount /mnt vnconfig -u svnd0 |
|
# # # # # |
mount /dev/fd0c /mnt mkdir /mnt/etc echo "set tty com0" >/mnt/etc/boot.conf echo "stty com0 57600" >>/mnt/etc/boot.conf umount /mnt |
Get src.tar.gz and sys.tar.gz
You need a running installation of OpenBSD at home for this. Get both thesrc.tar.gz and sys.tar.gz packages for this. Install them to /usr/src and /usr/src/sys.Configuring the Kernel
Go to/usr/src/sry/arch/i386/conf and copy the RAMDISK config to RAMDISK.orig. Edit RAMDISK after that (I know, I know...). Comment out the following devices:pckbc0, pckbd* wskbd*, vga0, vga*, pcdisplay0, wsdisplay*, wsdisplay*. That way you make sure that booting the floppy will print out as much as possible on the serial console. NAnT told me, that you also need the option PCIBIOS_INTR_FIXUP_FORCE in your kernel, if you are running into problems with some fxp0 timeout messages.Compiling Crunch
Crunch is a tool needed for the creation of the bootdisks. Go to the directory/usr/src/distrib/crunch and run| # | make ; make install |
Editing the miniroot partition.
Go to/usr/src/distrib/miniroot, and create a file called "boot.conf" with the following entries:|
set tty com0 stty com0 57600 |
/etc/lilo.conf on your rootserver!) Make sure that boot.conf gets onto your disk: Edit the file located in the /usr/src/distrib/i386 directory, called "common". Find the line with "protocols" and duplicate it. After that replace "protocols" with "boot.conf" in one of them.Compilation
Now it is time to build the bootfloppy:|
# # |
cd /usr/src/distrib/i386/ramdiskA make |
floppy35.fs" at your hands. If it complains about some missing ".c"-files, it could be because those files are located somewhere beneath "/usr/src/sys" in the kernel sources. Find them and copy them to where the compilation failed. Re-runMount your floppy
Mount your bootfloppy.|
# # |
vnconfig svnd0 floppy35_serial.fs mount /dev/svnd0a /mnt |
/usr/src/distrib/miniroot/boot.conf to /mnt/etc/boot.conf
|
# # |
mkdir /mnt/etc cp /usr/src/distrib/miniroot/boot.conf |
|
# # |
umount /mnt vnconfig -u svnd0 |
Note: Again: If you keep getting a "fxp0: device timeout" and you are not able to get your network running, try compiling the kernel with "PCIBIOS_INTR_FIXUP_FORCE". (Thank you Markus and Marcus for that hint)
This guide is © 2005 - 2009 thomas dettbarn.
Author: thomas dettbarn
dettus at dettus dot net