<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>blog.johanv.org (Posts about debian)</title><link>https://blog.johanv.org/</link><description></description><atom:link href="https://blog.johanv.org/en/categories/debian.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="https://blog.johanv.org/pages/contact/"&gt;Johan Vervloet&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"&gt;
&lt;img alt="Creative Commons License BY-NC-SA"
style="border-width:0; margin-bottom:12px;"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Wed, 29 Oct 2025 18:31:16 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Debian 11, XFCE and a bluetooth mouse</title><link>https://blog.johanv.org/en/posts/debian-11-xfce-bluetooth-mouse/</link><dc:creator>Johan Vervloet</dc:creator><description>&lt;div&gt;&lt;p&gt;Last week, I gave an old laptop a second life. It's an old ASUS, I think it came
with Windows 8 back in the day, and I installed Debian 11 with XFCE on it. This looks
very retro, but it works like a charm. I can now use the battery for serveral
hours, while with Windows it would die after 5 minutes. And today I got my bluetooth
mouse working.&lt;/p&gt;
&lt;p&gt;&lt;img alt="a bluetooth logitech mouse, sitting on the laptop" src="https://blog.johanv.org/galleries/cards/bluetooth-mouse.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Here is what I did:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.johanv.org/en/posts/debian-11-xfce-bluetooth-mouse/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><guid>https://blog.johanv.org/en/posts/debian-11-xfce-bluetooth-mouse/</guid><pubDate>Mon, 06 Feb 2023 20:15:00 GMT</pubDate></item><item><title>Nog een dikke week voor de belastingsaangifte...</title><link>https://blog.johanv.org/en/posts/nog-een-dikke-week-voor-de-belastingsaangifte/</link><dc:creator>Johan Vervloet</dc:creator><description>&lt;div&gt;&lt;p&gt;Dus tijd voor mijn jaarlijkse blog post over Tax-On-Web met Linux.&lt;/p&gt;
&lt;p&gt;Dit jaar met &lt;a class="reference external" href="https://www.bunsenlabs.org/"&gt;Bunsenlabs&lt;/a&gt;, maar dat is
eigenlijk een getunede &lt;a class="reference external" href="https://www.debian.org"&gt;Debian&lt;/a&gt; 8 (Jessie).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blog.johanv.org/en/posts/nog-een-dikke-week-voor-de-belastingsaangifte/"&gt;Read more…&lt;/a&gt; (1 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><guid>https://blog.johanv.org/en/posts/nog-een-dikke-week-voor-de-belastingsaangifte/</guid><pubDate>Sat, 02 Jul 2016 19:43:49 GMT</pubDate></item><item><title>Dell Precision M4500, Debian Wheezy en nVidia drivers</title><link>https://blog.johanv.org/en/posts/old/node-191/</link><dc:creator>Johan Vervloet</dc:creator><description>&lt;div&gt;&lt;p&gt;Dit weekend installeerde ik Debian Wheezy op mijn Dell Precision M4500
laptop. Deze laptop heeft een nVidia Corporation GT215 [Quadro FX 1800M]
grafische kaart, en net zoals bij ongeveer elke mogelijke
Linuxdistributie, blijft de nouveau-schermdriver iedere X tijd hangen,
waardoor het systeem niet meer reageert. (Zie deze &lt;a class="reference external" href="https://bugzilla.redhat.com/show_bug.cgi?id=754882"&gt;bug in
Fedora&lt;/a&gt;, maar ik
vermoed dat elke distributie een analoge bug zal hebben.)&lt;/p&gt;
&lt;p&gt;Dus ben
ik wel verplicht om de freedom hating proprietary driver te installeren.
Ik haalde de inspiratie op de &lt;a class="reference external" href="http://wiki.debian.org/NvidiaGraphicsDrivers"&gt;Debian
Wiki&lt;/a&gt;; op deze manier
werkt het:&lt;/p&gt;
&lt;pre class="literal-block"&gt;apt-get install linux-headers-`uname -r` #dit is misschien niet nodig
apt-get install nvidia-kernel-dkms nvidia-settings&lt;/pre&gt;
&lt;p&gt;en
zet het volgende in
&lt;code class="docutils literal"&gt;/etc/X11/xorg.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;Section "Module"
    Load        "glx"
EndSection
Section "Device"
    Identifier  "Video Card"
    Driver              "nvidia"
EndSection&lt;/pre&gt;
&lt;p&gt;Rebooten,
en dat is dat.&lt;/p&gt;&lt;/div&gt;</description><guid>https://blog.johanv.org/en/posts/old/node-191/</guid><pubDate>Mon, 27 Feb 2012 20:24:11 GMT</pubDate></item><item><title>Setting up a wireless virtualisation host with Debian Squeeze and KVM</title><link>https://blog.johanv.org/en/posts/old/node-190/</link><dc:creator>Johan Vervloet</dc:creator><description>&lt;div&gt;&lt;p&gt;At the moment, I have two 'servers' on my attic. A file server,
which is an old laptop running Freenas 8, and a server for &lt;a class="reference external" href="https://blog.johanv.org/posts/old/node-160/"&gt;printing,
scanning&lt;/a&gt; and backups, which is a 10 year old PC running
Ubuntu Server 10.04.&lt;/p&gt;
&lt;p&gt;Since I don't have ethernet cables to the
attic, the print server is accessable via wifi. I connected the print
server to the file server with a cable, and to access the file server, I
just route the traffic through the print server.&lt;/p&gt;
&lt;p&gt;Now I want to
replace those two servers on the attic by one virtualization host, which
will at first just run a virtual copy of the servers I have right
now.&lt;/p&gt;
&lt;p&gt;For this virtual host, I have a 6 year old PC with 64-bit AMD
processor, 1 GB ram and 150 GB disk space. This should be enough for my
needs atm. I can always add more ram over time if
needed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;Freenas used to be a lightweight file
server. It isn't any more since version 8. Certainly don't use zfs as
file system on your low end machine. &lt;a class="reference external" href="http://openmediavault.org"&gt;Open Media
Vault&lt;/a&gt; is probably a better file server
solution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I have upgraded to a 3.2-kernel, which
makes adding a non-access-point wireless interface to a bridge
impossible. So I created another subnet for the virtual machines, as
described in the remarks below. Which makes the ebtables thing
irrelevant.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Although it worked quite well (at last),
I connected my virtual host to the wired network some day ago. Which
makes things a lot easier and more stable. See comment below.&lt;/p&gt;
&lt;p&gt;I'm
not sure wheter it will work. Right now I have one virtual server ready
to use, I'm still experiencing some network problems, and I am not sure
whether what I am trying will actually work. But I'll keep you updated.
This is what I did so far:&lt;/p&gt;
&lt;div class="section" id="setting-up-the-debian-server"&gt;
&lt;h2&gt;Setting up the Debian server&lt;/h2&gt;
&lt;p&gt;I set up a very basic Debian installation for the virtualization
host. I used the 64-bit netinstall CD, to install only the basic system
tools. No graphical environment, since the resources of my 'server' are
limited. I created a large partition for virtual disk files, which I
mounted under &lt;code class="docutils literal"&gt;/vdisks&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;My server has no space for PCI-cards
(only mini-PCI), I don't have a mini-PCI wireless card, so I will be
using a &lt;a class="reference external" href="http://homesupport.cisco.com/en-us/wireless/lbc/WUSB54GC"&gt;Linksys
WUSB54GC&lt;/a&gt;
usb wireless adapter I had lying around.&lt;/p&gt;
&lt;p&gt;(Note: I will have to
search for something else, because after some time the wireless card
just stops working.)&lt;/p&gt;
&lt;p&gt;To enable wireless networking, I had to
install &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;wireless-tools&lt;/span&gt;&lt;/code&gt; and &lt;code class="docutils literal"&gt;wpasupplicant&lt;/code&gt;, because my network is
secured with WPA-PSK authentication. I also needed a driver for the
network card, so I had to &lt;a class="reference external" href="http://blog.mypapit.net/2011/08/how-to-add-contrib-and-non-free-repository-in-debian-gnulinux.html"&gt;enable the non-free
repositories&lt;/a&gt;,
and after that I could install &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;firmware-ralink&lt;/span&gt;&lt;/code&gt;. With all those
packages installed, &lt;a class="reference external" href="http://wiki.debian.org/WiFi/HowToUse#WPA-PSK_and_WPA2-PSK"&gt;enabling the wireless
networking&lt;/a&gt;
was a piece of cake.&lt;/p&gt;
&lt;p&gt;Then I installed the tools for running and
managing virtual machines on the command line: &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;qemu-kvm&lt;/span&gt;&lt;/code&gt;,
&lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;libvirt-bin&lt;/span&gt;&lt;/code&gt; and &lt;code class="docutils literal"&gt;virtinst&lt;/code&gt;. Because the virtual hosts will be
accessed using the wireless network, we will also need
&lt;code class="docutils literal"&gt;ebtables&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="setting-up-the-bridge"&gt;
&lt;h2&gt;Setting up the bridge&lt;/h2&gt;
&lt;p&gt;Because the virtual machines will have to be accessible from my
wireless lan, I need to configure a network bridge on the host, which
will bridge the wireless card on the host to the virtual network
interfaces of the guests. &lt;a class="reference external" href="http://wiki.debian.org/BridgeNetworkConnections#Configuring_bridging_in_.2BAC8-etc.2BAC8-network.2BAC8-interfaces"&gt;Configuring a bridge on a Debian
system&lt;/a&gt;
is very easy, but not if one of the interfaces has to use WPA-PSK. After
a lot of trial and error, I got it working with this
&lt;code class="docutils literal"&gt;/etc/network/interfaces&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
      wpa-ssid **MySsid**
      wpa-psk **MyPsk**
      address 192.168.1.201
      netmask 255.255.255.0
      gateway 192.168.1.1

iface br0 inet static
      bridge_ports wlan0
      bridge-stp off
      bridge-maxwait 5
      address 192.168.1.200
      netmask 255.255.255.0
      gateway 192.168.1.1&lt;/pre&gt;
&lt;p&gt;As
you can see, I used static IP-addresses, I think I had troubles when
using dhcp. I had to start wlan0 first, and then br0, probably because
the network card has to associate to the access point. The configuration
above only starts wlan0, but I start br0 in &lt;code class="docutils literal"&gt;/etc/rc.local&lt;/code&gt;, by adding
the following line:&lt;/p&gt;
&lt;pre class="literal-block"&gt;ifup br0&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="section" id="installing-a-virtual-freenas-server"&gt;
&lt;h2&gt;Installing a virtual FreeNAS server&lt;/h2&gt;
&lt;p&gt;To set up the virtual file server, I used this
command:&lt;/p&gt;
&lt;pre class="literal-block"&gt;virt-install --connect qemu:///system -n gobelijn -r 256 --disk path=/vdisks/gobelijn/gobelijn01.img,size=2 --disk path=/vdisks/gobelijn/gobelijn02.img,size=40 -c /vdisks/iso/FreeNAS-8.0.3-RELEASE-x64.iso --vnc --noautoconsole --os-type unix --os-variant freebsd7 --network=bridge:br0 --hvm&lt;/pre&gt;
&lt;p&gt;This
creates a system with 256 MB ram, a disk of 2 GB for the OS and a disk
of 40 GB for the data. It boots from the FreeNAS-iso, which I placed on
&lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;/vdisks/iso/FreeNAS-8.0.3-RELEASE-x64.iso&lt;/span&gt;&lt;/code&gt;. The virtual server is
called ‘Gobelijn’, I tend to choose characters of comic strips as server
names at home. I ran the command as root, because it didn't work with a
user in the kvm-group.&lt;/p&gt;
&lt;p&gt;Now the new virtual server is booted, but of
course I couldn't see what was happening. Since there is no graphical
environment installed on the server, I needed another computer to
connect to it. I installed &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;virt-viewer&lt;/span&gt;&lt;/code&gt; on there, and connected as
follows:&lt;/p&gt;
&lt;pre class="literal-block"&gt;virt-viewer --connect qemu+ssh://root@192.168.1.200/system gobelijn&lt;/pre&gt;
&lt;p&gt;For
some or another reason, I had to enter the password twice. It should
probably work with a non-root user as well, still have to try it
out.&lt;/p&gt;
&lt;p&gt;After the installation, instead of rebooting, the system just
shuts down. I restarted it by issuing these commands on the virtual
machine
host:&lt;/p&gt;
&lt;pre class="literal-block"&gt;virsh --connect qemu:///system
start gobelijn&lt;/pre&gt;
&lt;p&gt;... and it didn't work. The virtual guests didn't recognize
it's virtual network card. Luckily, this is a &lt;a class="reference external" href="http://blog.adlibre.org/2011/06/06/freenas-8-under-kvm/"&gt;known problem&lt;/a&gt;, you
can fix it by changing the network device type in the appropriate
configuration file in &lt;code class="docutils literal"&gt;/etc/libvirt/qemu&lt;/code&gt;. I had to replace the line
&lt;code class="docutils literal"&gt;&amp;lt;model &lt;span class="pre"&gt;type='ne2k_pci'/&amp;gt;&lt;/span&gt;&lt;/code&gt; in the xml (under devices, interface),
and change it to &lt;code class="docutils literal"&gt;&amp;lt;model &lt;span class="pre"&gt;type='rtl8139'/&amp;gt;&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;After rebooting the virtual
machine, it had a network interface.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="ebtables"&gt;
&lt;h2&gt;ebtables&lt;/h2&gt;
&lt;p&gt;... but it still didn't work. I could connect from the virtual
guest to the virtual host and vice versa, but I couldn't connect the
virtual host from other machines in the same subnet. The cause seems to
be that &lt;a class="reference external" href="http://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC"&gt;wireless routers reject network packages with source
mac-addresses that didn't
authenticate&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This
can be fixed with ebtables, as described in the Debian wiki. I just did
what's described in there: I
entered&lt;/p&gt;
&lt;pre class="literal-block"&gt;ebtables -t nat -A POSTROUTING -o wlan0 -j snat --to-src $MAC_OF_BRIDGE --snat-arp --snat-target ACCEPT&lt;/pre&gt;
&lt;p&gt;and
used the script
&lt;code class="docutils literal"&gt;addcomputer.sh&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;#!/bin/bash
# addcomputer
# Will Orr - 2009

INIF="wlan0"

function add_ebtables () {
  COMPIP=$1
  COMPMAC=$2

  ebtables -t nat -A PREROUTING -i $INIF -p IPv4 --ip-dst $COMPIP -j \
dnat --to-dst $COMPMAC --dnat-target ACCEPT
  ebtables -t nat -A PREROUTING -i $INIF -p ARP --arp-ip-dst $COMPIP \
-j dnat --to-dst $COMPMAC --dnat-target ACCEPT
}

if [[ $# -ne 2 ]]; then
  echo "Usage: $0 ip mac"
elif [[ $(whoami) != "root" ]]; then
  echo "Error: must be root"
else
  add_ebtables $1 $2
fi&lt;/pre&gt;
&lt;p&gt;to
change the source mac address from source packages from the virtual
guest. I saved the rules using&lt;/p&gt;
&lt;pre class="literal-block"&gt;EBTABLES_ATOMIC_FILE=/root/ebtables-atomic ebtables -t nat --atomic-save&lt;/pre&gt;
&lt;p&gt;and
load them at boot time by adding this to
&lt;code class="docutils literal"&gt;/etc/rc.local&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;EBTABLES_ATOMIC_FILE=/root/ebtables-atomic ebtables -t nat --atomic-commit&lt;/pre&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;Now
I still want to start the guest automatically when the host boots.
Normally this can be done with &lt;code class="docutils literal"&gt;virsh autostart gobelijn&lt;/code&gt;, but that
doesn't work, probably because the hack of starting the bridge in
&lt;code class="docutils literal"&gt;/etc/rc.local&lt;/code&gt;. So I just start the virtual guest in
&lt;code class="docutils literal"&gt;/etc/rc.local&lt;/code&gt; as well, by adding&lt;/p&gt;
&lt;pre class="literal-block"&gt;sleep 4
virsh start gobelijn&lt;/pre&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://wiki.debian.org/WiFi/HowToUse#WPA-PSK_and_WPA2-PSK"&gt;Debian wiki: WPA-PSK and
WPA2-PSK&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://wiki.debian.org/KVM"&gt;Debian wiki: KVM&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://www.howtoforge.com/installing-kvm-guests-with-virt-install-on-ubuntu-8.10-server"&gt;HowtoForge: Installing KVM guests with virt-install on Ubuntu
8.10-server&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://blog.adlibre.org/2011/06/06/freenas-8-under-kvm/"&gt;Adlibitum: Freenas 8 under
KVM&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC"&gt;Debian wiki: Bridging with a wireless
NIC&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;/div&gt;</description><guid>https://blog.johanv.org/en/posts/old/node-190/</guid><pubDate>Fri, 03 Feb 2012 11:05:49 GMT</pubDate></item><item><title>initrd.img opnieuw genereren (Debian)</title><link>https://blog.johanv.org/en/posts/old/node-161/</link><dc:creator>Johan Vervloet</dc:creator><description>&lt;div&gt;&lt;p&gt;Debian tip van de dag:&lt;/p&gt;
&lt;p&gt;Als je je bootpartitie read-only maakt, en
je vergeet ze writable te remounten voor een ‘&lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;apt-get&lt;/span&gt; upgrade&lt;/code&gt;’,
dan wordt het ‘initramfs’ niet opnieuw gegenereerd. Soms wordt de
upgrade hierdoor niet afgebroken, en dan zit je daar met een systeem met
een ‘verkeerd’ initramfs.&lt;/p&gt;
&lt;p&gt;Een manier om initramfs opnieuw te laten
genereren, is de
volgende:&lt;/p&gt;
&lt;pre class="literal-block"&gt;mount -o rw,remount /boot       #niet vergeten deze keer
dpkg-reconfigure linux-image-`uname -r`&lt;/pre&gt;&lt;/div&gt;</description><guid>https://blog.johanv.org/en/posts/old/node-161/</guid><pubDate>Wed, 26 Jan 2011 13:32:10 GMT</pubDate></item></channel></rss>