Installation NanoBSD für Soekris/ALIX Appliances
Aus HC Services
Inhaltsverzeichnis |
Installation Nanobsd fuer Soekris/ALIX Appliances
Buildhost erstellen
- Installation Freebsd
- Falls mehrere, oder große Images nötig sind, bitte zuerst hier schauen: Nanobsd auf einer separaten Partition erstellen
- /usr/src erstellen und per csup aktualisieren (Achtung csup ab Freebsd 7 im Basisystem enthalten)
Kernel Konfiguration verändern
# cd /usr/src/sys/i386/conf # cp GENERIC ROUTER # vi ROUTER #(anpassen)
System Updaten
http://www.freebsd.org/doc/en/books/handbook/makeworld.html
Pakete auf Buildhost installieren
# pkg_add -r <paketname> oder # cd /usr/ports/pfad/zu/paket && make install clean
Nanokonfiguration vorbereiten
cd /usr/src/tools/tools/nanobsd
- Pakete extrahieren
# mkdir Pkg && cd Pkg # pkg_create -Rb <paketname gemaess pkg_info>
- Dateien, die nicht standardmäßig installiert werden, hinzufügen (z.B. fehlende termcap)
# cd ../Files # tar -cf - /usr/share/misc/termcap | tar -xf -
Erstellen der Konfigurationsdatei
# cd .. && vi nanobsd.conf
Erstellen des Images
sh nanobsd.sh -c nanobsd.conf
Flashen des Images auf CF Karte
# dd if=/usr/obj/nanobsd.full/_.disk.full of=/dev/<usbdrive> bs=64k
Einbau und Boot
- Wichtig: bei Soekris Boxen vorher die Konsolenübertragung im Bios von 19200 auf 9600 Baud setzen
[STRG]-p im Bios Prompt set ConSpeed=9600 reboot
Konfiguration NanoBSD
Passwort ändern
# ./change_password
SSH Hostkeys permanent speichern
# ./save_sshkeys
Systemspezifische Konfiguration
# mount /cfg # touch /cfg/rc.conf # man rc.conf(5) # vi /cfg/rc.conf
andere Konfigfiles: (Bsp. ppp.conf)
# mkdir /cfg/ppp/ && touch /cfg/ppp/ppp.conf # vi /cfg/ppp/ppp.conf (Beispiele) # reboot
Achtung: Alle Dateien die in /cfg angelegt wurden sind dann in /etc und werden geladen
Aktualisieren Nanobsd
Binary Update
- als root auf Buildhost anmelden
- aktualisieren /usr/src mittels csup
- Kernel Update
# vi /usr/src/sys/i386/conf/<FILE>
- Dateien hinzufügen
# cd /usr/src/tools/tools/nanobsd/Files # tar -cf - /pfad/zu/datei | tar -xf -
- Konfigurationsfile ändern
# cd /usr/src/tools/tools/nanobsd # vi <konfig>.nano
- neues Image erstellen
# cd /usr/src/tools/tools/nanobsd
komplettes rebuild
# sh nanobsd.sh -c <konfig>.conf
'make buildkernel, install und cust_*
# sh nanobsd.sh -w -c <konfig>.conf
'make buildworld', install und cust_*
# sh nanobsd.sh -k -c <konfig>.conf
Nur install und cust_*
# sh nanobsd.sh -b -c <konfig>.conf
Image auf Nanohost übertragen
mittels nc(1)
- auf Buildhost
# nc -l 8888 < /usr/obj/nanobsd.full/_.disk.image # NICHT _.disk.full nehmen!!!
- auf Nanohost
# nc buildhost 8888 | sh updatep2 # Für Update auf Slice 2 # reboot # Nächster Boot ist Slice 2
mittels ssh(1)
- auf Nanohost
# ssh buildhost 'cat /usr/obj/nanobsd.full/_.disk.image' | sh updatep2 # Für Update auf Slice 2 # reboot # Nächster Boot ist Slice 2
Fehlerprüfung
- Wenn ein Fehler aufgetreten ist
- reboot und im Bootprompt wieder (fehlerfreien) Slice 1 auswählen
- Update Fehler beheben und Vorgang wiederholen
- Wenn kein Fehler aufgetreten ist
- Vorgang von Slice 2 aus wiederholen, nur diesmal updatep1 verwenden
- (reboot)