dettus
Bicycle User
Hey.
Ich hab ne kleine howto geschrieben, wie man bei Strato ein OpenBSD auf einem Rootserver an den Start kriegt:
*** OpenBSD 3.5@ Strato Howto
*** (C)opyleft 2004 by Dettus
*** as of September 4th, 2004
*****************************
0.) 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.
1.) 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.
2.) 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 LOOSE IT!
We will destroy your system a little later.
Make sure you have:
ipadress, broadcast, netmask -> run "ifconfig"
hostname -> run "hostname"
nameserver, dommainname -> run "cat /etc/resolv.conf"
defaultrouter -> run "route -n"
serial port speed -> run "cat /etc/lilo.conf"
Got everything? Great! Check it again... ;-) And watch out that your serial
speed is 57600 if you want to use my bootfloppy!
3.) Backing up
If you want to play it save, I recommend that you backup the first bytes of
/dev/hda, jsut in case you chicken out, or something goes wrong with the floppy
image:
% dd if=/dev/hda of=harddiskbootimage.img bs=1k count=1440
Copy this image via scp to a save location.
4.) 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.
If you want to use my image, you can type in:
% wget -O- http://www.dettus.net/floppy35_seriell.fs.gz | gzip -d -f >/dev/hda
(Its MD5sum is: 1cde7d54182efdfd2fdcfd9b5905ba28)
All your other stuff will be lost on your harddrive. But who needs it anyway?
(If anything goes wrong, you can still replace the first bytes by the backup you
made.)
Boot your computer in normal mode now, and it will show you the familiar OpenBSD
bootprompt. While the kernel boots, you will see a lot of broken characters,
but don't worry, it will drop you off at the famous "(U)pgrade, (I)nstall or
(S)hell" prompt.
5.) 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 brainfucked (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".
6.) 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.
BUT DON'T REBOOT YET!
7.) 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
This will boot up and all the standard output will pe written to the serial
console. The next part is a bit tricky: You have to activate the serial console
for a login. And you will have to use "ed" for that.
% ed /mnt/etc/ttys
Type in numbers to jump through all the lines in the file. Type "1" and press
Enter to go to the first, type "2" to go to the second and so on. Line "19"
contained the following entry at my installation:
tty00 "/usr/libexec/getty std.9600" unknown off
You have to change this. Use the "c" command for that, and type in
tty00 "/usr/libexec/getty std.57600" vt220 on secure
Press Enter and CTRL-D to exit the change mode. Then use "w" to write the file
and "q" to get the hell out of this editor. Other ed commands are "." to show
the contents of the actual line, and "d" to delete a line. Well, better then
nothing!
Use "cat /mnt/etc/ttys" to check if the file is broken. If not... hooray!
8.) 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.
Have fun!
--------------------------------------------------------------------------------
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:
A1.) Get src.tar.gz and sys.tar.gz
You need a running installation of OpenBSD at home for this. Get both the
src.tar.gz and sys.tar.gz packages for this. Install them to /usr/src and
/usr/src/sys.
A2.) 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.
A3.) 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
A4.) 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
(The number "57600" is the baudrate of the serial console, it should match the
value that you have written down from /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.
A5.) Compilation
Now it is time to build the bootfloppy: Go to "/usr/src/distrib/i386/ramdiskA"
and type in "make". When everything works smoothely, you'll have a file called
"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-run
make.
When it's done, move the "floppy35.fs" file to "floppy35_serial.fs" or somethingso that you won't be confused.
A6.) Mount your floppy
Mount your bootfloppy. Type in
% vnconfig svnd0 floppy35_serial.fs
% mount /dev/svnd0a /mnt
and copy /usr/src/distrib/miniroot/boot.conf to /mnt/etc/boot.conf
% mkdir /mnt/etc
% cp /usr/src/distrib/miniroot/boot.conf
and unmount the imagefile
% umount /mnt
% vnconfig -u svnd0
And your bootfloppy is ready!!! Write it onto the harddrive in your rootserver
like I mentioned before.
Have fun with your OpenBSD at Strato!
Ich hab ne kleine howto geschrieben, wie man bei Strato ein OpenBSD auf einem Rootserver an den Start kriegt:
*** OpenBSD 3.5@ Strato Howto
*** (C)opyleft 2004 by Dettus
*** as of September 4th, 2004
*****************************
0.) 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.
1.) 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.
2.) 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 LOOSE IT!
We will destroy your system a little later.
Make sure you have:
ipadress, broadcast, netmask -> run "ifconfig"
hostname -> run "hostname"
nameserver, dommainname -> run "cat /etc/resolv.conf"
defaultrouter -> run "route -n"
serial port speed -> run "cat /etc/lilo.conf"
Got everything? Great! Check it again... ;-) And watch out that your serial
speed is 57600 if you want to use my bootfloppy!
3.) Backing up
If you want to play it save, I recommend that you backup the first bytes of
/dev/hda, jsut in case you chicken out, or something goes wrong with the floppy
image:
% dd if=/dev/hda of=harddiskbootimage.img bs=1k count=1440
Copy this image via scp to a save location.
4.) 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.
If you want to use my image, you can type in:
% wget -O- http://www.dettus.net/floppy35_seriell.fs.gz | gzip -d -f >/dev/hda
(Its MD5sum is: 1cde7d54182efdfd2fdcfd9b5905ba28)
All your other stuff will be lost on your harddrive. But who needs it anyway?

(If anything goes wrong, you can still replace the first bytes by the backup you
made.)
Boot your computer in normal mode now, and it will show you the familiar OpenBSD
bootprompt. While the kernel boots, you will see a lot of broken characters,
but don't worry, it will drop you off at the famous "(U)pgrade, (I)nstall or
(S)hell" prompt.
5.) 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 brainfucked (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".
6.) 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.
BUT DON'T REBOOT YET!
7.) 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
This will boot up and all the standard output will pe written to the serial
console. The next part is a bit tricky: You have to activate the serial console
for a login. And you will have to use "ed" for that.
% ed /mnt/etc/ttys
Type in numbers to jump through all the lines in the file. Type "1" and press
Enter to go to the first, type "2" to go to the second and so on. Line "19"
contained the following entry at my installation:
tty00 "/usr/libexec/getty std.9600" unknown off
You have to change this. Use the "c" command for that, and type in
tty00 "/usr/libexec/getty std.57600" vt220 on secure
Press Enter and CTRL-D to exit the change mode. Then use "w" to write the file
and "q" to get the hell out of this editor. Other ed commands are "." to show
the contents of the actual line, and "d" to delete a line. Well, better then
nothing!
Use "cat /mnt/etc/ttys" to check if the file is broken. If not... hooray!
8.) 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.
Have fun!
--------------------------------------------------------------------------------
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:
A1.) Get src.tar.gz and sys.tar.gz
You need a running installation of OpenBSD at home for this. Get both the
src.tar.gz and sys.tar.gz packages for this. Install them to /usr/src and
/usr/src/sys.
A2.) 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.
A3.) 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
A4.) 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
(The number "57600" is the baudrate of the serial console, it should match the
value that you have written down from /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.
A5.) Compilation
Now it is time to build the bootfloppy: Go to "/usr/src/distrib/i386/ramdiskA"
and type in "make". When everything works smoothely, you'll have a file called
"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-run
make.
When it's done, move the "floppy35.fs" file to "floppy35_serial.fs" or somethingso that you won't be confused.
A6.) Mount your floppy
Mount your bootfloppy. Type in
% vnconfig svnd0 floppy35_serial.fs
% mount /dev/svnd0a /mnt
and copy /usr/src/distrib/miniroot/boot.conf to /mnt/etc/boot.conf
% mkdir /mnt/etc
% cp /usr/src/distrib/miniroot/boot.conf
and unmount the imagefile
% umount /mnt
% vnconfig -u svnd0
And your bootfloppy is ready!!! Write it onto the harddrive in your rootserver
like I mentioned before.
Have fun with your OpenBSD at Strato!