RPI horrible slow with apt-get/dpkgThis is especially true when using f2fs. This is caused by fsync/sync calls.
Solution: add force-unsafe-io to /etc/dpkg/dpkg.cfg.
If you also want to speed up all other software, use the "eatmydata"-package. E.g.:
eatmydata apt-get upgradeNote that combining eatmydata with dpkg is still faster than force-unsafe-io alone!
Also warning: if your RPI crashes during eatmydata (or loses power or whatever), your data might be gone.
Migrating to f2fsPlease only try this if you're an advanced Linux user who knows how to figure things out by herself in case I made any mistakes in these steps.
Making a backup first is adviced (it is very easy to make fatal mistakes in these steps).
Disabling wifiIn case you want to use the wifi dongle for eg monitor mode or so.
Remove the following lines:
allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
Compiling for RPIOne big warning: the default setting for 'char'-types on the rpi is UNSIGNED. Most other platforms use signed chars! This causes problems with certain programs like the squid proxy.
Suggested CFLAGS settings:
export CFLAGS="-fsigned-char -O3 -fomit-frame-pointer -march=armv6j -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" export CXXFLAGS="-fsigned-char -O3 -fomit-frame-pointer -march=armv6j -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
Flashing LEDsYou can flash the "disk-activity" led by invoking:
echo 1 > /sys/bus/platform/devices/leds-gpio/leds/led0/brightnessIt will automatically switch off.
Destroying the SD cardAlways try the shutdown the device cleanly, e.g. with a "shutdown" command. If not, you can physically destroy the sd card.