tag:blogger.com,1999:blog-49074028159930663502024-03-08T09:22:58.951-05:00but why...?Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-4907402815993066350.post-9973345860513574132013-01-10T07:44:00.000-05:002013-01-10T07:44:18.291-05:00<br />
<h2>
Repurposing an old laptop with tinycore linux:</h2>
<h4>
low power, low cost, low noise using a compact flash card</h4>
<br />
What to do with those ancient laptops? I always feel guitly disposing of them, knowing they cost near $3000 when new. But what use can a pentium serve at this point? <br />
<br />
I had a need to run a simple application to send a few commands out the serial port periodically. I wanted this to be a low-cost, low-power, low-noise solution. So, with this old laptop, a 16MB compact flash card I had lying around and a CF-IDE adapter I set to work.<br />
<br />
Initially I had used FreeBSD but it required a rather large CF card due to the fact that I needed the linux-compat libraries to be included. Then a few months later I came across<a href="http://tinycorelinux.net/"> tinycore linux</a>. Actually, microcore is what really interested me - requires 8MB and less than 32MB of RAM. I love a challenge, so I set to work.<br />
<br />
Tinycore wasn't really intended to be "installed" - the devs seem to prefer running from a CD or other media. However, without a CD drive, I needed this to be installed to the CF card. Turns out <a href="http://www.parkytowers.me.uk/thin/Linux/TinycoreCF.shtml">someone had already done most of the legwork for me</a>. Most of the instructions I list here are directly from that page, but I list here for my own history along with the steps I later used for setting it to my direct purpose.<br />
<br />
1. download the<a href="http://tinycorelinux.net/4.x/x86/release/Core-current.iso"> microcore ISO file</a> and the <a href="http://tinycorelinux.net/4.x/x86/tcz/grub-0.97-splash.tcz">grub extension</a>.<br />
<br />
2. partition and format the CF card, then mount the partition (/dev/sdc in my case):<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># fdisk /dev/sdc</span><br />
<br />
Delete the existing partition:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Command (m for help): d</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Selected partition 1</span><br />
<br />
<br />
Create a new partition, primary, first, full size of the card:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Command (m for help): n</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Partition type:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> p primary (0 primary, 0 extended, 4 free)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> e extended</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Select (default p): p</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Partition number (1-4, default 1): </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Using default value 1</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">First sector (2048-31359, default 2048): </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Using default value 2048</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Last sector, +sectors or +size{K,M,G} (2048-31359, default 31359): </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Using default value 31359</span><br />
<br />
<br />
Set the partition type to 83 (linux)<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Command (m for help): t</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Selected partition 1</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Hex code (type L to list codes): 83</span><br />
<br />
<br />
Set the bootable flag for this partition:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Command (m for help): a</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Partition number (1-4): 1</span><br />
<br />
<br />
Write the partition table:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Command (m for help): w</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">The partition table has been altered!</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Calling ioctl() to re-read partition table.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">WARNING: Re-reading the partition table failed with error 16: Device or resource busy.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">The kernel still uses the old table. The new table will be used at</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">the next reboot or after you run partprobe(8) or kpartx(8)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Syncing disks.</span><br />
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div>
Format the partition to ext2:</div>
<div>
<br /></div>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mkfs.ext2 -L TINYCORE /dev/sdc1</span> <br />
<br />
<br />
3. mount the microcore ISO and copy the kernel and initramfs file to the CF card:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mkdir tc cf</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mount /dev/sdc1 cf</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mount Core-current.iso tc</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mkdir cf/boot</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># cp -a tc/boot/vmlinuz tc/boot/core.gz cf/boot</span><br />
<br />
<br />
4. install the grub bootloader to the card:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mkdir grub</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mount grub-0.97-splash.tcz grub</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mkdir cf/boot/grub</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># cp -a grub/usr/lib/grub/i386-pc/* cf/boot/grub/</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Times, Times New Roman, serif;">Next we add and edit the file </span><span style="background-color: white;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">cf/boot/grub/menu.lst</span></span><span style="font-family: Times, 'Times New Roman', serif;"> </span><span style="font-family: Times, 'Times New Roman', serif;">(using vi)</span><span style="font-family: Times, 'Times New Roman', serif;"> </span><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> </span><span style="font-family: Times, Times New Roman, serif;">and enter the following contents:</span><br />
<span style="background-color: white; font-family: Verdana, Helvetica, Arial, sans-serif;"><br /></span>
<span style="background-color: white;"></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">default 0</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">timeout 1</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">title tinycore</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">kernel /boot/vmlinuz opt=sda1</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">initrd /boot/core.gz</span><br />
<div style="font-family: Verdana, Helvetica, Arial, sans-serif;">
<br /></div>
<br />
As per the aforementioned url, we need to link <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">menu.lst </span>to <span style="font-family: Courier New, Courier, monospace; font-size: x-small;">grub.conf</span> and create a grub device mapping:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># ln -T cf/boot/grub/menu.lst cf/boot/grub/grub.conf</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># echo "(hd0) /dev/sdc" >grub-device.map</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
And finally, install grub:<br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># grub --device-map=grub-device.map </span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">grub> root (hd0,0)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">root (hd0,0)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Filesystem type is ext2fs, partition type 0x83</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">grub> setup (hd0)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">setup (hd0)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Checking if "/boot/grub/stage1" exists... yes</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Checking if "/boot/grub/stage2" exists... yes</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Checking if "/boot/grub/e2fs_stage1_5" exists... yes</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">succeeded</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">Done.</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">grub> quit</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">quit</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<br />
<br />
5. install my applications on the card, modify /opt/bootlocal.sh to start my applications.<br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># mkdir cf/opt</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># cp -R xxx cf/opt</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># echo "/opt/xxx/start???" > cf/opt/bootlocal.sh</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"># chmod 755 cf/opt/bootlocal.sh</span><br />
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"># umount cf tc grub</span><br />
<br />
This step involves creating a directory /opt in the root of the CF card and copying the files there. Because we added the opt=sda1 bootcode to the bootloader, this directory will be mounted within the uncompressed initramfs filesystem in RAM at the /opt location. (This also works for home=sda1, and there is also the automatically mounted /tce directory). <br />
<br />
I chose to use /opt because I will need to automatically start my application when the system boots. This is most easily done by starting it via /opt/bootlocal.sh. Having /opt be persistent in the root filesystem will allow me to change this without having to deal with the "backup" solution (which could have been used if I used /tce instead and then use mydata.tgz). But I won't be modifying files often or having files written often, so flash longevity isn't a concern for me.<br />
<br />
Another option would have been to have a startup script in /etc and then have that file be persistent (via /opt/.filetool.lst), but I am going for minimalistic here.<br />
<br />
As for an IP address, tinycore uses DHCP by default so my router will offer a static IP address to it. However, I could have just as easily added an ifconfig statement to /opt/bootlocal.sh.<br />
<br />
As a finaly note for myself, I probably could have compiled a kernel and made my own initrd image and gone even smaller or extracted the entire microcore initramfs cpio archive to the disk. However, the advantage here is that this all took less than one hour. Time is money. As well, using the initramfs system ensures that everything is readonly and will not be corrupted. Maybe in the future, remastering the initramfs to contain my application might be advantageous.<br />
<br />
So, let's review: I have an old laptop that powers down the screen when the lid is closed a 16MB flash card that minimizes the noise (no hard disk) and power consumption (no hard disk). Sure, a raspberry pi or a beagle board would have been a nice small solution, but why not use what I already had?<br />
<br />Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-8816844083371862852013-01-09T16:15:00.001-05:002013-01-09T16:15:31.577-05:00<h2>
<span style="font-family: Verdana, sans-serif;">Creating a ffp (fonz fun plug) package for proxychains to run on the dns-323</span></h2>
<div>
<span style="font-family: Verdana, sans-serif;">I wanted to run an application on my dns-323 via a proxy server, specifically a SOCKS5 proxy server. I couldn't find anyone that had build proxychains so here it is. These instructions are for ffp 0.5.</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">Links:</span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><a href="http://nas-tweaks.net/82/installing-and-uninstalling-packages-and-activation-and-deactivation-of-daemons-in-fonz-fun_plug">ffp</a>: information about using ffp with a dlink dns-323</span></div>
<div>
<a href="http://nas-tweaks.net/106/compiling-software-for-the-fonz-fun_plug/"><span style="font-family: Verdana, sans-serif;">creating a package for ffp</span></a></div>
<div>
<span style="font-family: Verdana, sans-serif;"><a href="http://www.inreto.de/dns323/fun-plug/0.5/PACKAGES.html">ffp package downloads</a></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><i>Using the method described in the second link above did NOT work for me. There was an issue at the final stage, during make install where make was attempting to install proxychains.conf to a location that didn't exist. And while I was able to manually tweak it to build correctly, that just won't work when adding to the build env because it will download the package each time. So, instead I will create the package manually.</i></span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">We need to install the following packages:</span></div>
<div>
<ul>
<li><span style="font-family: Verdana, sans-serif;">make</span></li>
<li><span style="font-family: Verdana, sans-serif;">gcc</span></li>
<li><span style="font-family: Verdana, sans-serif;">distcc</span></li>
<li><span style="font-family: Verdana, sans-serif;">libtool</span></li>
<li><span style="font-family: Verdana, sans-serif;">binutils</span></li>
<li><span style="font-family: Verdana, sans-serif;">kernel-headers</span></li>
<li><span style="font-family: Verdana, sans-serif;">automake</span></li>
<li><span style="font-family: Verdana, sans-serif;">autoconf</span></li>
<li><span style="font-family: Verdana, sans-serif;">patch</span></li>
</ul>
<span style="font-family: Verdana, sans-serif;">Each of these can be downloaded from the link listed above for packages using wget </span>(<span style="font-family: Courier New, Courier, monospace;">wget <url><url></url></url></span>). <span style="font-family: Verdana, sans-serif;">Then, they are installed using</span><span style="font-family: Courier New, Courier, monospace;"> funpkg -i <pkg .tgz=".tgz"></pkg></span></div>
<div>
<br /></div>
<div>
<span style="font-family: Verdana, sans-serif;">Download proxychains, extract the contents and build:</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">cd /tmp</span><br />
<span style="font-family: Courier New, Courier, monospace;">wget http://downloads.sourceforge.net/project/proxychains/proxychains/version%203.1/proxychains-3.1.tar.gz</span><br />
<span style="font-family: Courier New, Courier, monospace;">tar xvzf proxychains-3.1.tar.gz</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd proxychains-2.1</span><br />
<span style="font-family: Courier New, Courier, monospace;">mkdir ffp</span><br />
<span style="font-family: Courier New, Courier, monospace;">./configure --enable-static=no --prefix=/tmp/proxychains-3.1/ffp</span><br />
<span style="font-family: Courier New, Courier, monospace;">make</span><br />
<span style="font-family: Courier New, Courier, monospace;">make install</span><br />
<span style="font-family: Courier New, Courier, monospace;">tar cvzf proxychains-3.1.tgz ffp</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Now we can test installing the package:</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">funpkg -i proxychains-3.1.tgz</span><br />
<br /></div>
Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-38595086116513288832011-12-30T10:48:00.002-05:002011-12-30T10:48:35.609-05:00USB mounting a blackberry playbook in linuxBlackberry has decided that the playbook will not be visible as a mass storage device. Lovely. And, they only provide drivers for windows and mac. Nice. So, for us linux users? There is a solution. This has been blogged about by several people, but I'll summarize it here for at least my own purposes.<div>
<br /></div>
<div>
Basically, what we'll be doing here is having the playbook appear as a USB network card on linux and using a SMB mount.</div>
<div>
<br /></div>
<div>
1. Settings -> Storage & Sharing:</div>
<div>
<ul>
<li>Change "USB Connections" to "Connect to Windows"</li>
</ul>
</div>
<div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-d9RJckG85ns/Tv3ZzzDbevI/AAAAAAAAZ2o/vXgPiIkmZlo/s1600/IMG_00000006.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="http://2.bp.blogspot.com/-d9RJckG85ns/Tv3ZzzDbevI/AAAAAAAAZ2o/vXgPiIkmZlo/s320/IMG_00000006.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<ul>
<li>Change "Network Identification" to give your playbook a network name, workgroup and a username.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Kfm4pgq5K3I/Tv3aCKwdi8I/AAAAAAAAZ20/sAVN10idiTw/s1600/IMG_00000005.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="http://3.bp.blogspot.com/-Kfm4pgq5K3I/Tv3aCKwdi8I/AAAAAAAAZ20/sAVN10idiTw/s320/IMG_00000005.jpg" width="320" /></a></div>
<div>
<br /></div>
<ul>
<li>Set "File Sharing" to ON</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-t4UZt3iquhQ/Tv3aOFx-ftI/AAAAAAAAZ3A/VjGsjUPiUfg/s1600/IMG_00000007.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="http://4.bp.blogspot.com/-t4UZt3iquhQ/Tv3aOFx-ftI/AAAAAAAAZ3A/VjGsjUPiUfg/s320/IMG_00000007.jpg" width="320" /></a></div>
<div>
<br /></div>
<ul>
<li>You can optionally turn ON Wi-Fi sharing so that you can use SMB mounts over Wi-Fi, but that is much slower than the USB mount we're about to cover.</li>
<li>Set a password - again, this is optional. I didn't bother because I intend to disable file sharing when I am done.</li>
</ul>
<div>
2. Settings -> About -> Network</div>
</div>
</div>
<div>
<ul>
<li>With your playbook connected to your computer via the USB cable, the playbook should have an IPv4 address assigned to the USB NIC. Take note of the address. </li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-VzH1kGXa5nw/Tv3aTcQ7-lI/AAAAAAAAZ3M/15_EdyVWIN0/s1600/IMG_00000004.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="187" src="http://2.bp.blogspot.com/-VzH1kGXa5nw/Tv3aTcQ7-lI/AAAAAAAAZ3M/15_EdyVWIN0/s320/IMG_00000004.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
3. On your linux PC (one that uses gnome/nautilus in this case)</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li>Open Nautilus, and from the FILE menu, select "Connect to server..." (sorry, no screenshot, but apparently one can't take screenshots when a menu is active)</li>
<li>In the "Connect to server..." dialog:</li>
</ul>
- select "windows share" for service type<br />
<div class="separator" style="clear: both; text-align: left;">
- enter the IP address you noted above into the "Server" field</div>
<div class="separator" style="clear: both; text-align: left;">
- set the "Share" field to "/media"</div>
<div class="separator" style="clear: both; text-align: left;">
- enter the playbook file sharing username that you set</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-QoQCnUA8O_o/Tv3a2eLhM2I/AAAAAAAAZ3Y/W9h-5dlP2IE/s1600/Screenshot-Connect+to+Server.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-QoQCnUA8O_o/Tv3a2eLhM2I/AAAAAAAAZ3Y/W9h-5dlP2IE/s320/Screenshot-Connect+to+Server.png" width="285" /></a></div>
<div>
<br /></div>
<br />
<div>
<ul>
<li> Once you click "connect" the playbook should now be mounted and visible in nautilus.</li>
</ul>
</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>IF you prefer to do things from the command line as I do, then replace step 4 with the following:</b></div>
<div>
<b><br /></b></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"> smbmount //169.254.67.137/media /media -o leo </span></div>
<div>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: inherit;">Of course, replace the IP address, username and mount destination with your own.</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">One final point, if you would prefer to use Wi-Fi mounting, not much changes, just the IP address of the playbook, which is more likely on your local network rather than an 169.xxx.xxx.xxx (avahi?) network address that is used for the USB NIC.</span></div>Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-24552359703090427992011-12-07T11:33:00.001-05:002011-12-07T11:38:01.106-05:00Backyard Ice Rink - the tarp arrives!The tarp has finally arrived! 20'x30' and white. I've laid it out across the rink area, screwed in the four corners, and moved it so that it lays evenly across the area. Here's what it looks like:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/--JonjNCWWj4/Tt-V5WQPi1I/AAAAAAAAZwg/kR4TBNXTnUU/s1600/IMG_3452.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/--JonjNCWWj4/Tt-V5WQPi1I/AAAAAAAAZwg/kR4TBNXTnUU/s320/IMG_3452.JPG" width="320" /></a></div>
<br />
Along the boards, I simply used some extra drywall screws I had to fasten the tarp eyelets to the boards so that the wind doesn't blow it away while we wait for the deep freeze. The screws had to be put in at an angle as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-1fv4x7vavNA/Tt-V4Gto0RI/AAAAAAAAZwY/ECa5nP6jNqw/s1600/IMG_3454.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-1fv4x7vavNA/Tt-V4Gto0RI/AAAAAAAAZwY/ECa5nP6jNqw/s320/IMG_3454.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And finally, I added some extra illumination - the lighting might need to be adjusted, but here's what it looks like at night:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-T0kPj-B_KIs/Tt-V3hVgcdI/AAAAAAAAZwQ/Cpl-Nlsks-s/s1600/IMG_3456.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-T0kPj-B_KIs/Tt-V3hVgcdI/AAAAAAAAZwQ/Cpl-Nlsks-s/s320/IMG_3456.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-916701233768658802011-11-21T21:47:00.001-05:002011-11-21T22:57:48.451-05:00Backyard Ice Rink - attempt one.Okay, so this year I've decided to attempt a backyard ice rink. My boy has started hockey and hopefully a rink this close will spur some interest. After a quick survey of the yard, I've determined that I can land a 20' x 30' pad that is "level enough". (Actually, it's 28' x 18', the tarp is 30' x 20', need some extra to hold in the water). Beyond that, there's just too much slope. So, up first is the bill of materials:<br />
<br />
<br />
<ul>
<li>20' x 30' white 6mil tarp: $51.99 ($39.99, $12 shipping)</li>
<li>boards - six 2"x10"x10': $53.34</li>
<li>boards - four 2"x10"x8': $26.68</li>
<li>stakes - four 2"x4"x8: $8.92</li>
<li>four corner brackets: $11.96</li>
<li>one box of 100x3" green deck screws: $11.49</li>
<li>subtotal: $164.38, tax: $21.37, <b>grand total: $185.75</b></li>
</ul>
<br />
<br />
<b><u>STEP 1: string up the box</u></b><br />
As you can see in the image below, I have marked the four corners with stakes and run twine between the posts. This indicates where the stakes will go.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Lx0YHfn-TfU/TssZ0P8y0iI/AAAAAAAAZuY/DN2LbPns054/s1600/IMG_3313.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-Lx0YHfn-TfU/TssZ0P8y0iI/AAAAAAAAZuY/DN2LbPns054/s320/IMG_3313.JPG" width="320" /></a></div>
<br />
<b><u>STEP 2: insert the stakes</u></b><br />
Here I have my box of stakes. Rather than paying the $0.99 each for 2"x2"x4' stakes, I simply bought 2"x4"x8' and cut them down to 6 stakes per.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-pjxQJ5SzWcc/Tssa_-djdXI/AAAAAAAAZug/se3kOOKVNaQ/s1600/IMG_3316.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-pjxQJ5SzWcc/Tssa_-djdXI/AAAAAAAAZug/se3kOOKVNaQ/s320/IMG_3316.JPG" width="320" /></a></div>
<br />
<br />
Next, I have lined up the boards and started pounding in some stakes - two per board. Note: when you have misplaced you sledge hammer, the backend of an axe will suffice.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-JxhlveIqYcM/TssbZhkcnLI/AAAAAAAAZuo/QDNSwIXiHxw/s1600/IMG_3321.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-JxhlveIqYcM/TssbZhkcnLI/AAAAAAAAZuo/QDNSwIXiHxw/s320/IMG_3321.JPG" width="320" /></a></div>
<br />
<br />
<b><u>STEP 3: install the boards</u></b><br />
Yes, that's my wife's garden I'm trampling. She wasn't too happy, but a rink for my boy trumps the garden. The boards are now screwed into the stakes using the 3" deck screws. I used the green screws in hopes that they won't rust. Two screws per stake should be enough.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-z4Iz_LDzn7o/Tssb3qaJa6I/AAAAAAAAZuw/r6B_o6_fdi0/s1600/IMG_3323.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-z4Iz_LDzn7o/Tssb3qaJa6I/AAAAAAAAZuw/r6B_o6_fdi0/s320/IMG_3323.JPG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-k3ADJoUJmbY/Tssb4c_F7RI/AAAAAAAAZu4/8HgqTo2U8zI/s1600/IMG_3324.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-k3ADJoUJmbY/Tssb4c_F7RI/AAAAAAAAZu4/8HgqTo2U8zI/s320/IMG_3324.JPG" width="320" /></a></div>
<br />
<br />
<b><u>STEP 4: fasten the boards to each other:</u></b><br />
Here cut a few leftover stakes in half and screwed the adjacent boards to each other.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-1trqICZbE_0/Tssb6Nnr4RI/AAAAAAAAZvA/cnmMirMtL04/s1600/IMG_3325.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-1trqICZbE_0/Tssb6Nnr4RI/AAAAAAAAZvA/cnmMirMtL04/s320/IMG_3325.JPG" width="320" /></a></div>
<br />
In the corners I used metal brackets.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-o69BoYzsUiw/Tssb68K9bHI/AAAAAAAAZvI/v_M7neKAsy4/s1600/IMG_3327.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-o69BoYzsUiw/Tssb68K9bHI/AAAAAAAAZvI/v_M7neKAsy4/s320/IMG_3327.JPG" width="320" /></a></div>
<br />
<b><u>STEP 5: time for coffee</u></b><br />
This is the finished product. Now I'm frozen, going in to get a coffee. And wait for my tarp to arrive. I'll lay down the tarp once the ground is near frozen so as to not damage the grass. Once we get some sub-zero temperatures, I'll start the flooding.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-PKUM4aYZZSs/Tssb8oGB1CI/AAAAAAAAZvQ/4V-8fqJQaQQ/s1600/IMG_3328.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-PKUM4aYZZSs/Tssb8oGB1CI/AAAAAAAAZvQ/4V-8fqJQaQQ/s320/IMG_3328.JPG" width="320" /></a></div>
<br />Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-88291305449863870772008-10-14T14:55:00.008-05:002008-10-15T11:44:00.402-05:00Building tomatoND with MLPPP for the Asus WL-520guHere is an attempt to recount from memory how I built tomatoND with MLPPP for the Asus WL-520gu. It may work for the Buffalo WHR-G125 as well. I may have missed a thing or two....I'll update as/if I find mistakes.<br /><br /><pre># download and untar WRT54GL source<br />wget ftp://ftp.linksys.com/opensourcecode/wrt54gl/4.30.11/WRT54GL_v4.30.11_11_US.tgz<br />tar xzf source/WRT54GL_v4.30.11_11_US.tgz<br /><br /># download and unpackage the tomato source yielding tomato.tar and tomatoND.tar<br />wget http://fixppp.org/downloads/TomatoSource_1_19.tar.bz2<br />tar xjf TomatoSource_1_19.tar.bz2<br /><br /># download and unrar the tomato MLPPP patch<br />wget http://fixppp.org/downloads/tomato-mlppp-1.19-mp2_src.rar<br />unrar e tomato-mlppp-1.19-mp2_src.rar<br /><br /># rename WRT source folder to tomato<br />mv WRT54GL-US_v4.30.11_11/ tomato<br /><br /># Create a symlink in /opt/brcm to tomato/tools/brcm/.<br />ln -s $PWD/tomato/tools/bcrm /opt/bcrm<br /><br /># add the cross compiler folders to your path<br />PATH=$PATH:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin<br />export PATH<br /><br /># remove files specified in tomato build README file<br />cd tomato/release/src/<br />rm -rf et et.4702 wl rts tools .model<br />cd router/<br />rm -rf busybox cron dnsmasq httpd iproute2 iptables ipupdate lib libnet libpcap mipsel-uclibc misc nas netconf ntpclient nvram others rc ses shared traceroute udhcpd upnp utils www<br />cd ../../..<br /><br /># untar tomato source over the WRT source<br />tar xf tomato.tar<br /><br /># untar tomatoND source over the tomato modified WRT source<br />tar xf tomatoND.tar<br /><br /># remove .c files that have been pre-built<br />cd tomato/release/src/shared<br />rm bcmsrom.c bcmutils.c hnddma.c linux_osl.c sbutils.c sflash.c<br />cd ../..<br /><br /># apply the MLPPP patch<br />patch -p1 < ../tomato-mlppp-1.19-mp2.patch<br /><br /># enable MLPPP in the kernel<br /># set CONFIG_PPP_MULTILINK=y in both files<br />cd release/src/<br />vim linux/linux/.config<br />vim linux/linux/.config.old<br /><br /># on my ubuntu system, make didn't like the curly bracket loops<br /># as a quick fix I just duplicated the sections for each loop<br /># (see the loops for {*.asp,*.svg} and {*.js,*.jsx}<br />vim router/www/Makefile<br /><br /># build the source<br />make<br /><br /># at some point the build will fail - the tomato_profile.h file<br /># gets an extra "-e " prepended to the file, just remove it<br />vim ./router/shared/tomato_profile.h<br /><br /># make again<br />make<br /><br /># your image is now in the image folder</pre>Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-30520508350403707492008-10-14T11:25:00.004-05:002008-10-15T11:44:18.182-05:00MLPPP Tomato on the Asus WL-520guI picked up the Asus WL-520gu for $20 (after MIR). My hope was to run Tomato/MLPPP as is described at here: <a href="http://www.dslreports.com/forum/r20484600-TomatoMLPPP-released-evade-throttle-or-bond-two-DSL-lines">dslreports-tomato-mlppp</a> and at <a href="http://fixppp.org/">fixppp.org</a>. However, that's only for the Linksys WRT54GL and similar devices. With help from Guspaz and dsl_ricer I was able to get it all to build, connect and run with MLPPP (though I haven't verified that it's actually working properly).<br /><br />Since the dd-wrt and tomato firmware for the WL-520gu also work on the Buffalo WHR-G125, this MLPPP version *should* work on the Buffalo as well, though I don't own one and haven't tried.<br /><br />DISCLAIMER: this is an account of how I got MLPPP/Tomato working on my Asus WL-520gu. I am not recommending anyone try this, and if you do, I will not be held responsible if you brick your router.<br /><br />Basically, what we're going to do is flash with dd-wrt, then with basic tomato (ND version), get the router up and running, then flash with the MLPPP version. I'll describe how to build the firmware in another post. I am assuming you have a DSL modem configured to allow the router to perform pppoe negotiation.<br /><br />1. Follow the steps to flash the router with dd-wrt outlined here: <a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=26194">dd-wrt on WL-520gu</a>. Reboot and configure to make sure it works and connects to your ISP.<br /><br />2. Using a similar procedure as was done in step 1., using the asus recovery tool, flash the router with TomatoND firmware version v1.19. <span style="font-weight:bold;">NOTE: you must use the ND version of Tomato.</span> The current version is v1.21, but I used v1.19 because that is what the stable version of MLPPP is based upon. It can be found on the <a href="http://www.polarcloud.com/tomato">Tomato download page</a> (specifically, <a href="http://www.polarcloud.com/f/rotten/Tomato_1_19_ND.7z">here</a>)<br /><br />3. reboot the router and configure it appropriately to your settings. The WAN side probably won't connect via pppoe via your modem. I followed the advice in <a href="http://www.linksysinfo.org/forums/showthread.php?t=57746">this thread</a> to get it to connect: <br /> <blockquote>I found that vlan1ports nvram variable on Tomato was set to "0 5u" I changed this as follows (from telnet login to the router):<br /> nvram set vlan1ports="0 5"<br /> nvram commit<br /> reboot</blockquote><br /><br />4. Repeat step 2 using the MLPPP version of the tomatoND firmware that I built.<br /><br />Now, step 2 may be unnecessary if you want to directly flash with the MLPPP version....I didn't try that though, so I don't know if there'd be any issue.<br /><br />I use a 2write 2700HG-B modem/router. Had to configure it to bridge mode....<a href="http://www.dslreports.com/faq/15835">this post</a> was super useful (though VPI for Bell is 0, not 8).<br /><br />Useful links:<br /><a href="http://fixppp.org/">http://fixppp.org/</a><a href=" http://www.redflagdeals.com/forums/showthread.php?t=594003"><br />http://www.redflagdeals.com/forums/showthread.php?t=594003</a><br /><a href="http://www.dslreports.com/forum/r20484600-TomatoMLPPP-released-evade-throttle-or-bond-two-DSL-lines">http://www.dslreports.com/forum/r20484600-TomatoMLPPP-released-evade-throttle-or-bond-two-DSL-lines</a><a href="http://www.linksysinfo.org/forums/showthread.php?t=57746">http://www.linksysinfo.org/forums/showthread.php?t=57746</a><br /><a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=26194">http://www.dd-wrt.com/phpBB2/viewtopic.php?t=26194</a><br /><a href="http://www.dslreports.com/faq/15835">http://www.dslreports.com/faq/15835</a><br /><a href="http://www.broadbandreports.com/forum/r21066151-2wire-2700HGB-bridge-mode-simple-tutorial">http://www.broadbandreports.com/forum/r21066151-2wire-2700HGB-bridge-mode-simple-tutorial</a>Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-37615038496941624082008-01-19T14:46:00.001-05:002008-01-19T14:58:13.434-05:00video editing in linuxI had some old camcorder videos that I wanted to digitize/transfer to DVD and distribute to family. I borrowed an ATI USB 2.0 TV wonder gadget from a friend and unfortunately was stuck with windoze to capture the streams. After capturing all the videos, I switched back to linux to start chopping up the files as appropriate. This is where it got tough.<br /><br />I captured to MPEG-2 and simply wanted to split videos at specific times. With AVI files it's easy, just use avisplit which I believe is part of the transcode package. MPEG2 isn't quite as simple. I was hoping to simply load a video into a program, scroll to the split point, mark it and tell the program to split at the nearest I-frame, without re-encoding the file.<br /><br />So, I soon found Cinelerra, Kino, Avidemux and Kdenlive. A quick search showed that Cinelerra and Kino are both complex, so I started with Kdenlive which was said to be super simple - and it seemed overly complicated as well to me. And it quickly became apparent that it'd want to re-encode my files. So I switched to avidemux - it was great for scrolling through files and finding the split points. However, it wanted to re-encode my files as well :(<br /><br />More googling pointed me to mpgtx - a command line MPEG toolbox. Perfect. I used avidemux to locate all the split points in all the files, put them into a script file that would call mpgsplit as appropriate. I thought I had this in the bag until I started playing back the files and noticed the split points were just wrong in some files. Ugh. No idea why.<br /><br />Ok, more searching leads me to GOPchop, which installs but crashes - says my MPEG-2 files have incorrect headers and I-frames. Next is GOPdit. Ok, very simple, but effective. Had to make sure the pereferences were setup. This tool is good, but could use some more effective keyboard shortcuts and editing tools. But for the most part it seemed to work.<br /><br />Notable mentions include ProjectX which is supposed to be good for fixing up the MPEG-2 files that capture devices often hack up. Didn't manage to get it installed, but may still be of use when I get to 8mm projector files. Also, Lives is supposed to be another good program, but it's not in the repositories either. <br /><br />Lastly, another good site I am going to mention for searching for linux equivalents of windoze programs: http://www.linuxalt.com/Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com5tag:blogger.com,1999:blog-4907402815993066350.post-29892156094387622772007-11-16T14:25:00.001-05:002007-11-16T14:28:31.789-05:00merging firefox bookmark filesI started to use google bookmarks. But syncing with it is rough, if not dangerous. The gmarks extension was not very helpful, though it could be used at points. <br /><br />I wanted to merge my windows and linux bookmark files. Foxymarks is currently down, so I couldn't even try that. And I didn't like the fact that I HAD to sign up for their service. Just let me do it via the FTP option, and I'll handle it myself.<br /><br />Finally I decided to make copies of each file, import them both into firefox, then using the duplicate bookmark detection extension in firefox, I was able to week out the dups quite easily. Still need a solution for syncing with google tho.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com1tag:blogger.com,1999:blog-4907402815993066350.post-70784256473251568072007-11-16T14:19:00.000-05:002007-11-16T14:24:57.753-05:00Rockbox database woes on the sansa; tagtoolAdding songs to the sansa with rockbox currently still has to be done via the original firmware (OF). But, everytime I would plug in the usb cable, (with the unit off to have it automatically start up and boot to OF), the OF would insist on "refreshing the database". This could take several minutes. The latest version of the rockbox bootloader fixed that. It now prevents an OF database refresh when the unit is powered up via usb. Great. Just had to run sansapatcher -d, then sansapatcher --install.<br /><br />Now, the next issue was that sometimes the files loaded from linux would show up in the rockbox database, sometimes not. Turns out that many of the music files didn't have ID3 tags. So, in RB I changed it such that I could at least temporarily browse to the files to play them.<br /><br />So, enter audio tag tool for linux. Excellent tool for updating/modifying ID3 tags en mass. Yet still the files didn't show in the database. I fiddled with various settings in RB to re-initialize, update the database to no avail. Finally I just deleted the database files in the root RB folder, restarted and all was well.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-60062644223659790782007-11-16T09:36:00.000-05:002007-11-16T09:58:14.873-05:00Rockbox on the sansa E280Got the sansa last year for xmas. Hadn't used it too much. Wanted to play video, but the sandisk software for converting was pitiful at best and the highly uncommon video container and encoding made it near impossible to encode files in linux using something like mplayer.<br /><br />Enter rockbox. Plays mpeg1 and mpeg2 videos, provides a highly customizable interface, and even plays gameboy games! Check out the <a href="http://download.rockbox.org/manual/rockbox-sansae200/rockbox-build.html">manual</a> for installation, etc.<br /><br />My video conversion script ended up something like this:<br /><br />#!/bin/sh<br /># convert $1 into an mpeg named $2 for use with the sansa<br /><br /># options tried: <br /># 15, 24 fps<br /># 256kbps, 512kbps<br /># mpeg1, mpeg2<br /><br /># 256k yields poor quality video<br /># 512k doesn't work with 24fps<br /># no noticeable diff for mpeg 1/2 - 1 is simpler, use it<br /><br />mencoder "${1}" -of mpeg -oac lavc -lavcopts acodec=mp2:abitrate=128 -af resample=44100:0:0 -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=512 -vf scale,harddup -ofps 15 -zoom -xy 220 -o "${2}"Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com1tag:blogger.com,1999:blog-4907402815993066350.post-21965486446328460102007-11-16T09:33:00.000-05:002007-11-16T09:36:08.540-05:00JanusVM, tor, privoxy, etc.The need for anonymity and privacy lately has risen. The JanusVM vmware virtual machine is a simple entry into this area. This small vmx runs a whack of privacy things like tor, privoxy and squid. Just run the thing, and set your browser to http proxy localhost:8888. There are a myriad of other things that can be done with it, but this is usually sufficient.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-21985055494039685732007-08-22T12:52:00.000-05:002007-08-22T12:56:13.788-05:00vmware and a broadcom gigabit ethernet adapterMy Dell SC-420 has a Broadcom BCM-5751 adapter....any large-ish transfers from the host to a vmware guest is extremely slow, when it works at all!<br /><br />These two posts point to issues with the vmware adapters and the tg3 broadcom driver:<br /><br />http://www.vmware.com/community/thread.jspa?messageID=687712򧹠<br />http://www.vmware.com/community/thread.jspa?messageID=551754򆭊<br /><br />They also point to the solution which is:<br /><br />ethtool -s eth0 autoneg off speed 100<br />ethtool -K eth0 sg off rx off tx off tso off <br /><br />That seemed to fix it....Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-91897734752375682162007-08-22T07:55:00.000-05:002007-08-22T08:15:24.378-05:00sshd as a socks 5 proxy & foxyproxyThis isn't new stuff, been around for a long time and been written about many times, but too cool to pass up.<br /><br />If you have an ssh account on a server somewhere that you trust, that connection can be used to tunnel all your network traffic securely out to the internet....main use case probably while at internet cafe's. <br /><br />OpenSSH has built-in support as a socks 5 proxy server. So, using putty for example, in the "tunnels" configuration setting, create a new entry with source port being the port you'll connect to on your local machine, leave destination text field empty and select "dynamic" as the destination. Now, make an ssh connection to the server - netstat should show that your local computer is listening on the source port you specified.<br /><br />Now you can configure your browser (or whatever other application supports proxies) to point to localhost and the port you specified. Check your IP address before and after at http://www.dslreports.com/whois.<br /><br />Now, to make life super simple, install the firefox plugin foxyproxy to make proxy switching a simple single click!Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-91745371851482445902007-07-24T12:11:00.000-05:002007-07-24T12:20:15.302-05:00general desktop and server newswell, it's been a while....<br /><br />Dumped PCBSD as a desktop because after several upgrades I realized I was really only running FreeBSD with KDE on top. I wasn't using any PCBSD "benefits" and a somethings had gone screwy with the upgrades - particularly the Xorg updates that were broken along the way.<br /><br />I also realized that I just didn't want to spend time configuring and playing with distros....this occurred to me because I attempted ArchLinux because it looked to be perfect for me....optimized for 686, and oriented much like BSD. However, it took some thought and maintenance to keep going.....so I abandoned that.<br /><br />My requirements are few....firefox, python, and a shell. Add on top of that vmware server because I wanted to abandon the separate server and use just one machine. Has to be fast and light.....my desktop has a mere 8MB on board video RAM. Enter fluxbuntu.<br /><br />I ran fluxbuntu for a while....it's quick and already has my fundamental requirements save for vmware, but that was pretty easy to install. However FB was based on dapper and the subversion client for dapper was too old for my repo. Two months into FB I decided to try the upgrade to Feisty and it failed in various ways. FB also had some annoying issues. There was supposed to be a Feisty release of it but that didn't happen. They are anticipating a Gusty release....maybe I'll try that.<br /><br />For now I'm on Xubuntu, with vmware running my server. Having the server on vmware makes for simple backups of the entire vmware images onto dvd.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-80196164460260705092007-04-17T10:29:00.000-05:002008-01-19T15:01:28.631-05:00homemade DVDs in a dodge caravanLast year we bought a dodge caravan with an in-house dvd entertainment system. Great! The kid loves the wiggles and if we can make a long trip manageable, all the better. However, it seems that all my homemade movies just wouldn't play....loss of A/V sync, choppy video, it'd take 5 minutes to read the disc, most of the time it'd just fail. <br /><br />I'd done some reading that implied that I needed to use DVD+R media and set the booktype to ROM so that the player would think it was a pressed DVD. So, I tried that, but the player said there was no disc.<br /><br />A bit more googling led me to a groups post that said something about menus.....none of the DVDs I create have menus....it's just easier without. So, I recreated a DVD with menus, and whaddya know? It worked. Odd that the mere presence of menus affect the ability of the player to decode video and keep sync.<br /><br />UPDATE 2008-01-19: seems that the stupid player doesn't like DVD+R discs....stick with quality DVD-R!Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-87904788166789582502007-04-09T12:08:00.000-05:002007-04-10T08:47:36.942-05:00freebsd printing with CUPS and a Samsung ML-2010When I was running ubuntu last year I vaguely remember using my Samsung ML-2010 printer without too much fuss.....I think I found something in the excellent ubuntu forums that suggested using the ML-4500 driver....and it worked. Didn't always print nicely, but it pretty much worked out of the box.<br /><br />So, yesterday I needed to print something....searching for FreeBSD+ML-2010 yielded little to no results, and nothing useful. In fact the top hit in google groups was a post by a guy I went to university with - but nobody responded to him. So, I embarked on my own journey. CUPS was already installed. I didn't really bother trying LPD cause I thought it'd be neat to print from any computer in the house via this box.<br /><br />dmesg showed that I had /dev/ulpt0 - perfect. I started up CUPS, used my browser to view the web interface at port 631, and ran through the setup wizard to add my printer. But nothing samsung listed? So, I search the web for what to do next....turns out I need a PPD file for my printer.....samsung's website has one for linux....so I tried that.....completed the work in the web interface, print a test page.....and it complains. Missing some kind of filter? I guess I needed more than the PPD file.<br /><br />So, keep searching.....<a href="http://splix.ap2c.org/">splix</a> a third party samsung driver.....but there's no freebsd port in /usr/ports :( As it turns out, there is one in CVS as well as several postings in the news group about creating the port files. After following the instructions in the <a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=111034">PR report 111034 </a><br />I had the port files.....but the Makefile had issues.....missing operator on line 34......there were spaces where there should have been tabs....copy paste error on my part. Forgot Makefiles were so damned picky about tabs.<br /><br />So, I built the port, installed it....re-created the printer using the CUPS web interface. Print a test page and I get "Unsupported format 'application/postscript'!". Odd. Let me try from the command line......<br /><br />/usr/local/bin/lp -dditdy-printer <a href="https://launchpad.net/ubuntu/+source/gutenprint/+bug/36532">ubuntu</a> and <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=381743">debian</a> that claim this error was due to a missing file on those distributions with CUPS 1.2.3 - the file pstoraster.convs. Well, this file ain't on my system....."locate pstoraster" led me to /usr/ports/print/cups-pstoraster. Hmm....a seperate port.....wonder why something that seems so fundamental wouldn't be installed....? Well, I installed it, restarted CUPS tried the test page and no unsupported format complaint.<br /><br />But the job sat in the queue. <a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/99460">PR-99460</a> solved that issue: in printers.conf change deviceURI from usb:/dev/ulpt0 to file:/dev/ulpt0. CUPS won't be able to query the device but printing should work.....so I ran a test page after restarting cups and it appears to have completed (I did the test remotely, will have to wait until I'm home to see if it worked!).<br /><br />Ugh....that was long and painful!<br /><br /><br />UPDATE:<br /><br />I got home to find pages printed with errors listed on them. I can't remember the specific error, but suffice it to say that I'd used splix-1.0.1, and they'd recently released splix-1.0.1-1 specifically to workaround a firmware bug in the ML-2010. However, building this new splix might be an issue.....to start the tarball is half the size of the previous rev.<br /><br />I did a diff on the two versions, and there were a few files changed as well as rastertospl is missing in the latest? I tried to build 1.0.1-1, but it complains about missing some tool ppdpo? Apparently that's part of the cupsddk, which I couldn't build either. OK, dig deeper.<br /><br />A closer look at the diff shows that only one relevant file changed.....src/spl2.cpp had a two line change.....so I copied the file over to the 1.0.1 folder, repackaged the tarball, put it in /usr/ports/distfiles and tweaked the port's distinfo file to have matching MD5 and SHA256 signiatures and matching file size. Rebuilt and installed, printed a test page and it worked!Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com2tag:blogger.com,1999:blog-4907402815993066350.post-45785886189658355122007-04-03T08:12:00.000-05:002007-04-03T08:16:02.642-05:00MOre FreeBSD upgrade woes - large FAT32 partitionsAfter the upgrade to FreeBSD 6.2 I could no longer mount my 250G FAT32 partition? mount_msdosfs was complaining that the partition was too large. Turns out there's a kernel configuration options MSDOSFS_LARGE that needs to replace the standard MSDOSFS option in the GENERIC kernel. I guess PC-BSD had it enabled in the GENERIC kernel. So, I rebuilt the kernel....kinda wanted to stick with the GENERIC kernel since I don't want to add anything more to the plate of things I have to remember to maintain, but in the end I guess it's for the better since I was able to disable a whack of stuff in the kernel and ideally it will run quicker/smoother.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-78292741033919821762007-04-02T09:10:00.000-05:002007-04-02T09:12:23.221-05:00CD/DVD burners lost after FreeBSD upgradeSo, after an upgrade to 6.2 k3b no longer detects my DVD/CD burners? After upgrading all my ports and packages (and breaking a few in the mean time), it turns out that atapicam wasn't loaded....must have been in the GENERIC kernel for PC-BSD. Whatever. Adding atapicam_load="YES" to my /boot/loader.conf should fix that.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-49887521312721381992007-04-02T09:04:00.000-05:002007-04-02T09:10:16.598-05:00Intel E7221/i915/i810 video on FreeBSDMy PC-BSD 1.3 installation was based upon FreeBSD 6.1. My Dell SC420 has Intel E7221 on-board video which is based upon the i915 which uses the i810 driver. However, dmesg told me that it was using the isa-vga driver. Things were sluggish....after a while, switching windows would take a few seconds. my Xorg log said that /dev/agpgart wasn't found? Sure enough, nothing. After much searching, it seemed my best be would be to upgrade my kernel and source as the latest i810 driver had made some significant improvements.<br /><br />So, I upgraded to 6.2 - unfortunately this didn't help. I found several posts that said to hack vga_pci.c to always create an agp device. But vga_pci.c doesn't even seem to be in the source anymore?Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-71922323467169634302007-03-15T07:28:00.000-05:002007-03-15T07:58:44.279-05:00JVC Everio and making a DVDLast year when I was looking to buy a camcorder I discovered that there was basically three kinds on the market - miniDV, dvd, and hard disk. I didn't want to have to spend hours on end transcoding video from a miniDV cam as well as having to deal with adding a firewire card, etc. Nor did I want to have to waste a lot of money buying the dvd-ram media that a dvd camcorder would require. For me it's all about making the most of my time. So I bought a JVC Everio GZ-MG20 hard disk camcorder. The everio records video in mpeg2 format and audio in ac3. Perfect - already in dvd ready format. As well, the fact that the transfer mechanism is USB and the hard disk shows up as a mass drive, makes it even simpler.<br /><br />Now - when the hard disk almost filled up I decided it was time to make some dvds. So, I installed the windows software that came with the unit - power producer I think. I fed it the whack of files....created some menus, and expected it to simply author a dvd structure for me. But instead it started transcoding the video - it was going to take several hours?!?! But the whole point of recording in mpeg2 is so that it wouldn't be necessary to transcode.<br /><br />So, I searched high and low and tried several dvd authoring packages - but all insisted on transcoding. Until I found <a href="http://tmpgenc.pegasys-inc.com/en/index.html">TMPGEng DVD Author</a> from Pegasys software. It let me create a few menus and create a dvd structure and it only took as long as the vob structure took to write to disk.<br /><br />I have two issues with this software: first, it only runs on windows.....now that my desktop is BSD.....the second issue is that I would have liked for the chapter names of each of the videos to be set to the filename automatically, or at least an option to specify.....I run a script over the video files that renames them to the date that they were created....for this purpose. TMPGEnc automatically names each chapter as chapter 1, chapter 2, etc. Manually renaming 100 files is tedious at best, so I have settled for letting it name them this way. I also keep raw archives of the videos on dvd and my server, so the filenames/dates will be preserved there.<br /><br />There were a couple of other nice options it provided - there is the ability to create a DVD without menus, as well as having the first action (when inserted into a dvd player) to play all tracks sequentially (when using menus).<br /><br />So, in the end, for windows, TMPGEnc DVD Author seems to be the best solution for authoring DVDs. The reason for this post is as a precursor to some posts I hope to make regarding my trials and tribulations of authoring DVDs on BSD/Linux.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-85097385108859010492007-03-13T22:59:00.000-05:002007-03-13T23:04:05.431-05:00splitting and joining avi filesI captured some old home videos from VHS on to my computer using my Adaptec Gamebridge 1400 (not recommended, will hopefully post about it later). I'd converted them to MPEG4 using mencoder and ffmpeg.<br /><br />I had a file that ran too long....needed to chop off part. I loaded the file into vlc, figured out the time at which I needed to stop (1:35:32) and used "avisplit":<br /><br />avisplit -i movie.avi -t 01:35:32.00<br /><br />I also had a couple of files that needed to be one so I merged them using "avimerge":<br /><br />avimerge -o outfile.avi -i infile1.avi infile2.avi<br /><br />Note, the -i and files need to come last!<br /><br />Both avisplit and avimerge appear to be part of the "transcode" package.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-35865154831068076562007-03-07T22:15:00.000-05:002007-03-07T22:33:32.849-05:00ssmtp on freebsdI've been using FreeBSD off and on since version 3.x was considered leading edge. I never cared much for keeping close tabs on the logs and overall operation.....I'd update when I had the chance, have a look at the logs, see what's been happening. I found sendmail filling my logs to be quite annoying - I didn't want to be emailed cron output. So, I disabled sendmail in rc.conf.<br /><br />However, I have little spare time and so having an email in my inbox each morning with a summary would now be useful. So I re-enabled sendmail, but as it turns out, as is with many ISPs nowadays, outgoing connections to port 25 are disallowed - so having my server send the email directly (to my gmail account) wasn't gonna happen. So, looks like the default sendmail configuration wasn't going to work. A bit of googling told me that sendmail configuration was gonna be rough. So....I looked for an alternative. Enter ssmtp.<br /><br />ssmtp is a simple MTA sendmail replacement that I found while looking at the <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/outgoing-only.html">FreeBSD handbook</a>. It provides simple configuration for sending outgoing mail only - which is all I want to do. This <a href="http://forums.gentoo.org/viewtopic-p-3011748.html">gentoo how-to</a> was also quite helpful (as many gentoo postings are).<br /><br />I made copy of the sample ssmtp.conf file in /usr/local/etc/ssmtp/ and added the following:<br /><br />root=<email_addr_to_send_to>email_addr_to_send_root_emails_to<br />mailhub=isp_smtp_server<isp_smtp_server><br />rewriteDomain=domain_emails_should_appear_from<name_of_domain_email_should_appear_from><br />hostname=computer_hostname<nameo_of_my_computer><br />AuthUser=isp_email_login_id<my_isp_login_id><br />AuthPass=isp_email_password<my_pass><br /><br /><br />As I said, my ISP won't allow connections to port 25, so I have to use their smtp server, thus the need to provide authentication credentials.<br /><br />Test with:<br /><br />echo "testing mail service from my host" | mail root<br /><br />And a few minutes later I see an email from my host.</my_pass></my_isp_login_id></nameo_of_my_computer></name_of_domain_email_should_appear_from></isp_smtp_server></email_addr_to_send_to>Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0tag:blogger.com,1999:blog-4907402815993066350.post-10209025939407213272007-03-06T23:02:00.000-05:002007-03-07T09:50:43.121-05:00rtorrent & dtachMy search for a new torrent client has come to a close with the winner being <a href="http://libtorrent.rakshasa.no/">rtorrent</a>.<br />It provides an ncurses interfaces and encryption! Perfect. No more having to deal with a resource hungry GUI. Unfortunately the port for rtorrent didn't include a default rc file or create on upon first run. So, I downloaded the rc file from the website, tweaked it to my liking and off we go.<br /><br />During my search I stumbled upon people suggesting the use of "<a href="http://www.gnu.org/software/screen/">GNU screen</a>" to be able to allow rtorrent to run in the background, yet be able to attach and detach from the application at will and from remote locations. Cool. <br /><br />However, I also saw a lot of posts about GNU screen being bloated, slow and awkward to use - and most suggested <a href="http://dtach.sourceforge.net/">dtach </a>instead: a fork of GNU screen that has been trimmed down.<br /><br />So after installing rtorrent and dtach and reading the man pages I gave it a go:<br /><br />dtach -A /tmp/rtorrent.dtach rtorrent<br /><br />The program starts....I add a torrent file (the backspace key)....and sure enough it runs like a charm. ctrl-\ and I've detached. dtach -a /tmp/rtorrent.dtach and I'm attached again.<br /><br />dtach will definitely come in handy when remotely installing ports/packages or building something that will take longer than I can keep a remote session open. Sure a build can be done in the background, but portupgrade requires an attached terminal because it may ask questions of the user.Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com2tag:blogger.com,1999:blog-4907402815993066350.post-35078105310533726062007-03-06T17:22:00.000-05:002007-03-06T17:30:26.725-05:00utorrent & *nixSo, I'd been using uTorrent for quite some time - excellent program! Extremely small footprint, efficient and well designed. Other than some of the sysinternals tools, I haven't seen a windoze program that is within the same class. My only beef with uTorrent is that it's not open source. <br /><br />So, I recently switched away from windoze on my desktop....was on ubuntu for a while, but in the end I'm a FreeBSD kinda guy and thought I'd give PC-BSD a try. I really like it.<br /><br />So, what to do for a torrent client? Azureus is a pig. I need encryption 'cause my ISP is throttling. Ktorrent? Didn't work to well....even with encryption enabled, my DL/UL rates were significantly worse than with uTorrent.<br /><br />So, as it turns out, uTorrent runs on top of wine! Okay, so now my speeds are back up....but.....wine is taking up 40% of my CPU usage at all times! So much for a really efficient torrent client.<br /><br />Next?Leohttp://www.blogger.com/profile/12971832386364807064noreply@blogger.com0