<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sinodun Internet Technologies Ltd</title>
	<atom:link href="http://sinodun.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sinodun.com</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 19:32:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cutting down the noise of automake</title>
		<link>http://sinodun.com/2012/02/cutting-down-the-noise-of-automake/</link>
		<comments>http://sinodun.com/2012/02/cutting-down-the-noise-of-automake/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 19:32:47 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://sinodun.com/?p=613</guid>
		<description><![CDATA[Adding AM_SILENT_RULES([yes]) to your configure.ac will greatly reduce the output of make. It will look very similar to the linux kernel build: Making all in common CC strlcat.o CC strlcpy.o AR libcompat.a Making all in netconf/src/ncx CC libncx_a-b64.o CC libncx_a-blob.o CC libncx_a-bobhash.o CC libncx_a-cap.o This line must go after your AM_INIT_AUTOMAKE initialization. You need to be [...]]]></description>
			<content:encoded><![CDATA[<p>Adding AM_SILENT_RULES([yes]) to your configure.ac will greatly reduce the output of make. It will look very similar to the linux kernel build:</p>
<pre>Making all in common
  CC     strlcat.o
  CC     strlcpy.o
  AR     libcompat.a
Making all in netconf/src/ncx
  CC     libncx_a-b64.o
  CC     libncx_a-blob.o
  CC     libncx_a-bobhash.o
  CC     libncx_a-cap.o</pre>
<p>This line must go after your AM_INIT_AUTOMAKE initialization. You need to be using automake &gt;= 1.11. There is a good explanation <a href="http://www.flameeyes.eu/autotools-mythbuster/automake/silent.html" target="_blank">here</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2012/02/cutting-down-the-noise-of-automake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>freebsd-update</title>
		<link>http://sinodun.com/2012/02/freebsd-update/</link>
		<comments>http://sinodun.com/2012/02/freebsd-update/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 19:11:13 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://sinodun.com/?p=608</guid>
		<description><![CDATA[I have always liked FreeBSD. IMHO it has the best and most up-to-date software collection in the form of ports (much more current than Gentoo last time I looked). I was always irritated by how hard it was to upgrade the kernel and core OS. Talking to several friends I found that the new(ish) freebsd-update utility [...]]]></description>
			<content:encoded><![CDATA[<p>I have always liked FreeBSD. IMHO it has the best and most up-to-date software collection in the form of ports (much more current than Gentoo last time I looked). I was always irritated by how hard it was to upgrade the kernel and core OS. Talking to several friends I found that the new(ish) <a href="http://www.freebsd.org/doc/handbook/updating-freebsdupdate.html" target="_blank">freebsd-update</a> utility seems to have passed a lot of people by.</p>
<p>It allows binary updates to the FreeBSD OS (not ports or packages) it also supports major and minor release upgrades. Along with portsnap and portupgrade FreeBSD is now as easy to manage as any other OS.</p>
<p>One minor gotcha is that it only updates the version number reported by uname if the kernel has been upgraded.</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2012/02/freebsd-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Yuma</title>
		<link>http://sinodun.com/2011/12/auto-yuma/</link>
		<comments>http://sinodun.com/2011/12/auto-yuma/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 16:12:14 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[dnsccm]]></category>

		<guid isPermaLink="false">http://sinodun.com/?p=601</guid>
		<description><![CDATA[I have written a simple script that converts yuma tools so that it can be compiled via autoconf/automake. There is still a lot of work needed to get all the features working but the basics are there and it builds on OS X Lion. It forms part of our effort to develop DNSCCM (DNS Configuration, Control and [...]]]></description>
			<content:encoded><![CDATA[<p>I have written a simple <a href="http://dnsccm.org/projects/dnsccm/repository/show/trunk/auto-yuma" target="_blank">script</a> that converts <a href="http://www.netconfcentral.org/yuma" target="_blank">yuma tools</a> so that it can be compiled via autoconf/automake. There is still a lot of work needed to get all the features working but the basics are there and it builds on OS X Lion.</p>
<p>It forms part of our effort to develop <a href="http://dnsccm.org/" target="_blank">DNSCCM (DNS Configuration, Control and Monitoring)</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2011/12/auto-yuma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun and games with OS X Lion Server</title>
		<link>http://sinodun.com/2011/08/fun-and-games-with-os-x-lion-server/</link>
		<comments>http://sinodun.com/2011/08/fun-and-games-with-os-x-lion-server/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 14:10:21 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://sinodun.com/?p=581</guid>
		<description><![CDATA[With the recent release of Lion I decided to upgrade my desktop from Snow Leopard client to Lion Server and at the same time migrate the Snow Leopard mac mini server over to it. According to the combination of a knowledge base article and the migration instructions Chapter 3 page 24 this should be easy. It was [...]]]></description>
			<content:encoded><![CDATA[<p>With the recent release of Lion I decided to upgrade my desktop from Snow Leopard client to Lion Server and at the same time migrate the Snow Leopard mac mini server over to it.</p>
<p>According to the combination of a <a href="http://support.apple.com/kb/HT4766" target="_blank">knowledge base article</a> and the <a href="http://manuals.info.apple.com/en_US/lion_server_upgrading_migrating.pdf" target="_blank">migration instructions</a> Chapter 3 page 24 this should be easy. It was not.</p>
<p>The knowledge base instructions say in step 2-7</p>
<blockquote><p>Open &#8220;Install Mac OS X Lion&#8221;. <strong>Note</strong>: In order to install Lion Server, the Server app must be in the same folder as the Install Mac OS X app. If you just purchased Lion Server, these items should be in the Applications folder on the startup disk.</p>
<p>Click continue and agree to the software license agreement if you agree.</p>
<p>Click the &#8220;Show All Disks…&#8221; button.</p>
<p>Select a blank disk on which to install.</p>
<p>Click the Customize button.</p>
<p>Select the Server Software package.</p></blockquote>
<p>Unfortunately that isn&#8217;t true. It only works if you are already running Lion Server!!! Here is what you need to do.</p>
<p>Assuming you have a disposable Snow Leopard client on volume A and have a blank volume B.</p>
<ol>
<li>Boot into Snow Leopard client.</li>
<li>Use disk utility to erase volume B</li>
<li>Download both the Lion Client app and the Lion Server app from the app store.</li>
<li>They will be place in you /Applications folder</li>
<li>Run the Lion Client app, when asked press &#8220;Show all disks&#8221; then select install on Volume B.</li>
<li>Unlike what Apple say the customise button will stay greyed out and it will ignore the Server app.</li>
<li>During the install ignore the option to migrate (This is a client only migration).</li>
<li>Once Lion Client is installed run the Server App to install the server component</li>
<li>Copy the Lion Client app and the Lion Server app from the volume A /Applications to the new Lion Server /Applications directory.</li>
<li>Use disk utility to erase volume A</li>
<li>Run the Lion Client app, when asked press &#8220;Show all disks&#8221; then select install on Volume A.</li>
<li>This time what Apple say will be true. The customise button will be enabled and you will be able to select the Server component to install.</li>
<li>Connect the mac mini in target disk mode and during the install you will be invited to migrate from another server.</li>
</ol>
<p>This <a href="http://support.apple.com/kb/ht4771" target="_blank">guide to hosting Lion software updates on a Snow Leopard Server</a> is correct and useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2011/08/fun-and-games-with-os-x-lion-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New version of NSCP draft</title>
		<link>http://sinodun.com/2011/03/new-version-of-nscp-draft/</link>
		<comments>http://sinodun.com/2011/03/new-version-of-nscp-draft/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 12:27:04 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[DNS]]></category>

		<guid isPermaLink="false">http://sinodun.com/?p=544</guid>
		<description><![CDATA[We have released a new version of the Name Server Control Protocol (NSCP) draft. Older versions of this draft described the use of NETCONF as a transport protocol. For now this has been removed to concentrate on the data model. You can find older versions by clicking on the Projects tab.]]></description>
			<content:encoded><![CDATA[<p>We have released a new version of the <a href="http://tools.ietf.org/id/draft-dickinson-dnsop-nameserver-control-02.txt" target="_blank">Name Server Control Protocol (NSCP) draft</a>.</p>
<p>Older versions of this draft described the use of NETCONF as a transport protocol. For now this has been removed to concentrate on the data model.</p>
<p>You can find older versions by clicking on the Projects tab.</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2011/03/new-version-of-nscp-draft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing grub2 on GNU/Linux Software Raid</title>
		<link>http://sinodun.com/2010/07/installing-grub2-on-gnulinux-software-raid/</link>
		<comments>http://sinodun.com/2010/07/installing-grub2-on-gnulinux-software-raid/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 11:51:47 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://sinodun.com/?p=522</guid>
		<description><![CDATA[I have been setting up a two machines with software raid to use as Xen virtual environments. The two machines have 5 and 4 500GB disks. I decided to run Gentoo as the Dom0  OS because there is lots of good documentation for it and it has always been my favorite GNU/Linux distribution. The install [...]]]></description>
			<content:encoded><![CDATA[<p>I have been setting up a two machines with software raid to use as Xen virtual environments. The two machines have 5 and 4 500GB disks. I decided to run Gentoo as the Dom0  OS because there is lots of good documentation for it and it has always been my favorite GNU/Linux distribution. The install of the OS and xen is easy. I opted for the latest Xen 4.0.1rc3-pre code. Just emerge xen and xen-tools to get all the prerequisites and the unmerge them and build the latest source. Creating the RAID arrays was also easy. I did the following.</p>
<p><span id="more-522"></span></p>
<pre>for disk in a b c d ; do
parted -s /dev/sd$disk rm 1 rm 2 rm 3 rm 4 rm 5
parted -s /dev/sd$disk mklabel gpt
parted -s /dev/sd$disk mkpart STUFF 17.4kB 1049kB
parted -s /dev/sd$disk set 1 bios_grub on
parted -s /dev/sd$disk mkpart BOOT 1049kB 5GB
parted -s /dev/sd$disk mkpart SWAP 5GB 21GB
parted -s /dev/sd$disk mkpart ROOT 21GB 71GB
parted -s /dev/sd$disk mkpart XEN 71GB 500GB
for $part in 2 3 4 5 ; do
parted -s /dev/sd$disk set $part raid on
done
done

for md in 1 2 3 4 5 ; do
echo "Removing array"
mdadm --remove --stop /dev/md$md

echo "Creating Array"
if [ x$md == "x2" ] ; then
echo "yes" | mdadm --create /dev/md$md -f --level=1 --raid-devices=4 --metadata=0.90 /dev/sda$md /dev/sdb$md /dev/sdc$md /dev/sdd$md
mkfs.ext2 /dev/md$md
elif [ x$md == "x5" ] ; then
echo "yes" | mdadm --create /dev/md$md -f --level=5 --raid-devices=4 /dev/sda$md /dev/sdb$md /dev/sdc$md /dev/sdd$md
mkfs.xfs -f /dev/md$md
else
echo "yes" | mdadm --create /dev/md$md -f --level=1 --raid-devices=4 /dev/sda$md /dev/sdb$md /dev/sdc$md /dev/sdd$md
if [ x$md == "x3" ] ; then
mkswap /dev/md$md
elif [ x$md == "x4" ] ; then
mkfs.ext4 /dev/md$md
fi
fi
done

mount /dev/md4 /mnt/gentoo
mkdir /mnt/gentoo/boot
mkdir /mnt/gentoo/xen
mount /dev/md2 /mnt/gentoo/boot
swapon /dev/md3
mount /dev/md5 /mnt/gentoo/xen
cd /mnt/gentoo
tar -xjpf /root/stage3-amd64-20100514.tar.bz2 -C /mnt/gentoo
cp -f /root/portage-latest.tar.bz2 /mnt/gentoo
cd /
mount -t proc proc /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
cp -L /etc/resolv.conf /mnt/gentoo/etc/
chroot /mnt/gentoo /bin/bash
env-update &amp;&amp; source /etc/profile
cd /usr
tar -xjpf /portage-latest.tar.bz2

cp /usr/share/zoneinfo/Europe/London /etc/localtime
cd /etc
echo "127.0.0.1 xen1.sinodun.com xen1 localhost" &gt; hosts
hostname xen1
emerge --sync --quiet
eselect profile set 7
cat &lt;&lt; EOF &gt; /etc/make.conf
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
CHOST="x86_64-pc-linux-gnu"
USE="threads -gnome -kde -minimal -qt4 nfs branding dbus hal jpeg lock session startup-notification thunar X hal fglrx lvm qemu-ifup qemu_user_targets_x86_64 qemu_softmmu_targets_x86_64 aio udev libvirtd lxc network phyp policykit caps nfsv4 parted qemu ccache xen nat ioemu hvm mmx sse sse2 X"

GENTOO_MIRRORS="ftp://mirror.qubenet.net/mirror/gentoo/ ftp://gentoo.wheel.sk/pub/linux/gentoo/ ftp://ftp.swin.edu.au/gentoo"
FEATURES="ccache"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="2G"

EOF

mkdir /etc/portage/
cat &lt;&lt; EOF &gt; /etc/portage/package.keywords
dev-python/python-augeas
app-emulation/qemulator
app-admin/augeas
sys-fs/device-mapper
net-firewall/shorewall6-lite
net-nds/rpcbind
net-fs/nfs4-acl-tools
app-emulation/qemu-kvm
net-analyzer/netcat6
x11-libs/cairo
app-emulation/xen
app-emulation/xen-tools
app-emulation/virt-manager
app-emulation/virtinst
app-emulation/libvirt
sys-kernel/xen-sources
net-firewall/ipsec-tools
&lt;sys-boot/grub-9999 **
EOF

emerge ccache mdadm gentoolkit

cat /dev/null  &gt; /etc/mdadm.conf
for md in 1 2 3 4 5 ; do
echo DEVICE /dev/sd[abcd]$md  &gt;&gt; /etc/mdadm.conf
done
for md in 1 2 3 4 5 ; do
echo ARRAY /dev/md$md UUID=`mdadm -D /dev/md$md | grep UUID | awk ' { print $3 } '` &gt;&gt; /etc/mdadm.conf
done</pre>
<p>Then I grabbed a copy of the 2.6.34 kernel and built it with all the Xen features turned on, all the software RAID on and all the drivers for my disk controllers on. I don&#8217;t use an initramfs so they all need to be in the kernel for raid auto-detection to work at boot time.</p>
<p>Then the problems started&#8230;</p>
<p>I could not get any release of grub2 to mutiboot xen and my kernel. Eventually I found that the fix was to get the latest grub code from Bazaar and to use that with a few work arounds.</p>
<ul>
<li>First unmerge any existing grub</li>
<li>build and install the code from bazaar</li>
<li>run grub-mkdevicemap. This will give a file called /boot/grub/device.map that looks something like this:</li>
</ul>
<pre>(hd0)    /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ9CZ405131
(hd1)    /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ9CZ405138
(hd2)    /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ9CZ405139
(hd3)    /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ9CZ405141
(hd4)    /dev/disk/by-id/md-uuid-5e9a37eb:6f0d060b:3cdba84c:474e7631
(hd5)    /dev/disk/by-id/md-uuid-66f62ccf:59a6fd08:3cdba84c:474e7631
(hd6)    /dev/disk/by-id/md-uuid-69ac7eac:5395e23b:3cdba84c:474e7631
(hd7)    /dev/disk/by-id/md-uuid-6fd706d5:94eafa75:3cdba84c:474e7631
(hd8)    /dev/disk/by-id/md-uuid-f4168a40:b212cce4:3cdba84c:474e7631</pre>
<ul>
<li>This needs altering to  give md names to the RAID disks. A script like this will do the hard part</li>
</ul>
<pre>for i in 1 2 3 4 5
do echo -n "(md$i)    /dev/disk/by-id/md-uuid-"  &gt;&gt; /boot/grub/device.map
mdadm -D /dev/md$i | grep UUID | awk ' { print $3 } ' &gt;&gt; /boot/grub/device.map
done
# cut the old lines oiut of the file</pre>
<ul>
<li>to read like this</li>
</ul>
<pre>(hd0)    /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ9CZ405131
(hd1)    /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ9CZ405138
(hd2)    /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ9CZ405139
(hd3)    /dev/disk/by-id/ata-SAMSUNG_HD502HJ_S20BJ9CZ405141
(md1)    /dev/disk/by-id/md-uuid-6fd706d5:94eafa75:3cdba84c:474e7631
(md2)    /dev/disk/by-id/md-uuid-69ac7eac:5395e23b:3cdba84c:474e7631
(md3)    /dev/disk/by-id/md-uuid-f4168a40:b212cce4:3cdba84c:474e7631
(md4)    /dev/disk/by-id/md-uuid-66f62ccf:59a6fd08:3cdba84c:474e7631
(md5)    /dev/disk/by-id/md-uuid-5e9a37eb:6f0d060b:3cdba84c:474e7631</pre>
<ul>
<li>Then run grub-mkconfig -o /tmp/grub.cfg. This file will look something like this</li>
</ul>
<pre>Generating grub.cfg ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /usr/local/etc/grub.d and settings from /usr/local/etc/default/grub
#

### BEGIN /usr/local/etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
 load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
 set saved_entry="${prev_saved_entry}"
 save_env saved_entry
 set prev_saved_entry=
 save_env prev_saved_entry
 set boot_once=true
fi

function savedefault {
 if [ -z "${boot_once}" ]; then
 saved_entry="${chosen}"
 save_env saved_entry
 fi
}

function load_video {
 insmod vbe
 insmod vga
 insmod video_bochs
 insmod video_cirrus
}

insmod raid
insmod mdraid
insmod part_gpt
insmod part_gpt
insmod part_gpt
insmod part_gpt
insmod ext2
set root='(md4)'
search --no-floppy --fs-uuid --set 25de7b8d-303c-47fa-8ebb-9b2276f17b5f
if loadfont /usr/local/share/grub/unicode.pf2 ; then
 set gfxmode=640x480
 load_video
 insmod gfxterm
fi
if terminal_output gfxterm ; then true ; else
 # For backward compatibility with versions of terminal.mod that don't
 # understand terminal_output
 terminal gfxterm
fi
insmod raid
insmod mdraid
insmod part_gpt
insmod part_gpt
insmod part_gpt
insmod part_gpt
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 9de924a9-a266-4952-90a5-2aec6a9d3cce
set locale_dir=($root)/grub/locale
set lang=
insmod gettext
set timeout=5
### END /usr/local/etc/grub.d/00_header ###

### BEGIN /usr/local/etc/grub.d/09_xen ###
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "vmlinuz-2.6.34-xen" {
insmod raid
insmod mdraid
insmod part_gpt
insmod ext2
set root='(md2)'
multiboot /xen.gz dummy=dummy
module /vmlinuz-2.6.34-xen dummy=dummy root=/dev/md4 max_loop=64
}

### END /usr/local/etc/grub.d/09_xen ###

### BEGIN /usr/local/etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-2.6.34-xen
menuentry 'GNU/Linux, with Linux 2.6.34-xen' --class gnu-linux --class gnu --class os {
 load_video
 insmod raid
 insmod mdraid
 insmod part_gpt
 insmod part_gpt
 insmod part_gpt
 insmod part_gpt
 insmod ext2
 set root='(md2)'
 search --no-floppy --fs-uuid --set 9de924a9-a266-4952-90a5-2aec6a9d3cce
 echo    'Loading Linux 2.6.34-xen ...'
 linux    /vmlinuz-2.6.34-xen root=/dev/md4 ro  
}
menuentry 'GNU/Linux, with Linux 2.6.34-xen (recovery mode)' --class gnu-linux --class gnu --class os {
 load_video
 insmod raid
 insmod mdraid
 insmod part_gpt
 insmod part_gpt
 insmod part_gpt
 insmod part_gpt
 insmod ext2
 set root='(md2)'
 search --no-floppy --fs-uuid --set 9de924a9-a266-4952-90a5-2aec6a9d3cce
 echo    'Loading Linux 2.6.34-xen ...'
 linux    /vmlinuz-2.6.34-xen root=/dev/md4 ro single
}
### END /usr/local/etc/grub.d/10_linux ###

### BEGIN /usr/local/etc/grub.d/20_linux_xen ###
### END /usr/local/etc/grub.d/20_linux_xen ###

### BEGIN /usr/local/etc/grub.d/30_os-prober ###
### END /usr/local/etc/grub.d/30_os-prober ###

### BEGIN /usr/local/etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /usr/local/etc/grub.d/40_custom ###

### BEGIN /usr/local/etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
 source $prefix/custom.cfg;
fi
### END /usr/local/etc/grub.d/41_custom ###
done</pre>
<ul>
<li>Unfortunately, those two UUIDs are totally wrong. They come from grub-probe (run by grub-mkconfig)</li>
</ul>
<pre>grub-probe -d --target=fs_uuid /dev/md2
9de924a9-a266-4952-90a5-2aec6a9d3cce</pre>
<ul>
<li>/dev/md2 is my boot disk but according to mdadm the UUID should be:</li>
</ul>
<pre>mdadm -D /dev/md2
/dev/md2:
 Version : 0.90
 Creation Time : Fri Jul  9 11:25:32 2010
 Raid Level : raid1
 Array Size : 4881664 (4.66 GiB 5.00 GB)
 Used Dev Size : 4881664 (4.66 GiB 5.00 GB)
 Raid Devices : 4
 Total Devices : 4
Preferred Minor : 2
 Persistence : Superblock is persistent

 Update Time : Sat Jul 10 13:08:31 2010
 State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
 Spare Devices : 0

 UUID : 69ac7eac:5395e23b:3cdba84c:474e7631
 Events : 0.36

 Number   Major   Minor   RaidDevice State
 0       8        2        0      active sync   /dev/sda2
 1       8       18        1      active sync   /dev/sdb2
 2       8       34        2      active sync   /dev/sdc2
 3       8       50        3      active sync   /dev/sdd2</pre>
<ul>
<li>Fix that by hand in the config don&#8217;t forget t change the UUID format to 12345678-1234-1234-1234-123456789abc and copy it to /boot/grub/grub.cfg.</li>
<li>Finally run grub-install /dev/md1 and you&#8217;re done.</li>
<li>Exit the install</li>
</ul>
<pre>exit
umount /mnt/gentoo/proc
umount /mnt/gentoo/dev
umount /dev/md2
umount /dev/md5
swapoff /dev/md3
umount /dev/md4</pre>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2010/07/installing-grub2-on-gnulinux-software-raid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Netgear ReadyNAS Pro</title>
		<link>http://sinodun.com/2010/02/netgear-readynas-pro/</link>
		<comments>http://sinodun.com/2010/02/netgear-readynas-pro/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 17:05:52 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[is it me?]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://sinodun.com/blog/?p=459</guid>
		<description><![CDATA[I bought one of these because I keep running out of disk space. With the ability to store 12Tb, I thought it might keep me going for some time to come. It allows you to build raid 0,1 and 5 arrays and Netgear&#8217;s own X raid something or other. Unfortunately, it doent allow striping and [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I bought one of <a href="http://www.netgear.com/Products/Storage/ReadyNASPro.aspx" target="_blank">these</a> because I keep running out of disk space. With the ability to store 12Tb, I thought it might keep me going for some time to come.</p>
<p style="text-align: left;">It allows you to build raid 0,1 and 5 arrays and Netgear&#8217;s own X raid something or other. Unfortunately, it doent allow striping and mirroring. It  is compatible with OS X and supports AFP shares and Timemachine as well as <a href="http://sinodun.com/blog/2010/02/os-x-server/">iscsi as I mentioned earlier</a>. However, the GUI is a bit flaky and didn&#8217;t seem to like <a href="http://en.wikipedia.org/wiki/ISCSI#Addressing">Initiator iqn&#8217;s</a> at all. If you download the root ssh plugin you can access the box as root over ssh and look at what it is actually doing.</p>
<p style="text-align: left;">iscsi config is held in /etc/ietd.conf</p>
<pre style="text-align: left;">Target iqn.2010-2.taurus.sinodun.com:calendarserver
 Lun 0 Path=/e/calendarserver,Type=fileio,ScsiSN=RN293R60037B-003,IOMode=wb
 HeaderDigest CRC32,None
 DataDigest CRC32,None
 IncomingUser user xxxxxxxxxxxx
 InitiatorIQN iqn.2010-02.com.sinodun.hydra:calendarserver

Target iqn.2010-2.taurus.sinodun.com:collaboration
 Lun 0 Path=/e/collaboration,Type=fileio,ScsiSN=RN293R60037B-001,IOMode=wb
 HeaderDigest CRC32,None
 DataDigest CRC32,None
 IncomingUser user xxxxxxxxxxxx
 InitiatorIQN iqn.2010-02.com.sinodun.hydra:collaboration</pre>
<p style="text-align: left;">Firstly their Target IQNs don&#8217;t look like the spec described on wikipedia &#8211; I don&#8217;t know if it is Netgear or Wikipedia that is wrong here and don&#8217;t care as this doen&#8217;t seem to break anything.</p>
<p style="text-align: left;">The real problem in the Initiator IQN &#8211; I had to add this by hand and it gets stripped out of every entry in the file every time a new iscsi target is created and at other random times. According to the Netgear web GUI theses are needed for persistent reservation support.</p>
<p style="text-align: left;">However, once it is working it seems nice and stable. If your disks don&#8217;t mount just go and check those Initiator IQNs.</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2010/02/netgear-readynas-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OS X Server</title>
		<link>http://sinodun.com/2010/02/os-x-server/</link>
		<comments>http://sinodun.com/2010/02/os-x-server/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 14:15:18 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://sinodun.com/?p=422</guid>
		<description><![CDATA[I have recently bought one of the new Mac Mini Servers, partly because I like everything mac and partly because I wanted to try OS X Server for my business. First impressions are great. Apple have taken the best (or very good) OSS and created a nice, if somewhat basic GUI to sit on top. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I have recently bought one of the new <a href="http://store.apple.com/uk/configure/MC408B/A?mco=MTM3NzUyNjY" target="_blank">Mac Mini Servers</a>, partly because I like everything mac and partly because I wanted to try OS X Server for my business.</p>
<p style="text-align: left;">First impressions are great. Apple have taken the best (or very good) OSS and created a nice, if somewhat basic GUI to sit on top. You can of course still go and edit the configuration by hand if need be.</p>
<p style="text-align: left;">Unfortunately, the graphics card failed in the first unit, however Apple were very good and I had a new unit in a couple of days. This got me thinking. Normally if I wanted to send a computer back for repair or replacement I would remove the disks but with a mac mini you have to prise it open with a paint scraper. Not something I really want to be doing to a box which is still under warranty.</p>
<p style="text-align: left;">So, when the new one arrived, I decided to take advantage of my <a href="http://www.netgear.com/Products/Storage/ReadyNASPro.aspx" target="_blank">Netgear ReadyNAS Pro NAS</a> box&#8217;s (of which more later) ability to do iscsi and along with the <a href="http://www.studionetworksolutions.com/products/product_detail.php?pi=11" target="_blank">globalSAN iSCSI Initiator</a> added disks for each service that could contain sensitive data.  This took some time to get working, mostly due to issues with the Netgear but I now have all data on hot swap mirrored disks and the mac mini could go back to apple with no sign of sensitive data.</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2010/02/os-x-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome to Sinodun Internet Technologies</title>
		<link>http://sinodun.com/2010/01/hello-world/</link>
		<comments>http://sinodun.com/2010/01/hello-world/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 14:11:45 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sinodun.com/?p=1</guid>
		<description><![CDATA[Welcome to Sinodun Internet Technologies. John Dickinson has recently incorporated and we are in the process of setting up our new website. Please visit again soon.]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Welcome to Sinodun Internet Technologies. John Dickinson has recently incorporated and we are in the process of setting up our new website. Please visit again soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2010/01/hello-world/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Developing an engine for OpenSSL</title>
		<link>http://sinodun.com/2009/02/developing-an-engine-for-openssl/</link>
		<comments>http://sinodun.com/2009/02/developing-an-engine-for-openssl/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 15:57:49 +0000</pubDate>
		<dc:creator>jad</dc:creator>
				<category><![CDATA[crypto]]></category>

		<guid isPermaLink="false">http://jadickinson.co.uk/?p=338</guid>
		<description><![CDATA[For fun I thought I would see how hard it is to write an engine for OpenSSL. There are several existing ones that you can look at. I started by seeing how the opensc engine worked. This code shows the first step. #include &#60;stdio.h&#62; #include &#60;string.h&#62; #include &#60;openssl/crypto.h&#62; #include &#60;openssl/objects.h&#62; #include &#60;openssl/engine.h&#62; static int bind_fn(ENGINE [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">For fun I thought I would see how hard it is to write an engine for OpenSSL. There are several existing ones that you can look at. I started by seeing how the <a href="http://opensc-project.org">opensc</a> engine worked. This code shows the first step.</p>
<pre>#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;openssl/crypto.h&gt;
#include &lt;openssl/objects.h&gt;
#include &lt;openssl/engine.h&gt;

static int bind_fn(ENGINE * e, const char *id)
{
  if (!ENGINE_set_id(e, "simple") ||
      !ENGINE_set_name(e, "simple engine")) {
    return 0;
  } else {
    return 1;
  }
}

IMPLEMENT_DYNAMIC_CHECK_FN();
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn);</pre>
<p>Compile it like this</p>
<pre>gcc -c -fpic simple_engine.c
gcc -shared -o simple_engine.so simple_engine.o</pre>
<p>Make openssl.cnf look like this</p>
<pre>openssl_conf            = openssl_def

[openssl_def]
engines = engine_section

[engine_section]
simple = simple_section

[simple_section]
engine_id = simple
dynamic_path = /path/to/simple_engine.so
init = 0

[req]
distinguished_name = req_distinguished_name

[req_distinguished_name]</pre>
<p>Run OpenSSL and see your results</p>
<pre>$ openssl engine
(padlock) VIA PadLock (no-RNG, no-ACE)
(dynamic) Dynamic engine loading support
(simple) simple engine</pre>
<p>Of course it doesn&#8217;t do anything useful yet. But it is a start.</p>
]]></content:encoded>
			<wfw:commentRss>http://sinodun.com/2009/02/developing-an-engine-for-openssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

