<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Andrew's blog (Entries tagged as hardware)</title>
    <link>https://blog.etc.gen.nz/</link>
    <description>This is a blog, it is it is.</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:blog@etc.gen.nz" />
    <generator>Serendipity 2.4.0 - http://www.s9y.org/</generator>
    <pubDate>Sun, 17 Sep 2017 12:03:07 GMT</pubDate>

    <image>
    <url>https://blog.etc.gen.nz/templates/2k11/img/s9y_banner_small.png</url>
    <title>RSS: Andrew's blog - This is a blog, it is it is.</title>
    <link>https://blog.etc.gen.nz/</link>
    <width>100</width>
    <height>21</height>
</image>

<item>
    <title>Network boot a Raspberry Pi 3</title>
    <link>https://blog.etc.gen.nz/archives/131-Network-boot-a-Raspberry-Pi-3.html</link>
            <category>catalyst</category>
    
    <comments>https://blog.etc.gen.nz/archives/131-Network-boot-a-Raspberry-Pi-3.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=131</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=131</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    &lt;p&gt;I found to make all this work I had to piece together a bunch of information from different locations. This fills in some of the blanks from the official Raspberry Pi documentation. See &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net.md&#039;]);&quot;  href=&quot;https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net.md&quot;&gt;here&lt;/a&gt;, &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.raspberrypi.org/blog/pi-3-booting-part-ii-ethernet-all-the-awesome/&#039;]);&quot;  href=&quot;https://www.raspberrypi.org/blog/pi-3-booting-part-ii-ethernet-all-the-awesome/&quot;&gt;here&lt;/a&gt;, and &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net_tutorial.md&#039;]);&quot;  href=&quot;https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net_tutorial.md&quot;&gt;here&lt;/a&gt;.&lt;p&gt;

&lt;p&gt;&lt;b&gt;Image&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Download the latest raspbian image from &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.raspberrypi.org/downloads/raspbian/&#039;]);&quot;  href=&quot;https://www.raspberrypi.org/downloads/raspbian/&quot;&gt;https://www.raspberrypi.org/downloads/raspbian/&lt;/a&gt; and unzip it. I used the lite version as I&#039;ll install only what I need later.&lt;/p&gt;

&lt;p&gt;To extract the files from the image we need to jump through some hoops. Inside the image are two partitions, we need data from each one.&lt;/p&gt;

&lt;pre&gt;
 # Make it easier to re-use these instructions by using a variable
 IMG=2017-04-10-raspbian-jessie-lite.img
 fdisk -l $IMG
&lt;/pre&gt;

&lt;p&gt;You should see some output like:&lt;/p&gt;

&lt;pre&gt;
 Disk 2017-04-10-raspbian-jessie-lite.img: 1.2 GiB, 1297862656 bytes, 2534888 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disklabel type: dos
 Disk identifier: 0x84fa8189
 
 Device                               Boot Start     End Sectors  Size Id Type
 2017-04-10-raspbian-jessie-lite.img1       8192   92159   83968   41M  c W95 FAT32 (LBA)
 2017-04-10-raspbian-jessie-lite.img2      92160 2534887 2442728  1.2G 83 Linux
&lt;/pre&gt;

&lt;p&gt;You need to be able to mount both the boot and the root partitions. Do this by tracking the offset of each one and multiplying it by the sector size, which is given on the line saying &quot;Sector size&quot; (typically 512 bytes), for example with the 2017-04-01 image, boot has an offset of 8192, so I mount it like this (it is VFAT):&lt;/p&gt;

&lt;pre&gt;
 mount -v -o offset=$((8192 * 512)) -t vfat $IMG /mnt
 # I then copy the data off:
 mkdir -p /data/diskless/raspbian-lite-base-boot/
 rsync -xa /mnt/ /data/diskless/raspbian-lite-base-boot/
 # unmount the partition now:
 umount /mnt
&lt;/pre&gt;

&lt;p&gt;Then we do the same for the root partition:&lt;/p&gt;

&lt;pre&gt;
 mount -v -o offset=$((92160 * 512)) -t ext4 $IMG /mnt
 # copy the data off:
 mkdir -p /data/diskless/raspbian-lite-base-root/
 rsync -xa /mnt/ /data/diskless/raspbian-lite-base-root/
 # umount the partition now:
 umount /mnt
&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;DHCP&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;When I first set this up, I used &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/openwrt.org&#039;]);&quot;  href=&quot;http://openwrt.org&quot;&gt;OpenWRT&lt;/a&gt; on my router, and I had to patch &lt;tt&gt;/etc/init/dnsmasq&lt;/tt&gt; to support setting DHCP option 43. As of the writting of this article, a similar patch has been merged, but isn&#039;t in a release yet, and, well, there may never be another release of OpenWRT. I&#039;m now running &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/lede-project.org/&#039;]);&quot;  href=&quot;https://lede-project.org/&quot;&gt;LEDE&lt;/a&gt;, and the the good news is it already has the patch merged (hurrah!). If you&#039;re still on OpenWRT, then here&#039;s the patch you&#039;ll need:&lt;/p&gt;

&lt;p&gt;&lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/git.lede-project.org/?p=source.git;a=commit;h=9412fc294995ae2543fabf84d2ce39a80bfb3bd6&#039;]);&quot;  href=&quot;https://git.lede-project.org/?p=source.git;a=commit;h=9412fc294995ae2543fabf84d2ce39a80bfb3bd6&quot;&gt;
https://git.lede-project.org/?p=source.git;a=commit;h=9412fc294995ae2543fabf84d2ce39a80bfb3bd6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This lets you put the following in &lt;tt&gt;/etc/config/dnsmasq&lt;/tt&gt;, this says that any device that uses DHCP and has a MAC issued by the Raspberry PI Foundation, should have option 66 (boot server) and option 43 set as specified. Set the IP address on option 66 to the device that should be used for tftp on your network, if it&#039;s the same device that provides DHCP then it isn&#039;t required. I had to set the boot server, as my other network boot devices are using a different server (with an older tftpd-hpa, I explain the problem further down).&lt;/p&gt;

&lt;pre&gt;
 config mac &#039;rasperrypi&#039;
         option mac &#039;b8:27:eb:*:*:*&#039;
         option networkid &#039;rasperrypi&#039;
         list dhcp_option &#039;66,10.1.0.253&#039;
         list dhcp_option &#039;43,Raspberry Pi Boot&#039;
&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;tftp&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Initially I used a version of tftpd that was too old and didn&#039;t support how the RPi tried to discover if it should use the serial number based naming scheme. The version of tftpd-hpa Debian Jessie works just fine. To find out the serial number you&#039;ll probably need to increase the logging of tftpd-hpa, do so by editing &lt;tt&gt;/etc/default/tftpd-hpa&lt;/tt&gt; and adding &quot;-v&quot; to the &lt;tt&gt;TFTP_OPTIONS&lt;/tt&gt; option. It can also be useful to watch tcpdump to see the requests and responses, for example (10.1.0.203 is the IP of the RPi I&#039;m working with):&lt;/p&gt;

&lt;pre&gt;
  tcpdump -n -i eth0 host 10.1.0.203 and dst port 69
&lt;/pre&gt;

&lt;p&gt;This was able to tell me the serial number of my RPi, so I made a directory in my tftpboot directory with the same serial number and copied all the boot files into there. I then found that I had to remove the init= portion from the cmdline.txt file I&#039;m using. To ease debugging I also removed quiet. So, my current cmdline.txt contains (newlines entered for clarity, but the file has it all on one line):&lt;/p&gt;

&lt;pre&gt;
idwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/nfs
nfsroot=10.1.0.253:/data/diskless/raspbian-lite-base-root,vers=3,rsize=1462,wsize=1462
ip=dhcp elevator=deadline rootwait hostname=rpi.etc.gen.nz
&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;NFS root&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;You&#039;ll need to export the directories you created via NFS. My exports file has these lines:&lt;/p&gt;

&lt;pre&gt;
/data/diskless/raspbian-lite-base-root	10.1.0.0/24(rw,no_root_squash,sync,no_subtree_check)
/data/diskless/raspbian-lite-base-boot	10.1.0.0/24(rw,no_root_squash,sync,no_subtree_check)
&lt;/pre&gt;

&lt;p&gt;And you&#039;ll also want to make sure you&#039;re mounting those correctly during boot, so I have in &lt;tt&gt;/data/diskless/raspbian-lite-base-root/etc/fstab&lt;/tt&gt; the following lines:

&lt;pre&gt;
10.1.0.253:/data/diskless/raspbian-lite-base-root   /       nfs   rw,vers=3       0   0
10.1.0.253:/data/diskless/raspbian-lite-base-boot   /boot   nfs   vers=3,nolock   0   2
&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;Network Booting&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Now you can hopefully boot. Unless you into this &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/github.com/raspberrypi/firmware/issues/764&#039;]);&quot;  href=&quot;https://github.com/raspberrypi/firmware/issues/764&quot;&gt;bug&lt;/a&gt;, as I did. Where the RPi will sometimes fail to boot. Turns out the fix, which is mentioned on the bug report, is to put bootcode.bin (and only bootcode.bin) onto an SD card. That&#039;ll then load the fixed bootcode, and which will then boot reliably.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sat, 02 Sep 2017 11:31:00 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/131-guid.html</guid>
    <category>catalyst</category>
<category>debian</category>
<category>geek</category>
<category>hardware</category>
<category>rpi</category>

</item>
<item>
    <title>Nifty eBook reader</title>
    <link>https://blog.etc.gen.nz/archives/78-Nifty-eBook-reader.html</link>
            <category>catalyst</category>
    
    <comments>https://blog.etc.gen.nz/archives/78-Nifty-eBook-reader.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=78</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=78</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    It seems that the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.dadirect.com/iliad/&#039;]);&quot;  href=&quot;http://www.dadirect.com/iliad/&quot;&gt;iLiad&lt;/a&gt; might be really nice eBook reader.  It supports PDF, allows you to annotate documents using a touchscreen and lots of other fancy things.&lt;br /&gt;
&lt;br /&gt;
Nice.&lt;br /&gt;
&lt;br /&gt;
Now if only it cost less than AUD$1,000... 
    </content:encoded>

    <pubDate>Sun, 16 Dec 2007 20:58:32 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/78-guid.html</guid>
    <category>catalyst</category>
<category>geek</category>
<category>hardware</category>

</item>
<item>
    <title>Hardware (?) Hacks</title>
    <link>https://blog.etc.gen.nz/archives/69-Hardware-Hacks.html</link>
            <category>catalyst</category>
            <category>house</category>
    
    <comments>https://blog.etc.gen.nz/archives/69-Hardware-Hacks.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=69</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=69</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    &lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 83px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:9 --&gt;&lt;img width=&#039;83&#039; height=&#039;110&#039;  src=&quot;https://blog.etc.gen.nz/uploads/Stereo/DSCF5610-small.serendipityThumb.JPG&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;A bit of a mess...&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_right&quot; style=&quot;width: 83px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:7 --&gt;&lt;img width=&#039;83&#039; height=&#039;110&#039;  src=&quot;https://blog.etc.gen.nz/uploads/p8200067.serendipityThumb.jpg&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Ah, much tidier&lt;/div&gt;&lt;/div&gt;What do you do if the back of your stereo cabinet is a mess and you&#039;ve been a network monkey in the past?&lt;br /&gt;
&lt;br /&gt;
Simple, you grab some cable management brackets from your good junk pile[1], some bits of MDF and you hack your stereo cabinet.&lt;br /&gt;
&lt;br /&gt;
I think it came out much tidier, and now I can safely push it back without risking damaging cables!&lt;br /&gt;
&lt;br /&gt;
If you&#039;re wondering why some of the power cords aren&#039;t plugged in, they belong to devices we don&#039;t use very much, why have them plugged in and drawing power if we aren&#039;t actually using them?&lt;br /&gt;
&lt;br /&gt;
[1] &quot;Good junk pile&quot; every geek should have one, it is that collection of odds and sods that you don&#039;t really need, but which - just might, one day - come in handy.  It should be noted however that they don&#039;t tend to have a very high Wife Approval Factor. 
    </content:encoded>

    <pubDate>Thu, 30 Aug 2007 09:25:06 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/69-guid.html</guid>
    <category>catalyst</category>
<category>geek</category>
<category>hardware</category>
<category>house</category>
<category>stereo</category>

</item>
<item>
    <title>Hardware Changelog</title>
    <link>https://blog.etc.gen.nz/archives/59-Hardware-Changelog.html</link>
            <category>catalyst</category>
    
    <comments>https://blog.etc.gen.nz/archives/59-Hardware-Changelog.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=59</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=59</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    Why doesn&#039;t hardware have changelogs?&lt;br /&gt;
&lt;br /&gt;
Perhaps I&#039;ve been using open source software for too long, but I like to scan through the changelogs (a log of changes that the authors have made before releasing a new version) to see what has changed.  This can give me hints to new features to checkout, or changed behaviour that it would be helpful to know about.&lt;br /&gt;
&lt;br /&gt;
But hardware (and closed source software) typically don&#039;t have changelogs.  An example is my Brand New Replaced Under Warranty D-Link DGS-1008D.  The old one was hardware revision C3.  The new one is C4.  What has changed?  Will it not brick itself like the old one did after a years usage?  Is this one going to be faster because they&#039;ve improved the code or silicon in some fashion?&lt;br /&gt;
&lt;br /&gt;
I&#039;ll never know... 
    </content:encoded>

    <pubDate>Wed, 27 Jun 2007 21:03:54 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/59-guid.html</guid>
    <category>catalyst</category>
<category>geek</category>
<category>hardware</category>

</item>
<item>
    <title>One Laptop Per Child</title>
    <link>https://blog.etc.gen.nz/archives/34-One-Laptop-Per-Child.html</link>
    
    <comments>https://blog.etc.gen.nz/archives/34-One-Laptop-Per-Child.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=34</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=34</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    One of the projects I&#039;ve been following quite closely is the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/laptop.org/&#039;]);&quot;  href=&quot;http://laptop.org/&quot;&gt;OLPC&lt;/a&gt; project for the last couple of years.  At &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.catalyst.net.nz&#039;]);&quot;  href=&quot;http://www.catalyst.net.nz&quot;&gt;Catalyst&lt;/a&gt;&lt;br /&gt;
we have an A-test board.  Unfortunately I haven&#039;t much of a chance to play with it (although I would like to).&lt;br /&gt;
&lt;br /&gt;
Last night one of karora&#039;s sons ran over and told us &quot;Daddy there is a grownup over there using a kids computer!&quot;.  Turns out that the &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/pleasesendustolinuxconfau.info/&#039;]);&quot;  href=&quot;http://pleasesendustolinuxconfau.info/&quot;&gt;Please Send Us To linux.conf.au&lt;/a&gt; students from &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/oregonstate.edu/&#039;]);&quot;  href=&quot;http://oregonstate.edu/&quot;&gt;Oregon State University&lt;/a&gt; had a OLPC out and were playing with it.&lt;br /&gt;
&lt;br /&gt;
Susanne and I headed over to check it out.  It is a really amazing device, even more amazing to see it in the flesh.  It is very small, quite light and looks pretty darn cool.  There is a &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.youtube.com/watch?v=N-MYqe7fNsU&#039;]);&quot;  href=&quot;http://www.youtube.com/watch?v=N-MYqe7fNsU&quot;&gt;video&lt;/a&gt; of us checking it on YouTube.&lt;br /&gt;
&lt;br /&gt;
I can see why the hype has increased even more now that all the components have been put together and the working screen is in it.&lt;br /&gt;
&lt;br /&gt;
Oh, and Susanne now &lt;b&gt;really&lt;/b&gt; wants one. 
    </content:encoded>

    <pubDate>Tue, 16 Jan 2007 01:24:24 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/34-guid.html</guid>
    <category>hardware</category>
<category>lca2007</category>
<category>olpc</category>

</item>
<item>
    <title>Lenovo in NZ kinda sucky</title>
    <link>https://blog.etc.gen.nz/archives/24-Lenovo-in-NZ-kinda-sucky.html</link>
    
    <comments>https://blog.etc.gen.nz/archives/24-Lenovo-in-NZ-kinda-sucky.html#comments</comments>
    <wfw:comment>https://blog.etc.gen.nz/wfwcomment.php?cid=24</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.etc.gen.nz/rss.php?version=2.0&amp;type=comments&amp;cid=24</wfw:commentRss>
    

    <author>andrew@etc.gen.nz (Andrew Ruthven)</author>
    <content:encoded>
    &lt;a onclick=&quot;_gaq.push([&#039;_trackPageview&#039;, &#039;/extlink/www.lenovo.com&#039;]);&quot;  href=&quot;http://www.lenovo.com&quot;&gt;Lenovo&lt;/a&gt; seem to be just another company that is completely USA centric.&lt;br /&gt;
&lt;br /&gt;
I wanted to price out a Lenovo notebook, as I&#039;ve used a number of IBM ThinkPads over the years and always found them to be very good notebooks.  I had a look at their website and found the Z61t that seems pretty nifty.  I did a few web searches using Google and found people talking about customising it, by adding a higher resolution screen, the 7 cell battery and things like that.&lt;br /&gt;
&lt;br /&gt;
So I try cusomising the notebook on the Lenovo website (after telling it I&#039;m in NZ).  You can&#039;t.  No customisation possible.  You can order an &lt;b&gt;additional&lt;/b&gt; battery (which is 7 cells) but you still get (and pay for) the 4 cell battery.  So I call the 0800 number and talk to a woman at their call centre.  She informs me that the package is the package, no customisation, no upgrades for batteries, nothing.  I thank her and hang up somewhat disappointed.&lt;br /&gt;
&lt;br /&gt;
Out of curiosity I tell the Lenovo website I&#039;m in the USA.  Wow.  You can totally customise the notebook.  Specify the CPU, RAM, batteries whatever.  Although there is no option for a higher resolution screen.&lt;br /&gt;
&lt;br /&gt;
Sigh... 
    </content:encoded>

    <pubDate>Sun, 26 Nov 2006 20:22:03 +0000</pubDate>
    <guid isPermaLink="false">https://blog.etc.gen.nz/archives/24-guid.html</guid>
    <category>geek</category>
<category>hardware</category>

</item>

</channel>
</rss>
