Browse Source

some more blogposts

Vincent Truchseß 10 months ago
5 changed files with 363 additions and 1 deletions
  1. +21
  2. +313
  3. +1
  4. +11
  5. +17

+ 21
- 0
blag/gossip-web.adoc View File

@@ -0,0 +1,21 @@
= Ein Gossip-Web
:date: 2019-10-02T16:42:39+02:00
:tags: ssb web meta

Ich habe ja geplant $dinge zu programmieren, um Websiten ins SSB-Netzwerk zu
schieben und Webseiten von dort zu browsen. +
Wia das so ist, hat SSB ja nur eine begrenzte Reichweite die durch den eigenen
Sozialen Graphen definiert wird. Es gibt also keine globale Sichtbarkeit.

Ich stelle mir die Frage, welche auswirkungen ein Web ohne globale sichtbarkeit
hat. Ich kann mir vorstellen, dass neben dem "Ich spiegele meine website in's
SSB" - Usecase auch ein ganz eigenes Biotop von Webseiten entstehen kann. Wenn
ich weiß, meine website kann nur von Menschen, die mir sozial nahe stehen
gesehen werden muss ich mir weniger Sorgen um Herassment oder Ähnliches machen.
Kommt halt immer darauf an, welche Zielgruppe eine Seite erreichen will. +
Für "Alles öffentlich und will aufmerksamkeit" gibt es ja schon das klassische
Web. Für die Niesche könnte ein Gossip-Web das richtige sein. Man stelle sich
vor wie sich Menschen wider gegenseitig erzählen auf was für Webseiten sie
wider gestoßen sind oder Linklisten tauschen... +
Das Internet ist manchmal einfach zu groß um wahr zu sein.

+ 313
- 0
tech/debian-autoinstall.adoc View File

@@ -0,0 +1,313 @@
= Auto-Install your Workstation's OS
VI <>
:date: 2019-10-26T21:10:07+02:00
:tags: linux debian ansible

Somethings about *Debian* we operators love is the possibility to automate the
installation process with a preseed file. +
Another thing we love is *Ansible*, since it makes our lives much easier.

Usually we use these tools to automate the setup of our server systems. But since
servers are just computers, why not apply these tools to the computers we like to
spend so much time in front of.

This post is a guide demonstrating a method how to build your own custom

== The Debian Installer

If you're not familiar with automated Debian installations, here is a little
recap about preseeding the Debian installer.

=== The Preseed File

If you install a Debian system by hand, the installer will ask you a series of
questions about your installation. A preseed file is basically a text file
containing the answers to these questions.
To write a preseed file, download the
link:[example file] and
edit it to your needs. +
There are three ways to use a preseed file during the installation process:
* Including the file in the installation media
* Including the file in the installers initrd
* Downloading the file from a http-server

== Building your own

=== Testing the Preseed File

Before building an iso image you might like to test and modify your preseed file.
To do so I'd recommend to setup a small http-server serving the preseed.cfg your
machine. +
With that in place you can setup a virtual machine, attach the Debian-stabele
netinstall CD and choose `Advanced Options` -> `Automated Installation`. The
installer will prompt you for the url to fetch the preseed file from. +
This way you can modify the file and re-run the installation easily.

=== After the Installation

Usually, you will perform several tasks after a fresh installation. This may
include system settings, copying dotfiles and installing software. Also, if you
are using Debian on a Laptop/Workstation you may want to upgrade the system from
stable to unstable. +
Ansible is the appropriate tool for these postinstall tasks. Since you have just
setup a clean debian VM, you can start a ssh-server in it and use Ansible on the
host system to setup your machine. +

=== Building the Installation Media

The ultimate goal of this guide ia a iso-image you can dd on a usb-stick and
impress your friends how smooth and easy your debian installation goes.

==== Extracting the Installer's Filesystem

First you need to unpack the netinstaller's iso:

mkdir isofs
bsdtar -C isofs -xf debian-netinstall.iso

==== Preparing the playbooks

When upgrading the OS with Ansible, most tasks after the OS-upgrades will fail
due to changes in the python libraries Ansible uses. Therefore the postinstall
playbook must be split into two separate ones. One for the OS upgrade and one for
all other tasks. +
Since these playbooks will be run on the freshly installed machine itself, change
the `host` directives to `localhost`.

To give you an example, here are the playbooks I used:


- name: Setup a working Workstation
hosts: localhost
- name: Check for upgrade state
path: /.testing
register: upgrade_testing
- name: change sources.list to testing
dest: /etc/apt/sources.list
content: |
deb testing main non-free contrib
#deb-src testing main non-free contrib
deb testing-updates main contrib non-free
#deb-src testing-updates main contrib non-free
when: not upgrade_testing.stat.exists
- name: update OS to testing
update_cache: yes
upgrade: dist
when: not upgrade_testing.stat.exists
- name: save upgrade-state
dest: /.testing
content: " "
- name: change sources.list to sid
dest: /etc/apt/sources.list
content: |
deb sid main non-free contrib
#deb-src sid main non-free contrib
- name: update OS to sid
update_cache: yes
upgrade: dist


- name: Setup a working Workstation
hosts: localhost
- name: create getty-override folder
path: /etc/systemd/system/getty@tty1.service.d
state: directory
- name: Setup autologin
dest: /etc/systemd/system/getty@tty1.service.d/override.conf
content: |
ExecStart=-/sbin/agetty --autologin vincent --noclear %I $TERM
- name: install some software
- neovim
- git
- zsh
- firefox
- thunderbird
- awesome
- awesome-extra
- redshift-gtk
- caffeine
- keepassx
- exa
- fzf
- ripgrep
- pdfgrep
- zathura
- zathura-pdf-poppler
- okular
- asciidoctor
- pandoc
- network-manager
- network-manager-gnome
- cbatticon
- pasystray
- pulseaudio
- xorg
- xss-lock
- i3lock
- lxterminal
state: present
- name: create xorg.conf.d
path: /etc/X11/xorg.conf.d
state: directory
- name: Setup Keyboard
dest: /etc/X11/xorg.conf.d/00-keyboard.conf
content: |
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us"
Option "XkbModel" "pc104"
Option "XkbVariant" "altgr-intl"
Option "XkbOptions" "caps:swapescape"
- name: check for zsh installation
path: /usr/bin/zsh
register: zsh
- name: change user shell to zsh
name: vincent
shell: /usr/bin/zsh
when: zsh.stat.exists

==== Deploying Files

Create a folder `rootfs` that includes the file-structure you want to be present
on the freshly installed system. This might for example look like this:

├── home
│   └── vincent
│   ├── .config
│   ├── .gitconfig
│   ├── .oh-my-zsh
│   ├── .vim
│   ├── .vimrc
│   ├── .xinitrc
│   ├── .zprofile
│   └── .zshrc
└── root
├── postinstall2.yml
└── postinstall.yml

Now let's create a `.tar` archive of this folder structure and add it to the
installation media:

cp -r rootfs rootfs.tmp
sudo chown -R root:root rootfs.tmp
sudo chmod 700 rootfs/root
sudo tar -C rootfs.tmp -cf postinstall.tar ./
sudo mv postinstall.tar isofs/
sudo rm -r rootfs.tmp

==== The preseed.cfg

Some modifications have to be made to your `preseed.cfg`. +
First, you need to add `ansible` to the packages to be installed:

# Individual additional packages to install
d-i pkgsel/include string ansible

Secondly, you need to add a `preseed/late_command` directive that unpacks the tar

d-i preseed/late_command string tar -C /target -xf /cdrom/postinstall.tar; \
in-target chown -R vincent:vincent /home/vincent;

Now the preseed-file has to be added to the installer's initrd:

chmod +w -R isofs/install.amd
gunzip isofs/install.amd/initrd.gz
echo preseed.cfg | cpio -H newc -o -A -F isofs/install.amd/initrd
gzip isofs/install.amd/initrd
chmod -R -w isofs/install.amd

==== Generating a new Iso Image

After altering the content of the Image we need to re-calculate the checksums:

chmod +w isofs/md5sum.txt
cd isofs
md5sum `find -follow -type f` > md5sum.txt
chmod -w md5sum.txt
cd ..

Now we can generate a `.iso` image:

sudo genisoimage -quiet -V "preseed-autoinstall" -J -R -r -l -cache-inodes \
-c isolinux/ -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 \
-boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
-o preseed-autoinstall.iso isofs

isohybrid --uefi preseed-autoinstall.iso

Et violá, we have a `.iso` image!

== Installation

Now, dd it on a flashdrive, boot your workstation from it and let the
autoinstaller do it's magic. +
After the first boot simply run the two playbooks:

sudo ansible-playbook /root/postinstall.yml
sudo ansible-playbook /root/postinstall2.yml

Congratulations, you are good to go.

// vim: spell textwidth=81

+ 1
- 1
tech/new-feeds.adoc View File

@@ -4,5 +4,5 @@ VI
:tags: proton rss

Hey there, I have continued the development on *Proton* and added a few new
features. There are now tree distinct link:../fedds.html[RSS-feeds]. Also I have
features. There are now tree distinct link:../feeds.html[RSS-feeds]. Also I have
added link:../tags.html[tags], so you can easily find articles grouped by topic.

+ 11
- 0
tech/saljut.adoc View File

@@ -0,0 +1,11 @@
= Saljut
:date: 2019-10-02T16:15:18+02:00
:tags: saljut ssb

Looks like I've just started a new project. +
*Saljut* is going to be a ssb-web-proxy to publish and browse websites _hosted_
on SSB. +
At the moment I am still working on the
link:../files/whitepaper.html[whitepaper]. This File will be updated from time
to time.

+ 17
- 0
tech/saljut2.adoc View File

@@ -0,0 +1,17 @@
= Saljut II
:date: 2019-10-08T09:16:09+02:00
:tags: saljut ssb clojure

Saljut is now in a state of a working prototype!

The development and communication about it goes mainly over SSB (see
`%rr5HHGlQ+GNk7xwRD7wpofzl3nv/KKzo0Yhjfg+L0yI=.sha256` for more infos). Also
I have mirrored the repository to the regular web

I hope some of you want to try using it and give me feedback about it (If you
publish scuttlesites, please let me know).

This website is now also availale under