<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"><channel><title>softwarebakery.com</title><atom:link href="http://softwarebakery.com/feed.xml" rel="self" type="application/rss+xml" /><link>http://softwarebakery.com/</link><description>Softwarebakery</description><pubDate>Mon, 22 Apr 2013 23:53:26 +0200</pubDate><generator>http://github.com/creationix/wheat</generator><language>en</language><item><title>Install Hirens Boot CD on DriveDroid</title><link>http://softwarebakery.com/install-hirensbootcd-on-drivedroid</link><comments>http://softwarebakery.com/install-hirensbootcd-on-drivedroid#disqus_thread</comments><pubDate>Mon, 22 Apr 2013 22:30:00 +0200</pubDate><guid isPermaLink="true">http://softwarebakery.com/install-hirensbootcd-on-drivedroid</guid><description>&lt;p&gt;In this tutorial we will go through the process of installing Hirens Boot CD on a DriveDroid image. This is very similar to the process of installing other systems. The steps are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a blank image in DriveDroid of reasonable size.&lt;/li&gt;
&lt;li&gt;Select the image in DriveDroid, so that it becomes available on your PC as an USB drive.&lt;/li&gt;
&lt;li&gt;Follow the instructions at &lt;a href=&quot;http://www.hiren.info/pages/bootcd-on-usb-disk&quot;&gt;Hirens Boot CDs page on how to install Hirens on a USB drive&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This also applies to other systems, but for those systems the instructions on how to install them to a USB drive will, of course, differ. In this article we will focus on install Hirens Boot CD.&lt;/p&gt;

&lt;h2&gt;Requirements&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A phone with &lt;a href=&quot;/projects/drivedroid&quot;&gt;DriveDroid&lt;/a&gt; installed&lt;/li&gt;
&lt;li&gt;An USB cable&lt;/li&gt;
&lt;li&gt;A PC with Windows installed&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.7-zip.org/&quot;&gt;7-Zip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Hirens.BootCD.15.2.zip&lt;/code&gt; from &lt;a href=&quot;http://www.hirensbootcd.org/download/&quot;&gt;hirensbootcd.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;USBFormat.zip&lt;/code&gt; from &lt;a href=&quot;http://www.hiren.info/pages/bootcd-on-usb-disk&quot;&gt;hiren.info&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;grub4dos.zip&lt;/code&gt; from &lt;a href=&quot;http://www.hiren.info/pages/bootcd-on-usb-disk&quot;&gt;hiren.info&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Creating a blank image in DriveDroid&lt;/h2&gt;

&lt;p&gt;The first step is creating a blank image in DriveDroid where we will install Hirens Boot CD on. You will find the option 'Create blank image...' under the + menu in DriveDroid:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;install-hirensbootcd-on-drivedroid/01-createimage.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next choose a filename, set the size to 650MB, uncheck 'Partition Table (MBR)' and set filesystem to 'None'. It should look like:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;install-hirensbootcd-on-drivedroid/02-createimage.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next hit create and wait for the creation process to complete. This usally takes at least a minute.&lt;/p&gt;

&lt;p&gt;Now we have a blank image. It is time to use it. You should be able to see the image in DriveDroids image list. Tap the newly created image:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;install-hirensbootcd-on-drivedroid/03-useimage.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A dialog will popup where you can select in what mode to host the image. Your dialog might differ, but the options are from left to right:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writable USB-disk&lt;/li&gt;
&lt;li&gt;Read-only USB-disk&lt;/li&gt;
&lt;li&gt;CD-rom disk&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On my device I have two host-devices, so I see two rows. For our purposes we want to create a USB-disk and we need the PC to be able to write to it, so we choose the first option:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;install-hirensbootcd-on-drivedroid/04-useusb.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A USB-disk should now popup on your PC. From here on we can loosely follow the tutorial on how to install Hirens Boot CD to an USB-drive that is found on &lt;a href=&quot;http://www.hiren.info/pages/bootcd-on-usb-disk&quot;&gt;their site&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Installing Hirens Boot CD&lt;/h2&gt;

&lt;p&gt;From their tutorial we can see that we first need USBFormat. Download and extract the zip and run USBFormat as an administrator. Next look for the USB-disk in USBFormat. For me it shows up as 'Linux File-CD', but that may differ on your phone/rom/kernel. Once you have the USB-drive selected use the following settings to format the disk:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;install-hirensbootcd-on-drivedroid/05-formatusb.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once USBFormat has finished, you'll notice that the disk now becomes available on Windows and allows you to put files on it.&lt;/p&gt;

&lt;p&gt;For the next step we need to use grub4dos. Download and extract the zip and run &lt;code&gt;grubinst_gui.exe&lt;/code&gt; as administrator. Look for the USB-disk by looking for the correct size (around 650MB) and use the following settings to install Grub4Dos onto the USB-disk:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;install-hirensbootcd-on-drivedroid/06-installgrub.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next, copy &lt;code&gt;grldr&lt;/code&gt; and &lt;code&gt;menu.lst&lt;/code&gt; from &lt;code&gt;grub4dos.zip&lt;/code&gt; to the USB-drive.&lt;/p&gt;

&lt;p&gt;Now it's time to put the rest of the files of Hirens Boot CD onto the USB-drive. First download and extract the file &lt;code&gt;Hirens.BootCD.15.2.zip&lt;/code&gt; from &lt;a href=&quot;http://www.hirensbootcd.org/download/&quot;&gt;their download page&lt;/a&gt;. You should see an ISO file named &lt;code&gt;Hiren's.BootCD.15.2.iso&lt;/code&gt;. We will use 7-zip to extract the files from the ISO to the USB-disk. Click with right mouse on the ISO, choose 7-Zip and 'Extract files...':&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;install-hirensbootcd-on-drivedroid/07-extractiso.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next enter the location of the USB-disk (use Browse if you aren't sure). Extraction will take several minutes.&lt;/p&gt;

&lt;p&gt;When the extaction process is finished you should have the following files on your USB-disk:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;install-hirensbootcd-on-drivedroid/08-usbcontent.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, make sure to safely remove the USB-disk from Windows. This is to ensure all data is being written to the disk (which is usually cached by Windows for a while). After doing so, open up DriveDroid on your phone and tap the image again. Now instead of using the first option, choose the USB-disk in read-only mode (the padlocked USB icon). This will ensure the USB-disk cannot change whenever the image is hosted in this mode. If you ever want to write some files onto the disk, choose writable USB-disk-mode.&lt;/p&gt;

&lt;p&gt;Now reboot your PC. It should now be able to boot Hirens Boot CD from your phone. Enjoy!&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>Shrinking images on Linux</title><link>http://softwarebakery.com/shrinking-images-on-linux</link><comments>http://softwarebakery.com/shrinking-images-on-linux#disqus_thread</comments><pubDate>Thu, 21 Feb 2013 15:53:00 +0100</pubDate><guid isPermaLink="true">http://softwarebakery.com/shrinking-images-on-linux</guid><description>&lt;p&gt;When creating images from existing ISOs you often need to allocate a number of MB for the image to &lt;em&gt;at least&lt;/em&gt; fit the files that are in the ISO. Predicting the exact size of the image is hard, even for a program. In this case you will create an image that is larger than actually needed: the image is much larger than the files on the image are combined.&lt;/p&gt;

&lt;p&gt;This post will show how to shrink an existing image to a more optimal size. We will do this on Linux, since all required tools are available there: GParted, &lt;code&gt;fdisk&lt;/code&gt; and &lt;code&gt;truncate&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;Requirements&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;A Linux PC&lt;/li&gt;
&lt;li&gt;Some knowledge how the terminal works will helps&lt;/li&gt;
&lt;li&gt;The unoptimal image (&lt;code&gt;myimage.img&lt;/code&gt; in this example)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Creating loopback device&lt;/h1&gt;

&lt;p&gt;GParted is a great application that can handle partition tables and filesystems quite well. In this tutorial we will use GParted to shrink the filesystem (and its accompaning partition in the partition table).&lt;/p&gt;

&lt;p&gt;GParted operates on devices, not simple files like images. This is why we first need to create a device for the image. We do this using the loopback-functionality of Linux.&lt;/p&gt;

&lt;p&gt;First we will enable loopback if it wasn't already enabled:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo modprobe loop
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we can request a new (free) loopback device:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo losetup -f
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will return the path to a free loopback device. In this example this is &lt;code&gt;/dev/loop0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Next we create a device of the image:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo losetup /dev/loop0 myimage.img
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we have a device &lt;code&gt;/dev/loop0&lt;/code&gt; that represents &lt;code&gt;myimage.img&lt;/code&gt;. We want to access the partitions that are on the image, so we need to ask the kernel to load those too:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo partprobe /dev/loop0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This should give us the device &lt;code&gt;/dev/loop0p1&lt;/code&gt;, which represents the first partition in &lt;code&gt;myimage.img&lt;/code&gt;. We do not need this device directly, but GParted requires it.&lt;/p&gt;

&lt;h1&gt;Resize partition using GParted&lt;/h1&gt;

&lt;p&gt;Next we can load the device using GParted:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo gparted /dev/loop0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This should show a window similar to the following:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;shrinking-images-on-linux/gparted-01.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now notice a few things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There is one partition.&lt;/li&gt;
&lt;li&gt;The partition allocates the entire disk/device/image.&lt;/li&gt;
&lt;li&gt;The partition is filled partly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We want to resize this partition so that is fits it content, but not more than that.&lt;/p&gt;

&lt;p&gt;Select the partition and click Resize/Move. A window similar to the following will popup:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;shrinking-images-on-linux/gparted-02.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Drag the right bar to the left as much as possible.&lt;/p&gt;

&lt;p&gt;Note that sometimes GParted will need a few MB extra to place some filesystem-related data. You can press the up-arrow at the &lt;em&gt;New size&lt;/em&gt;-box a few times to do so. For example, I pressed it 10 times (=10MiB) for FAT32 to work. For NTFS you might not need to at all.&lt;/p&gt;

&lt;p&gt;Finally press &lt;em&gt;Resize/Move&lt;/em&gt;. You will return to the GParted window. This time it will look similar to the following:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;shrinking-images-on-linux/gparted-03.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Notice that there is a part of the disk &lt;em&gt;unallocated&lt;/em&gt;. This part of the disk will not be used by the partition, so we can shave this part off of the image later. GParted is a tool for disks, so it doesn't shrink images, only partitions, we have to do the shrinking of the image ourselves.&lt;/p&gt;

&lt;p&gt;Press &lt;em&gt;Apply&lt;/em&gt; in GParted. It will now move files and finally shrink the partition, so it can take a minute or two, most of the time it finishes quickly. Afterwards close GParted.&lt;/p&gt;

&lt;p&gt;Now we don't need the loopback-device anymore, so unload it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo losetup -d /dev/loop0
&lt;/code&gt;&lt;/pre&gt;

&lt;h1&gt;Shaving the image&lt;/h1&gt;

&lt;p&gt;Now that we have all the important data at the beginning of the image it is time to shave of that unallocated part. We will first need to know where our partition ends and where the unallocated part begins. We do this using &lt;code&gt;fdisk&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ fdisk -l myimage.img
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here we will see an output similar to the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Disk myimage.img: 6144 MB, 6144000000 bytes, 12000000 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
Disk identifier: 0x000ea37d

      Device Boot      Start         End      Blocks   Id  System
myimage.img1            2048     9181183     4589568    b  W95 FAT32
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note two things in the output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The partition ends on block 9181183 (shown under &lt;code&gt;End&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;The block-size is 512 bytes (shown as &lt;code&gt;sectors of 1 * 512&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will use these numbers in the rest of the example. The block-size (512) is often the same, but the ending block (9181183) will differ for you. The numbers mean that the parition ends on byte 9181183*512 of the file. After that byte comes the unallocated-part. Only the first 9181183*512 bytes will be useful for our image.&lt;/p&gt;

&lt;p&gt;Next we shrink the image-file to a size that can just contain the partition. For this we will use the &lt;code&gt;truncate&lt;/code&gt; command (thanks uggla!). With the truncate command need to supply the size of the file in bytes. The last block was 9181183 and block-numbers start at 0. That means we need (9181183+1)*512 bytes. This is important, else the partition will not fit the image. So now we use truncate with the calculations:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ truncate --size=$[(9181183+1)*512] myimage.img
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now copy the new image over to your phone, where it should act exactly the same as the old/big image.&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>Windows installation on DriveDroid</title><link>http://softwarebakery.com/windows-install-on-drivedroid</link><comments>http://softwarebakery.com/windows-install-on-drivedroid#disqus_thread</comments><pubDate>Fri, 25 Jan 2013 12:31:00 +0100</pubDate><guid isPermaLink="true">http://softwarebakery.com/windows-install-on-drivedroid</guid><description>&lt;p&gt;In version v0.7.0 of &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid&quot;&gt;DriveDroid (Free)&lt;/a&gt; and &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid.paid&quot;&gt;DriveDroid (Paid)&lt;/a&gt; a feature has been added to create blank images that look like normal USB disks. This allows you to use tools on your PC to fill the blank USB disk with whatever you want.&lt;/p&gt;

&lt;p&gt;In this post I will show how to create a Windows 7 installation disk that can be booted from your phone with DriveDroid. The disk will be made using files of the official Windows 7 ISO.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/laptopmobile.jpg&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;h1&gt;Requirements&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;DriveDroid v0.7.0+&lt;/li&gt;
&lt;li&gt;4GB free space on your Android phone&lt;/li&gt;
&lt;li&gt;A PC with Windows 7 and 7-zip installed&lt;/li&gt;
&lt;li&gt;Diskpart utility (installed by default on Windows 7)&lt;/li&gt;
&lt;li&gt;A Windows 7 installation disk or ISO&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note that on some systems &lt;a href=&quot;http://support.microsoft.com/kb/300415&quot;&gt;diskpart&lt;/a&gt; is not installed. I installed it seperately &lt;a href=&quot;http://download.microsoft.com/download/win2000platform/DiskPart/1.00.0.1/NT5/EN-US/diskpart_setup.exe&quot;&gt;using the diskpart setup&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;Image creation&lt;/h1&gt;

&lt;p&gt;First hook up your phone to your PC using a USB cable.&lt;/p&gt;

&lt;p&gt;Next we'll have to create a blank image on your phone. On this image we will eventually store the installation disk. In DriveDroid we go to the + button and choose 'Create blank image...'.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/drivedroid01.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Choose a filename like 'windows7.img' and choose 3500MB as the size for the image. You can uncheck 'Partition table (MBR)' and choose 'None' for the filesystem. Now hit the 'Create' button on the top-right.&lt;/p&gt;

&lt;p&gt;As a side-note, we choose to not create a partition table and filesystem here because DriveDroid does not support formatting NTFS filesystems. NTFS is required for the Windows 7 installer to work. We will partition and format the image from your PC in Windows, but we'll get to that.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/drivedroid02.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will create the image file in the background. Open the notification-bar to see when the image creation is finished. Most time will be used by 'Allocating file...', which creates a 3500MB file. This can take half an hour or so on most devices that have a FAT-32 filesystem on their SD-card, other filesystems do not seem to have this problem and will finish almost instantly.&lt;/p&gt;

&lt;p&gt;It is recommended not to do anything else on your phone while the image is being created. At the moment the image creation process can be killed by Android when there isn't enough memory available on the device to launch other applications. I still need to figure out how to avoid this.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/drivedroid03.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the image is created go to DriveDroid.&lt;/p&gt;

&lt;h1&gt;Partitioning and formatting&lt;/h1&gt;

&lt;p&gt;Select the image in DriveDroid and click the option that says '(read-write)'. As soon as we have done that, Windows will find a new USB drive. A window will popup in Windows asking to format the drive.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/01.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Choose 'Cancel': this method of formatting is not compatible with a Windows 7 install disk, since it'll not create a partition table and bootsector. Thus it will not boot using this option. We will partition and format the disk properly using diskpart.&lt;/p&gt;

&lt;p&gt;Go to start and type &lt;code&gt;cmd.exe&lt;/code&gt;. Command prompt will open.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/02.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Start diskpart by typing &lt;code&gt;diskpart&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/03.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Show the connected drives by typing &lt;code&gt;list drive&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/04.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You will see that the image you just created in DriveDroid is listed here as a disk of 3500MB. In this example it is listed as Disk 3.&lt;/p&gt;

&lt;p&gt;To work on disk 3, we need to select it by typing &lt;code&gt;select disk 3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/05.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next we create a partition table and fill the bootsector by typing &lt;code&gt;clean&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/06.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now we can create a partition by typing &lt;code&gt;create partition primary&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/07.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The partition hasn't got a filesystem yet. For the Windows 7 install disk we need a NTFS filesystem. We can format a NTFS filesystem on the partition by typing &lt;code&gt;format fs=ntfs quick&lt;/code&gt;. This will take a few seconds to a minute or so.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/08.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now we have a bootsector, partition table, partition and filesystem. We only have to mark the partition as 'bootable' to be able to boot from it. We do this by typing &lt;code&gt;active&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/09.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally we leave diskpart by typing &lt;code&gt;exit&lt;/code&gt;. You can close the window after that.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/10.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;h1&gt;Copying files&lt;/h1&gt;

&lt;p&gt;Now we have a disk that has a filesystem and can be booted from. We should be able to  see the empty disk in 'My Computer'. In this example it is disk G:.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/11.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next we need to copy files from the official Windows 7 installation CD to the USB drive. If you have the CD at hand, you can just copy those files over.&lt;/p&gt;

&lt;p&gt;However, since I only have an ISO file I need to extract the ISO to the USB drive. We can do this using 7-zip. Go to the Windows 7 ISO using Windows Explorer. Right click the ISO file, choose &lt;code&gt;7-Zip&lt;/code&gt; and choose &lt;code&gt;Extract files...&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/12.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Choose G:\ as the destination to extract the files to and hit OK.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/13.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Extracting the files will take a while.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/14.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the files are extracted the contents of your disk should look similar to this.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/15.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We are finished. The disk should be usable and is stored in &lt;code&gt;windows7.img&lt;/code&gt; on your Android phone. If you want to try it on another PC, first safely remove the disk by left clicking the icon in your system tray.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/16.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And choosing your phone from the menu. In my case it is GT-I9000 (Samsung Galaxy S).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/17.png&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Unplug your USB cable and plug it in a PC where you want to install Windows 7. Make sure you still have &lt;code&gt;windows7.img&lt;/code&gt; selected in DriveDroid.&lt;/p&gt;

&lt;p&gt;Boot the other PC, go to the bios and put your phone as the first boot device.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/18.jpg&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Save the changes and reboot. The PC should now boot the Windows 7 installer from your phone.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;windows-install-on-drivedroid/19.jpg&quot; class=&quot;box&quot; /&gt;&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>DriveDroid 0.7.0 released</title><link>http://softwarebakery.com/drivedroid-0-7-0-released</link><comments>http://softwarebakery.com/drivedroid-0-7-0-released#disqus_thread</comments><pubDate>Sun, 20 Jan 2013 22:01:00 +0100</pubDate><guid isPermaLink="true">http://softwarebakery.com/drivedroid-0-7-0-released</guid><description>&lt;p&gt;Version 0.7.0 of &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid&quot;&gt;DriveDroid (Free)&lt;/a&gt; and &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid.paid&quot;&gt;DriveDroid (Paid)&lt;/a&gt; is just released. This version comes with quite a few changes. Here is the changelog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added 'Create blank image' to create an empty/FAT32 disk-image&lt;/li&gt;
&lt;li&gt;Improved USB Mass Storage option&lt;/li&gt;
&lt;li&gt;Improved support emails&lt;/li&gt;
&lt;li&gt;Option to check for USB Mass Storage&lt;/li&gt;
&lt;li&gt;Changed menu structure for creating/adding/downloading images&lt;/li&gt;
&lt;li&gt;Added support for HTC Sensation, Samsung GT-S5360 and HDC i9300&lt;/li&gt;
&lt;li&gt;Fixed crash when going to preferences without root&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Create blank image&lt;/h2&gt;

&lt;p&gt;The biggest feature is the ability to create blank images from within DriveDroid. You can specify the size that you want the USB-disk to have and DriveDroid can format a FAT-32 filesystem on it (big thanks to &lt;a href=&quot;http://code.google.com/p/fat32-lib/&quot;&gt;fat32-lib&lt;/a&gt;). Once you select the image you'll see an empty USB-disk on your PC where you can store files.&lt;/p&gt;

&lt;p&gt;One advantage of this system is not just being able to store files, but to be able to use any tool on your PC to create bootable USB drives. In the past a number of ISOs were not loadable by DriveDroid, because those weren't USB compatible. Now you can use tools like &lt;a href=&quot;http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool&quot;&gt;Windows 7 USB/DVD download tool&lt;/a&gt;, &lt;a href=&quot;http://unetbootin.sourceforge.net/&quot;&gt;UNetBootin&lt;/a&gt;, &lt;a href=&quot;https://launchpad.net/win32-image-writer&quot;&gt;Image Writer&lt;/a&gt; or just &lt;a href=&quot;http://linux.die.net/man/1/dd&quot;&gt;dd&lt;/a&gt; to write images or ISOs to a disk you created+hosted using DriveDroid.&lt;/p&gt;

&lt;h2&gt;Compatiblity&lt;/h2&gt;

&lt;p&gt;I've also tried to support devices that do not have USB Mass Storage by default. Use the 'USB Mass Storage (UMS)'-option in the preferences of DriveDroid to enable UMS. It will use the normal way of enabling UMS, but will try to detect whether this does not work and use other methods to enable it. Hopefully this will work for some devices.&lt;/p&gt;

&lt;p&gt;For anyone who still has trouble, please send me a support email through the preferences of DriveDroid. Support emails now contain more information, so it should have a better chance of solving the problem.&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>DriveDroid 0.6.2 released</title><link>http://softwarebakery.com/drivedroid-0-6-2-released</link><comments>http://softwarebakery.com/drivedroid-0-6-2-released#disqus_thread</comments><pubDate>Sun, 09 Dec 2012 22:13:00 +0100</pubDate><guid isPermaLink="true">http://softwarebakery.com/drivedroid-0-6-2-released</guid><description>&lt;p&gt;Since the first release of DriveDroid (version 0.5) much has changed. This post summarizes the changes from 0.5 till 0.6.2.&lt;/p&gt;

&lt;h2&gt;Distributions&lt;/h2&gt;

&lt;p&gt;A number of new distributions are now available in the downloadlist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arch Linux&lt;/li&gt;
&lt;li&gt;Crunchbang&lt;/li&gt;
&lt;li&gt;Debian&lt;/li&gt;
&lt;li&gt;Fedora&lt;/li&gt;
&lt;li&gt;FreeBSD&lt;/li&gt;
&lt;li&gt;GeeXboX&lt;/li&gt;
&lt;li&gt;Gentoo&lt;/li&gt;
&lt;li&gt;Grml&lt;/li&gt;
&lt;li&gt;OpenSUSE&lt;/li&gt;
&lt;li&gt;SliTaz&lt;/li&gt;
&lt;li&gt;Tails&lt;/li&gt;
&lt;li&gt;Ubuntu&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For &lt;a href=&quot;https://github.com/FrozenCow/distscraper/tree/master/scrapers&quot;&gt;a recent list of distributions&lt;/a&gt; take a look &lt;a href=&quot;https://github.com/FrozenCow/distscraper&quot;&gt;distscraper&lt;/a&gt;, which retrieves the different downloadable image-urls.&lt;/p&gt;

&lt;p&gt;The downloadlist now also includes logos of the distributions. The logos are retrieved and slightly altered using &lt;a href=&quot;https://github.com/FrozenCow/distscraper/blob/master/retrievelogos.sh&quot;&gt;a script in distscraper&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Compatiblity&lt;/h2&gt;

&lt;p&gt;Support for the different devices has been improved greately by adding support for hosting iso/img files for 5 new devices/ROMs. There were also a lot of different little incompatiblities between the different Android versions, which now show appropriate messages when a particular feature is not supported on the device.&lt;/p&gt;

&lt;h2&gt;Paid version&lt;/h2&gt;

&lt;p&gt;Last but not least, there is now a paid (no-ads) version available &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid.paid&quot;&gt;on the Play Store&lt;/a&gt;. No extra features are added to the paid version at the moment, though it always helps development.&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>DriveDroid 0.5 released!</title><link>http://softwarebakery.com/drivedroid-released</link><comments>http://softwarebakery.com/drivedroid-released#disqus_thread</comments><pubDate>Mon, 12 Nov 2012 20:13:00 +0100</pubDate><guid isPermaLink="true">http://softwarebakery.com/drivedroid-released</guid><description>&lt;p&gt;DriveDroid allows you to boot your PC from ISO/IMG files stored on your phone. This is ideal for trying Linux distributions or always having a rescue-system on the go... without the need to burn CDs or USB pendrives.&lt;/p&gt;

&lt;p&gt;DriveDroid also includes a convenient download menu where you can select a popular distibution to download and use.&lt;/p&gt;

&lt;h2&gt;How do you make this work?&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Connect your phone to your PC using an USB cable&lt;/li&gt;
&lt;li&gt;Download an image file (.iso or .img) through DriveDroid or download them manually&lt;/li&gt;
&lt;li&gt;Select the image file in DriveDroid to let your phone 'host' the file over USB&lt;/li&gt;
&lt;li&gt;(Re)start your PC and make sure the correct boot priority is set in the bios&lt;/li&gt;
&lt;li&gt;The image should now be booted on your PC&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Requirements&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Root&lt;/li&gt;
&lt;li&gt;USB cable (from phone to PC)&lt;/li&gt;
&lt;li&gt;USB Mass Storage-support should be enabled on your ROM (being able to mount SD card)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Notes&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Some .iso files do not support being booted over USB, but most popular distibutions are. All images that are downloadable through DriveDroid are supported.&lt;/li&gt;
&lt;li&gt;All .img files should work fine.&lt;/li&gt;
&lt;li&gt;It is recommended to download distributions over wifi: those files are big!&lt;/li&gt;
&lt;li&gt;Do NOT use DriveDroid while your SD card is mounted (being used on your PC). This can cause loss of data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The downloads that DriveDroid provides are gathered using &lt;a href=&quot;http://github.com/FrozenCow/distscraper&quot;&gt;distscraper&lt;/a&gt;. If you want other distributions to be includes in the list, please &lt;a href=&quot;https://github.com/FrozenCow/distscraper/issues&quot;&gt;open up an issue&lt;/a&gt; or do a pull request.&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>Recovering commits with Git</title><link>http://softwarebakery.com/recovering-commits-with-git</link><comments>http://softwarebakery.com/recovering-commits-with-git#disqus_thread</comments><pubDate>Fri, 13 Jan 2012 21:42:00 +0100</pubDate><guid isPermaLink="true">http://softwarebakery.com/recovering-commits-with-git</guid><description>&lt;p&gt;Git is pretty powerful. With this power it allows you to do amazing things. Recently I've come to realize that you can hurt yourself pretty badly with its powers. Operations like resetting and fast-forwarding are dangarous and should be used with care.&lt;/p&gt;

&lt;p&gt;Today I did not handle them with care and commits seemed to be lost. Luckily I found that Git does not delete commits. My lost commits were just not referenced by any branch or tag, but were 'dangling'. The problem is finding these commits back.&lt;/p&gt;

&lt;p&gt;I found two possible commands that helped me find my lost commits: &lt;code&gt;git reflog&lt;/code&gt; and &lt;code&gt;git fsck --lost-found&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Reflog&lt;/h3&gt;

&lt;p&gt;This command shows the history of operations you have done on your repository. Each operation is shown with the hash of the commit that it results in. As an example we will create a repository, commit a change, 'lose' the commit and find it back using &lt;code&gt;git reflog&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;First we create a test repository:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkdir myrepo
$ cd myrepo
$ git init
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Next we'll commit a file with some text:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ echo some text in a file &amp;gt; file
$ git add file
$ git commit -m &quot;My first change&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we'll make a change to the file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ echo other text in a file &amp;gt; file
$ git commit file -m &quot;Another change to file&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can see the current commits in the log:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git log --oneline
fd9e098 Another change to file
98b88cc My first change
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we make our mistake and reset to the first commit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git reset --hard HEAD~1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Our second commit is now 'lost'. We can see that the file does not match the latest change we made and the log does not show our latest commit anymore:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cat file
some text in a file
$ git log --oneline
98b88cc My first change
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Presume we haven't done the previous logs and don't know the hash of the latest commit that we have done. We can see the operations we did using reflog:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git reflog
98b88cc HEAD@{0}: reset: moving to HEAD~1
fd9e098 HEAD@{1}: commit: Another change to file
98b88cc HEAD@{2}: commit (initial): My first change
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Two commits and a reset, that seems to fit with what we did. Commit 'fd9e098' seems to be the one we're missing. We can take a look at the history of that commit to get a better understanding whether it really is the right one:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git log fd9e098 --oneline
fd9e098 Another change to file
98b88cc My first change
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This seems to be in line with what we previously saw, so now we want to get back that last commit. We have the option to just reset our history to that commit by using &lt;code&gt;git reset --hard&lt;/code&gt;:.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git reset --hard fd9e098
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The history is now the same as before:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git log
fd9e098 Another change to file
98b88cc My first change
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you weren't sure it was the right commit yet, you can do a checkout of the commit before resetting to look at its files more easily:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git checkout fd9e098
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Though do remember to checkout to your previous branch when you're done going through its files:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git checkout master
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Lost and found&lt;/h3&gt;

&lt;p&gt;Instead of using &lt;code&gt;git reflog&lt;/code&gt; to find your lost commits, you can also use Git's fsck to find 'dangling' commits for you. If we go back to our example we can do a reset again to 'lose' our latest commit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git reset --hard 98b88cc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now if we issue the lost and found command. It'll return the dangling commit(s) that were lost:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git fsck --lost-found
dangling commit fd9e0982eaf3d8589aac26f0c6a52be5741ee8f7
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We can do the same as before and reset to that commit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git reset --hard fd9e0982eaf3d8589aac26f0c6a52be5741ee8f7
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now the history is restored and the files are of the latest commit.&lt;/p&gt;

&lt;h3&gt;Garbage collection&lt;/h3&gt;

&lt;p&gt;Even though the dangling commits exist at this time, they will be removed after a garbage collection. Git automatically does this for files that are 2 weeks old. Garbage collection can also be disabled by using the configuration value &lt;code&gt;gc.auto&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git config --global gc.auto 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To do garbage collections manually you could use:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git gc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;More information on this can be found on &lt;a href=&quot;http://linux.die.net/man/1/git-gc&quot;&gt;git-gc manual page&lt;/a&gt;.&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>Setting up an infinote server with PAM</title><link>http://softwarebakery.com/infinote-server-with-pam</link><comments>http://softwarebakery.com/infinote-server-with-pam#disqus_thread</comments><pubDate>Tue, 12 Jul 2011 22:42:00 +0200</pubDate><guid isPermaLink="true">http://softwarebakery.com/infinote-server-with-pam</guid><description>&lt;p&gt;&lt;a href=&quot;http://gobby.0x539.de/&quot;&gt;Gobby&lt;/a&gt; is a multi-user text editor. It allows editing text files by multiple persons, while all of them can see and edit in real-time. It is a great tool for online collaboration, like making todos or even coding a program collaboratively.&lt;/p&gt;

&lt;p&gt;Gobby connects to an &lt;a href=&quot;http://gobby.0x539.de/trac/wiki/Infinote/Infinoted&quot;&gt;infinote&lt;/a&gt; server. The server keeps track of the different users and documents.&lt;/p&gt;

&lt;p&gt;On Ubuntu 10.04 infinoted 0.4.1-1 is already in the repository and it is easy to set up. However, such a setup does not include username and password authentication, an automatic startup using a init-script and a separate user under which the process should run. Authentication using PAM, and thus username and password, is only available since 0.5.0.&lt;/p&gt;

&lt;p&gt;This post contains all of the steps required to run infinoted 0.5.0 on Ubuntu 10.04. This includes compiling, creating the user, init-script and configuration necessary to run infinoted in a proper way.&lt;/p&gt;

&lt;h3&gt;Compiling infinoted with PAM support&lt;/h3&gt;

&lt;p&gt;Since PAM is an optional dependency for infinoted you should make sure that &lt;code&gt;libpam-dev&lt;/code&gt; is installed before compiling. The configure script does not provide you with any notification of its absence (this will be fixed in a &lt;a href=&quot;http://git.0x539.de/?p=infinote.git;a=commit;h=42e314a4af31126342aac8d5e9e3fd633630f0d4&quot;&gt;later version&lt;/a&gt;). You should also make sure &lt;code&gt;libdaemon-dev&lt;/code&gt; is installed, otherwise the initscript will not work properly. After that, compilation is rather straightforward:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ apt-get install libxml2-dev gnutls-dev libgsasl7-dev libglib2.0-dev libpam-dev libdaemon-dev
$ wget http://releases.0x539.de/libinfinity/libinfinity-0.5.0.tar.gz
$ tar xfvz libinfinity-0.5.0.tar.gz
$ cd libinfinity-0.5.0
$ ./configure --prefix=/usr
$ make
$ make install
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you are on Ubuntu and want to make a deb package, you can replace the last command (&lt;code&gt;make install&lt;/code&gt;) by &lt;code&gt;checkinstall&lt;/code&gt; and answer the questions that follow. Make sure you install checkinstall first:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ apt-get install checkinstall
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When you've created the package, you can install it using:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ dpkg -i infinoted-0.5.0-1.deb
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Configuring infinoted&lt;/h3&gt;

&lt;p&gt;We'll run the server as a seperate (less privileged) user instead of as root, so we start by creating a new user. The user's home directory will be &lt;strong&gt;/var/infinote&lt;/strong&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ useradd --home-dir /var/infinote --user-group --shell /bin/false infinote
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Before we can start the server we have to create a home directory, a place to store the documents and its configuration. The server looks for the configuration file &lt;code&gt;$HOME/.config/infinoted.conf&lt;/code&gt;. We create the directories and set the appropriate permissions on them using the following commands:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkdir /var/infinote/{,root,sync,.config}
$ touch /var/infinote/.config/infinoted.conf
$ chown -R infinote: /var/infinote
$ chmod -R 0700 /var/infinote
$ chmod 0600 /var/infinote/.config/infinoted.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we can fill &lt;em&gt;infinoted.conf&lt;/em&gt; with the following configuration:&lt;/p&gt;

&lt;h5 class='code-link'&gt;/var/infinote/.config/infinoted.conf&lt;/h5&gt;

&lt;pre&gt;&lt;code&gt;[infinoted]
security-policy=require-tls
root-directory=/var/infinote/root/
certificate-file=/var/infinote/cert.pem
key-file=/var/infinote/key.pem
sync-directory=/var/infinote/sync/
sync-interval=60
pam-service=infinote
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Generating a certificate&lt;/h4&gt;

&lt;p&gt;You might have noticed a reference to the &lt;strong&gt;cert.pem&lt;/strong&gt; and &lt;strong&gt;key.pem&lt;/strong&gt; files. These allow the connection to be encrypted. We haven't created them yet, so we'll do that now. The creation of the certificate requires quite a lot of &lt;a href=&quot;http://en.wikipedia.org/wiki/Entropy_(computing)&quot;&gt;entropy&lt;/a&gt;. If your machine runs out of entropy this can make the entire process take a very long time. To solve this you could try to generate more entropy by moving your mouse or typing on the keyboard. On a server which has no such peripherals this will obviously not work, so you might have to create the certificate somewhere else and copy it over to the server. Another thing to look out for is the fact that the certificate (cert.pem) will be bound to a domain name. This is determined by the hostname of the computer generating the certificate, so you might have to change it temporarily.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ hostname your_temporary_hostname # optional, don't forget to restore afterwards
$ cd /var/infinote
$ sudo -u infinote infinoted-0.5 -k key.pem -c cert.pem --create-key --create-certificate
$ chown 0600 key.pem cert.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Authentication using PAM&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;http://gobby.0x539.de/trac/wiki/Infinote/Infinoted&quot;&gt;documentation of infinoted&lt;/a&gt; shows the option to setup PAM but gives no hints on how to do it. There are multiple ways to setup PAM authentication with infinoted. We chose to use the &lt;a href=&quot;http://cpbotha.net/software/pam_pwdfile/&quot;&gt;pam_pwdfile&lt;/a&gt; authentication module. This allows you to define users and passwords in a flat text file, so that you do not need to create full system users for them. So you need to &lt;code&gt;apt-get install libpam-pwdfile&lt;/code&gt;. Since all users that are in this file are solely created for use with infinote we will use the module &lt;a href=&quot;http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-pam_permit.html&quot;&gt;pam_permit&lt;/a&gt; to forgo account management.&lt;/p&gt;

&lt;p&gt;We start by creating a new PAM service in the &lt;code&gt;/etc/pam.d/&lt;/code&gt; directory called &lt;code&gt;infinote&lt;/code&gt; and use the following as its contents:&lt;/p&gt;

&lt;h5 class='code-link'&gt;/etc/pam.d/infinote&lt;/h5&gt;

&lt;pre&gt;&lt;code&gt;#%PAM-1.0
auth      required    pam_pwdfile.so pwdfile /etc/infinoted.passwd
account   required    pam_permit.so
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we have to create the file that defines users and their passwords, we have chose to place it at &lt;code&gt;/etc/infinoted.passwd&lt;/code&gt;. The file should contain username:password_hash pairs. The password hashes can be generated using any of the following commands:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ openssl passwd -1 &amp;lt;password&amp;gt;
$ openssl passwd -crypt &amp;lt;password&amp;gt;
$ htpasswd -nbd &amp;lt;username&amp;gt; &amp;lt;password&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note that both of the available hashing methods are rather weak, so don't count on these hashes to provide you with any security. After having created the hashes for your passwords, your password file should look something like this:&lt;/p&gt;

&lt;h5 class='code-link'&gt;/etc/infinoted.passwd&lt;/h5&gt;

&lt;pre&gt;&lt;code&gt;maato:$1$yII45doY$ZSH/biluHy12zp9KOuEQ9/
frozencow:SiN2d/00c/ubI
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Creating an init script&lt;/h3&gt;

&lt;p&gt;To automatically (and easily) start and stop the infinote daemon, we will need an init-script. We placed the code below in &lt;code&gt;/etc/init.d/infinoted&lt;/code&gt;. Make sure to also run &lt;code&gt;chmod +x /etc/init.d/infinoted&lt;/code&gt;.&lt;/p&gt;

&lt;h5 class='code-link'&gt;/etc/init.d/infinoted&lt;/h5&gt;

&lt;pre&gt;&lt;code&gt;#! /bin/sh
### BEGIN INIT INFO
# Provides:          infinoted
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts infinoted
# Description:       starts infinoted using start-stop-daemon
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/infinoted-0.5
USER=infinote
NAME=infinoted
PIDFILE=/var/infinote/.infinoted/infinoted-0.5.pid
DESC=&quot;Infinote Daemon&quot;

test -x $DAEMON || exit 0

if [ -f /etc/default/infinoted ] ; then
        . /etc/default/infinoted
fi

set -e

. /lib/lsb/init-functions

# Function that starts the daemon
d_start() {
        log_daemon_msg &quot;Starting $DESC&quot; &quot;$NAME&quot;
        start-stop-daemon --quiet -c $USER -p $PIDFILE -x $DAEMON --start -- -d
        log_end_msg $?
}

# Function that stops the daemon
d_stop() {
        log_daemon_msg &quot;Stopping $DESC&quot; &quot;$NAME&quot;
        start-stop-daemon --quiet -c $USER -p $PIDFILE -x $DAEMON --stop -- -D
        log_end_msg $?
}

case &quot;$1&quot; in
  start)
        d_start
        ;;
  stop)
        d_stop
        ;;
  restart)
        log_daemon_msg &quot;Restarting $DESC&quot; &quot;$NAME&quot;
        d_stop || true
        sleep 1
        d_start
        log_daemon_msg &quot;Done&quot;
        ;;
  status)
        status_of_proc -p $PIDFILE &quot;$DAEMON&quot; infinoted &amp;amp;&amp;amp; exit 0 || exit $?
        ;;
  *)
        log_daemon_msg &quot;Usage: $NAME {start|stop|restart|status}&quot; &amp;gt;&amp;amp;2
        exit 1
        ;;
esac

exit 0
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Additional information&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;pam-pwdfile &lt;a href=&quot;http://code.google.com/p/pam-pwdfile/source/browse/trunk/README&quot;&gt;README&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><author>maato@softwarebakery.com (Maato)</author></item><item><title>Wii Device Library v1.2 released</title><link>http://softwarebakery.com/wii-device-library-v1-2-released</link><comments>http://softwarebakery.com/wii-device-library-v1-2-released#disqus_thread</comments><pubDate>Sat, 02 May 2009 00:00:00 +0200</pubDate><guid isPermaLink="true">http://softwarebakery.com/wii-device-library-v1-2-released</guid><description>&lt;p&gt;Here is another release of &lt;a href=&quot;/project/wiidevicelibrary&quot;&gt;Wii Device Library&lt;/a&gt;. This version fixes even more bugs and adds some more stablity. The major changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Balanceboards are now also supported under Windows.&lt;/li&gt;
&lt;li&gt;All stacks are more stable (*).&lt;/li&gt;
&lt;li&gt;Fixed support for Bluez v3.2.1 on x64 machines.&lt;/li&gt;
&lt;li&gt;Fixed some issues for the Windows and Linux GUIs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(*) You can now (un)plug your bluetooth dongle when running without problems.&lt;/p&gt;

&lt;p&gt;You can get the full changelog at &lt;a href=&quot;http://code.google.com/p/wiidevicelibrary/source/list&quot;&gt;Google Code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The download is available at the &lt;a href=&quot;/project/wiidevicelibrary&quot;&gt;project page&lt;/a&gt;&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>Wii Device Library v1.1 released</title><link>http://softwarebakery.com/wii-device-library-v1-1-released</link><comments>http://softwarebakery.com/wii-device-library-v1-1-released#disqus_thread</comments><pubDate>Sun, 19 Apr 2009 00:00:00 +0200</pubDate><guid isPermaLink="true">http://softwarebakery.com/wii-device-library-v1-1-released</guid><description>&lt;p&gt;We have finally found the time and resources to release a new version of &lt;a href=&quot;/project/wiidevicelibrary&quot;&gt;Wii Device Library&lt;/a&gt;. This version fixes a lot of the reported bugs and more. Here is a short list of the changes in this version:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connecting using BlueZ has improved.&lt;/li&gt;
&lt;li&gt;Connecting using MsBluetooth has become more stable and faster.&lt;/li&gt;
&lt;li&gt;Fixed freeze when connecting to a Wiimote with plugged extension under Windows.&lt;/li&gt;
&lt;li&gt;Fixed incorrect behaviour with multiple Wiimotes under Windows.&lt;/li&gt;
&lt;li&gt;Fixed a rare bug that occured on some Vista machines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Several other fixes and changes have been made. You can get the full changelog at &lt;a href=&quot;http://code.google.com/p/wiidevicelibrary/source/list&quot;&gt;Google Code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The download is available at the &lt;a href=&quot;/project/wiidevicelibrary&quot;&gt;project page&lt;/a&gt;.&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item><item><title>Wii Device Library released</title><link>http://softwarebakery.com/wii-device-library-released</link><comments>http://softwarebakery.com/wii-device-library-released#disqus_thread</comments><pubDate>Mon, 22 Dec 2008 23:00:00 +0100</pubDate><guid isPermaLink="true">http://softwarebakery.com/wii-device-library-released</guid><description>&lt;p&gt;After working on &lt;a href=&quot;/project/wiidevicelibrary&quot;&gt;Wii Device Library&lt;/a&gt; on and off for several months we have decided to release our work to the public. This is not the first project we have worked on together, but it is the first project we have actually decided to release. Because of this we wanted to do it right, so we came up with a couple of requirements for the release of the library.
In this post we will describe what decisions we made to share this knowledge with others and for ourselfs to look back upon.&lt;/p&gt;

&lt;h2&gt;Project hosting&lt;/h2&gt;

&lt;p&gt;As it’s likely we want to release more of our projects in the future, it will be helpful to have a centralized place where we can publish all these projects. That’s why we first started looking into project hosting websites such as &lt;a href=&quot;http://www.sourceforge.net/&quot;&gt;SourceForge&lt;/a&gt;, &lt;a href=&quot;http://www.sourceforge.net/&quot;&gt;Google Code&lt;/a&gt; and others. We felt that the projects we would be hosting there would be unrelated to each other and we wanted more control over our content. So, we wanted our own website. But since we were taking as long as we did to publish one project, we also wanted to start as soon as possible with the content. Developing our own website would take too much time. That’s why we chose a CMS, which in our case is &lt;a href=&quot;http://wordpress.org/&quot;&gt;WordPress&lt;/a&gt;. We chose WordPress because we could test it out on WordPress.com. There we found that it was possible to not only blog, but also create pages. And since we didn’t want to spend a lot of time making a theme, we could easily choose our theme from different theme-galleries. From here, things finally started to get rolling. We quickly found a good webhost and registered our domainname. Here we set up our own WordPress site, added a few plugins and we were ready for the next step.&lt;/p&gt;

&lt;h2&gt;Version control&lt;/h2&gt;

&lt;p&gt;We wanted our code to be easily accessable to everyone. For this we wanted a svn repository and an one-click download system. Choosing which svn repository to use was hard at first. There were tons of providers for this, all with different features. We thought about what features we really needed, in the end we just wanted an easily accessable code repository. We have also considered different version control systems. &lt;a href=&quot;http://subversion.tigris.org/&quot;&gt;Subversion&lt;/a&gt; was more widely used than some of the others (&lt;a href=&quot;http://www.nongnu.org/cvs/&quot;&gt;Cvs&lt;/a&gt;, &lt;a href=&quot;http://msdn.microsoft.com/en-us/vstudio/aa700907.aspx&quot;&gt;SourceSafe&lt;/a&gt; and &lt;a href=&quot;http://bazaar-vcs.org/&quot;&gt;Bazaar&lt;/a&gt;), so that was in line with our requirement of keeping everything easily accessable to everyone. Google Code gave us a Subversion repository, was fast and it also allowed people to browse the code online, which was just what we needed.&lt;/p&gt;

&lt;h2&gt;Download package&lt;/h2&gt;

&lt;p&gt;The repository was finished, but we still needed a download package, which included the binaries, sourcecode and examples, that had to be a breeze to find, download and extract. For this we have put a large download-button on the project page where a zip file can be downloaded. Other archive formats aren’t that well supported accros platforms, so zip was the only right format for this. We chose to not use external download systems, because this required more searching for mirrors that would like to host our files. Handling our own downloads would result in a fast and reliable user-experience. We only need to be aware of our monthly usage.&lt;/p&gt;

&lt;h2&gt;Examples&lt;/h2&gt;

&lt;p&gt;We wanted to make it easy to get started with the library. We found in other libraries and frameworks that the examples are a major factor in choosing the library or not. So we thought about what examples we needed to include. We divided the library in different ascpects. For each aspect we created an example that could be used as a program on its own. This makes it very easy to look into one aspect of the library without getting confused by the previous or next examples.&lt;/p&gt;

&lt;p&gt;Go check out the &lt;a href=&quot;/project/wiidevicelibrary&quot;&gt;Wii Device Library&lt;/a&gt;, and let us know what you think.&lt;/p&gt;</description><author>frozencow@gmail.com (FrozenCow)</author></item></channel></rss>