Let systemd automount NTFS partitions to ensure successful booting

On my laptop I use a dual-boot setup with a NTFS partition shared between Windows and Linux, containing eg. music. Because the Windows version installed is Windows 10, it could sometimes happen that, in spite of having turned off hybrid shutdown, ntfs-3g would refuse to mount the shared data partition because it was in an unclean state. Continue reading “Let systemd automount NTFS partitions to ensure successful booting”

Workaround for broken O2 Micro SD card reader support since Linux kernel version 4.1.8

On my Dell Latitude E7450 notebook I regularly update to current versions of the Linux kernel. Along with such a Kernel update my notebook’s SD card reader could no longer be initialized properly: Continue reading “Workaround for broken O2 Micro SD card reader support since Linux kernel version 4.1.8”

Setting the MTU on NetworkManager connections

It is August 2015. Unfortunately it is still not possible to manually specify the MTU to be used on non-Ethernet NetworkManager connections (eg. VPN connections but also PPP).

Not that is has not been requested years ago. Choose one of the many bug reports:

Safe for the fact that they’re partially redundant reports, just imagine what would have happened if the devs had simply provided a MTU field for every connection type, empty by default but allowing to explicitly configure one. But no, that would have confused users *rolleyes*

Enough ranting, for VPN connections the workaround remains. Create a script /etc/NetworkManager/dispatcher.d/vpn-up:

#!/bin/sh

if [ "$2" = "vpn-up" ]; then
	/sbin/ifconfig "$1" mtu 1392
fi

Still thinking that it’s sufficient to backup /home before your next distribution upgrade/reinstall? Good luck…

Enabling libvirt channels by adding virtio_console to the openSUSE installation

libvirt supports the concept of so-called channels that represent private communication channels between a libvirt guest and its host.
Continue reading “Enabling libvirt channels by adding virtio_console to the openSUSE installation”

Moving from DataObjectManager – GridFieldRecordEditor, GridFieldRelationEditor and usability issues

Recently I’ve been working a lot with the SilverStripe CMS/framework written in PHP (as one could undoubtedly deduce from my earlier post). The context involved porting a custom application from SilverStripe 2.4 to 3.1. Naturally this also involved dealing with the formerly used DataObjectManager module and 3.x’s new ORM and GridField components.
Continue reading “Moving from DataObjectManager – GridFieldRecordEditor, GridFieldRelationEditor and usability issues”

Simplify extension for SilverStripe hides children pages in the SiteTree / TreeView

Simplify is an extension for the popular SilverStripe Content Management System (CMS). Its purpose is to simplify the use of the admin interface by allowing fine-grained permissions as to which users should be allowed to see which options.
Continue reading “Simplify extension for SilverStripe hides children pages in the SiteTree / TreeView”

Connecting to libvirtd as non-root user on openSUSE 13.1

As a revisit to my previous post on connecting to libvirtd as a non-root user on openSUSE 12.2, the way to do it on openSUSE 13.1 is the same that worked for Marek Goldmann on Fedora 18 (although he used the wheel group).

Create /etc/polkit-1/rules.d/80-libvirt-manage.rules with the following content:

polkit.addRule(function(action, subject) {
    if (action.id == "org.libvirt.unix.manage" &&
        subject.active == true && subject.local == true &&
        subject.isInGroup("libvirt")) {
            return polkit.Result.YES;
    }
});

And add the user accounts that should be allowed access to the libvirt group.

Patching VirtualBox guest additions for SLES12/RHEL7 guests

This may not be relevant to most of you, yet, as the SLES12 and RHEL7 beta programs are not quite open to the public, but similar problems may happen to you with other distributions that do backports of patches as well.

If you see error messages such as the following when compiling VirtualBox guest additions for your Linux guest:

/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c: In function ‘rtR0MemObjNativeMapUser’:
/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1542:26: error: ‘struct mm_struct’ has no member named ‘numa_next_reset’
                 pTask->mm->numa_next_reset = jiffies + 0x7fffffffffffffffUL;
                          ^
make[2]: *** [/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxguest] Error 2

You should take a look at VirtualBox ticket #12638 which deals with the removal of the numa_balancing_scan_period_reset sysctl and related data structures. I just submitted a patch there that tries to address the issue of distro vendor backports of patches in a less expensive way than grepping header files.

If you want to try it out, also have a look at How to recreate / build VirtualBox guest additions ISO image VBoxGuestAdditions.iso.

How to recreate / build VirtualBox guest additions ISO image VBoxGuestAdditions.iso

As Linux kernel development progresses, so do interfaces change from time to time and kernel modules outside of the Linux kernel such as VirtualBox’s guest additions need more or less updating. Having done some patching in the VirtualBox sources, you might want to rebuild the guest additions ISO image, VBoxGuestAdditions.iso, so you can try out the patched code in your VMs more easily.

Googling for “building VBoxGuestAdditions.iso” you might find this vbox-dev mailing list thread from 2011 which suggests that the ISO could not be easily rebuilt as a special build setup would be needed. However, it turns out this is not quite true:


pief@e6400:~/vbox/src/VBox/Additions> kmk additions-iso
kBuild: copydbg /home/pief/vbox/out/linux.amd64/release/bin/additions/VBoxControl - /home/pief/vbox/out/linux.amd64/release/obj/Additions/Installer/linux/debug/bin/VBoxControl
[...]
kBuild: Installing /home/pief/vbox/out/linux.amd64/release/obj/Additions/Installer/linux/lib/VBoxGuestAdditions/mount.vboxsf
kBuild: Packing /home/pief/vbox/out/linux.amd64/release/bin/additions/VBoxGuestAdditions-amd64.tar.bz2
Header is 404 lines long

About to compress 5440 KB of data...
Adding files to archive named "/home/pief/vbox/out/linux.amd64/release/bin/additions/VBoxLinuxAdditions.run"...
./
./install.sh
./VBoxGuestAdditions-amd64.tar.bz2
./do_dkms
./vboxadd
./vboxadd-x11
./deffiles
./routines.sh
./vboxadd-service
CRC: 1167516186
MD5: eb794c6b2981e2042a81f475f060be18

Self-extractible archive "/home/pief/vbox/out/linux.amd64/release/bin/additions/VBoxLinuxAdditions.run" successfully created.
kBuild: mkisofs - /home/pief/vbox/out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso
/usr/bin/genisoimage -rational-rock -joliet -iso-level 3 \
-volid "VBOXADDITIONS_4.3.53_50574" -l -graft-points -o /home/pief/vbox/out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso \
[...]
VBoxLinuxAdditions-amd64.run=/home/pief/vbox/out/linux.amd64/release/bin/additions/VBoxLinuxAdditions.run \
[...]

I: -input-charset not specified, using utf-8 (detected in locale settings)
Total translation table size: 0
Total rockridge attributes bytes: 269
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
2906 extents written (5 MB)
kBuild: Zipping image /home/pief/vbox/out/linux.amd64/release/bin/additions/VBoxGuestAdditions.zip
adding: VBoxGuestAdditions.iso (deflated 8%)
pief@e6400:~/vbox/src/VBox/Additions> dir

In my case, I found the new ISO image in ~/vbox/src/out/linux.amd64/release/bin/additions/VBoxGuestAdditions.iso. Copying that file to /usr/share/virtualbox should make it available to your VMs.