OpenBSD 3.5 bei Strato

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!
 
*g* gesprochen wie ein angewandter paranoider.
ich haette auch gerne die originalquellen benutzt, aber leider funzte das nicht, weil die openbsd-bootfloppies standardmaessig auf 9600 baud eingestellt sind, strato aber 57600 erwartet.
die äs, die er mir ausgeworfen hatte waren da leider ueberhaupt nicht hilfreich... also hab ich mir ne floppy gebastelt, die ins netz gepackt und beschrieben wie ich die gebaut hab. probleme damit?
 
Das ist keine Pyschose sondern Sicherheitsaspekt. Nicht persönlich nehmen, dettus.
("angewandte paranoia" gibt es nicht *g*)

Wo liegt das Problem, wenn Deine Anleitung funktioniert, man nach Appendix A vorgeht und bootfloppy aus Originalquellen herstellt? !
 
Die Anleitung sollte doch eigentlich auf für FreeBSD gehen, oder? Ich weiß ich weiß, ist ein openbsd thread, aber nur kurz mal ne Zwischenfrage.
Eigentlich sollte es doch keine Unterschiede geben bis zum Bootfloppy, gibbet ein FBSD Bootfloppy mit den von Strato erforderlichen 57600?

Thx
 
theoretisch gehts, falls eine einzige bootfloppy bei freebsd ausreicht... oder halt nen bootfaehiges iso-image nehmen und dass nach /dev/hda schreiben.
freebsd hab ich bisher nur ein einziges mal installiert, von daher musst du selbst gucken.
 
Klingt alles recht geil hier werd es vieleicht mal mit NetBSD ausprobieren wenn ich ein paar euro über hab.

Wenn man irgendwie einen fehler macht, kann man dann das standard image von strato (suse oder debian) wieder draufspielen lassen?

p.s.: ein deutsches howto wäre auch nett gewesen ;)
 
Das mit dem Default-Image ist natürlich jeder Zeit kostenlos möglich, einzig die Dauer die hierfür eingeplant werden muss ist schonmal unterschiedlich. Vor einiger Zeit habe ich das 2x machen lassen- einmal warens knapp 3h einmal über 24h.

Die serielle Konsole ist jedoch definitiv ein sehr nettes Werkzeug das man zumindest bei vielen anderen Anbietern entweder gänzlich vermissen oder erst per kostenpflichtiger Option hinzukaufen kann.
 
Strato war noch NIE das gelbe vom Ei! Was ich da im Laufe der Jahre an Geschichten zu gehört habe, das ist fast wie Telekom zu ihren besten Zeiten :-). Wie das heute inzwischen ist, weiss ich aber nicht, das ist alles bereits eine Weile her.

Gruß, I.MC
 
Wer ist denn bitte schön noch das "Gelbe vom Ei"? Sowohl bei zb 1&1 wie auch bei hosteurope werde ich definitiv nie wieder Kunde- dahingehend bin ich von Strato [zumindest noch] recht angetan. Davon ab- gehts doch im dasprovisorium um webspace- nicht um Server. Wer auf guten Service wert legt und willig ist über 100¤ im Monat zu berappen geht halt zb zu bytecamp- der hat aber dann natürlich Strato und Konsorten eh von vornherein ausgeschlossen- und käme nie auf solch abwägige Gedanken ;)
 
@mjjb, I.MC, martin -> offtopic

Eure Providerdiskussion hat nichts mit dem Thema zu tun.
 
@dettus
Liest Du Mailinglist misc@openbsd.org? Dort ärgern sich die Leute, daß OpenBSD nicht auf Strato-Dedis installierbar ist, mit Verweis auf diesen Thread :)

P.S.
Soll nicht bewertend sein. Ich habe keinen Strato-Server und habe die Inst. nicht ausprobiert.
 
Zuletzt bearbeitet von einem Moderator:
Nihil schrieb:
@dettus
Soll nicht bewertend sein. Ich habe keinen Strato-Server und habe die Inst. nicht ausprobiert.

Warum sollte das auch bewertend sein???
Es geht um die Installation von OpenBSD-current.
Ausserdem halte ich es für möglich, dass unterschiedliche Mainboards
zum Einsatz kommen...
 
Sicherlich. In diesem Fall geht es um _zwei_ nic - fxp0 und fxp1.
In der Mailinglist weiterzulesen...
 
In misc@ gab's einen Reply, dass es eventuell an der PS/2 Maus
liegt, die an dem gleichen IRQ 12 dranhaengt wie die dual-fxp Karte.

Ich wuerde gerne von NaNT wissen, ob es geholfen hat?

Wenn man es ueberhaupt schafft, Strato dazu zu bewegen,
die Maus in dem BIOS abzuschalten...
 
@dettus: Mal ne ganz blöde Frage. Warum hast du eigentlich mit ner bootdisk gearbeitet wenns mir ner bootfähigen ISO angäblich auch funkt?
 
Zuletzt bearbeitet:
@SierraX: Ist doch kein Unterschied, das fxp-Treiber ist auf beiden drauf.

@NaNt: Vielleicht laeuft es jetzt besser? Es gab ein Paar
Aenderungen an der /sys/dev/pci/if_fxp_pci.c in der letzten Zeit:

----------------------------
revision 1.31
date: 2004/09/20 04:24:00; author: brad; state: Exp; lines: +3 -2
enable code to disable dynamic standby mode on 82550's

ok beck@
----------------------------
revision 1.30
date: 2004/09/18 20:31:45; author: beck; state: Exp; lines: +2 -1
new fxp variant, noticed by freebsd
ok brad@
----------------------------
revision 1.29
date: 2004/09/16 02:56:22; author: brad; state: Exp; lines: +30 -19
- for the generic 82557 PCI ID also print the chip name if we have an 82558
or newer.
- rearrange PCI IDs a bit.
- eliminate setting the FXPF_HAS_RESUME_BUG flag now that we have support
to disable dynamic standby.

ok deraadt@ mcbride@ mickey@
 
Zurück
Oben