Mathew McBride's website

HOWTO: Read only rootfs, writes to USB on Linux

embeddedraspberrypilinuxTue 26 Mar 2013 09:49:48No comments

What you will need:

  • Kernel sources for the system you are booting on
  • AUFS patches for the kernel
  • A USB drive, preferrably one with reasonably fast write speeds

The goal of this excercise is to create a Linux system that has a read-only root filesystem, with all write activites performed on a USB drive. In this instance, we will boot a Raspberry Pi, with the SDcard used as the read only rootfs, and a USB drive used for all file writes (system logs etc.). This is done to improve reliability, as during our access system project, we found that the SDcard can be a bit fragile if the system is reset often.

Read below the fold for more

SELinux Policy Macros: Reference

technologylinuxselinuxSat 15 Sep 2012 18:20:27No comments
I have posted a 'cheatsheet' of SELinux Policy Macros to assist in development of SELinux Policy Modules.

SELinux add on policy repository

technologylinuxselinuxgentooSat 08 Sep 2012 09:23:12No comments

I have created a git repository for my addon SELinux polices for Gentoo at Gitorious.

Right now it includes rules for php-fpm with nginx and unix domain sockets, as previously mentioned, as well as nzbget+nzbgetweb and uwsgi

HOWTO: HostAP (Master) mode for Ralink rt73 USB wifi

technologywirelesslinuxSun 21 Nov 2010 11:23:17No comments

Here is how I managed to get my Ralink-based WIFI stick working in access point mode with WPA encryption.

  • Hardware used: TP-Link TL-WN321G
  • System: Gentoo

Read on for more..

MacGuyvering: Installing a handbrake snapshot on Gentoo

technologylinuxgentoohandbrakeTue 13 Jul 2010 13:38:10No comments

So, you want to encode some video, and run Gentoo, but the handbrake ebuild either doesn't work or is too scary. They only have packages for Ubuntu or Fedora, but don't despair, we can use the Ubuntu package on Gentoo with a bit of detective work.

# Rebuild udev with extras so libgudev is present
echo "sys-fs/udev extras" >> /etc/portage/package.use
emerge udev

# Get the latest handbrake nightly build for ubuntu
cd /tmp
ar x handbrake-gtk_svn3428ppa1~lucid1_i386.deb data.tar.bz2

# Extract it
cd /
tar -jxvf /tmp/data.tar.bz2

The technique of extracting data.tar.gz or data.tar.bz2 out of the .deb will work for other .deb-only binaries you can find as well

Virtualization on Linux without extreme kernel modifications: lxc

technologyvserverlxclinuxFri 02 Apr 2010 12:07:42(Last updated: Sat 03 Apr 2010 12:18:13)No comments

There are multiple ways one can run multiple instances of Linux on a server, from entire system virtualization such as VMware, Xen (to a lesser extent) to operating system level virtualization such as UML, OpenVZ and Linux-VServer.

The last three require some kernel magic that isn't in mainline kernels. Linux-VServer (and probably OpenVZ) needs a lot of kernel modification.

Other operating systems ship similar 'containerisation' mechanisms as standard, notably Solaris Containers and FreeBSD jails.

    Welcome to my site

    Mathew McBride, telecoms hardware access engineer, programmer, gamer and all round nerd

    Warning: contents of blog may not make any sense whatsoever.

    ipv6 ready

    You are accessing this page over IPv6!

    (C) Mathew McBride, 2006-2017
    Creative Commons License
    Unless specified, the content on this website is licensed under a Creative Commons Attribution-ShareAlike 3.0 Australia License.