HackMD
  • New!
    New!  “Bookmark” and save your note
    Find a note that's worth keeping or want reading it later? “Bookmark” it to your personal reading list.
    Got it
      • Create new note
      • Create a note from template
    • New!  “Bookmark” and save your note
      New!  “Bookmark” and save your note
      Find a note that's worth keeping or want reading it later? “Bookmark” it to your personal reading list.
      Got it
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Save as template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
      • ODF (Beta)
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
    Menu Sharing Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML ODF (Beta)
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note    
    Published Linked with
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    PuavoOS in a Nutshell ===================== ![](https://i.imgur.com/Zy7J2Ml.png) ## PuavoOS ist selbstkonsistent und rekursiv PuavOS ist ein speziell für Schulen entwickeltes Betriebssystem auf Debian Basis. PuavoOs besteht aus vier Hauptkomponenten: 1. Ein für den Gebrauch in Schulen angepasstes Gnome3-Desktop mit über hundert zusätzliche schulspezifische Applikationen (Engeräte). 2. Ein System um einen Klon der globalen PuavoCloud-Dienste lokal zu hosten und mit zusätzlichen lokalen Diensten zu ergänzen. (PuavoBox). 3. Ein System um "sich selber" ab Quelltexten als Image zu bauen und die so gebauten Images zu verteilen (Buildhost und Imagehost). 4. Ein System, welches ausgehend von jedem PuavoOS-Gerät auf irgendeinem Computer ein "Klon von sich selbst" installieren kann. :::info Diese vier Komponenten sind in jedem Image, also auch auf deinem Laptop, enthalten. In den folgenden Abschnitten wird die dritte Komponenten näher betrachtet. Die anderen Komponenten werden an anderer Stelle behandelt. ::: ## Images bauen und verteilen ### Ein Rundgang durch das Buildsystem :::warning **Ich stelle mein Image mangels Wissen von Puppet und aus anderen Gründen nicht dem offiziellen Buildsystem von Puavo her.** **Siehe weiter unten bei: Software installieren für mein Vorgehen** ::: Alle Tools und Quelltexte zum Bauen und verteilen von Images sind in `/puavo-os/` (z.B. auf deinem Laptop! )zu finden. Mit dem Befehl ``` cd /puvo-os/ ``` wechselst du in das Build-Verzeichnis. Dieses Verzeichnis hat folgende Inhalt: ``` stotz.basil@laptop:/puavo-os$ ls apt-repositories defaults.mk Jenkinsfile LICENSE rules cloud fonts.dir Jenkinsfile.cloud Makefile config fonts.scale Jenkinsfile.i386 parts debs images.json Jenkinsfile.imagebuild README.md stotz.basil@laptop:/puavo-os$ ``` #### Die wichtigsten Verzeichnisse und Dateien ##### Das Verzeichnis `rules` Das Image wird mit [Puppet](https://puppet.com/de) gebaut. Puppet ist ein Tool, welches an Hand von Regeln (rules) den Ziel-Zustand einer Installation beschreibt. Durch die Anwendung dieser Regeln wir die Installtion dann automatisch auf den gewünschten Zustand gebracht. Im Verzeichnis `rules` befinden sich alle diese Regeln. Die Regeln sin hierachisch aufgebaut und die Regel ``` /puavo-os/rules/image/manifests/allinone.pp ``` ist der Startpunkt der aktuellen Images. ##### Verzeichnis `parts` In diesem Verzeichnis befinden sich die Quelltexte aller puavospezifischen Teile (parts), welche dann von Puppet als Debianpakete gebaut und installiert werden. ##### Verzeichnis `debs` Im Verzeichnis `debs` ist das lokale Debian-Repository (debs) indem die während der Bauens generierten Debian-Pakete abgelegt werden. (Aus Platzgründen wurden für das Image die generierten Pakete gelöscht, sie werden beim Buildprozess jedoch automatisch wieder erzeugt.) ##### Datei `Makefile` Das Makefile ##### Datei defaults.mk Diese Datei konfiguriert den Make-Prozess. :::info Es lohnt sich durchaus in diesen Verzeichnissen und Dateien ein wenig herum zu stöbern. ::: :::info Falls du dein eigenes Image basteln willst, kannst du die Puppet-Regeln in `/pusvo-os/rules` an deine Bedürfnisse anpassen. ::: ### Make [Make](https://de.wikipedia.org/wiki/Make) ist ein regelbasiertes standard Unix-Tool zur Instandhaltung beliebiger Projekte. Hier wird der Bau und Verteilung der Images gesteuert. ``` stotz.basil@laptop:/puavo-os$ make help Puavo OS Build System Targets: [build] build all apply-rules apply all Puppet rules build-debs-cloud build Puavo OS (cloud) Debian packages build-debs-parts build Puavo OS Debian packages build-debs-ports build all external Debian packages build-parts build all parts clean clean debs and parts help display this help and exit install install all install-parts install all parts rdiffs make rdiffs for images (uses "rdiff_targets"-variable) rootfs-debootstrap build Puavo OS rootfs from scratch rootfs-image pack rootfs to a squashfs image rootfs-shell spawn shell from Puavo OS rootfs rootfs-sync-repo sync Puavo OS rootfs repo with the current repo rootfs-update update Puavo OS rootfs setup-buildhost some optional setup for buildhost update update Puavo OS localhost upload-debs upload debs to remote archive Variables: debootstrap_mirror debootstrap mirror [http://httpredir.debian.org/debian/] image_dir directory where images are built [/srv/puavo-os-images] images_urlbase Prefix for image urls (https://...) mirror_dir Mirror directory (for images and rdiffs) rootfs_dir Puavo OS rootfs directory [/virtualtmp/opinsys-os/rootfs] stotz.basil@laptop:/puavo-os$ ``` :::info Probier `make help` auf deinem Laptops aus! ::: ## Schritt für Schritt Der Buildhost wird mit `sudo make setup-buildhost` vorbereitet, dann kann das Image mit ``` make rootfs-debootstrap make rootfs-update make rootfs-image ``` gebaut werden. Alle nötigen Schritte zur Verteilung des Image werden mit `make rdiffs` gemacht. ### Die wichtigsten Make-Targets #### make setup-buildhost Installiert und konfiguriert auf deinem Laptop, dass er als Buildhost genutzt werden kann. #### make rootfs-debootstrap Führt ein (angepasstes) `debootstrap` durch. #### make rootfs-update Baut das Image von "scratch" aus den Quellen und vom standart Debian-Repo mit Hilfe der puppet-rules in `/puavo-os/rules` : * Die Linux-Kernel werden kompiliert und in einem lokalen Debian-Repo in `/puavo-os/debs/` abgelegt. * Alle gepatchten Debian-Pakete und alle puavo-Pakete werden kompiliert und im lokalen Debian-Repo in `/poav-os/debs/` abgelegt * Dann wird das komplette System aus dem lokalen Debian-Repo und den standard Debian-Repos im chroot gebaut und konfiguriert. #### make rootfs-image Komprimiert das chroot als `squashfs` #### make rdiffs Erstellt alle für einen Imagehost gebrauchten Dateien in einem Verzeichnis. Dieses Verzeichnis wird auf einem Webserver im Internet freigegeben. #### make rootfs-shell Öffnet eine root-shell im aktuellen chroot. ### DIY: Baue selber das aktuelle Image! :::info Damit das funktionieren kann muss dein Laptop mindestens 128GByte RAM haben. Da es das ziemlich wahrscheinlich nicht hat, wird der Prozess (irgendwo bei `make rootfs-update`) mit wegen des fehlenden Diskplatz abgebrochen. Opinsys baut ihre Images jedoch so, sie benutzen einen Rechner mit 128GByte RAM. Wird das Image auf einer HD/SSD gebaut, dauert der Vorgang viele Stunden. Aus dem RAM kann es aber in einer Stunde gebaut werden. Ich habe meine (hier beschriebenen) Versuche mit 8GByte RAM gemacht. ::: :::warning Um diese Experimente durchzuführen brauchst du einen root-Zugang zum Laptop. (Am einfachsten geht's indem du die Befehle am Terminal des Rechners eingibst, von dem du dich per ssh angemeldet hast.) ::: #### Richte das Grundsystem ein Bereite deinen Laptop mit `make setup-buildhost` vor und führe `make rootfs-debootstrap` aus. Wenn das Make-Target fertig gestellt ist, kannst du mit `make rootfs-shell` dein frisch gebautes rootfs ansehen. Mit Cntrl-D (oder `exit`) kommst du wieder zurück. :::info Beachte, dass die ganze Verzeichnisse deines Laptops, incl. des Verzeichnis `/puavo-os/`, schon vorhanden sind. Es lohnt sich auch die Inhalte einzelner Verzeichnisse anzusehen... ::: #### Baue das PuavoOS Du kannst jetzt mit `make rootfs-update` versuchen das System fertig zu bauen. :::info Oooops! Falls du keinen Monster-Laptop hast, ist hier Ende der Stange. Hier lohnt es sich trotzdem wieder mit `make rootfs-shell` ins rootfs zu wechseln und z.B. den Inhalt des lokalen Debian-Repository im `/puavo-os/debs/.archive/`-Verzeichnis anzusehen, evtl. sind da schon frisch gebaute Pakete drin. ::: ##### Wie weiter? Du kannst jetzt natürlich dein Laptop mit 128GByte RAM aufmotzen oder du modifizierst den Make-Prozess so, dass statt im RAM von der HD/SSD (mit 128GByte freiem Speicherplatz) läuft: 1. Erstelle ein Verzeichnis `/home/buildhost/`, (oder falls du ein User-Login hast, das Verzeichnis `~/buildhost/`). 2. Kopiere `/puavo-os/` in dein `buildhost/`-Verzeichnis. (Alternativ kannst du dir auch mit `git clone https://github.com/puavo-org/puavo-os.git` eine aktuellere Version für dein `buildhost/`-Verzeichnis holen.) 3. Passe die Pfade (`rootfs_dir, image_dir, mirror_dir`) in `default.mk` so an, dass sie sich alle in deinem `buildhost/`-Verzeichnis befinden. 4. Passe den Webproxy `squid` so an, dass sein Cache in deinem `buildhost/`-Verzeichnis liegt. 5. `make rootfs-update`

    Import from clipboard

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.
    All
    • All
    • Team
    No template found.

    Create a template

    Delete template

    Do you really want to delete this template?

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in via Google

    New to HackMD? Sign up

    Help

    Documents

    Tutorials
    YAML Metadata
    Slide Example
    Book Example

    Contacts

    Talk to us
    Report an issue
    Send us email

    Cheatsheet

    Example Syntax
    Header # Header
    • Unordered List
    - Unordered List
    1. Ordered List
    1. Ordered List
    • Todo List
    - [ ] Todo List
    Blockquote
    > Blockquote
    Bold font **Bold font**
    Italics font *Italics font*
    Strikethrough ~~Strikethrough~~
    19th 19^th^
    H2O H~2~O
    Inserted text ++Inserted text++
    Marked text ==Marked text==
    Link [link text](https:// "title")
    Image ![image alt](https:// "title")
    Code `Code`
    var i = 0;
    ```javascript
    var i = 0;
    ```
    :smile: :smile:
    Externals {%youtube youtube_id %}
    LaTeX $L^aT_eX$

    This is a alert area.

    :::info
    This is a alert area.
    :::

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub

        Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully