Bei einer Fritzbox 7412 das WLAN aktivieren

Seit einiger Zeit bieten 1&1 zu ihren DSL-Verträgen keine kostenlosen WLAN-Router mehr an. Um einen WLAN-Router zu bekommen, muss man 2,99€ extra im Monat zahlen, was eine ziemliche Frechheit ist, insbesondere weil der ausgelieferte Router, die FRITZ!Box 7412, der gleiche ist. In der kostenlosen Version ist das WLAN lediglich in der Firmware deaktiviert. Das heißt allerdings, dass man durch aufspielen einer anderen Firmware die WLAN-Funktionalität aktivieren kann. Lustigerweise wurde sich nicht einmal die Mühe gemacht, eine andere Verpackung zu produzieren, und so wird auf dem Karton die FRITZ!Box verwirrenderweise als WLAN-Router bezeichnet.

Bei der folgenden Anleitung gehe ich davon aus, dass die FRITZ!Box noch nicht eingerichtet wurde, da das sowieso danach nochmal gemacht werden muss. Außerdem gehe ich davon aus, dass viele Leute die FRITZ!Box gar nicht einrichten wollen, und das WLAN nur zwecks besseren Weiterverkaufsmöglichkeiten aktivieren und bei sich zuhause einen gescheiten Router benutzen.

  1. Die aktuelle Firmware von der AVM-Seite downloaden: https://ftp.avm.de/fritzbox/fritzbox-7412/deutschland/fritz.os/
  2. Die FRITZ!Box in die Steckdose stecken
  3. Die FRITZ!Box per Netzwerkkabel mit einem Rechner verbinden
  4. Das Konfigurationsinterface der FRITZ!Box aufrufen; dazu in einem Browser fritz.box aufrufen
  5. Alle Einrichtungsdialoge überspringen
  6. Durch einen Klick auf „Ansicht: Standard“ in der Fußleiste die erweiterte Ansicht freischalten
  7. In der Seitenleiste auf „System“ klicken
  8. In der Seitenleiste auf „Update“ klicken
  9. Oben auf den Reiter „FRITZ!OS-Datei“ klicken
  10. Das Häkchen bei „Sicherungsdatei vor dem Update erstellen“ entfernen
  11. Im folgenden Menüpunkt die in Schritt 1 heruntergeladene Datei hochladen
  12. Auf „Update starten“ klicken
  13. Warten, bis man wieder auf die Startseite weitergeleitet wird
  14. Wieder alle Einrichtungsdialoge überspringen
  15. In der Seitenleiste auf „System“ klicken
  16. In der Seitenleiste auf „Sicherung“ klicken
  17. Oben auf den Reiter „Werkseinstellungen“ klicken
  18. In diesem Menü die FRITZ!Box auf Werkseinstellungen zurücksetzen

Jetzt sollte bei der FRITZ!Box das WLAN aktiviert sein und auch die WLAN-LED am Router leuchten.

UPDATE: Scheinbar funktioniert diese Methode mittlerweile nicht mehr auf jedem Router zuverlässig. Sollte am Ende das WLAN immer noch nicht funktionieren, kann man die FRITZ!Box mit dem Recovery-Tool des Herstellers komplett zurücksetzen. Dieses findet man hier. (Dieses Tool aber nur für die FRITZ!Box 7412 benutzen. Für andere Modelle muss eine andere Version heruntergeladen werden.)

How to Cite a Website with BibTeX

Citing a website in some kind of scientific writing can be really annoying. If you use LaTeX (which you should do) to write it, you probably will use BibTeX for bibliography managment. However, because the BibTeX format has been relatively unchanged since 1985 there is no entry type for a website. The solution to this is just using the newer BibLaTeX which supports the @ONLINE entry type.

In order to switch from BibTeX to BibLaTeX you just need to add \usepackage{biblatex} to your preamble. Assuming your bibliography file is called bibliography.bib you will also have to add \bibliography{bibliography.bib} to the preamble. Printing the bibliography is done by \printbibliography instead of \bibliography{bibliography}. Instead of running bibtex on the .aux-file after running pdflatex for the first time, you will have to run biber on the generated .bcf-file. Much more about BibTeX and bibliography management in general can be found here.

Having done all this, this website for example could be cited after adding the following to your bibliography file:

@online{cite_key, 
    author = {Jonas Mönnig},
    title = {How to Cite a Website with BibTeX},
    year = 2016,
    url = {https://jonas-moennig.de/how-to-cite-a-website-with-bibtex/ },
    urldate = {2016-07-26}
}

This is a simple format but still annoying to type manually. Wouldn’t it be easier if you could just generate these entries automatically? That is why I have written a Firefox Add-on that does exactly this. It tries to extract author, title and publishing year from the website and generates an @ONLINE entry that can be copied and pasted into your .bib file. You still have to change the cite key manually as the add-on cannot guess what you would prefer. You can find the add-on in the Mozilla Add-on store.

Unfortunately version 1.0 requires Firefox 48 which at the time of this writing is only available as a beta version. A stable version can be expected mid-August. Until then you can install version 0.9.1 manually here.

If you don’t like the default template, for example because you want to use plain BibTeX and not BibLaTeX, from version 1.0 upwards you can change the template in the preferences. For a plain BibTeX format you could simply use

@misc{cite_key,
    author = {$author$},
    title = {$title$},
    year = $year$,
    howpublished = {\url{$url$}},
    note = {Accessed: $urldate$}
}

which would result to something like this:

@misc{cite_key,
    author = {jonas},
    title = {How to Cite a Website with BibTeX},
    year = 2016,
    howpublished = {\url{https://jonas-moennig.de/how-to-cite-a-website-with-bibtex/}},
    note = {Accessed: 2016-07-26}
}

Sometimes the add-on has multiple guesses available for author name, title and publishing year. In this case you can click on the current value to open a menu with all of the guesses from which you can choose from. Sometimes however, it doesn’t find the right values at all in which case you have to fill in the blanks manually.

As the add-on uses the WebExtension standard it can be easily ported to Chrome. If you want the add-on to be released as a Chrome extension, you can just leave a comment down below or feel free to fork the project on GitHub and do it yourself.

Resize Bcache Caching Device

Bcache is a cache for Linux. It can be used when you have a normal HDD and a faster SSD in your computer to let the SSD or part of the SSD act as a cache for the HDD to improve overall system performance. There is plenty of information on how to resize the backing device (the partition on the HDD) but I couldn’t find any information on how to resize the caching device without losing the data on the backing device. However a couple of weeks ago I was able to achieve this and I now want to share what I still remember of it.

I write the following from memory and I am not entirely sure that this is exactly what I did. Follow these instructions at your own risk and make a backup of your data (you should have a backup of your data anyway). If you find my explanation to be vague, refer to the Arch Linux wiki or ask a question in the comments.

 1. Detach the backing device from your caching device

# echo 1 > /sys/block/sdX/sdX[Y]/bcache/detach

Doing this will make Bcache ignore the caching device and forward every hard disk access to the backing device and the old caching device is no longer needed.

2. Resize the caching device

Now we can actually resize the caching device. The filesystem on the caching device itself can’t be resized so we will just resize the underlying partition and create a new caching device on the partition. I use LVM so what I did was something like the following:

# lvresize -L -20G VolumeGroup/cache

If you don’t use LVM it could be a little bit more difficult to resize the partition but there are plenty of partitioning tools out there so I will assume that you can find out how to do it.

3. Creating a new caching device

The last step destroyed the bcache file system on the partition so we have to create a new one.

# make-bcache -C /dev/VolumeGroup/cache

The above command will  create a new caching device on /dev/VolumeGroup/cache.

4. Reattach the backing device to the caching device

Now we can put it all together again. To reattach the backing device we first have to find out the cset.uuid of the caching device. Assuming that the caching device is located at /dev/VolumeGroup/cache we can do this with

bcache-super-show /dev/VolumeGroup/cache | grep cset.uuid

The backing device then can be reattached with

# echo cset.uuid > /sys/block/bcache0/bcache/attach

assuming that your caching device is bcache0.

Now the cache should be working properly. You can check this by executing

# cat /sys/block/bcache0/bcache/state

If the above has the output „clean“ then you have successfully resized your caching device.