It has been a while since my last update. Since last summer, I -have worked on a Norwegian -docbook version of the 2004 book -Free Culture by Lawrence Lessig, -to get a Norwegian text explaining the problems with the copyright -law. Yesterday, I finally broken the 90% mark, when counting the -number of strings to translate. Due to real life constraints, I have -not had time to work on it since March, but when the summer broke out, -I found time to work on it again. Still lots of work left, but the -first draft is nearing completion. I created a graph to show the -progress of the translation:
- -When the first draft is done, the translated text need to be -proof read, and the remaining formatting problems with images and SVG -drawings need to be fixed. There are probably also some index entries -missing that need to be added. This can be done by comparing the -index entries listed in the SiSU version of the book, or comparing the -English docbook version with the paper version. Last, the colophon -page with ISBN numbers etc need to be wrapped up before the release is -done. I should also figure out how to get correct Norwegian sorting -of the index pages. All docbook tools I have tried so far (xmlto, -docbook-xsl, dblatex) get the order of symbols and the special -Norwegian letters ÃÃÃ wrong.
- -There is still need for translators and people with docbook -knowledge, to be able to get a good looking book (I still struggle -with dblatex, xmlto and docbook-xsl) as well as to do the draft -translation and proof reading. And I would like the figures to be -redrawn as SVGs to make it easy to translate them. Any SVG master -around? There are also some legal terms that are unfamiliar to me. -If you want to help, please get in touch with me, and check out the -project files currently available from -github.
- -If you are curious what the translated book currently look like, -the updated -PDF -and -EPUB -are published on github. The HTML version is published as well, but -github hand it out with MIME type text/plain, confusing browsers, so I -saw no point in linking to that version.
+ +Continuing my research into mesh networking, I was recommended to +use TP-Link 3040 and 3600 access points as mesh nodes, and the pair I +bought arrived on Friday. Here are my notes on how to set up the +MR3040 as a mesh node using +OpenWrt.
+ +I started by following the instructions on the OpenWRT wiki for +TL-MR3040, +and downloaded +the +recommended firmware image +(openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin) and +uploaded it into the original web interface. The flashing went fine, +and the machine was available via telnet on the ethernet port. After +logging in and setting the root password, ssh was available and I +could start to set it up as a batman-adv mesh node.
+ +I started off by reading the instructions from +Wireless +Africa, which had quite a lot of useful information, but +eventually I followed the recipe from the Open Mesh wiki for +using +batman-adv on OpenWrt. A small snag was the fact that the +opkg install kmod-batman-adv command did not work as it +should. The batman-adv kernel module would fail to load because its +dependency crc16 was not already loaded. I +reported the bug to +the openwrt project and hope it will be fixed soon. But the problem +only seem to affect initial testing of batman-adv, as configuration +seem to work when booting from scratch.
+ +The setup is done using files in /etc/config/. I did not bridge +the Ethernet and mesh interfaces this time, to be able to hook up the +box on my local network and log into it for configuration updates. +The following files were changed and look like this after modifying +them:
+ +/etc/config/network
+ ++ +config interface 'loopback' + option ifname 'lo' + option proto 'static' + option ipaddr '127.0.0.1' + option netmask '255.0.0.0' + +config globals 'globals' + option ula_prefix 'fdbf:4c12:3fed::/48' + +config interface 'lan' + option ifname 'eth0' + option type 'bridge' + option proto 'dhcp' + option ipaddr '192.168.1.1' + option netmask '255.255.255.0' + option hostname 'tl-mr3040' + option ip6assign '60' + +config interface 'mesh' + option ifname 'adhoc0' + option mtu '1528' + option proto 'batadv' + option mesh 'bat0' ++ +
/etc/config/wireless
++ +config wifi-device 'radio0' + option type 'mac80211' + option channel '11' + option hwmode '11ng' + option path 'platform/ar933x_wmac' + option htmode 'HT20' + list ht_capab 'SHORT-GI-20' + list ht_capab 'SHORT-GI-40' + list ht_capab 'RX-STBC1' + list ht_capab 'DSSS_CCK-40' + option disabled '0' + +config wifi-iface 'wmesh' + option device 'radio0' + option ifname 'adhoc0' + option network 'mesh' + option encryption 'none' + option mode 'adhoc' + option bssid '02:BA:00:00:00:01' + option ssid 'meshfx@hackeriet' ++
/etc/config/batman-adv
++ +config 'mesh' 'bat0' + option interfaces 'adhoc0' + option 'aggregated_ogms' + option 'ap_isolation' + option 'bonding' + option 'fragmentation' + option 'gw_bandwidth' + option 'gw_mode' + option 'gw_sel_class' + option 'log_level' + option 'orig_interval' + option 'vis_mode' + option 'bridge_loop_avoidance' + option 'distributed_arp_table' + option 'network_coding' + option 'hop_penalty' + +# yet another batX instance +# config 'mesh' 'bat5' +# option 'interfaces' 'second_mesh' ++ +
The mesh node is now operational. I have yet to test its range, +but I hope it is good. I have not yet tested the TP-Link 3600 box +still wrapped up in plastic.
The first wheezy based beta release of Debian Edu was wrapped up -today. This is the release announcement:
- -New features for Debian Edu 7.1+edu0~b0 released -2013-07-27
- -These are the release notes for for Debian Edu / Skolelinux -7.1+edu0~b0, based on Debian with codename "Wheezy".
- -About Debian Edu and Skolelinux
- -Debian Edu, also known as -Skolelinux, is a Linux distribution based on Debian providing an -out-of-the box environment of a completely configured school -network. Immediately after installation a school server running all -services needed for a school network is set up just waiting for users -and machines being added via GOsa², a comfortable Web-UI. A netbooting -environment is prepared using PXE, so after initial installation of -the main server from CD, DVD or USB stick all other machines can be -installed via the network. The provided school server provides LDAP -database and Kerberos authentication service, centralized home -directories, DHCP server, web proxy and many other services. The -desktop contains -more -than 60 educational software packages and more are available from -the Debian archive, and schools can choose between KDE, Gnome, LXDE -and Xfce desktop environment.
- -This is the fifth test release based on Debian Wheezy. Basically -this is an updated and slightly improved version compared to the -Squeeze release.
- -ALERT: Alpha based installations should reinstall or downgrade the -versions of gosa and libpam-mklocaluser to the ones used in this beta -release.
- -Software updates
+ +If one of the points of switching to a new init system in Debian is +to get rid of huge +init.d scripts, I doubt we need to switch away from sysvinit and +init.d scripts at all. Here is an example init.d script, ie a rewrite +of /etc/init.d/rsyslog:
--
-
-
- Switched roaming workstation profiles from wicd to network-manager - for network configuration, as wicd didn't work any more. -
- Changed version numbers of patched gosa and libpam-mklocaluser - packages to make sure our locally patched versions will be replaced - by the official packages when they are released from Debian. Those - installing alpha version need to reinstall or manually downgrade gosa - and libpam-mklocaluser. -
- Added bluetooth tools to the default desktop (bluedevil, blueman). -
- Added tools for sharing the desktop on KDE (krdc, krfb). -
- Added valgrind to the default installation for easier debugging of - crash bugs. - -
Other changes
- --
-
-
- Fixed artwork package to work with gnome, no longer break - desktop=gnome installations. -
- Adjusted installer to now work when forced to use a proxy with the - netinst CD. -
- Fixed code detecting and setting/loading hardware specific - setup/firmware to work more robust out of the box. -
- Adjusted Kerberos setup to detect realm and server settings at - install time instead of dynamically at run time. This avoid a crash - with krb5-auth-dialog on diskless workstations without a DNS name. -
- Worked around misfeature in network-manager not calling the dhclient - exit hooks, causing automatic proxy configuration and automatic host - name setting at run time to work again. -
- Fixed feature setting the default Iceweasel start page from URL - fetched from LDAP, to allow schools to set the global default by - updating the dc=skole,dc=skolelinux,dc=no LDAP object. -
- Changed default host name on all networked machines to be unique - (generated from MAC or reverse DNS) after boot. -
- Adjusted partition sizes to make sure they are big enough. - -
Known issues
- --
-
-
- Grub is missing the new artwork. -
- KDE fail to understand the wpad.dat file provided, causing it to - not use the http proxy as it should. -
- Chromium also fail to use the proxy. - -
Where to get it
- -To download the multiarch netinstall CD release you can use
- --
-
-
- ftp://ftp.skolelinux.org/skolelinux-cd/wheezy/debian-edu-7.1+edu0~b0-CD.iso - -
- http://ftp.skolelinux.org/skolelinux-cd/wheezy/debian-edu-7.1+edu0~b0-CD.iso - -
- rsync -avzP ftp.skolelinux.org::skolelinux-cd/wheezy/debian-edu-7.1+edu0~b0-CD.iso . - -
The MD5SUM of this image is: 55d5de9765b6dccd5d9ec33cf1a07109
-
The SHA1SUM of this image is: 996a1d9517740e4d627d100de2d12b23dd545a3f
To download the multiarch USB stick ISO release you can use
- --
+
+#!/lib/init/init-d-script +### BEGIN INIT INFO +# Provides: rsyslog +# Required-Start: $remote_fs $time +# Required-Stop: umountnfs $time +# X-Stop-After: sendsigs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: enhanced syslogd +# Description: Rsyslog is an enhanced multi-threaded syslogd. +# It is quite compatible to stock sysklogd and can be +# used as a drop-in replacement. +### END INIT INFO +DESC="enhanced syslogd" +DAEMON=/usr/sbin/rsyslogd +-
Pretty minimalistic to me... For the record, the original sysv-rc +script was 137 lines, and the above is just 15 lines, most of it meta +info/comments.
- - -The MD5SUM of this image is: d8f0818c51a78d357de794066f289f69
-
The SHA1SUM of this image is: 49185ca354e8d0543240423746924f76a6cee733
How to do this, you ask? Well, one create a new script +/lib/init/init-d-script looking something like this: +
+#!/bin/sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service + +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +SCRIPTNAME=$1 +scriptbasename="$(basename $1)" +echo "SN: $scriptbasename" +if [ "$scriptbasename" != "init-d-library" ] ; then + script="$1" + shift + . $script +else + exit 0 +fi + +NAME=$(basename $DAEMON) +PIDFILE=/var/run/$NAME.pid + +# Exit if the package is not installed +#[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: +-
How to report bugs
+It is based on /etc/init.d/skeleton, and could be improved quite a +lot. I did not really polish the approach, so it might not always +work out of the box, but you get the idea. I did not try very hard to +optimize it nor make it more robust either.
-http://wiki.debian.org/DebianEdu/HowTo/ReportBugs +
A better argument for switching init system in Debian than reducing +the size of init scripts (which is a good thing to do anyway), is to +get boot system that is able to handle the kernel events sensibly and +robustly, and do not depend on the boot to run sequentially. The boot +and the kernel have not behaved sequentially in years.
Today I switched to -my -new laptop. I've previously written about the problems I had with -my new Thinkpad X230, which was delivered with an -180 -GB Intel SSD disk with Lenovo firmware that did not handle -sustained writes. My hardware supplier have been very forthcoming in -trying to find a solution, and after first trying with another -identical 180 GB disks they decided to send me a 256 GB Samsung SSD -disk instead to fix it once and for all. The Samsung disk survived -the installation of Debian with encrypted disks (filling the disk with -random data during installation killed the first two), and I thus -decided to trust it with my data. I have installed it as a Debian Edu -Wheezy roaming workstation hooked up with my Debian Edu Squeeze main -server at home using Kerberos and LDAP, and will use it as my work -station from now on.
- -As this is a solid state disk with no moving parts, I believe the -Debian Wheezy default installation need to be tuned a bit to increase -performance and increase life time of the disk. The Linux kernel and -user space applications do not yet adjust automatically to such -environment. To make it easier for my self, I created a draft Debian -package ssd-setup to handle this tuning. The -source -for the ssd-setup package is available from collab-maint, and it -is set up to adjust the setup of the machine by just installing the -package. If there is any non-SSD disk in the machine, the package -will refuse to install, as I did not try to write any logic to sort -file systems in SSD and non-SSD file systems.
- -I consider the package a draft, as I am a bit unsure how to best -set up Debian Wheezy with an SSD. It is adjusted to my use case, -where I set up the machine with one large encrypted partition (in -addition to /boot), put LVM on top of this and set up partitions on -top of this again. See the README file in the package source for the -references I used to pick the settings. At the moment these -parameters are tuned:
- --
-
-
- Set up cryptsetup to pass TRIM commands to the physical disk - (adding discard to /etc/crypttab) - -
- Set up LVM to pass on TRIM commands to the underlying device (in - this case a cryptsetup partition) by changing issue_discards from - 0 to 1 in /etc/lvm/lvm.conf. - -
- Set relatime as a file system option for ext3 and ext4 file - systems. - -
- Tell swap to use TRIM commands by adding 'discard' to - /etc/fstab. - -
- Change I/O scheduler from cfq to deadline using a udev rule. - -
- Run fstrim on every ext3 and ext4 file system every night (from - cron.daily). - -
- Adjust sysctl values vm.swappiness to 1 and vm.vfs_cache_pressure - to 50 to reduce the kernel eagerness to swap out processes. - -
During installation, I cancelled the part where the installer fill -the disk with random data, as this would kill the SSD performance for -little gain. My goal with the encrypted file system is to ensure -those stealing my laptop end up with a brick and not a working -computer. I have no hope in keeping the really resourceful people -from getting the data on the disk (see -XKCD #538 for an explanation why). -Thus I concluded that adding the discard option to crypttab is the -right thing to do.
- -I considered using the noop I/O scheduler, as several recommended -it for SSD, but others recommended deadline and a benchmark I found -indicated that deadline might be better for interactive use.
- -I also considered using the 'discard' file system option for ext3 -and ext4, but read that it would give a performance hit ever time a -file is removed, and thought it best to that that slowdown once a day -instead of during my work.
- -My package do not set up tmpfs on /var/run, /var/lock and /tmp, as -this is already done by Debian Edu.
- -I have not yet started on the user space tuning. I expect -iceweasel need some tuning, and perhaps other applications too, but -have not yet had time to investigate those parts.
- -The package should work on Ubuntu too, but I have not yet tested it -there.
- -As for the answer to the question in the title of this blog post, -as far as I know, the only solution I know about is to replace the -disk. It might be possible to flash it with Intel firmware instead of -the Lenovo firmware. But I have not tried and did not want to do so -without approval from Lenovo as I wanted to keep the warranty on the -disk until a solution was found and they wanted the broken disks -back.
+ +The SPICE protocol for +remote display access is the preferred solution with oVirt and RedHat +Enterprise Virtualization, and I was sad to discover the other day +that the browser plugin needed to use these systems seamlessly was +missing in Debian. The request +for a package was from 2012-04-10 with no progress since +2013-04-01, so I decided to wrap up a package based on the great work +from Cajus Pollmeier and put it in a collab-maint maintained git +repository to get a package I could use. I would very much like +others to help me maintain the package (or just take over, I do not +mind), but as no-one had volunteered so far, I just uploaded it to +NEW. I hope it will be available in Debian in a few days.
+ +The source is now available from +http://anonscm.debian.org/gitweb/?p=collab-maint/spice-xpi.git;a=summary.