<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>SurlyJake Blog</title><link href="https://www.surlyjake.com/" rel="alternate"></link><link href="https://www.surlyjake.com/feeds/atom.xml" rel="self"></link><id>https://www.surlyjake.com/</id><updated>2020-10-09T20:53:00-07:00</updated><entry><title>ubuntu cloud images in libvirt and virt-manager</title><link href="https://www.surlyjake.com/blog/2020/10/09/ubuntu-cloud-images-in-libvirt-and-virt-manager/" rel="alternate"></link><published>2020-10-09T20:53:00-07:00</published><updated>2020-10-09T20:53:00-07:00</updated><author><name>SurlyJake</name></author><id>tag:www.surlyjake.com,2020-10-09:/blog/2020/10/09/ubuntu-cloud-images-in-libvirt-and-virt-manager/</id><summary type="html">&lt;p&gt;I stopped using IOS's to create VM's. I started using 'cloud images' I might expand on the resons to do this here... lets hope this feature request in the GUI virt-manager gets some traction: https://github.com/virt-manager/virt-manager/issues/143. &lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;i'm going to show examples using virt-install and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I stopped using IOS's to create VM's. I started using 'cloud images' I might expand on the resons to do this here... lets hope this feature request in the GUI virt-manager gets some traction: https://github.com/virt-manager/virt-manager/issues/143. &lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;i'm going to show examples using virt-install and running it with my user account, which in turn, uses the qemu session connection. this gets around filesystem permission issues, etc. there is a difference between qemu:///session and qemu:///system. Just understand that there is a distingction. If you want to use something like virt-manager with this vm afterwards,you can simply connect virt-manager to qemu://session in addition to the default qemu:///system by selecting File-&amp;gt; Add Connection. You can read more about this subject at: https://blog.wikichoon.com/2016/01/qemusystem-vs-qemusession.html&lt;/p&gt;
&lt;hr&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;if trying to connect to a bridge as i did below, you need to create a file to let qemu allow users (using the aforementioned qemu:///session) to connect to the system-level bridge. Edit the file /etc/qemu/bridge.conf and add a line that corresponds to tbe bridge you'd like to use. In my case, all it needs is "allow virbr0". edit to suit your machine.&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;grab the image. Start here: http://cloud-images.ubuntu.com/. Navigate their complicated folder structure to download a specific version. I used https://cloud-images.ubuntu.com/daily/server/focal/20210720/focal-server-cloudimg-amd64.img.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I cant find documentation on what each of the different formats are other than the rather brief description column and making an inference on the file extention. For example, lets look at these two examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;https://cloud-images.ubuntu.com/daily/server/focal/20210720/focal-server-cloudimg-amd64.img&lt;/li&gt;
&lt;li&gt;https://cloud-images.ubuntu.com/daily/server/focal/20210720/focal-server-cloudimg-amd64-disk-kvm.img&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;so whats the difference? if you're going to run the image in kvm, you might be tempted by the -kvm image, but from what i can see, by looking at the .manifest files https://cloud-images.ubuntu.com/daily/server/focal/20210720/focal-server-cloudimg-amd64.manifest and https://cloud-images.ubuntu.com/daily/server/focal/20210720/focal-server-cloudimg-amd64-disk-kvm.manifest, it looks like the -kvm image has a kernel with kvm enabled, which would only be needed for a kvm hypervisor, not a guest.\&amp;lt;/rant&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;    wget https://cloud-images.ubuntu.com/daily/server/focal/20210720/focal-server-cloudimg-amd64.img
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Now create some cloud-init configurations documentation here: https://cloudinit.readthedocs.io/en/latest/. its complicated. in our simple environment, we're going to use 'datasource' of 'NoCloud'https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html. which is just a .iso file with two files: meta-data and user-data. those two files define all of the configuration that will be dropped onto the vm at first boot. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;meta-data has the machine specific data like hostname and network configurations. For this use-case we're gonna let it default to dhcp, so lets keep it basic and only set and instance-id and local-hostname.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;instance-id: foo-tester
local-hostname: foo-tester
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;user-data is documented here: https://cloudinit.readthedocs.io/en/latest/topics/format.html# . here we'll set up a few things like our user and ssh key. I'm going to use docker on these hosts, so i'll install and enable docker and docker-compose.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;foobar&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;ssh_authorized_keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ssh&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;rsa&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;copy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;your&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;pubkey&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~/.&lt;/span&gt;&lt;span class="n"&gt;ssh&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;id_rsa&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pub&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;sudo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ALL=(ALL) NOPASSWD:ALL&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;groups&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sudo&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="c1"&gt;# runs apt-get update&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;package_update&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;true&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="c1"&gt;# runs apt-get upgrade&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;package_upgrade&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;true&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="c1"&gt;# installing additional packages&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;packages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;docker&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;docker&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;compose&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="c1"&gt;# run some commands on first boot&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;runcmd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;systemctl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;daemon&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;reload&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;systemctl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;docker&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;systemctl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;docker&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="c1"&gt;# after system comes up first time. &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;final_message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;The system is finally up, after $UPTIME seconds&amp;quot;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;use virt-install to pull in the user and meta data files for first boot, start the vm, configure it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;virt&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;tester&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4096&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;vcpus&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linux&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;variant&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ubuntu20&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;network&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bridge&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;virbr0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;nographics&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;backing_store&lt;/span&gt;&lt;span class="o"&gt;=$&lt;/span&gt;&lt;span class="n"&gt;PWD&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/focal-server-cloudimg-amd64.img&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;bus&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;virtio&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;cloud&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;init&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=$&lt;/span&gt;&lt;span class="n"&gt;PWD&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/user-data&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;PWD&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/meta-data&amp;quot;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Your terminal session will attach to the VM. let it boot for a little bit so that you can see the dhcp'ed address print out to the console. When you want, detach from the serial console hold down control, then press seven key followed by the ] key. ( ctrl+^])&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;if anything goes wrong, you'll want to get rid of the machine that you created to start over:&lt;/p&gt;
&lt;p&gt;virsh destroy foo-tester || virsh undefine foo-tester --remove-all-storage&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;you can scroll up in the output to find out the dhcp address your VM picked up:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="c"&gt;    8&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;499751&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;&lt;span class="c"&gt; cloud&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;init&lt;/span&gt;&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="c"&gt;652&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;&lt;span class="c"&gt;: ci&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;info: &lt;/span&gt;&lt;span class="nb"&gt;+--------+------+----------------------------+---------------+--------+-------------------+&lt;/span&gt;&lt;span class="c"&gt;&lt;/span&gt;
&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="c"&gt;    8&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;501392&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;&lt;span class="c"&gt; cloud&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;init&lt;/span&gt;&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="c"&gt;652&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;&lt;span class="c"&gt;: ci&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;info: | Device |  Up  |          Address           |      Mask     | Scope  |     Hw&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;Address    |&lt;/span&gt;
&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="c"&gt;    8&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;503118&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;&lt;span class="c"&gt; cloud&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;init&lt;/span&gt;&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="c"&gt;652&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;&lt;span class="c"&gt;: ci&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;info: &lt;/span&gt;&lt;span class="nb"&gt;+--------+------+----------------------------+---------------+--------+-------------------+&lt;/span&gt;&lt;span class="c"&gt;&lt;/span&gt;
&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="c"&gt;    8&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;504659&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;&lt;span class="c"&gt; cloud&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;init&lt;/span&gt;&lt;span class="k"&gt;[&lt;/span&gt;&lt;span class="c"&gt;652&lt;/span&gt;&lt;span class="k"&gt;]&lt;/span&gt;&lt;span class="c"&gt;: ci&lt;/span&gt;&lt;span class="nb"&gt;-&lt;/span&gt;&lt;span class="c"&gt;info: | enp1s0 | True |      192&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;168&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;122&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;212       | 255&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;255&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;255&lt;/span&gt;&lt;span class="nt"&gt;.&lt;/span&gt;&lt;span class="c"&gt;0 | global | 52:54:00:xx:xx:xx |&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;log in over ssh and enjoy.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;ssh foobar@192.168.122.212&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</content><category term="Virtualization"></category><category term="LibVirt"></category><category term="Qemu"></category><category term="virt-manager"></category><category term="cloud"></category></entry><entry><title>QT segfault when accessing ui objects</title><link href="https://www.surlyjake.com/blog/2013/10/10/qt-segfault-when-accessing-ui-objects/" rel="alternate"></link><published>2013-10-10T20:53:00-07:00</published><updated>2013-10-10T20:53:00-07:00</updated><author><name>SurlyJake</name></author><id>tag:www.surlyjake.com,2013-10-10:/blog/2013/10/10/qt-segfault-when-accessing-ui-objects/</id><summary type="html">&lt;p&gt;I'm starting with QT for a hobby project. My design called for a public method inside of my QMainWindow main window. the method will update the text in the display. When calling anything using the ''ui-&amp;gt;'' pointer, the app would segfault. The QT Creator debugger showed the ui pointer as …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I'm starting with QT for a hobby project. My design called for a public method inside of my QMainWindow main window. the method will update the text in the display. When calling anything using the ''ui-&amp;gt;'' pointer, the app would segfault. The QT Creator debugger showed the ui pointer as '&lt;not accessible&gt;'. That was a clue. To confirm, I wanted to see gdb's output.&lt;/p&gt;
&lt;p&gt;To enable debug symbols for GDB, I had to  edit the '.pro' file and add the line ''#CONFIG += debug''. After the edit is made, change directories to the project folder, run qmake, make clean, and make. Once the build is completed, 'gdb ./terminal' (terminal is the name of my program).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$ gdb ./terminal
&lt;span class="o"&gt;(&lt;/span&gt;gdb&lt;span class="o"&gt;)&lt;/span&gt; run
Starting program: /home/jacob/program/./terminal 
Program received signal SIGSEGV, Segmentation fault.
0x0804f8f3 &lt;span class="k"&gt;in&lt;/span&gt; MainWindow::updateStatus &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;this&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0x2c74c085, &lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0xbfffee4c&lt;span class="o"&gt;)&lt;/span&gt; at mainwindow.cpp:233
&lt;span class="m"&gt;233&lt;/span&gt;     qDebug&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;&amp;lt; ui-&amp;gt;valueLabelLocusStatus-&amp;gt;text();&lt;/span&gt;
&lt;span class="s"&gt;(gdb) print ui&lt;/span&gt;
Cannot access memory at address 0x2c74c09d
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After the segfault, I tried to get it to print the value of the 'ui' pointer, it said ''cannot access memorry at address...''. That confirmed it, Something is wrong with the ui pointer.&lt;/p&gt;
&lt;p&gt;The problem was threading. Because my application was in a thread other than that of the main window, access to it's widgets isn't allowed. To resolve the issue, I followed the QT documentation at http://qt-project.org/doc/qt-5.0/qtcore/signalsandslots.html . I changed the public method on the mainwindow class into a QT slot. I made my class extend QObject and added a signal to my class instead of calling the method directly. Once the signal is connected to the slot, QT handled the threading issue.&lt;/p&gt;</content><category term="Development"></category><category term="QT"></category><category term="Development"></category></entry><entry><title>Easily Test Packages From Arch Linux Testing Repositories</title><link href="https://www.surlyjake.com/blog/2012/03/29/easily-test-packages-from-arch-linux-testing-repositories/" rel="alternate"></link><published>2012-03-29T12:18:05-07:00</published><updated>2012-03-29T12:18:05-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2012-03-29:/blog/2012/03/29/easily-test-packages-from-arch-linux-testing-repositories/</id><summary type="html">&lt;p&gt;Sometimes, when a new kernel or application that I use a lot comes out, I want to quickly download and test it on my system. It is simple enough to edit /etc/pacman.conf and enable the testing repositories, then update your system. Problem is, enabling the testing and/or …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Sometimes, when a new kernel or application that I use a lot comes out, I want to quickly download and test it on my system. It is simple enough to edit /etc/pacman.conf and enable the testing repositories, then update your system. Problem is, enabling the testing and/or community-testing repos at their default position will update all packages which have versions in testing.&lt;/p&gt;
&lt;p&gt;If you put the &lt;code&gt;[testing]&lt;/code&gt; and &lt;code&gt;[community-testing]&lt;/code&gt; repos after &lt;code&gt;[core]&lt;/code&gt; and &lt;code&gt;[community]&lt;/code&gt; accordingly. This will tell pacman to prefer the stable versions of packages. Running &lt;code&gt;pacman -Syu&lt;/code&gt; will result in the same set of packages as before.&lt;/p&gt;
&lt;p&gt;Once pacman is configured with the testing repositories enabled as described above, you can selectively run versions of applications that are in testing with all of their testing dependencies without messing about. If you want to install a package from the testing repository, you simply prefix it with the repository's name. Here is an example:&lt;/p&gt;
&lt;p&gt;Linus releases a new kernel and you have read that it fixes some bug that has been plaguing you for months. It's in &lt;code&gt;[testing]&lt;/code&gt;, but you just can't wait. You can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Go to the Arch packages site and manually download the .pkg.xz files of the kernel and all it's dependencies, then install them with pacman -U.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enable the &lt;code&gt;[testing]&lt;/code&gt; repo and run an update. This might give you a lot more than you bargained for.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you configured pacman as I described above, you can simply run &lt;code&gt;pacman -Syu testing/linux&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you have already installed a package which requires an older package than the one you are instaling, pacman will prompt you with the problem like this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;failed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;prepare&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;transaction&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;could&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;satisfy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;dependencies&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;nvidia&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;requires&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;linux&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can usually sove this by installing a newer version of that dependency. The solution in this case is to also install the nvidia package from testing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pacman -Syu testing/linux testing/nvidia
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now It should go through.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: Obviously running something from testing is done at your own risk. Be sure to read up on the repositories you enable here: &lt;a href="https://wiki.archlinux.org/index.php/Official_Repositories"&gt;https://wiki.archlinux.org/index.php/Official_Repositories&lt;/a&gt;&lt;/p&gt;</content><category term="Arch Linux"></category><category term="Arch Linux"></category><category term="dependencies"></category><category term="nvidia"></category><category term="pacman"></category><category term="repository"></category><category term="update"></category></entry><entry><title>New ArchLinux mirror</title><link href="https://www.surlyjake.com/blog/2012/03/15/new-archlinux-mirror/" rel="alternate"></link><published>2012-03-15T15:36:05-07:00</published><updated>2012-03-15T15:36:05-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2012-03-15:/blog/2012/03/15/new-archlinux-mirror/</id><summary type="html">&lt;p&gt;I love Arch linux and have been using it for a few months now. When I started, many of the mirrors I used were slow or would go offline and/or out of date. When I saw an offer for a VPS which should allow me to host a mirror …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I love Arch linux and have been using it for a few months now. When I started, many of the mirrors I used were slow or would go offline and/or out of date. When I saw an offer for a VPS which should allow me to host a mirror of the archlinux package archives, I snatched it up. If you run arch, you can point pacman at my server by adding this line in /etc/pacman.d/mirrorlist:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Server = http://archlinux.surlyjake.com/archlinux/$repo/os/$arch
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I threw together a quick page showing some general stats for the server which you can view at &lt;a href="http://archlinux.surlyjake.com/"&gt;http://archlinux.surlyjake.com/&lt;/a&gt;.The server has been added as an &lt;a href="http://www.archlinux.org/mirrors/archlinux.surlyjake.com/"&gt;official Arch Linux mirror&lt;/a&gt;, but is not in the pacman-mirrorlist package (I'm not sure what the process for that is).&lt;/p&gt;</content><category term="Arch Linux"></category><category term="Arch Linux"></category><category term="hosting"></category></entry><entry><title>Review After One Year of QuickWeb VPS Hosting</title><link href="https://www.surlyjake.com/blog/2012/02/19/review-after-one-year-of-quickweb-vps-hosting/" rel="alternate"></link><published>2012-02-19T11:05:42-08:00</published><updated>2012-02-19T11:05:42-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2012-02-19:/blog/2012/02/19/review-after-one-year-of-quickweb-vps-hosting/</id><summary type="html">&lt;p&gt;One year ago, I purchased a VPS from QuickWeb. I found the deal at my one of my favorite sites for cheap hosting: www.lowendbox.com. The deal was:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OpenVZ VPS&lt;/li&gt;
&lt;li&gt;256MB RAM/386 Burst&lt;/li&gt;
&lt;li&gt;10G disk space&lt;/li&gt;
&lt;li&gt;250GB bandwidth/ Month on 1 IP&lt;/li&gt;
&lt;li&gt;$35.88/ 1 Year&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I ordered …&lt;/p&gt;</summary><content type="html">&lt;p&gt;One year ago, I purchased a VPS from QuickWeb. I found the deal at my one of my favorite sites for cheap hosting: www.lowendbox.com. The deal was:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OpenVZ VPS&lt;/li&gt;
&lt;li&gt;256MB RAM/386 Burst&lt;/li&gt;
&lt;li&gt;10G disk space&lt;/li&gt;
&lt;li&gt;250GB bandwidth/ Month on 1 IP&lt;/li&gt;
&lt;li&gt;$35.88/ 1 Year&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I ordered without much of a problem and my Debian server was provisioned within a few minutes. I was a happy camper. $2.99/month is a great deal for root access to a server, even one with such meager specs. I've had a decent year of hosting with QuickWeb, but I decided to take my business elsewhere when my plan came up for renewal. To help explain why,  I want to share the three support tickets I had to open with them. This will give you the clearest idea of what you get for the money. I Would have included the full text of these exchanges, but they insert a privacy notice in the signature of their support emails, so i'm worried that I may have agreed to something in their TOS.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The server that QuickWeb provisioned for me was fully loaded. For me, that wasn't such a good thing. The server already had web, DNS, and mail server software installed and running (apache, named, and postfix IIRC).  I wasn't comfortable with that because I prefer to start from scratch, planned on using nginx and didn't need to run a DNS and public mail server. I opened a ticket asking if i could get a server provisioned that only includes the base Debian install. The response from QuickWeb was that they don't have a minimal template 'yet', but that I could uninstall packages that i don't need using apt-get. Thanks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In July of last year, there was a service interruption. This site was down.  Not just me, I checked stuff like connecting from a few other servers that I have access too and, of course, http://www.downforeveryoneorjustme.com/. I opened a ticket. An hour and a half later, a response told me that I had sent the ticket to sales instead of the helpdesk and next time, to use the helpdesk for faster response. Another hour and a half later, they replied and told me that the VPS was actually up the whole time, but there was a brief network interruption in their management network, so I wan't able to connect to check the status of my VPS. I had to reiterrate that whether or not the server was UP, It was unreachable over the network for an hour and a half.  The last reply from them came 8 hours in. They asked me to do stuff like turn off IPtables and give them a traceroute.
I gave them a ticket without a lot of information, somehow sent it into their sales queue, but it took them 8 hours to get me a semi-intelligent response.  They never acknowleged a problem with public connectivity to my server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The isue that sealed the deal for me happened this December when QuickWeb changed the IP of my server. Despite their claims to have notified me, I never got an email from them. I used a gmail account to handle all their communication with me.  Yes, even checked the spam folder. No notice. I submitted a ticket for this one too and all they did was tell me that they sent me emails about it while I told them that they didn't.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The server this site is runing on now is a KVM VPS from bitcable. So far the support there is night and day compared with QuickWeb.  Preetam helped me set up the virtIO drivers on FreeBSD. More on that later.&lt;/p&gt;</content><category term="Hosting"></category><category term="Debian"></category><category term="FreeBSD"></category><category term="VM"></category></entry><entry><title>Create a custom application launcher in GNOME3</title><link href="https://www.surlyjake.com/blog/2011/12/30/create-a-custom-application-launcher-in-gnome3/" rel="alternate"></link><published>2011-12-30T09:26:51-08:00</published><updated>2011-12-30T09:26:51-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2011-12-30:/blog/2011/12/30/create-a-custom-application-launcher-in-gnome3/</id><summary type="html">&lt;p&gt;On Arch, the system-wide shortcuts are stored in /usr/share/applications. Each one is a .desktop file with a few parameters. user-specific icons are stored in ~/.local/share/applications. I downloaded eclipse and extracted it in my home directory, so I'll use eclipse as the example application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create the .desktop …&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;</summary><content type="html">&lt;p&gt;On Arch, the system-wide shortcuts are stored in /usr/share/applications. Each one is a .desktop file with a few parameters. user-specific icons are stored in ~/.local/share/applications. I downloaded eclipse and extracted it in my home directory, so I'll use eclipse as the example application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create the .desktop file&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano ~/.local/share/applications/Eclipse.desktop
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Paste this in:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Desktop&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Entry&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="n"&gt;Encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;UTF&lt;/span&gt;&lt;span class="mi"&gt;-8&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="n"&gt;Version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="n"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Application&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="n"&gt;NoDisplay&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="n"&gt;Exec&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;eclipse&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;eclipse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Eclipse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Comment&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Launcher&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Eclipse&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Each line is pretty self-explanatory. Edit to suit your needs. As soon as you save the file, you will be able to see your new shortcut in the list.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;(Optional) Give the shortcut a nice-looking icon:&lt;/strong&gt;
    You probably noticed that your icon is an ugly diamond. To pretty it up, you simply have to add one more line to the desktop file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Icon=/path/to/eclipse/eclipse.svg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Your application may have included a png icon, but to make it really look nice, you should grab an SVG file of the logo from somewhere. Arch has a very simple packaging process which lets you examine all of the package building elements through their webpage at http://www.archlinux.org/packages/. I was able to grab the SVG which the package uses like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;wget -O eclipse.svg http://projects.archlinux.org/svntogit/packages.git/plain/trunk/eclipse.svg\?h\=packages/eclipse
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;</content><category term="Arch Linux"></category><category term="GNOME"></category><category term="IDE"></category><category term="Linux"></category><category term="svg"></category></entry><entry><title>Wordpress HTTPS secure login</title><link href="https://www.surlyjake.com/blog/2011/12/20/wordpress-https-secure-login-with-nginx/" rel="alternate"></link><published>2011-12-20T21:36:11-08:00</published><updated>2011-12-20T21:36:11-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2011-12-20:/blog/2011/12/20/wordpress-https-secure-login-with-nginx/</id><summary type="html">&lt;p&gt;Back when I started with Wordpress, I had to create server rewrites to force my browser to use HTTPS. That changed back in 2008, but this is the first i've heard of it.&lt;/p&gt;
&lt;p&gt;Wordpress 2.6 (released in July, 2008) and newer include the tools do do this out of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Back when I started with Wordpress, I had to create server rewrites to force my browser to use HTTPS. That changed back in 2008, but this is the first i've heard of it.&lt;/p&gt;
&lt;p&gt;Wordpress 2.6 (released in July, 2008) and newer include the tools do do this out of the box! Using this documentation, you can get rid of some old .htaccess or nginx rewrite rules: &lt;a href="http://codex.wordpress.org/Administration_Over_SSL"&gt;http://codex.wordpress.org/Administration_Over_SSL&lt;/a&gt;.  All you have to do is add the declaration in wp-config.php:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;define(&amp;#39;FORCE_SSL_ADMIN&amp;#39;, true);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This forces logins and administrative sessions to use SSL.&lt;/p&gt;
&lt;p&gt;Now, you can remove the old nginx rewrites. They aren't needed anymore:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;rewrite&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;^/&lt;/span&gt;&lt;span class="nt"&gt;wp-login&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;php&lt;/span&gt;&lt;span class="o"&gt;(.*)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;https&lt;/span&gt;&lt;span class="o"&gt;://&lt;/span&gt;&lt;span class="nt"&gt;www&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;surlyjake&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;wp-login&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;php&lt;/span&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;permanent&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="nt"&gt;rewrite&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;^/&lt;/span&gt;&lt;span class="nt"&gt;wp-admin&lt;/span&gt;&lt;span class="o"&gt;(.*)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;https&lt;/span&gt;&lt;span class="o"&gt;://&lt;/span&gt;&lt;span class="nt"&gt;www&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;surlyjake&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;wp-admin&lt;/span&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;permanent&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="Hosting"></category><category term="wordpress"></category><category term="security"></category><category term="https"></category></entry><entry><title>WordPress Redirection Plugin</title><link href="https://www.surlyjake.com/blog/2011/09/09/wordpress-redirection-plugin/" rel="alternate"></link><published>2011-09-09T15:10:17-07:00</published><updated>2011-09-09T15:10:17-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2011-09-09:/blog/2011/09/09/wordpress-redirection-plugin/</id><summary type="html">&lt;p&gt;This blog is undergoing some changes.There is some content (like the zabbix pages) that I can no longer maintain since I no longer use them in my day-job. To keep everything working seamlessly, I wanted to create some 302 (permanently moved) redirectors for the content that I was taking …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This blog is undergoing some changes.There is some content (like the zabbix pages) that I can no longer maintain since I no longer use them in my day-job. To keep everything working seamlessly, I wanted to create some 302 (permanently moved) redirectors for the content that I was taking down. In the past, I used a plugin called "&lt;a href="http://wordpress.org/extend/plugins/smart-404/"&gt;smart 404&lt;/a&gt;" to intelligently redirect visitors to a good page instead of the dummy standard 404 page. Unfortunately, It looks like smart 404 is having some trouble in newer WordPress versions and wouldn't create a smart suggestions on my 404 page.&lt;/p&gt;
&lt;p&gt;Enter &lt;a href="http://wordpress.org/extend/plugins/redirection/"&gt;Redirection&lt;/a&gt;. Redirection gives you a menu in the admin interface which allows you to easily create and maintain 301 and 302 redirections (among other features). Here is a screenshot of what it looks like once activated:&lt;/p&gt;
&lt;p&gt;{% img http://www.surlyjake.com/images/blog/wordpress-redirection-plugin.jpg %}&lt;/p&gt;
&lt;p&gt;From the screenshot, you can see that I was able to create a simple 301 redirect from a page on my WordPress instance to an external website where the content will live from now on.  The second rule allowed me to match the URL using a regular expression and redirect it to another page on my site. This is a great piece of software.&lt;/p&gt;
&lt;p&gt;One issue I ran into when testing the plugin was that edits I made did not seem to be taking effect. This turned out to simply be my browser caching the 301 response. I recommend that you either manually clear the cache or download the &lt;a href="http://chrispederick.com/work/web-developer/"&gt;web developer toolbar&lt;/a&gt; and disable cache.  I should also note that my server runs nginx and not the Apache web server. I simply deleted the redirection 'module' for Apache which attempts to create .htaccess rules to perform the redirections. Without the Apache module, WordPress handles the redirections.&lt;/p&gt;
&lt;p&gt;Redirection Plugin documentation: &lt;a href="http://urbangiraffe.com/plugins/redirection/"&gt;http://urbangiraffe.com/plugins/redirection/&lt;/a&gt;&lt;/p&gt;</content><category term="Hosting"></category><category term="web development"></category><category term="wordpress"></category></entry><entry><title>Prevent samba from creating home directory for machine accounts.</title><link href="https://www.surlyjake.com/blog/2011/08/05/prevent-samba-from-creating-home-directory-for-machine-accounts/" rel="alternate"></link><published>2011-08-05T17:34:29-07:00</published><updated>2011-08-05T17:34:29-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2011-08-05:/blog/2011/08/05/prevent-samba-from-creating-home-directory-for-machine-accounts/</id><summary type="html">&lt;p&gt;Since this setup automatically creates a home directory for a user as soon as they access the machine (via samba, ssh, console), I noticed some directories being created for computer accounts.  To prevent this,  I have added a line that only "Domain Users" are allowed to authenticate.  To add this …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Since this setup automatically creates a home directory for a user as soon as they access the machine (via samba, ssh, console), I noticed some directories being created for computer accounts.  To prevent this,  I have added a line that only "Domain Users" are allowed to authenticate.  To add this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;wbinfo -n &amp;quot;Domain Users&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It will spit out the SID for the Domain Users group. Something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;S-1-5-21-((some number))-((some number))-((some number)) Domain Group (2)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Take that number and change the Pam_winbind.so line in /etc/pam.d/common-session to look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;session sufficient pam_winbind.so require_membership_of=S-1-5-21-((some number))-((some number))-((some number)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="Linux"></category><category term="Samba"></category><category term="windows"></category></entry><entry><title>Create a single standalone .exe from a Python program</title><link href="https://www.surlyjake.com/blog/2011/03/28/create-a-single-standalone-exe-from-a-python-program/" rel="alternate"></link><published>2011-03-28T08:53:00-07:00</published><updated>2011-03-28T08:53:00-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2011-03-28:/blog/2011/03/28/create-a-single-standalone-exe-from-a-python-program/</id><summary type="html">&lt;p&gt;I have been working on a small windows command line tool that I wanted to distribute it as a single executable file on windows. I tried cx_freeze and py2exe. Both of these tools worked well, but I couldn't find an easy way to compress make the whole program into …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I have been working on a small windows command line tool that I wanted to distribute it as a single executable file on windows. I tried cx_freeze and py2exe. Both of these tools worked well, but I couldn't find an easy way to compress make the whole program into a .exe file. py2exe and cx_freeze both create working programs, but there are always some dependent .zip archive or .dll's somewhere that need to be distributed with it. Pyinstaller, I found, actually compresses everything into a single .exe. This makes a pretty big executable (my small command line utility created a 5MB .exe file), but it's simple and it works.&lt;/p&gt;
&lt;p&gt;To use pyinstaller:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;grab pyinstaller 1.5rc (1.4 doesn't work with python 2.7). extract the zip file anywhere.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;change directories to the pyinstaller folder you just created.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Before you create your first executable, you will have to run this once.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;python configure.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now, pyinstall needs to scan through your program and create what they call a spec file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;python makespec.py --onefile path\to\program\program.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now, run this command to generate the executable.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;python build.py program\program.spec
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the command has finished, the standalone executable will be available in the program\dist folder inside of pyinstaller.
Instructions for how to do this for a linux executable on ubuntu linux can be found here: &lt;a href="http://excid3.com/blog/2009/12/pyinstaller-a-simple-tutorial/"&gt;http://excid3.com/blog/2009/12/pyinstaller-a-simple-tutorial/&lt;/a&gt;. You can find more info on pyinstaller at their website: &lt;a href="http://www.pyinstaller.org/"&gt;http://www.pyinstaller.org/&lt;/a&gt;.&lt;/p&gt;</content><category term="Development"></category><category term="python"></category><category term="windows"></category></entry><entry><title>Install Open-VM-tools on Debian 6 squeeze</title><link href="https://www.surlyjake.com/blog/2011/02/08/install-open-vm-tools-on-debian-6-squeeze/" rel="alternate"></link><published>2011-02-08T15:51:53-08:00</published><updated>2011-02-08T15:51:53-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2011-02-08:/blog/2011/02/08/install-open-vm-tools-on-debian-6-squeeze/</id><summary type="html">&lt;p&gt;Installing Open Virtual Machine Tools is a nice alternative to managing and installing the vmware tools package that comes with Vmware's hypervisor products.  It allows you to use APT to manage all the dependencies and updates. Module assistant will recompile the kernel modules for you automatically when you update kernels …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Installing Open Virtual Machine Tools is a nice alternative to managing and installing the vmware tools package that comes with Vmware's hypervisor products.  It allows you to use APT to manage all the dependencies and updates. Module assistant will recompile the kernel modules for you automatically when you update kernels too.&lt;/p&gt;
&lt;p&gt;I have verified that this configuration works under ESXi 4.1.0, 260247 and a new Squeeze install. All of the essential functions like being able to see guest OS information on the Vsphere summary page and performing "Shut Down Guest" and "Restart Guest" all work as expected. If your experiences vary, please leave a comment&lt;/p&gt;
&lt;p&gt;This should all be performed by the root user (otherwise prepend 'sudo' to the commands if you must use sudo). _
The first thing you need to do is add the 'contrib' archive to your apt sources config:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano /etc/apt/sources.list
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Add the 'contrib' to the end of these source lines. I use the debian.uchicago.edu repository, so mine look like this on a new install:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://debian.uchicago.edu/debian/&lt;/span&gt; &lt;span class="kp"&gt;squeeze&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt; &lt;span class="kp"&gt;contrib&lt;/span&gt;
&lt;span class="k"&gt;deb-src&lt;/span&gt; &lt;span class="s"&gt;http://debian.uchicago.edu/debian/&lt;/span&gt; &lt;span class="kp"&gt;squeeze&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt; &lt;span class="kp"&gt;contrib&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After you save changes to the file, simply update your package list and perform the install:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;apt&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;apt&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;open&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;open&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You might see an error that looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Loading&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;open&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;vmhgfsFATAL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Module&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;vmhgfs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;vmmemctlFATAL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Module&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;vmmemctl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;vmsyncFATAL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Module&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;vmsync&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Don't worry, this is because we have not installed the kernel modules for some of the more advanced VMware functions like the vmhgfs file system, Memory Balloon (vmmemctl) Driver,  and vmsync, which helps freeze the VM while taking snapshots.
To install these kernel modules, we're going to use module-assistant. It will compile the modules for your kernel:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;module-assistant&lt;/span&gt; &lt;span class="n"&gt;auto-install&lt;/span&gt; &lt;span class="n"&gt;open-vm&lt;/span&gt; -&lt;span class="n"&gt;i&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The '-i' puts module assistant into non-interactive mode. It wont ask you to confirm any additional package installs necesarry to set up the build environment.
If you're running a server without a Graphical environment, you're finished. If you want features such as automatically adjusting the VM's monitor resolution or allowing your mouse to seamlessly move between your host system and the VM, you need to install one more package:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;apt&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;open&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;toolbox&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now you won't need to use CTRL+ALT to switch back and forth.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Debian"></category><category term="install"></category><category term="squeeze"></category><category term="virtual machine"></category><category term="VM"></category><category term="VMware"></category><category term="vmware tools"></category></entry><entry><title>Tar extract destination folder</title><link href="https://www.surlyjake.com/blog/2011/02/08/tar-extract-destination-folder/" rel="alternate"></link><published>2011-02-08T11:51:10-08:00</published><updated>2011-02-08T11:51:10-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2011-02-08:/blog/2011/02/08/tar-extract-destination-folder/</id><summary type="html">&lt;p&gt;Tar can redirect extracted files to a different folder. This can be handy if you want to unpack a tar archive stored on a cd or other read-only media and want to eliminate the step of first copying the archive, extracting it, then deleting the extra tar.  All you have …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Tar can redirect extracted files to a different folder. This can be handy if you want to unpack a tar archive stored on a cd or other read-only media and want to eliminate the step of first copying the archive, extracting it, then deleting the extra tar.  All you have to do is add a '-C &lt;target folder&gt;' to the tar command.   So here's an example using the VMware Tools tarball:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# tar -C /root -zxvf /media/cdrom0/VMwareTools-8.3.2-257589.tar.gz
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This will redirect the extracted files into the /root folder. simple&lt;/p&gt;</content><category term="SysAdmin"></category><category term="extract"></category><category term="VMware"></category></entry><entry><title>Brasero, no option for creating ISO</title><link href="https://www.surlyjake.com/blog/2011/01/19/brasero-no-option-for-creating-iso/" rel="alternate"></link><published>2011-01-19T13:37:20-08:00</published><updated>2011-01-19T13:37:20-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2011-01-19:/blog/2011/01/19/brasero-no-option-for-creating-iso/</id><summary type="html">&lt;p&gt;I love Brasero. It's simple, lightweight, and comes with Ubuntu. Recently, when I wanted to back up a disk, ISO was not on the list of formats. As is usual, the issue was a missing package: brasero-cdrkit.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;apt-get install brasero-cdrkit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, .ISO (ISO9960) will be an available disk format for …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I love Brasero. It's simple, lightweight, and comes with Ubuntu. Recently, when I wanted to back up a disk, ISO was not on the list of formats. As is usual, the issue was a missing package: brasero-cdrkit.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;apt-get install brasero-cdrkit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, .ISO (ISO9960) will be an available disk format for you under Brasero.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;http://www.surlyjake.com/wp-content/uploads/2011/01/Brasero-iso.jpg&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;http://www.surlyjake.com/wp-content/uploads/2011/01/Brasero-iso.jpg&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Brasero-iso&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;520&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;552&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;alignnone size-full wp-image-690&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/img&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="Brasero"></category><category term="ISO"></category><category term="Ubuntu"></category></entry><entry><title>Tandberg endpoints cannot establish calls over Juniper Routers</title><link href="https://www.surlyjake.com/blog/2010/11/19/tandberg-endpoints-cannot-establish-calls-over-juniper-routers/" rel="alternate"></link><published>2010-11-19T10:52:08-08:00</published><updated>2010-11-19T10:52:08-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-11-19:/blog/2010/11/19/tandberg-endpoints-cannot-establish-calls-over-juniper-routers/</id><summary type="html">&lt;p&gt;This is a nasty little issue. On my private network, suddenly some endpoints  would refuse to establish calls made over SIP or H323. Error codes would  be:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;channel unacceptable
487 / Request Terminated
480 / Temporarily Not Available
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Not particularly helpful information. After all the packet sniffing  and diagnostic checks, it appeared …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This is a nasty little issue. On my private network, suddenly some endpoints  would refuse to establish calls made over SIP or H323. Error codes would  be:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;channel unacceptable
487 / Request Terminated
480 / Temporarily Not Available
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Not particularly helpful information. After all the packet sniffing  and diagnostic checks, it appeared packets were being rewritten or  dropped between the endpoint and our VCS. The culprit here is Juniper's  'ALG' for SIP and H323 traffic. I don't have the time not to figure out  exactly why or how it was breaking my calls, but i do know that in my  case, it wasn't needed. Disable the SIP and H323 ALG's (in the SRX web  UI under Configure -&amp;gt; security -&amp;gt; ALG. The endpoints will start  working again after your reboot them and allow them to re-register to  your gatekeeper.&lt;/p&gt;
&lt;p&gt;More reading:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.juniper.net/techpubs/software/junos-security/junos-security95/junos-security-swconfig-security/id-79332.html#id-79332"&gt; http://www.juniper.net/techpubs/software/junos-security/junos-security95/junos-security-swconfig-security/id-79332.html#id-79332&lt;/a&gt;&lt;/p&gt;</content><category term="Networking"></category><category term="alg"></category><category term="error codes"></category><category term="gatekeeper"></category><category term="h323"></category><category term="junos"></category><category term="routers"></category><category term="sip"></category><category term="Video Conferencing"></category></entry><entry><title>Monitoring Flexlm usage with Zabbix</title><link href="https://www.surlyjake.com/blog/2010/11/18/monitoring-flexlm-usage-with-zabbix/" rel="alternate"></link><published>2010-11-18T14:16:10-08:00</published><updated>2010-11-18T14:16:10-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-11-18:/blog/2010/11/18/monitoring-flexlm-usage-with-zabbix/</id><summary type="html">&lt;p&gt;Flexlm license usage can be a hard thing to accurately measure and monitor. Luckily, the output from lmutil can be used to display license usage. First thing to do is locate the lmutil binary and try to get it to run. I use Flexlm for autodesk on Windows and ESRI …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Flexlm license usage can be a hard thing to accurately measure and monitor. Luckily, the output from lmutil can be used to display license usage. First thing to do is locate the lmutil binary and try to get it to run. I use Flexlm for autodesk on Windows and ESRI on linux(centOS).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows:&lt;/strong&gt;
This server seemed to want the  license file specified. You may need to launch the lmtools GUI tool and  watch the status bar for the path to it. This is what mine looked like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;quot;c:\program files\autodesk network license manager\lmutil&amp;quot; lmstat -c &amp;quot;c:\program files\autodesk network license manager\license\license.lic&amp;quot; -a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Linux:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/home/esri/arcgis/license10.0/bin/lmutil lmstat -a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That will spit out the current license usage for all your products. To isolate the numbers we want to monitor, we will be piping the output into some other commands like find and cut.
I recommend using the GNU tools for windows http://gnuwin32.sourceforge.net/. These examples use the built-in 'find' utility, and a 'cut.exe' tool i found googling around. I had overlooked the gnutools when I first set this up. My mistake can be your gain. With gnutools, it will be easy to isolate the output you want using 'grep' and 'cut'. First, isolate the line you are looking for with grep. You will have to figure out what feature code you want to monitor. mine looks like this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;quot;c:\program files\autodesk network license manager\lmutil&amp;quot; lmstat -c &amp;quot;c:\program files\autodesk network license manager\license\license.lic&amp;quot; -a | find /i &amp;quot;64300acd_f:&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Linux:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;now that you have the right line,  you can trim the extra characters with 'cut'. It will take some experimentation to get it right.:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;quot;c:\program files\autodesk network license manager\lmutil&amp;quot; lmstat -c &amp;quot;c:\program files\autodesk network license manager\license\license.lic&amp;quot; -a | find /i &amp;quot;64300acd_f:&amp;quot; | cut -c 62-64
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Linux:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO | cut -c 59-61
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The output now should be only the number of licenses being used.&lt;/p&gt;
&lt;p&gt;To allow zabbix to monitor this value, we need to create a 'UserParameter' read up on it here: &lt;a href="http://www.zabbix.com/documentation/1.8/manual/config/user_parameters"&gt;http://www.zabbix.com/documentation/1.8/manual/config/user_parameters&lt;/a&gt;. This is what the parameter looks like on my servers:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;UserParameter=licenses.autocad.used,&amp;quot;c:\program files\autodesk network license manager\lmutil&amp;quot; lmstat -c &amp;quot;c:\program files\autodesk network license manager\license\license.lic&amp;quot; -a | find /i &amp;quot;64300acd_f:&amp;quot; | cut -c 62-64
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Linux:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;UserParameter=licenses.arcinfo.used,/home/esri/arcgis/license10.0/bin/lmutil lmstat -a | grep ARC/INFO | cut -c 59-61
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once you have the userparameter created on the license server, restart the agent and add an item in zabbix to begin collecting values.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="gnu tools"></category><category term="license usage"></category><category term="Linux"></category><category term="lmtools"></category><category term="windows"></category></entry><entry><title>View string including special characters like newlines in Python</title><link href="https://www.surlyjake.com/blog/2010/10/19/view-string-including-special-characters-like-newlines-in-python/" rel="alternate"></link><published>2010-10-19T15:28:04-07:00</published><updated>2010-10-19T15:28:04-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-10-19:/blog/2010/10/19/view-string-including-special-characters-like-newlines-in-python/</id><summary type="html">&lt;p&gt;After spending a frustrating hour or two trying to format a string, i stumbled on python's repr() funcion. repr() allows you to inspect a string object when you're troubleshooting your code. For example:&lt;/p&gt;
&lt;p&gt;I was trying to understand a string that was shown in the terminal like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;print mystring …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;After spending a frustrating hour or two trying to format a string, i stumbled on python's repr() funcion. repr() allows you to inspect a string object when you're troubleshooting your code. For example:&lt;/p&gt;
&lt;p&gt;I was trying to understand a string that was shown in the terminal like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;print mystring




Node - 192.168.1.104
ERROR:
Description = Generic failure
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Seems pretty simple to remove the extra newline characters right? no. doing a string.replace("\n", " ") did not fix it, but actually mangled the string. So here comes repr() to the rescue...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;print repr(mystring)




&amp;#39;Node - 192.168.1.104\r\r\nERROR:\r\r\nDescription = Generic failure\r\r\n&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;\r\r\n... i've never heard of it before, but knowing that it's there, i could easily change my replace to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;print mystring.replace(&amp;quot;\r\r\n&amp;quot;, &amp;quot; &amp;quot;)




Node - 192.168.1.104 ERROR: Description = Generic failure
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="Development"></category><category term="Python"></category></entry><entry><title>'Pstools: Access Denied in a Domain Environment'</title><link href="https://www.surlyjake.com/blog/2010/09/15/pstools-access-denied-in-a-domain-environment/" rel="alternate"></link><published>2010-09-15T14:53:10-07:00</published><updated>2010-09-15T14:53:10-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-09-15:/blog/2010/09/15/pstools-access-denied-in-a-domain-environment/</id><summary type="html">&lt;p&gt;After upgrading to a windows 7 VM at work, I was having trouble getting pstools commands to authenticate on remote machines. After much trial and error, I realized some curious behaviour with psexec. Obviously, when connecting to a remote machine, I would try to use the '-u' switch to specify …&lt;/p&gt;</summary><content type="html">&lt;p&gt;After upgrading to a windows 7 VM at work, I was having trouble getting pstools commands to authenticate on remote machines. After much trial and error, I realized some curious behaviour with psexec. Obviously, when connecting to a remote machine, I would try to use the '-u' switch to specify my administrative account, but would always get 'access is denied'. Of course, all of the normal things should be checked: simple sharing turned off, $ADMIN share working... you know...&lt;/p&gt;
&lt;p&gt;The issue was apparently that if I log into my workstation as a non-administrative user, but try to issue pstools commands as an administrator,  it fails because Microsoft wants me to log into my workstation and work logged with my domain admin account.&lt;/p&gt;
&lt;p&gt;Take a look at this example using psexec:
On windows 7, running 'cmd' as your non-admin user, if you type in the command:&lt;/p&gt;
&lt;p&gt;{% codeblock lang:text %}
c:\Program Files (x86)\PsTools&amp;gt;psexec -u domain\domainadmin \targetmachine cmd&lt;/p&gt;
&lt;p&gt;PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com&lt;/p&gt;
&lt;p _="%" endcodeblock&gt;Password:
Could not start PsExec service on targetmachine:
Access is denied.&lt;/p&gt;
&lt;p&gt;If you:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Hit start&lt;/li&gt;
&lt;li&gt;Type "cmd"&lt;/li&gt;
&lt;li&gt;Hold down 'shift' and right-click on the 'cmd' in the start menu&lt;/li&gt;
&lt;li&gt;Select 'run as different user'.&lt;/li&gt;
&lt;li&gt;Type in your administrative credentials. Use the same ones you will use in the psexec command.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now you should have your command line window open. If you run the same command as earlier:&lt;/p&gt;
&lt;p&gt;{% codeblock lang:text %}
c:\Program Files (x86)\PsTools&amp;gt;psexec -u domain\domainadmin \targetmachine cmd&lt;/p&gt;
&lt;p&gt;PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com&lt;/p&gt;
&lt;p&gt;Password:&lt;/p&gt;
&lt;p _="%" endcodeblock&gt;Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Windows\system32&amp;gt;&lt;/p&gt;
&lt;p&gt;Now you're in!&lt;/p&gt;</content><category term="SysAdmin"></category><category term="psexec"></category><category term="pstools"></category><category term="windows"></category></entry><entry><title>ntpq timed out on freeBSD</title><link href="https://www.surlyjake.com/blog/2010/09/07/ntpq-timed-out-on-freebsd/" rel="alternate"></link><published>2010-09-07T13:42:38-07:00</published><updated>2010-09-07T13:42:38-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-09-07:/blog/2010/09/07/ntpq-timed-out-on-freebsd/</id><summary type="html">&lt;p&gt;I was running ntpd locally on a server and wanted to check in on ntpd's status. ntpq -p was not producing any output even though ntpd was running.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# ntpq -p
localhost: timed out, nothing received
***Request timed out
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This is because I had the option "restrict default ignore" set in …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I was running ntpd locally on a server and wanted to check in on ntpd's status. ntpq -p was not producing any output even though ntpd was running.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# ntpq -p
localhost: timed out, nothing received
***Request timed out
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This is because I had the option "restrict default ignore" set in /etc/ntp.conf. ntpq. This makes ntpd ignore EVERYTHING, even queries to the loopback interface. Ntpq queries ntpd over the loopback interface at 127.0.0.1. To allow these local queries, add:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt; restrict 127.0.0.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;to /etc/ntp.conf, then also add restrict lines for your other upstream ntp servers.&lt;/p&gt;
&lt;p&gt;restart ntpd:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/etc/rc.d/ntpd restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now ntpq -p will show you status of it's peers&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 dns3.untangle.c .INIT.          16 u    -   64    0    0.000    0.000   0.000
 mirror          .INIT.          16 u    -   64    0    0.000    0.000   0.000
 153.16.4.133    .INIT.          16 u    -   64    0    0.000    0.000   0.000
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="FreeBSD"></category><category term="ntp"></category><category term="ntpd"></category><category term="time"></category></entry><entry><title>Cannot delete ZFS snapshot</title><link href="https://www.surlyjake.com/blog/2010/08/23/cannot-delete-zfs-snapshot/" rel="alternate"></link><published>2010-08-23T15:14:09-07:00</published><updated>2010-08-23T15:14:09-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-08-23:/blog/2010/08/23/cannot-delete-zfs-snapshot/</id><content type="html">&lt;p&gt;While Deleting to delete a snapshot, i typed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;zpool&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;destroy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;zfsdiskpool&lt;/span&gt;&lt;span class="nv"&gt;@Sat&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and got:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;cannot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;open&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;zfsdiskpool@Sat&amp;#39;&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;invalid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;character&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;@&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This is because to delete snapshots in ZFS, you should use 'zfs destroy' instead of 'zpool destroy'. DOH!&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;zfs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;destroy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;zfsdiskpool&lt;/span&gt;&lt;span class="nv"&gt;@Sat&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="invalid character"></category><category term="snapshot"></category><category term="ZFS"></category></entry><entry><title>Script to run handbrake recursively through a folder tree</title><link href="https://www.surlyjake.com/blog/2010/08/10/script-to-run-handbrake-recursively-through-a-folder-tree/" rel="alternate"></link><published>2010-08-10T10:22:29-07:00</published><updated>2010-08-10T10:22:29-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-08-10:/blog/2010/08/10/script-to-run-handbrake-recursively-through-a-folder-tree/</id><summary type="html">&lt;p&gt;Handbrake is a fantastic tool for (among other uses), converting videos into mobile formats. It is extremely easy to use and can usually get a video properly converted in just a few clicks. To get Videos encoded for use on my phone, I use the "iPhone &amp;amp; iPod Touch" preset. It …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Handbrake is a fantastic tool for (among other uses), converting videos into mobile formats. It is extremely easy to use and can usually get a video properly converted in just a few clicks. To get Videos encoded for use on my phone, I use the "iPhone &amp;amp; iPod Touch" preset. It will convert your video to .mp4 as well as scale it down to a consumable size. This format will work on any smartphone I've seen.&lt;/p&gt;
&lt;p&gt;My issue is that when converting a folder full of videos, I don't want to have to use the gui to add a bunch of videos to the queue one by one. Its a very clicky process. This simple bash script will walk handbrake through all the files in a selected folder (and its subfolders). This uses the find command to traverse recursively through a directory structure. It will place the transcoded file in the same folder as its source and change its extension to ".mp4".&lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Usage: handbrakefolder.sh [FOLDER]
Run handbrake on all the files contained in [FOLDER]. (the current directory by default) &lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# Change this to specify a different handbrake preset. You can list them by running: &amp;quot;HandBrakeCLI --preset-list&amp;quot;&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="nv"&gt;PRESET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;iPhone &amp;amp; iPod Touch&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -z &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
    &lt;span class="nv"&gt;TRANSCODEDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;.&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
    &lt;span class="nv"&gt;TRANSCODEDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
    find &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$TRANSCODEDIR&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;/* -type f -exec bash -c &lt;span class="s1"&gt;&amp;#39;HandBrakeCLI -i &amp;quot;$1&amp;quot; -o &amp;quot;${1%\.*}&amp;quot;.mp4 --preset=&amp;quot;$PRESET&amp;quot;&amp;#39;&lt;/span&gt; __ &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Save that into a .sh file like "handbrakefolder.sh" and grant it the execute permission (chmod +x handbrakefolder.sh).&lt;/p&gt;
&lt;p&gt;Thanks to Vinnie and &lt;a href="http://mywiki.wooledge.org/UsingFind"&gt;http://mywiki.wooledge.org/UsingFind&lt;/a&gt; for their help in this.&lt;/p&gt;
&lt;p&gt;Now you can simply execute this script against a folder containing your video files. like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;For&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;folder&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;structure&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;like&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;this&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Videos&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;show1&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;show2&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;season&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;season&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;show3&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="n"&gt;hostname&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;handbrakefolder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Videos&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="p"&gt;....&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="kr"&gt;When&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;it&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;look&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;like&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;this&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Videos&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;show1&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;show2&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;season&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;season&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;ep2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;show3&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;avi&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;vid2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mp4&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="bash script"></category><category term="Handbrake"></category><category term="recursive"></category></entry><entry><title>Write zero's to disk Infinite loop</title><link href="https://www.surlyjake.com/blog/2010/07/30/write-zeros-to-disk-infinite-loop/" rel="alternate"></link><published>2010-07-30T17:05:49-07:00</published><updated>2010-07-30T17:05:49-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-07-30:/blog/2010/07/30/write-zeros-to-disk-infinite-loop/</id><summary type="html">&lt;p&gt;I was bored... So this is a little bash script i wrote that will write zero's to a hard disk infinately until you press CTRL+C. It uses dcfldd instead of plain dd because i like the progress output it provides.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt; 1&lt;/span&gt;
&lt;span class="normal"&gt; 2&lt;/span&gt;
&lt;span class="normal"&gt; 3&lt;/span&gt;
&lt;span class="normal"&gt; 4&lt;/span&gt;
&lt;span class="normal"&gt; 5&lt;/span&gt;
&lt;span class="normal"&gt; 6&lt;/span&gt;
&lt;span class="normal"&gt; 7&lt;/span&gt;
&lt;span class="normal"&gt; 8&lt;/span&gt;
&lt;span class="normal"&gt; 9 …&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary><content type="html">&lt;p&gt;I was bored... So this is a little bash script i wrote that will write zero's to a hard disk infinately until you press CTRL+C. It uses dcfldd instead of plain dd because i like the progress output it provides.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt; 1&lt;/span&gt;
&lt;span class="normal"&gt; 2&lt;/span&gt;
&lt;span class="normal"&gt; 3&lt;/span&gt;
&lt;span class="normal"&gt; 4&lt;/span&gt;
&lt;span class="normal"&gt; 5&lt;/span&gt;
&lt;span class="normal"&gt; 6&lt;/span&gt;
&lt;span class="normal"&gt; 7&lt;/span&gt;
&lt;span class="normal"&gt; 8&lt;/span&gt;
&lt;span class="normal"&gt; 9&lt;/span&gt;
&lt;span class="normal"&gt;10&lt;/span&gt;
&lt;span class="normal"&gt;11&lt;/span&gt;
&lt;span class="normal"&gt;12&lt;/span&gt;
&lt;span class="normal"&gt;13&lt;/span&gt;
&lt;span class="normal"&gt;14&lt;/span&gt;
&lt;span class="normal"&gt;15&lt;/span&gt;
&lt;span class="normal"&gt;16&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; -e &lt;span class="s2"&gt;&amp;quot;Which disk would you like to wipe out? (sda, sdb, sdc)?   \c&amp;quot;&lt;/span&gt;
&lt;span class="nb"&gt;read&lt;/span&gt; DISK
&lt;span class="nb"&gt;read&lt;/span&gt; -p &lt;span class="s2"&gt;&amp;quot;You picked &amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$DISK&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;, are you sure? (y/n)&amp;quot;&lt;/span&gt; -n &lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nv"&gt;$REPLY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;~ ^&lt;span class="o"&gt;[&lt;/span&gt;Yy&lt;span class="o"&gt;]&lt;/span&gt;$ &lt;span class="o"&gt;]]&lt;/span&gt;
&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="nv"&gt;C&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;((&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;do&lt;/span&gt;
        &lt;span class="nb"&gt;echo&lt;/span&gt; -e &lt;span class="s2"&gt;&amp;quot;\nStarting zero Sweep number &amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$C&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; ...&amp;quot;&lt;/span&gt;
        dcfldd &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/zero &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/dev/&lt;span class="nv"&gt;$DISK&lt;/span&gt;
        &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Zero&amp;#39;s written to Disk &amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$C&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; time(s)&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;[ hit CTRL+C to stop ]&amp;quot;&lt;/span&gt;
        &lt;span class="nb"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;C&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;C+1
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><category term="SysAdmin"></category><category term="bash script"></category><category term="dd"></category></entry><entry><title>Convert High-Def MKV to play on xbox 360 using Linux</title><link href="https://www.surlyjake.com/blog/2010/06/29/convert-high-def-mkv-to-play-on-xbox-360-using-linux/" rel="alternate"></link><published>2010-06-29T16:23:32-07:00</published><updated>2010-06-29T16:23:32-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-06-29:/blog/2010/06/29/convert-high-def-mkv-to-play-on-xbox-360-using-linux/</id><summary type="html">&lt;p&gt;There are a million different tutorials out there on how to convert a MKV file into a format that an xbox360 will play. You may have found, like i did, that most of them use 50 different questionable pieces of software to manipulate individual tracks and separate the mkv, etc …&lt;/p&gt;</summary><content type="html">&lt;p&gt;There are a million different tutorials out there on how to convert a MKV file into a format that an xbox360 will play. You may have found, like i did, that most of them use 50 different questionable pieces of software to manipulate individual tracks and separate the mkv, etc, etc... I think those are ridiculous.&lt;/p&gt;
&lt;p&gt;Please read the&lt;a href="http://support.xbox.com/support/en/us/nxe/gamesandmedia/movies/videofaq/viewvideoplaybackfaq.aspx"&gt; FAQ regarding xbox360 file format compatibility&lt;/a&gt;.  It may help you pick better options for your particular files than the general ones i offer below.&lt;/p&gt;
&lt;p&gt;The solution is simple: Use &lt;a href="http://avidemux.sourceforge.net/"&gt;Avidemux&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install avidemux. To install it is simple. It's in the Ubuntu repositories and I imagine you can also find it in other distros quite easily.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open avidemux and open the mkv you want to convert. If prompted some garbage about 264 and safemode, just use safe mode and dont worry about it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select File -&amp;gt; Properties. This will tell you some info on the formats in use in your video file. Take this opportunity to identify what the xbox doesn't like. When you are finished, click OK. If you want a second opinion, open up the folder with your mkv in it.  Right click -&amp;gt; properties -&amp;gt; Audio/Video tab. This will also tell  you the video and audio formats.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We obviously know that it wont play a video in a MKV container, so first thing to do is change the "Format" dropdown to say "MP4" &lt;em&gt;(you can, of course use AVI, but the majority of files I run into are h.264 and aac audio. For this combo, you want mp4...)&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;From the Properties menu, recall the video codec. H264 files show as "AVC1" inside of avidemux. I'm sure theres a technical reason for this, but do you want to talk about it or watch your video?
Most of the time, you can leave the video droptown in avidemux on "Copy" this is nice because it means that your processor wont be re-encoding the video. This saves you quality and time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;From the properties menu, recall the audio codec. If you have a video with AAC stereo audio, leave the dropdown on "copy".
This is where most of my files need some love. Many MKV's have 5.1 surround audio tracks. This is great, but not for an xbox360. To mix the audio down to stereo, select AAC on the audio dropdown, then click "filters". In the mixer dropdown, select "stereo".&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click "save". Avidemux will prompt you for a filename for the converted file. It does not default a file extension, so do yourself and your xbox a favor and add one yourself like "&lt;videoname&gt;.mp4".&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once avidemux is finished with your file, it's ready to go.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://avidemux.sourceforge.net/"&gt;http://avidemux.sourceforge.net/&lt;/a&gt;&lt;/p&gt;</content><category term="SysAdmin"></category><category term="codec"></category><category term="h 264"></category><category term="Linux"></category><category term="mkv file"></category><category term="Ubuntu"></category><category term="xbox360"></category></entry><entry><title>Script to run handbrake on an entire folder</title><link href="https://www.surlyjake.com/blog/2010/06/10/script-to-run-handbrake-on-an-entire-folder/" rel="alternate"></link><published>2010-06-10T16:33:09-07:00</published><updated>2010-06-10T16:33:09-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-06-10:/blog/2010/06/10/script-to-run-handbrake-on-an-entire-folder/</id><summary type="html">&lt;p&gt;&lt;strong&gt; UPDATED 8-10-10:
This script has been superceeded by its newer version at &lt;a href="http://www.surlyjake.com/blog/2010/08/10/script-to-run-handbrake-recursively-through-a-folder-tree/"&gt;http://www.surlyjake.com/blog/2010/08/10/script-to-run-handbrake-recursively-through-a-folder-tree/&lt;/a&gt;. The new version features all of the previous features, but can also traverse recursively through a folder structure.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;{% codeblock handbrake.sh %}&lt;/p&gt;
&lt;h1&gt;!/bin/bash&lt;/h1&gt;
&lt;p _="%" endcodeblock&gt;if [ -z "$1" ] ; then
    TRANSCODEDIR="."
else …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt; UPDATED 8-10-10:
This script has been superceeded by its newer version at &lt;a href="http://www.surlyjake.com/blog/2010/08/10/script-to-run-handbrake-recursively-through-a-folder-tree/"&gt;http://www.surlyjake.com/blog/2010/08/10/script-to-run-handbrake-recursively-through-a-folder-tree/&lt;/a&gt;. The new version features all of the previous features, but can also traverse recursively through a folder structure.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;{% codeblock handbrake.sh %}&lt;/p&gt;
&lt;h1&gt;!/bin/bash&lt;/h1&gt;
&lt;p _="%" endcodeblock&gt;if [ -z "$1" ] ; then
    TRANSCODEDIR="."
else
    TRANSCODEDIR="$1"
fi
for file in "$TRANSCODEDIR"/*
do
    HandBrakeCLI -i "${file}" -o "${file}.mp4" --preset="iPhone &amp;amp; iPod Touch"""
done&lt;/p&gt;
&lt;p&gt;Save that into a .sh file like "handbrakefolder.sh"&lt;/p&gt;</content><category term="SysAdmin"></category><category term="bash script"></category><category term="Handbrake"></category><category term="script"></category><category term="video files"></category></entry><entry><title>Updating FreeBSD ports nicely using nice</title><link href="https://www.surlyjake.com/blog/2010/06/08/updating-freebsd-ports-nicely-using-nice/" rel="alternate"></link><published>2010-06-08T10:34:22-07:00</published><updated>2010-06-08T10:34:22-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-06-08:/blog/2010/06/08/updating-freebsd-ports-nicely-using-nice/</id><summary type="html">&lt;p&gt;Thanks to: &lt;a href="http://scottspare.com/bsdfun/?p=75"&gt;http://scottspare.com/bsdfun/?p=75&lt;/a&gt; for pointing me in the right direction. Compiling port updates can take a while and slow down your server. What you can do is use the 'nice' utility to force the processes to a lower priority. This will help your server to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Thanks to: &lt;a href="http://scottspare.com/bsdfun/?p=75"&gt;http://scottspare.com/bsdfun/?p=75&lt;/a&gt; for pointing me in the right direction. Compiling port updates can take a while and slow down your server. What you can do is use the 'nice' utility to force the processes to a lower priority. This will help your server to run &lt;em&gt;almost&lt;/em&gt; normally during an update.&lt;/p&gt;
&lt;p&gt;When you use the 'nice' command inside of csh or tcsh, you need to mind that you give the full path to the binary so you dont use the built-in 'nice' command.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# /usr/bin/nice -n 10 {your update command}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;What i use is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# /usr/bin/nice -n 10 portupgrade -aRrP
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Man page for 'nice': &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=nice&amp;amp;apropos=0&amp;amp;sektion=0&amp;amp;manpath=FreeBSD+8.0-RELEASE&amp;amp;format=html"&gt;http://www.freebsd.org/cgi/man.cgi?query=nice&amp;amp;apropos=0&amp;amp;sektion=0&amp;amp;manpath=FreeBSD+8.0-RELEASE&amp;amp;format=html&lt;/a&gt;&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Compiling"></category><category term="FreeBSD"></category><category term="freebsd ports"></category><category term="portupgrade"></category><category term="update"></category></entry><entry><title>Freebsd-update fetch interupted</title><link href="https://www.surlyjake.com/blog/2010/06/07/freebsd-update-fetch-interupted/" rel="alternate"></link><published>2010-06-07T15:38:35-07:00</published><updated>2010-06-07T15:38:35-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-06-07:/blog/2010/06/07/freebsd-update-fetch-interupted/</id><summary type="html">&lt;p&gt;I lost power while freebsd-update fetch was downloading patches up to 8.0-Release-p3. When the server came back online, I ran a freebsd-update fetch again and it still found two files that needed updating. after running freebsd-update install, got this error:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# &lt;span class="nv"&gt;freebsd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;update&lt;/span&gt; &lt;span class="nv"&gt;install&lt;/span&gt;
&lt;span class="nv"&gt;Installing&lt;/span&gt; &lt;span class="nv"&gt;updates&lt;/span&gt;...&lt;span class="nv"&gt;gunzip&lt;/span&gt;: &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;stdin&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;: &lt;span class="nv"&gt;unexpected&lt;/span&gt; &lt;span class="k"&gt;end …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;I lost power while freebsd-update fetch was downloading patches up to 8.0-Release-p3. When the server came back online, I ran a freebsd-update fetch again and it still found two files that needed updating. after running freebsd-update install, got this error:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# &lt;span class="nv"&gt;freebsd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;update&lt;/span&gt; &lt;span class="nv"&gt;install&lt;/span&gt;
&lt;span class="nv"&gt;Installing&lt;/span&gt; &lt;span class="nv"&gt;updates&lt;/span&gt;...&lt;span class="nv"&gt;gunzip&lt;/span&gt;: &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;stdin&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;: &lt;span class="nv"&gt;unexpected&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt; &lt;span class="nv"&gt;file&lt;/span&gt;
&lt;span class="nv"&gt;gunzip&lt;/span&gt;: &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;stdin&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;: &lt;span class="nv"&gt;unexpected&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt; &lt;span class="nv"&gt;file&lt;/span&gt;
 &lt;span class="nv"&gt;done&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I guess a patch archive was corrupted. no problem though, just remove the download:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# rm -r /var/db/freebsd-update/files&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;now you can run&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# freebsd-update fetch&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Looking&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;up&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;FreeBSD&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mirrors&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mirrors&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Fetching&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;signature&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;8.0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;RELEASE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;update5&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;freebsd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Fetching&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Fetching&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Inspecting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Preparing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;download&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Fetching&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;following&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;updated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;part&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;updating&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;8.0&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;RELEASE&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;p3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;boot&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;kernel&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;kernel&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;symbols&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;boot&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;kernel&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;nfsclient&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ko&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;symbols&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="c1"&gt;# freebsd-update install&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Installing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;updates&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;no problems&lt;/p&gt;</content><category term="SysAdmin"></category><category term="FreeBSD"></category><category term="Freebsd-update"></category></entry><entry><title>'ZFS Cant rm: No space left on device'</title><link href="https://www.surlyjake.com/blog/2010/01/19/zfs-cant-rm-no-space-left-on-device/" rel="alternate"></link><published>2010-01-19T17:52:42-08:00</published><updated>2010-01-19T17:52:42-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2010-01-19:/blog/2010/01/19/zfs-cant-rm-no-space-left-on-device/</id><summary type="html">&lt;p&gt;If you completely fill up a zfs pool, it wont let you delete files on it. What you CAN do, is pick a scapegoat file to wipe out or remove a snapshot. Then you will be able to use the rm command. what I did:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# &lt;span class="nv"&gt;df&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;h&lt;/span&gt;
&lt;span class="nv"&gt;Filesystem&lt;/span&gt;     &lt;span class="nv"&gt;Size&lt;/span&gt;    &lt;span class="nv"&gt;Used …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;If you completely fill up a zfs pool, it wont let you delete files on it. What you CAN do, is pick a scapegoat file to wipe out or remove a snapshot. Then you will be able to use the rm command. what I did:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# &lt;span class="nv"&gt;df&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;h&lt;/span&gt;
&lt;span class="nv"&gt;Filesystem&lt;/span&gt;     &lt;span class="nv"&gt;Size&lt;/span&gt;    &lt;span class="nv"&gt;Used&lt;/span&gt;   &lt;span class="nv"&gt;Avail&lt;/span&gt; &lt;span class="nv"&gt;Capacity&lt;/span&gt;  &lt;span class="nv"&gt;Mounted&lt;/span&gt; &lt;span class="nv"&gt;on&lt;/span&gt;
&lt;span class="nv"&gt;themirror&lt;/span&gt;       &lt;span class="mi"&gt;39&lt;/span&gt;&lt;span class="nv"&gt;G&lt;/span&gt;     &lt;span class="mi"&gt;39&lt;/span&gt;&lt;span class="nv"&gt;G&lt;/span&gt;      &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="nv"&gt;B&lt;/span&gt;   &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;    &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;jacob&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;themirror&lt;/span&gt;
# &lt;span class="nv"&gt;rm&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="nv"&gt;gfile&lt;/span&gt;
&lt;span class="nv"&gt;rm&lt;/span&gt;: &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="nv"&gt;gfile&lt;/span&gt;: &lt;span class="nv"&gt;No&lt;/span&gt; &lt;span class="nv"&gt;space&lt;/span&gt; &lt;span class="nv"&gt;left&lt;/span&gt; &lt;span class="nv"&gt;on&lt;/span&gt; &lt;span class="nv"&gt;device&lt;/span&gt;
# &lt;span class="nv"&gt;dd&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="nv"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;null&lt;/span&gt; &lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="nv"&gt;gfile&lt;/span&gt;
&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;records&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt;
&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;records&lt;/span&gt; &lt;span class="nv"&gt;out&lt;/span&gt;
&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;bytes&lt;/span&gt; &lt;span class="nv"&gt;transferred&lt;/span&gt; &lt;span class="nv"&gt;in&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;.&lt;span class="mi"&gt;000046&lt;/span&gt; &lt;span class="nv"&gt;secs&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nv"&gt;bytes&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;sec&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
# &lt;span class="nv"&gt;rm&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="nv"&gt;gfile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="dd"></category><category term="Filesystem"></category><category term="rm command"></category><category term="ZFS"></category></entry><entry><title>FreeBSD error in /boot/loader.conf</title><link href="https://www.surlyjake.com/blog/2009/12/23/freebsd-error-in-bootloader-conf/" rel="alternate"></link><published>2009-12-23T16:29:41-08:00</published><updated>2009-12-23T16:29:41-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-12-23:/blog/2009/12/23/freebsd-error-in-bootloader-conf/</id><summary type="html">&lt;p&gt;While experimenting with ZFS in FreeBSD, I made some tweaks to the vk.kmem_size variable in /boot/loader.conf. when setting it like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;#/boot/loader.conf&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kmem_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;1024&amp;quot;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;everything worked, but I wanted to see what would happen if i doubled it. Unfortunately, setting vm.kmem …&lt;/p&gt;</summary><content type="html">&lt;p&gt;While experimenting with ZFS in FreeBSD, I made some tweaks to the vk.kmem_size variable in /boot/loader.conf. when setting it like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;#/boot/loader.conf&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kmem_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;1024&amp;quot;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;everything worked, but I wanted to see what would happen if i doubled it. Unfortunately, setting vm.kmem_size to 2048 kept the FreeBSD kernel from booting. At startup it would just do this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;panic&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;kmem_suballoc&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bad&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;cpuid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To fix the erroneous variable setting, I had to :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Reboot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Wait for the FreeBSD Boot menu. (the screen that lists Default, ACPI disabled, safe, and single user modes)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press 6 to select "Escape to loader prompt"&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;At the loader prompt, type "show". This will provide all the default variable settings. press the spacebar to page down. In my case, at the end, the incorrect variable was: vm.kmem_size="2048".&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;to switch it back and allow the system to boot, type&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;correct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;in my case this was:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;set vm.kmem_size=1024M
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;type&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;boot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When you are finished with all that fun, you should edit the /boot/loader.conf file back so you don't have to do this again.
Thanks to "crsd" from the FreeBSD IRC channel for the help.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="FreeBSD8"></category><category term="ZFS"></category></entry><entry><title>Debian eth0, eth1, eth2, in Virtualbox or VMware Virtual machines when copying</title><link href="https://www.surlyjake.com/blog/2009/11/13/debian-eth0-eth1-eth2-etc-in-vms-when-copying/" rel="alternate"></link><published>2009-11-13T14:44:17-08:00</published><updated>2009-11-13T14:44:17-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-11-13:/blog/2009/11/13/debian-eth0-eth1-eth2-etc-in-vms-when-copying/</id><summary type="html">&lt;p&gt;Debian uses udev. Udev handles mapping MAC's to the appropriate /dev/eth(X) file. If you copy a Virtual machine, Udev will remember the MAC address of the old NIC. When you copy the machine, the virtual host usually generates a new MAC address for the VM.
Udev will assign …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Debian uses udev. Udev handles mapping MAC's to the appropriate /dev/eth(X) file. If you copy a Virtual machine, Udev will remember the MAC address of the old NIC. When you copy the machine, the virtual host usually generates a new MAC address for the VM.
Udev will assign the new Device to eth1, eth2, and so on. If you want to change your NIC assignments make Udev forget the old MAC.
In Debian 5 (lenny) it is in this file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/etc/udev/rules.d/70-persistent-net.rules
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In Debian 4 (etch) it is in this file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/etc/udev/rules.d/z25_persistent-net.rules
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To apply changes in Lenny: "udevadm trigger" or "udevtrigger" (in Etch)&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Debian"></category><category term="eth"></category><category term="VM"></category></entry><entry><title>Karmic install cannot login (gdm freezes) Nvidia</title><link href="https://www.surlyjake.com/blog/2009/11/03/karmic-install-cannot-login-gdm-freezes-nvidia/" rel="alternate"></link><published>2009-11-03T12:13:46-08:00</published><updated>2009-11-03T12:13:46-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-11-03:/blog/2009/11/03/karmic-install-cannot-login-gdm-freezes-nvidia/</id><summary type="html">&lt;p&gt;On a fresh install of karmic, using an Nvidia 7800 GT. When I went to click on my username to log in, some artifacts would appear on the screen, then the system would freeze. hard. Couldnt even ctrl+alt to another console. Installing the Nvidia drivers fixed the issue. To …&lt;/p&gt;</summary><content type="html">&lt;p&gt;On a fresh install of karmic, using an Nvidia 7800 GT. When I went to click on my username to log in, some artifacts would appear on the screen, then the system would freeze. hard. Couldnt even ctrl+alt to another console. Installing the Nvidia drivers fixed the issue. To fix it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Do a hard reset on the machine&lt;/li&gt;
&lt;li&gt;When you arrive at the GDM screen, DO NOT CLICK ON ANYTHING.&lt;/li&gt;
&lt;li&gt;press CTRL + ALT + F5. Your screen will switch over to a text console.&lt;/li&gt;
&lt;li&gt;Log in.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the Nvidia glx driver&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo aptitude install nvidia-glx-new
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reboot the machine.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo reboot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;</content><category term="SysAdmin"></category><category term="apt"></category><category term="driver"></category><category term="gdm"></category><category term="install"></category><category term="Karmic"></category><category term="nvidia"></category><category term="nvidia drivers"></category></entry><entry><title>Windows 32 (x86) or 64 (AMD64) detection in batch files</title><link href="https://www.surlyjake.com/blog/2009/10/20/windows-32-x86-or-64-amd64-detection-in-batch-files/" rel="alternate"></link><published>2009-10-20T16:53:04-07:00</published><updated>2009-10-20T16:53:04-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-10-20:/blog/2009/10/20/windows-32-x86-or-64-amd64-detection-in-batch-files/</id><summary type="html">&lt;p&gt;While there are a lot of ways to detect for a 64 bit version of windows. you can test for %programFiles(x86)%, but handling the output and writing the IF comparisons is messy.&lt;/p&gt;
&lt;p&gt;In Batch files, you can easily check for architecture by using the "processor_architecture" variable. x86 versions …&lt;/p&gt;</summary><content type="html">&lt;p&gt;While there are a lot of ways to detect for a 64 bit version of windows. you can test for %programFiles(x86)%, but handling the output and writing the IF comparisons is messy.&lt;/p&gt;
&lt;p&gt;In Batch files, you can easily check for architecture by using the "processor_architecture" variable. x86 versions of windows will have this set to "x86", and x64 versions "x64". Here's an easy example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;echo&lt;/span&gt; off
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;%processor_architecture%&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; AMD64 &lt;span class="k"&gt;echo&lt;/span&gt; This is a 64-bit version of windows
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;%processor_architecture%&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; x86 &lt;span class="k"&gt;echo&lt;/span&gt; this is a 32-bit version of windows.
&lt;span class="k"&gt;pause&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="amd64"></category><category term="batch"></category><category term="batch files"></category><category term="processor architecture"></category><category term="windows"></category></entry><entry><title>Uninstall ALL Versions of WinZip Batch Script</title><link href="https://www.surlyjake.com/blog/2009/10/06/uninstall-all-versions-of-winzip-batch-script/" rel="alternate"></link><published>2009-10-06T15:43:34-07:00</published><updated>2009-10-06T15:43:34-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-10-06:/blog/2009/10/06/uninstall-all-versions-of-winzip-batch-script/</id><summary type="html">&lt;p&gt;I have been struggling with this for quite a while, and ran into a lot of issues with all of the different versions on our network. There are people with 100 line .vbs scripts to do this, and I think this is much simpler:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;echo&lt;/span&gt; off
&lt;span class="c1"&gt;REM&lt;/span&gt;
&lt;span class="c1"&gt;REM&lt;/span&gt;
&lt;span class="c1"&gt;REM    Detects …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;I have been struggling with this for quite a while, and ran into a lot of issues with all of the different versions on our network. There are people with 100 line .vbs scripts to do this, and I think this is much simpler:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;echo&lt;/span&gt; off
&lt;span class="c1"&gt;REM&lt;/span&gt;
&lt;span class="c1"&gt;REM&lt;/span&gt;
&lt;span class="c1"&gt;REM    Detects winzip and silently uninstalls&lt;/span&gt;
&lt;span class="c1"&gt;REM    There is a un-stoppable pop-up window. so this will kill&lt;/span&gt;
&lt;span class="c1"&gt;REM    all instances of  IE after the UN-installation.&lt;/span&gt;
&lt;span class="c1"&gt;REM&lt;/span&gt;
&lt;span class="c1"&gt;REM&lt;/span&gt;
&lt;span class="c1"&gt;REM&lt;/span&gt;
taskkill /F /IM wzqkpick.exe
wmic product where &lt;span class="s2"&gt;&amp;quot;name like &amp;#39;&lt;/span&gt;&lt;span class="se"&gt;%%&lt;/span&gt;&lt;span class="s2"&gt;winzip&lt;/span&gt;&lt;span class="se"&gt;%%&lt;/span&gt;&lt;span class="s2"&gt;&amp;#39;&amp;quot;&lt;/span&gt; call Uninstall
&lt;span class="c1"&gt;REM&lt;/span&gt;
&lt;span class="c1"&gt;REM This section is for WinZip &amp;lt;12&lt;/span&gt;
&lt;span class="c1"&gt;REM&lt;/span&gt;
&lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="k"&gt;Exist&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;%programfiles(x86)%&lt;/span&gt;&lt;span class="s2"&gt;\Winzip\winzip32.exe&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;GOTO&lt;/span&gt; &lt;span class="nl"&gt;64&lt;/span&gt;
&lt;span class="k"&gt;If&lt;/span&gt; &lt;span class="k"&gt;Exist&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;%programfiles%&lt;/span&gt;&lt;span class="s2"&gt;\Winzip\winzip32.exe&amp;quot;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;%programfiles%&lt;/span&gt;&lt;span class="s2"&gt;\WinZip\Winzip32.exe&amp;quot;&lt;/span&gt; /Uninstallx
taskkill /F /IM iexplore.exe
&lt;span class="k"&gt;GOTO&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nl"&gt;END&lt;/span&gt;
&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nl"&gt;64&lt;/span&gt;
&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;%programfiles(x86)%&lt;/span&gt;&lt;span class="s2"&gt;\WinZip\Winzip32.exe&amp;quot;&lt;/span&gt; /Uninstallx
taskkill /F /IM iexplore.exe
&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nl"&gt;END&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;For getting rid of WinZip 12, the magic happens in the 'wmic' line. It searches all of the installed product's names for "winzip" and will uninstall anything it finds. This only works for products that use MSI's. If you ran this outside of a batch file, you will have to use a single % percentage sign instead of the %% double percentage sign... Windows scripting sucks, and that's just the way it is. Same thing that happens in "FOR" loops. &lt;/p&gt;
&lt;p&gt;I never knew anything about the Windows management instrumentation control (wmic) until now, but I will be sure to exploit it's features. &lt;/p&gt;</content><category term="SysAdmin"></category><category term="batch script"></category><category term="install"></category><category term="script"></category><category term="scripts"></category><category term="taskkill"></category><category term="windows"></category><category term="windows management instrumentation"></category><category term="wmic"></category></entry><entry><title>Tethered Blackberry Modem on Ubuntu Karmic</title><link href="https://www.surlyjake.com/blog/2009/09/11/tethered-blackberry-modem-on-ubuntu-karmic/" rel="alternate"></link><published>2009-09-11T17:54:43-07:00</published><updated>2009-09-11T17:54:43-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-09-11:/blog/2009/09/11/tethered-blackberry-modem-on-ubuntu-karmic/</id><summary type="html">&lt;p&gt;Using your blackberry as a 3G (in my case) modem proved to be Incredibly simple. There are five million different methods to do this and many have you compiling stuff and editing text files. I love those sorts of things, but this is much easier. I Wish that I had …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Using your blackberry as a 3G (in my case) modem proved to be Incredibly simple. There are five million different methods to do this and many have you compiling stuff and editing text files. I love those sorts of things, but this is much easier. I Wish that I had tried this sooner.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Confirmed using Blackberry Tour (9630) on Verizon. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What we will do is use a program called 'barry'. &lt;a href="http://www.netdirect.ca/software/packages/barry"&gt;http://www.netdirect.ca/software/packages/barry&lt;/a&gt; All we need to do is install some packages from the repository below. These commands are from the terminal, so launch it from "Applications -&amp;gt; Accessories -&amp;gt; Terminal" in the Menu.&lt;/p&gt;
&lt;p&gt;Edit /etc/apt/sources.list&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo nano /etc/apt/sources.list
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;add these lines:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://ppa.launchpad.net/doctormo/barry-snapshot/ubuntu&lt;/span&gt; &lt;span class="kp"&gt;karmic&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt;
&lt;span class="k"&gt;deb-src&lt;/span&gt; &lt;span class="s"&gt;http://ppa.launchpad.net/doctormo/barry-snapshot/ubuntu&lt;/span&gt; &lt;span class="kp"&gt;karmic&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;install the repositories key. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 113659DF
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now update your package list&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo aptitude update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and install the programs:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo aptitude install libbarry0 barry-util barrybackup-gui
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Thats it! now to create the connection, the command will vary depending on your provider. The ones they have preconfigured are: ATT Cingular, China Mobile, KPN Nederland, O2 Ireland, Rogers, Sprint, T-Mobile US, Verizon.
the syntax is :
sudo pppd call barry-{provider}&lt;/p&gt;
&lt;p&gt;for Verizon:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo pppd call barry-verizon
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You'll see a bunch of output, and it'll tell you that the connection is up. to close it down, press (CTRL+C). Make it pretty by creating an application launcher on your desktop.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="blackberry"></category><category term="install"></category><category term="Karmic"></category><category term="modem"></category><category term="Ubuntu"></category><category term="verizon"></category></entry><entry><title>Compiz desktop in Debian Squeeze</title><link href="https://www.surlyjake.com/blog/2009/08/19/compiz-desktop-in-debian-squeeze/" rel="alternate"></link><published>2009-08-19T11:32:00-07:00</published><updated>2009-08-19T11:32:00-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-08-19:/blog/2009/08/19/compiz-desktop-in-debian-squeeze/</id><summary type="html">&lt;p&gt;&lt;em&gt;It has come to my attention that this post is out of date. Since Squeeze's release, I have not been able to update it. Your best bet to get compiz working correctly would be to follow to the directions in the Debian wiki: &lt;/em&gt;&lt;a href="http://wiki.debian.org/Compiz"&gt;http://wiki.debian.org/Compiz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Getting compiz …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;It has come to my attention that this post is out of date. Since Squeeze's release, I have not been able to update it. Your best bet to get compiz working correctly would be to follow to the directions in the Debian wiki: &lt;/em&gt;&lt;a href="http://wiki.debian.org/Compiz"&gt;http://wiki.debian.org/Compiz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Getting compiz running on squeeze is surprising easy. Debian has included a document to help set it up, but there are a few little things necessary to get it to be usable.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Get the packages installed.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;apt-get install compiz compizconfig-settings-manager compiz-fusion-plugins-main
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Follow the instructions here: &lt;a href="http://wiki.debian.org/Compiz"&gt;http://wiki.debian.org/Compiz&lt;/a&gt; to customize your /etc/X11/xorg.conf file&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart gdm&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/etc/init.d/gdm restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;open up a terminal and type&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;compiz --replace
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If a went well, you should see everything flash around as it redraws your desktop.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;My window decorations (title bars) dissapeared when I enabled compiz. Additionally, i couldn't drag windows by clicking on the title bar. To fix this: go to&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;System -&amp;gt; Preferences -&amp;gt; Compizconfig Settings Manager&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Scroll down to the "Effects" section and enable "Window decoration"&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Scroll down to "Window Management" and enable "Move Window"&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you want to use the desktop cube and/or workspaces, you will need more than the single or dual workspaces provided by default.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;System -&amp;gt; Preferences -&amp;gt; Compizconfig Settings Manager&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click "General options"&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select the "Desktop size" tab.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the "Horizontal Virtual size" to whatever you want. For a cube... 4&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you want compiz to start automatically with GNOME:&lt;/p&gt;
&lt;p&gt;Add "compiz --replace" to "Desktop -&amp;gt; Preferences -&amp;gt; Sessions -&amp;gt; Startup Programs"&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</content><category term="SysAdmin"></category><category term="compiz"></category><category term="Compizconfig"></category><category term="cube"></category><category term="gdm"></category><category term="window decoration"></category><category term="window decorations"></category><category term="window management"></category></entry><entry><title>'Vmware - Unable to change virtual machine power state: Internal error.'</title><link href="https://www.surlyjake.com/blog/2009/08/14/vmware-unable-to-change-virtual-machine-power-state-internal-error/" rel="alternate"></link><published>2009-08-14T08:43:23-07:00</published><updated>2009-08-14T08:43:23-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-08-14:/blog/2009/08/14/vmware-unable-to-change-virtual-machine-power-state-internal-error/</id><summary type="html">&lt;p&gt;Ran into this while running Vmware Workstation under Ubuntu Jaunty. I got an error while shutting down the machine through an NX session.&lt;/p&gt;
&lt;p&gt;This is a result of a zombie 'vmware-vmx' process running. All you need to do is kill the process. This command sends 'signal 9' to the process …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Ran into this while running Vmware Workstation under Ubuntu Jaunty. I got an error while shutting down the machine through an NX session.&lt;/p&gt;
&lt;p&gt;This is a result of a zombie 'vmware-vmx' process running. All you need to do is kill the process. This command sends 'signal 9' to the process. When sent to a program, SIGKILL causes it to terminate immediately. In contrast to SIGTERM and SIGINT, this signal cannot be caught or ignored. For more information: &lt;a href="http://en.wikipedia.org/wiki/SIGKILL"&gt;more sigkill info&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;killall -s9 vmware-vmx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After that, I was able to start up the virtual machine without issue.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Jaunty"></category><category term="killall"></category><category term="SIGKILL"></category><category term="SIGTERM"></category><category term="Ubuntu"></category><category term="VM"></category><category term="VMware"></category><category term="Workstation"></category><category term="zombie"></category></entry><entry><title>Linux command line bandwidth monitor</title><link href="https://www.surlyjake.com/blog/2009/07/29/linux-command-line-bandwidth-monitor/" rel="alternate"></link><published>2009-07-29T16:50:48-07:00</published><updated>2009-07-29T16:50:48-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-07-29:/blog/2009/07/29/linux-command-line-bandwidth-monitor/</id><summary type="html">&lt;p&gt;You can find out how much bandwidth your linux machine is using with a simple tool called "bwm-ng". In Debian, install it with&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install bwm-ng
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, just type 'bwm-ng' in the command line. It will give you something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;bwm&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;ng&lt;/span&gt; &lt;span class="nv"&gt;v0&lt;/span&gt;.&lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;probing&lt;/span&gt; &lt;span class="nv"&gt;every&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;.&lt;span class="mi"&gt;000&lt;/span&gt;&lt;span class="nv"&gt;s …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;You can find out how much bandwidth your linux machine is using with a simple tool called "bwm-ng". In Debian, install it with&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install bwm-ng
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, just type 'bwm-ng' in the command line. It will give you something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;bwm&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;ng&lt;/span&gt; &lt;span class="nv"&gt;v0&lt;/span&gt;.&lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;probing&lt;/span&gt; &lt;span class="nv"&gt;every&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;.&lt;span class="mi"&gt;000&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;, &lt;span class="nv"&gt;press&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="s"&gt;h&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;help&lt;/span&gt;
&lt;span class="nv"&gt;input&lt;/span&gt;: &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;proc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;net&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;dev&lt;/span&gt; &lt;span class="nv"&gt;type&lt;/span&gt;: &lt;span class="nv"&gt;rate&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;         &lt;span class="nv"&gt;iface&lt;/span&gt;                   &lt;span class="nv"&gt;Rx&lt;/span&gt;                   &lt;span class="nv"&gt;Tx&lt;/span&gt;                &lt;span class="nv"&gt;Total&lt;/span&gt;
&lt;span class="o"&gt;==============================================================================&lt;/span&gt;
             &lt;span class="nv"&gt;lo&lt;/span&gt;:           &lt;span class="mi"&gt;0&lt;/span&gt;.&lt;span class="mi"&gt;00&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;            &lt;span class="mi"&gt;0&lt;/span&gt;.&lt;span class="mi"&gt;00&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;            &lt;span class="mi"&gt;0&lt;/span&gt;.&lt;span class="mi"&gt;00&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;
           &lt;span class="nv"&gt;eth0&lt;/span&gt;:        &lt;span class="mi"&gt;2221&lt;/span&gt;.&lt;span class="mi"&gt;47&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;           &lt;span class="mi"&gt;48&lt;/span&gt;.&lt;span class="mi"&gt;13&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;         &lt;span class="mi"&gt;2269&lt;/span&gt;.&lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;
&lt;span class="o"&gt;------------------------------------------------------------------------------&lt;/span&gt;
          &lt;span class="nv"&gt;total&lt;/span&gt;:        &lt;span class="mi"&gt;2221&lt;/span&gt;.&lt;span class="mi"&gt;47&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;           &lt;span class="mi"&gt;48&lt;/span&gt;.&lt;span class="mi"&gt;13&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;         &lt;span class="mi"&gt;2269&lt;/span&gt;.&lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="nv"&gt;KB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Pressing the "h" key while it is running wil actually pull up a nice menu to change some of the options you are looking at.&lt;/p&gt;
&lt;p&gt;bwm-ng is very basic, "&lt;strong&gt;iptraf&lt;/strong&gt;" is another tool that provides some more functionality if you want to drill further into what is moving in and out of your box.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="bandwidth"></category><category term="Debian"></category><category term="dev"></category><category term="eth"></category><category term="iface"></category><category term="Linux"></category></entry><entry><title>Batch extract a directory full of split RAR archives "part1", "part2"</title><link href="https://www.surlyjake.com/blog/2009/07/26/batch-extract-a-directory-full-of-split-rar-archives-part1-part2/" rel="alternate"></link><published>2009-07-26T18:18:10-07:00</published><updated>2009-07-26T18:18:10-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-07-26:/blog/2009/07/26/batch-extract-a-directory-full-of-split-rar-archives-part1-part2/</id><summary type="html">&lt;p&gt;If for some reason you have a directory full of RAR archives, and each is split into parts, extracting them individually can be a pain. If you just type "unrar *" into the terminal, you will extract each file multiple times depending on how many "parts" it has. First, install the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;If for some reason you have a directory full of RAR archives, and each is split into parts, extracting them individually can be a pain. If you just type "unrar *" into the terminal, you will extract each file multiple times depending on how many "parts" it has. First, install the "unrar" package:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo aptitude install unrar
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;then cd to the directory with all of your RAR archives. Then type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;unrar e &amp;#39;*.part1.rar&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;make sure to keep the single quotes. 
If the rar is password protected, add the "-p" switch followed by the password without any spaces.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;unrar e -p&amp;lt;password&amp;gt; &amp;#39;*.part1.rar&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="batch"></category><category term="extract"></category><category term="part1"></category><category term="part2"></category><category term="RAR"></category><category term="split"></category><category term="unrar"></category></entry><entry><title>In Ubuntu Jaunty, shift, ctrl,alt, and caps lock buttons stop working</title><link href="https://www.surlyjake.com/blog/2009/07/07/in-ubuntu-jaunty-shift-ctrlalt-and-caps-lock-buttons-stop-working/" rel="alternate"></link><published>2009-07-07T16:45:03-07:00</published><updated>2009-07-07T16:45:03-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-07-07:/blog/2009/07/07/in-ubuntu-jaunty-shift-ctrlalt-and-caps-lock-buttons-stop-working/</id><content type="html">&lt;p&gt;This appears to be related to vmware, to correct: open up the terminal, and type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;setxkbmap.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Thats it.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Jaunty"></category><category term="setxkbmap"></category><category term="terminal"></category><category term="Ubuntu"></category><category term="VMware"></category></entry><entry><title>Pidgin OSD pop ups in Ubuntu Jaunty</title><link href="https://www.surlyjake.com/blog/2009/07/07/pidgin-osd-pop-ups-in-ubuntu-jaunty/" rel="alternate"></link><published>2009-07-07T10:17:52-07:00</published><updated>2009-07-07T10:17:52-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-07-07:/blog/2009/07/07/pidgin-osd-pop-ups-in-ubuntu-jaunty/</id><summary type="html">&lt;p&gt;You can remove or configure the Pidgin pop up's that you see from pidgin. Buddies logging on/off, and in my case, new messages. I didn't want every new message i receive to be blasted up on the desktop OSD. To control what you see there, Pull up your Pidgin …&lt;/p&gt;</summary><content type="html">&lt;p&gt;You can remove or configure the Pidgin pop up's that you see from pidgin. Buddies logging on/off, and in my case, new messages. I didn't want every new message i receive to be blasted up on the desktop OSD. To control what you see there, Pull up your Pidgin window (buddy window, not your conversation box), then: Tools -&amp;gt; Plugins -&amp;gt; Libnotify Popups. When you have selected the libnotify pop-ups, click on "configure plug-in". That will give you some check boxes to customize the behaviour&lt;/p&gt;</content><category term="SysAdmin"></category><category term="configure"></category><category term="Jaunty"></category><category term="Libnotify"></category><category term="OSD"></category><category term="Pidgin"></category><category term="Popups"></category><category term="Ubuntu"></category></entry><entry><title>Xbox Media Center on original XBox</title><link href="https://www.surlyjake.com/blog/2009/06/08/xbox-media-center-on-original-xbox/" rel="alternate"></link><published>2009-06-08T21:23:13-07:00</published><updated>2009-06-08T21:23:13-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-06-08:/blog/2009/06/08/xbox-media-center-on-original-xbox/</id><summary type="html">&lt;p&gt;I picked up a refurbished original XBox specifically so i could install XBMC on it. Turns out it is a GREAT project, and through some trickery, was able to get it installed and running thanks to this post: &lt;a href="http://www.boards.ie/vbulletin/showthread.php?t=2055256404"&gt;http://www.boards.ie/vbulletin/showthread.php?t=2055256404&lt;/a&gt; by 'SuperCell' at …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I picked up a refurbished original XBox specifically so i could install XBMC on it. Turns out it is a GREAT project, and through some trickery, was able to get it installed and running thanks to this post: &lt;a href="http://www.boards.ie/vbulletin/showthread.php?t=2055256404"&gt;http://www.boards.ie/vbulletin/showthread.php?t=2055256404&lt;/a&gt; by 'SuperCell' at boards.ie. I highly recommend using this 'hotswap' method if you don't already have the gear necesarry to mod an xbox with a chip, or by using a savegame exploit. It'll save you some cash, plus who doesn't like yanking an IDE cable from a spinning hard drive?&lt;/p&gt;
&lt;p&gt;Best of all, all of the tools used in the process run perfectly in WINE, or directly on my Linux desktop.&lt;/p&gt;</content><category term="Hobby"></category><category term="IDE"></category><category term="Linux"></category><category term="trickery"></category><category term="WINE"></category><category term="XBMC"></category><category term="XBox"></category></entry><entry><title>Installing Skype on eee 1000 running Ubuntu 9.04 Jaunty</title><link href="https://www.surlyjake.com/blog/2009/05/23/installing-skype-on-eee-1000-running-ubuntu-904-jaunty/" rel="alternate"></link><published>2009-05-23T11:21:44-07:00</published><updated>2009-05-23T11:21:44-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-05-23:/blog/2009/05/23/installing-skype-on-eee-1000-running-ubuntu-904-jaunty/</id><summary type="html">&lt;p&gt;I have an eee 1000 netbook running Ubuntu Jaunty netbook remix. Installing and configuring Skype was pretty simple:&lt;/p&gt;
&lt;p&gt;Add the Medibuntu repository:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get update
sudo apt-get install medibuntu-keyring
sudo apt-get …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;I have an eee 1000 netbook running Ubuntu Jaunty netbook remix. Installing and configuring Skype was pretty simple:&lt;/p&gt;
&lt;p&gt;Add the Medibuntu repository:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get update
sudo apt-get install medibuntu-keyring
sudo apt-get update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Install skype:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo aptitude install skype
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Video worked out of the box. To configure sound, got to Options -&amp;gt; Sound Devices. Set:
Sound In: HDA Intel (hw:Intel,0)
Sound Out: Pulse
Ringing: Pulse&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Linux"></category><category term="Ubuntu"></category><category term="skype"></category></entry><entry><title>Install backupexec 12.5 agent on Debian Lenny</title><link href="https://www.surlyjake.com/blog/2009/05/12/install-backupexec-125-agent-on-debian-lennyinstall-backupexec-125-agent-on-debian-lenny/" rel="alternate"></link><published>2009-05-12T15:24:16-07:00</published><updated>2009-05-12T15:24:16-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-05-12:/blog/2009/05/12/install-backupexec-125-agent-on-debian-lennyinstall-backupexec-125-agent-on-debian-lenny/</id><summary type="html">&lt;p&gt;The path to it is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;BEWS_12.5.2213_LINUX-UNIX-MAC-SAP_AGENTS.tar.gz\BEWS_12.5.2213_LINUX-UNIX-MAC-SAP_AGENTS.tar\pkgs\Linux\VRTSralus.tar.gz\VRTSralus.tar\VRTSralus-12.5.2213-0.i386.deb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Unfortunately, the Deb package doesn't specify It's dependencies. You need to manually install the libstdc++5 package.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;The path to it is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;BEWS_12.5.2213_LINUX-UNIX-MAC-SAP_AGENTS.tar.gz\BEWS_12.5.2213_LINUX-UNIX-MAC-SAP_AGENTS.tar\pkgs\Linux\VRTSralus.tar.gz\VRTSralus.tar\VRTSralus-12.5.2213-0.i386.deb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Unfortunately, the Deb package doesn't specify It's dependencies. You need to manually install the libstdc++5 package.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install libstdc++5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can follow the rest of the install here: &lt;a href="http://insanelabs.com/debian/linux-symantec-backup-exec-12-and-debian-etch-3264/"&gt;http://insanelabs.com/debian/linux-symantec-backup-exec-12-and-debian-etch-3264/&lt;/a&gt;&lt;/p&gt;</content><category term="SysAdmin"></category><category term="backupexec"></category><category term="Debian"></category><category term="Linux"></category></entry><entry><title>Group share for a Active Directory domain group with Samba</title><link href="https://www.surlyjake.com/blog/2009/05/06/create-a-group-share-for-a-domain-group-with-samba/" rel="alternate"></link><published>2009-05-06T15:38:36-07:00</published><updated>2009-05-06T15:38:36-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-05-06:/blog/2009/05/06/create-a-group-share-for-a-domain-group-with-samba/</id><summary type="html">&lt;p&gt;Once you have joined your samba server to your domain and have set up user authentication, creating a share that will allow a group of users to access files is pretty simple.  We need to create a folder that is owned by the root user and the domain group. The …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Once you have joined your samba server to your domain and have set up user authentication, creating a share that will allow a group of users to access files is pretty simple.  We need to create a folder that is owned by the root user and the domain group. The samba share will inherit permissions from the parent folder.  Here is an example for creating a folder for a domain group called "corporate_HR". The domain is called "acme". There is administrative support group called "admins". Setting the folder's permissions to "2771" means that the owner (root) and the group (corporate_HR) have full access.  The "2" is a setgid bit. It will force all new files created under the HR folder to take the group parameter from it's parent.  We use the "force group" parameter to ensure that permissions are set properly when a member of the "ACME\admins" group accesses the files.&lt;/p&gt;
&lt;p&gt;login as root.&lt;/p&gt;
&lt;p&gt;to set up the filesystem:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cd /home
mkdir HR
chgrp corporate_HR HR
chmod 2771 HR
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;set up the share:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[HR]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;comment&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;share for corporate HR group&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;readonly&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;no&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;inherrit owner&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;inherit permissions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;authorized users&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;@ACME\corporate_HR @ACME\admins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;force group&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ACME\corporate_HR&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="Active Directory"></category><category term="Linux"></category><category term="Samba"></category><category term="share"></category></entry><entry><title>Join Debian Lenny to Active Directory using Samba</title><link href="https://www.surlyjake.com/blog/2009/05/01/join-debian-lenny-to-active-directory-using-samba/" rel="alternate"></link><published>2009-05-01T15:48:45-07:00</published><updated>2009-05-01T15:48:45-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-05-01:/blog/2009/05/01/join-debian-lenny-to-active-directory-using-samba/</id><summary type="html">&lt;p&gt;If you install GNOME on Debian and intend to use it as a server, first thing you should do is remove the network-manager and network-manager-gnome packages. This tool can be helpful on a desktop, but since we are tweaking DNS, IP addresses, and perhaps even NIC bonding, the network-manager can …&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you install GNOME on Debian and intend to use it as a server, first thing you should do is remove the network-manager and network-manager-gnome packages. This tool can be helpful on a desktop, but since we are tweaking DNS, IP addresses, and perhaps even NIC bonding, the network-manager can screw up your settings.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude purge network-manager-gnome network-manager
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If this is a VMware Virtual machine, install VMware tools. The prerequisites for Debian Lenny are:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install build-essential openssl libssl-dev linux-headers-$(uname -r) psmiscapt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You may have to manually create a DNS entry for your server. Just to be safe, do that now.&lt;/p&gt;
&lt;p&gt;If you plan to support NTFS-like ACL's, install support for it now.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install acl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;now, you need to mount the partition with ACL's enabled, to do this, edit your /etc/fstab.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano /etc/fstab
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The line I needed looked like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/dev/sda9 / ext3 acl,defaults 0 1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The important part is to get "acl" into the options list. Dont forget the comma.
I recommend rebooting just to make sure your fstab is set before you continue.
It's easy to screw something up here and make your system unbootable, so if you reboot, and cant get your system back up and running, get into single user mode, and use this command. (You will have to adjust /dev/sda1 to your root partition. In my experience, it is usually /dev/sda1 or /dev/hda1. Use fdisk -l to list the partitions on the disk.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mount -o remount,rw /dev/sda1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now lets get the samba and kerberos software packages installed.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install samba ntpdate smbclient winbind krb5-config krb5-user
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Put in the Workgroup/domain info when prompted if you like. They will set up some .conf files for you, but we're not going to use them anyways. We wont worry about WINS for now.
Now lets stop samba and winbind:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/etc/init.d/samba stop
/etc/init.d/winbind stop
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;move the /etc/samba files somewhere&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mkdir /etc/samba/vanillaconf
mv /etc/samba/* /etc/samba/vanillaconf/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;create your own /etc/samba/smb.conf: Make sure that the domain and realm fields are all caps.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[global]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;workgroup&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;((DOMAIN)) &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;server string&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;%h server&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;wins support&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;no &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;security&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;ads &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;realm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;((DOMAIN)).COM &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;encrypt passwords&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;obey pam restrictions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;winbind use default domain&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;winbind enum users&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;winbind enum groups&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;template shell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/bin/bash&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;idmap uid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;10000-20000&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;idmap gid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;10000-20000&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;sync time&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ntpdate ((domain controller))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;now that samba knows what domain its part of, and we have a basic config for it, we need to get the authentication part working. Kerberos is the softare that communicates with your Active Directory domain to authenticate users.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano /etc/krb5.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;configure domain in /etc/krb5.conf. important parts:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[libdefaults]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;default_realm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;((domain)).COM&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;[realms]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;((DOMAIN.COM))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;{ &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;kdc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;((domain controller)) &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;kdc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;((backup DC)) &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;admin_server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;(domain controller)) &lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;[domain_realm]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;.(domain).com&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;(domain controller).(domain).COM&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;{% endcodeblock %}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;do a test by typing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;kinit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;then type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;klist
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;if you get some output looking like this, you are ready to go.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;Ticket&lt;/span&gt; &lt;span class="nv"&gt;cache&lt;/span&gt;: &lt;span class="nv"&gt;FILE&lt;/span&gt;:&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;tmp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;krb5cc_0&lt;/span&gt; &lt;span class="nv"&gt;Default&lt;/span&gt; &lt;span class="nv"&gt;principal&lt;/span&gt;: &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;username&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;@&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;domain&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;.&lt;span class="nv"&gt;COM&lt;/span&gt; &lt;span class="nv"&gt;Valid&lt;/span&gt; &lt;span class="nv"&gt;starting&lt;/span&gt; &lt;span class="nv"&gt;Expires&lt;/span&gt; &lt;span class="nv"&gt;Service&lt;/span&gt; &lt;span class="nv"&gt;principal&lt;/span&gt; &lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;09&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;:&lt;span class="mi"&gt;54&lt;/span&gt;:&lt;span class="mi"&gt;23&lt;/span&gt; &lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;09&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;:&lt;span class="mi"&gt;54&lt;/span&gt;:&lt;span class="mi"&gt;26&lt;/span&gt; &lt;span class="nv"&gt;krbtgt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;domain&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;.&lt;span class="nv"&gt;COM&lt;/span&gt;@&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;domain&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;.&lt;span class="nv"&gt;COM&lt;/span&gt; &lt;span class="nv"&gt;renew&lt;/span&gt; &lt;span class="k"&gt;until&lt;/span&gt; &lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;09&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;:&lt;span class="mi"&gt;54&lt;/span&gt;:&lt;span class="mi"&gt;23&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To get Debian to recognize your Active Directory users, you need to update /etc/nsswitch.conf&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano /etc/nsswitch.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;add "winbind" to the passwd and group lines. if you have "compat" in the line, put in like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;passwd&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;compat&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;winbind&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;passwd_compat&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;winbind&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;compat&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;winbind&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;group_compat&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;winbind&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now start samba and winbind back up&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/etc/init.d/winbind start
/etc/init.d/samba start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Join your machine to the domain.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;net ads join -U (administrative user)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You should see&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Joined &amp;#39;(server name)&amp;#39; to realm &amp;#39;(domain).com&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you see&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;No&lt;/span&gt; &lt;span class="nv"&gt;DNS&lt;/span&gt; &lt;span class="nv"&gt;domain&lt;/span&gt; &lt;span class="nv"&gt;configured&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="s"&gt;(servername)&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;. &lt;span class="nv"&gt;Unable&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="nv"&gt;perform&lt;/span&gt; &lt;span class="nv"&gt;DNS&lt;/span&gt; &lt;span class="nv"&gt;Update&lt;/span&gt;. &lt;span class="nv"&gt;DNS&lt;/span&gt; &lt;span class="nv"&gt;update&lt;/span&gt; &lt;span class="nv"&gt;failed&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Don't worry. Just create an entry in your DNS server for the samba machine.
Test if winbind is working properly with&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;wbinfo -t
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you get&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;checking the trust secret via RPC calls failed Could not check secret
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then restart winbind:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/etc/init.d/winbind restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;allow AD accounts to logon to the machine:&lt;/p&gt;
&lt;p&gt;/etc/pam.d/common-account&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;account sufficient pam_winbind.so
account required pam_unix.so
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;/etc/pam.d/common-auth&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;auth sufficient pam_winbind.so
auth required pam_unix.so
use_first_pass nullok_secure
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;/etc/pam.d/common-session&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;session required pam_mkhomedir.so skel=/etc/skel/ umask=0066
session sufficient pam_winbind.so
session required pam_unix.so
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It is critical that "obey pam restrictions" is set to "yes". in your smb.conf for these pam settings to take effect.There are some other changes to these Pam.d settings i decided to make upon putting the server into production. I will write about that in another page [link].&lt;/p&gt;
&lt;p&gt;Now, give your admin group from AD root access to the box&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install sudo visudo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;add this line:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c"&gt;%(domain)\\(admin&amp;#39;s group) ALL =(ALL) ALL&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When creating shares, to give an AD user access to a share, use:(More info in the future)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;valid users = (domain)\username
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;to give an AD group access to a share, use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;valid users = @(domain)\groupname
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Sometimes, I have to reboot my windows client machine to make it work... fyi.
Sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;O'reilly's Samba book 3rd Edition.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ccs.neu.edu/home/battista/documentation/winbind/index.html"&gt;http://www.ccs.neu.edu/home/battista/documentation/winbind/index.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;...Countless articles, mailing lists, forums.&lt;/li&gt;
&lt;/ul&gt;</content><category term="SysAdmin"></category><category term="Active Directory"></category><category term="Debian"></category><category term="lenny"></category><category term="Linux"></category><category term="Samba"></category><category term="winbind"></category></entry><entry><title>How to configure openDNS on pfsense firewall</title><link href="https://www.surlyjake.com/blog/2009/04/26/how-to-configure-opendns-on-pfsense-firewall/" rel="alternate"></link><published>2009-04-26T10:24:23-07:00</published><updated>2009-04-26T10:24:23-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-04-26:/blog/2009/04/26/how-to-configure-opendns-on-pfsense-firewall/</id><summary type="html">&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create your openDNS.com account. Add your Network to their system, etc. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to the "System" -&amp;gt; "General setup" page.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the DNS address to the OpenDNS':&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="mf"&gt;208.67.222.222&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="mf"&gt;208.67.220.220&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now just make sure that "Allow DNS server list to be overridden by DHCP/PPP on …&lt;/p&gt;</summary><content type="html">&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create your openDNS.com account. Add your Network to their system, etc. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to the "System" -&amp;gt; "General setup" page.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the DNS address to the OpenDNS':&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="mf"&gt;208.67.222.222&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="mf"&gt;208.67.220.220&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now just make sure that "Allow DNS server list to be overridden by DHCP/PPP on WAN" checkbox is NOT checked.&lt;/p&gt;</content><category term="Networking"></category><category term="content filtering"></category><category term="opendns"></category><category term="pfsense"></category></entry><entry><title>Rip and convert to MP3 files in Debian Lenny</title><link href="https://www.surlyjake.com/blog/2009/03/23/rip-and-convert-to-mp3-files-in-debian-lenny/" rel="alternate"></link><published>2009-03-23T21:53:45-07:00</published><updated>2009-03-23T21:53:45-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-03-23:/blog/2009/03/23/rip-and-convert-to-mp3-files-in-debian-lenny/</id><summary type="html">&lt;p&gt;To create an MP3 audio file in Lenny, you need to install the proper package to encode them. I suggest you add the "&lt;a href="http://www.debian-multimedia.org/"&gt;debian-multimedia&lt;/a&gt;" repository while you are at it. Edit your  /etc/apt/sources.list and add:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://www.debian-multimedia.org&lt;/span&gt; &lt;span class="kp"&gt;lenny&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;run&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;then install …&lt;/p&gt;</summary><content type="html">&lt;p&gt;To create an MP3 audio file in Lenny, you need to install the proper package to encode them. I suggest you add the "&lt;a href="http://www.debian-multimedia.org/"&gt;debian-multimedia&lt;/a&gt;" repository while you are at it. Edit your  /etc/apt/sources.list and add:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://www.debian-multimedia.org&lt;/span&gt; &lt;span class="kp"&gt;lenny&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;run&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;then install the gstreamer lame encoder:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install gstreamer0.10-lame
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then you are done. You can launch soundconverter and convert formats to MP3 using VBR and other technologies. You can also use sound juicer to Rip CD's&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Debian"></category><category term="mp3"></category><category term="rip"></category><category term="sound juicer"></category><category term="soundconverter"></category></entry><entry><title>How to update my sparc FreeBSD install</title><link href="https://www.surlyjake.com/blog/2009/03/18/how-to-update-my-sparc-freebsd-install/" rel="alternate"></link><published>2009-03-18T10:43:07-07:00</published><updated>2009-03-18T10:43:07-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-03-18:/blog/2009/03/18/how-to-update-my-sparc-freebsd-install/</id><summary type="html">&lt;p&gt;So the spanking new freebsd-update doesn't work for sparc systems... boo. Have to do everything manually. Here's what I remember. Let me know if I forgot something, or its wrong.(very likely)&lt;/p&gt;
&lt;p&gt;Install cvsup:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cd /usr/ports/net/cvsup-without-gui/
# make install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;install fastest cvsup:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cd /usr/ports/sysutils/fastest_cvsup …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;So the spanking new freebsd-update doesn't work for sparc systems... boo. Have to do everything manually. Here's what I remember. Let me know if I forgot something, or its wrong.(very likely)&lt;/p&gt;
&lt;p&gt;Install cvsup:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cd /usr/ports/net/cvsup-without-gui/
# make install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;install fastest cvsup:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cd /usr/ports/sysutils/fastest_cvsup/
# make install
# fastest_cvsup -c us
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Replace "us" with your country if it's different. copy the default supfile to our own before editing.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cp /usr/share/examples/cvsup/stable-supfile /etc/stable-supfile
# cp /usr/share/examples/cvsup/ports-supfile /etc/ports-supfile
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;edit both of them and change the&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;*default host=
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;to the fastest cvsup server from the "fastest cvsup"&lt;/p&gt;
&lt;p&gt;then update the ports&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cvsup -L2 -g /etc/ports-supfile
# cvsup -L2 -g /etc/stable-supfile
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then i guess we try to build the world. see if something breaky.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cd /usr/src
# make buildworld
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Recompiled kernel. I have my own kernel called "MYSPARC2". Yours might just be "GENERIC"&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cd /usr/src
# make buildkernel KERNCONF=MYSPARC2
# make installkernel KERNCONF=MYSPARC2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;rebooted into single user mode then:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# mount -u /
# mount -a -t ufs
# swapon -a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now you are ready to install the new world.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# cd /usr/src
# make installworld
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After that was done, mergemaster to update your configs:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mergemaster -v
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then used portmaster to upgrade all of the ports.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# portmaster -a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Basically everything i know about BSD comes from or stems from something I've read at freebsdmadeeasy.com&lt;/p&gt;
&lt;p&gt;source: &lt;a href="http://www.freebsdmadeeasy.com/tutorials/freebsd/updating-freebsd-with-cvsup.php"&gt;http://www.freebsdmadeeasy.com/tutorials/freebsd/updating-freebsd-with-cvsup.php&lt;/a&gt;&lt;/p&gt;</content><category term="SysAdmin"></category><category term="cvs"></category><category term="FreeBSD 7"></category><category term="freebsd"></category><category term="update sparc"></category><category term="sparc"></category><category term="update"></category></entry><entry><title>Automysqlbackup.sh.2.5 on FreeBSD</title><link href="https://www.surlyjake.com/blog/2009/03/13/automysqlbackupsh25-on-freebsd/" rel="alternate"></link><published>2009-03-13T13:38:27-07:00</published><updated>2009-03-13T13:38:27-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-03-13:/blog/2009/03/13/automysqlbackupsh25-on-freebsd/</id><summary type="html">&lt;p&gt;Automysqlbackup is a great tool. It's setup and configuration can be found at many other sites. When you try to run it out of the box, you will get something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="go"&gt;./automysqlbackup.sh.2.5: Command not found.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To run it in FreeBSD, you need to edit a single …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Automysqlbackup is a great tool. It's setup and configuration can be found at many other sites. When you try to run it out of the box, you will get something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="go"&gt;./automysqlbackup.sh.2.5: Command not found.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To run it in FreeBSD, you need to edit a single line. Automysqlbackup.sh.2.5 is a bash script, and it references the path '/bin/sh'. In freebsd, bash is installed at '/usr/local/bin/bash.' If you haven't already, install bash:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="go"&gt;pkg_add -r bash&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then all you have to do is edit automysqlbackup.sh.2.5. Look for&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/bin/bash foo&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and change it to&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/usr/local/bin/bash&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now you should be able to launch it properly by running './automysqlbackup.sh.2.5'. creating a symlink would probably work, but i like this better.&lt;/p&gt;
</content><category term="SysAdmin"></category><category term="FreeBSD7"></category><category term="MySQL"></category></entry><entry><title>Install the proprietary Closed source version of Virtualbox on Debian Lenny</title><link href="https://www.surlyjake.com/blog/2009/02/17/install-the-proprietary-closed-source-version-of-virtualbox-on-debian-lenny/" rel="alternate"></link><published>2009-02-17T11:21:28-08:00</published><updated>2009-02-17T11:21:28-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-02-17:/blog/2009/02/17/install-the-proprietary-closed-source-version-of-virtualbox-on-debian-lenny/</id><summary type="html">&lt;p&gt;I like the closed source version of virtualbox. I just do. This is how to install it quickly and simply:&lt;/p&gt;
&lt;p&gt;add this to sources.list&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://download.virtualbox.org/virtualbox/debian&lt;/span&gt; &lt;span class="kp"&gt;lenny&lt;/span&gt; &lt;span class="kp"&gt;non-free&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;run this to get the public key and install it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;wget -q http://download.virtualbox.org …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;I like the closed source version of virtualbox. I just do. This is how to install it quickly and simply:&lt;/p&gt;
&lt;p&gt;add this to sources.list&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://download.virtualbox.org/virtualbox/debian&lt;/span&gt; &lt;span class="kp"&gt;lenny&lt;/span&gt; &lt;span class="kp"&gt;non-free&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;run this to get the public key and install it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;wget -q http://download.virtualbox.org/virtualbox/&lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;searchword0&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;deb&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;ian/sun_vbox.asc -O- | sudo apt-key add -
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;then just install it&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install virtualbox-2.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;this will automatically create the group "vboxusers" and add the user who installed it to the group. If you need to add others:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;sudo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;adduser&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;vboxusers&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="Debian"></category><category term="install"></category><category term="virtualbox"></category></entry><entry><title>Install Debian Lenny Nvidia Drivers using binary packages</title><link href="https://www.surlyjake.com/blog/2009/02/16/install-debian-lenny-nvidia-drivers-using-binary-packages/" rel="alternate"></link><published>2009-02-16T21:30:40-08:00</published><updated>2009-02-16T21:30:40-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-02-16:/blog/2009/02/16/install-debian-lenny-nvidia-drivers-using-binary-packages/</id><summary type="html">&lt;p&gt;As usual, the official Debian wiki has a great writeup on getting the Drivers installed.&lt;a href="http://wiki.debian.org/NvidiaGraphicsDrivers"&gt; http://wiki.debian.org/NvidiaGraphicsDrivers&lt;/a&gt;. Do yourself a favor and read the document. It will give you the full story and not just the regurgitated short version below. I use debian because I like the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;As usual, the official Debian wiki has a great writeup on getting the Drivers installed.&lt;a href="http://wiki.debian.org/NvidiaGraphicsDrivers"&gt; http://wiki.debian.org/NvidiaGraphicsDrivers&lt;/a&gt;. Do yourself a favor and read the document. It will give you the full story and not just the regurgitated short version below. I use debian because I like the packaging system. I think it works well. why add the agony of recompiling drivers whenever you update kernels and whatnot. Since X was broken, The key was to switch to a console session BEFORE logging in using GDM. As soon as the login page comes up, press CTRL+ALT+F2. This is what I had to be able to log in and use my X session:&lt;/p&gt;
&lt;p&gt;Login as root.&lt;/p&gt;
&lt;p&gt;I used the netinst disk and had to add the "non-free" and "contrib" repositories. to do this, edit /etc/apt/sources.list.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano /etc/apt/sources.list
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Find the line line that has something like&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://mirror.cc.columbia.edu/pub/linux/debian/debian/&lt;/span&gt; &lt;span class="kp"&gt;lenny&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt;
&lt;span class="k"&gt;deb-src&lt;/span&gt; &lt;span class="s"&gt;http://mirror.cc.columbia.edu/pub/linux/debian/debian/&lt;/span&gt; &lt;span class="kp"&gt;lenny&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;add "contrib non-free" to the end of both of these lines and then do a "aptitude update"&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# apt-get install module-assistant nvidia-kernel-common
# m-a auto-install nvidia-kernel&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;VERSION&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;-source
# apt-get install nvidia-glx&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;VERSION&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In the device section, add&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Driver &amp;quot;nvidia&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Restart GDM (and subsequently X)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# invoke-rc.d gdm restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Install The nvidia settings interface thingy if you want. This can also verify if the driver is actually running.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install nvidia-settings
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In debian, the package doesn't install a shortcut for some reason, so just launch it by typing "nvidia-settings" into the console.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="binary"></category><category term="Debian"></category><category term="driver"></category><category term="lenny"></category><category term="nvidia"></category></entry><entry><title>Add a Single User mode entry in Grub bootloader.</title><link href="https://www.surlyjake.com/blog/2009/02/15/add-a-single-user-mode-entry-in-grub-bootloader/" rel="alternate"></link><published>2009-02-15T17:20:58-08:00</published><updated>2009-02-15T17:20:58-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-02-15:/blog/2009/02/15/add-a-single-user-mode-entry-in-grub-bootloader/</id><summary type="html">&lt;p&gt;All you need to do is add 'single' to the end of any bootloader entry to make it single user. So what you need to do is edit the /boot/grub/menu.lst, copy one of the entries, and all 'single' to the end.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;gksudo kate /boot/grub/menu.lst …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;All you need to do is add 'single' to the end of any bootloader entry to make it single user. So what you need to do is edit the /boot/grub/menu.lst, copy one of the entries, and all 'single' to the end.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;gksudo kate /boot/grub/menu.lst
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;take the 'kernel' line and add 'single' to the end. Like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;kernel      /boot/vmlinuz-2.6.27-11-generic root=UUID=3699a36a-dd96-4186-8028-43776214c01e ro quiet splash single
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="bootloader"></category><category term="grub"></category><category term="Linux"></category></entry><entry><title>Set Windows Environment variables through registry.</title><link href="https://www.surlyjake.com/blog/2009/02/11/set-windows-environment-variables-through-registry/" rel="alternate"></link><published>2009-02-11T13:35:58-08:00</published><updated>2009-02-11T13:35:58-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-02-11:/blog/2009/02/11/set-windows-environment-variables-through-registry/</id><content type="html">&lt;p&gt;The system variables are in there, so you can change and add to them permanently.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="windows"></category></entry><entry><title>Securing and configuring HP switches</title><link href="https://www.surlyjake.com/blog/2009/01/27/securing-and-configuring-hp-switches/" rel="alternate"></link><published>2009-01-27T13:20:28-08:00</published><updated>2009-01-27T13:20:28-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-01-27:/blog/2009/01/27/securing-and-configuring-hp-switches/</id><summary type="html">&lt;p&gt;We got some Procurve 2810 Gigabit switches. they play some critical roles, so I wanted to keep others from playing with them. The exact code below would enable https for web management, enable ssh for console management, change the port ssh runs on, and disable telnet and unencrypted web management …&lt;/p&gt;</summary><content type="html">&lt;p&gt;We got some Procurve 2810 Gigabit switches. they play some critical roles, so I wanted to keep others from playing with them. The exact code below would enable https for web management, enable ssh for console management, change the port ssh runs on, and disable telnet and unencrypted web management.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;crypto&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;generate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;crypto&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;crypto&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;generate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;cert&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;crypto&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cert&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;generate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="kt"&gt;signed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mo"&gt;01&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mo"&gt;01&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2009&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mo"&gt;01&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mo"&gt;01&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;department&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;company&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Chicago&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;IL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;us&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;ip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;telnet&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;web&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;management&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;plaintext&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;ip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;management&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="Networking"></category><category term="Networking"></category></entry><entry><title>OpenOffice Remove mis-spelled words</title><link href="https://www.surlyjake.com/blog/2009/01/17/openoffice-remove-mis-spelled-words/" rel="alternate"></link><published>2009-01-17T11:26:04-08:00</published><updated>2009-01-17T11:26:04-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-01-17:/blog/2009/01/17/openoffice-remove-mis-spelled-words/</id><content type="html">&lt;p&gt;beleive or believe?
If you mistakenly add a word to Firefox's custom dictionary, the word is added to&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;~/.mozilla/firefox/[unique-alphanumeric-string].default/persdict.dat
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;just edit the file and remove your mistaken 'custom' word.&lt;/p&gt;</content><category term="Hobby"></category><category term="Linux"></category><category term="OpenOffice"></category></entry><entry><title>Remotely change power options in XP</title><link href="https://www.surlyjake.com/blog/2009/01/12/remotely-change-power-options-in-xp/" rel="alternate"></link><published>2009-01-12T16:35:21-08:00</published><updated>2009-01-12T16:35:21-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-01-12:/blog/2009/01/12/remotely-change-power-options-in-xp/</id><summary type="html">&lt;p&gt;First of all, get the pstools and set them up. then run&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;psexec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;\\&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;workstation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;powercfg&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Field&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Description&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;-----------------&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="o"&gt;-----&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="w"&gt;                       &lt;/span&gt;&lt;span class="n"&gt;Home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Office&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Desk&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Numerical&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ID&lt;/span&gt;&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Turn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;monitor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Turn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;monitor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Turn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;hard&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;disks&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Turn …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;First of all, get the pstools and set them up. then run&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;psexec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;\\&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;workstation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;powercfg&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Field&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Description&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="o"&gt;-----------------&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="o"&gt;-----&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="w"&gt;                       &lt;/span&gt;&lt;span class="n"&gt;Home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Office&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Desk&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Numerical&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ID&lt;/span&gt;&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Turn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;monitor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Turn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;monitor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Turn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;hard&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;disks&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Turn&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;hard&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;disks&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;standby&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;Never&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;standby&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;hibernates&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="n"&gt;Never&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;hibernates&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="n"&gt;After&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mins&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Processor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Throttle&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;AC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Supported&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;Processor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Throttle&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Supported&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;that will tell you what the current settings are. After that, you can set the power scheme by doing this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;psexec&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;\\&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;workstation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;powercfg&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;setactive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;[scheme name]&amp;quot;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It will exit with "error code 0", but no worries. Just check your work using the query command above after your changes.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="psexec"></category></entry><entry><title>Ubuntu recovery console with no root password</title><link href="https://www.surlyjake.com/blog/2009/01/05/ubuntu-recovery-console-with-no-root-password/" rel="alternate"></link><published>2009-01-05T21:48:51-08:00</published><updated>2009-01-05T21:48:51-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2009-01-05:/blog/2009/01/05/ubuntu-recovery-console-with-no-root-password/</id><summary type="html">&lt;p&gt;So your Ext3 root partition is corrupted. No matter how you try  to log into your system, your system asks you for root password. But you are a good, obedient ubuntu user. And you do not have a root password set. You can press CTRL+D, but that just reboots …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So your Ext3 root partition is corrupted. No matter how you try  to log into your system, your system asks you for root password. But you are a good, obedient ubuntu user. And you do not have a root password set. You can press CTRL+D, but that just reboots.  Are you boned?&lt;/p&gt;
&lt;p&gt;No. problem. press ctrl+alt+delete. You will get a messy screen about having trouble launching your X session, but you will get a login towards the bottom of the screen. So just use your normal user login and password.  after that, I use
&lt;code&gt;sudo su&lt;/code&gt;&lt;/p&gt;</content><category term="SysAdmin"></category><category term="ctrl-D"></category><category term="mainenance"></category><category term="recovery password"></category><category term="root password"></category><category term="Ubuntu"></category></entry><entry><title>Logitech webcam drivers</title><link href="https://www.surlyjake.com/blog/2008/12/30/logitech-webcam-drivers/" rel="alternate"></link><published>2008-12-30T15:26:04-08:00</published><updated>2008-12-30T15:26:04-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-12-30:/blog/2008/12/30/logitech-webcam-drivers/</id><summary type="html">&lt;p&gt;Logitech drivers are packed in with an awful, bloated program. Just want the drivers and nothing else? I did this with a Quickcam 4000 Pro. The same basic steps may apply to other cams:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the Program from logitech.com&lt;/li&gt;
&lt;li&gt;use 7-zip, winRAR, or some other decent compression program to …&lt;/li&gt;&lt;/ol&gt;</summary><content type="html">&lt;p&gt;Logitech drivers are packed in with an awful, bloated program. Just want the drivers and nothing else? I did this with a Quickcam 4000 Pro. The same basic steps may apply to other cams:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the Program from logitech.com&lt;/li&gt;
&lt;li&gt;use 7-zip, winRAR, or some other decent compression program to extract the contents of the .exe to a folder on you computer.&lt;/li&gt;
&lt;li&gt;Open up Device Manager. right-click on the unknown USB device, and select "Update Driver".&lt;/li&gt;
&lt;li&gt;Point it at the folders you extracted. it should be under a folder appropriately named "drivers". mine was in "pro".&lt;/li&gt;
&lt;li&gt;happy happy. you web cam works without the extra bloat.&lt;/li&gt;
&lt;/ol&gt;</content><category term="Hobby"></category><category term="logitech 4000 pro"></category><category term="logitech drivers"></category><category term="webcam"></category></entry><entry><title>Command line scp from linux(+BSD) to windows.</title><link href="https://www.surlyjake.com/blog/2008/12/20/command-line-scp-from-linuxbsd-to-windows/" rel="alternate"></link><published>2008-12-20T17:37:00-08:00</published><updated>2008-12-20T17:37:00-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-12-20:/blog/2008/12/20/command-line-scp-from-linuxbsd-to-windows/</id><summary type="html">&lt;p&gt;i traveling and wanted to copy over my logs to find out what was happening on my server. didn't want to install a client like filezilla or another GUI. Using the command line SCP utility, you can grab remote files securely over SSH. You can grab the executable from http …&lt;/p&gt;</summary><content type="html">&lt;p&gt;i traveling and wanted to copy over my logs to find out what was happening on my server. didn't want to install a client like filezilla or another GUI. Using the command line SCP utility, you can grab remote files securely over SSH. You can grab the executable from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html (pscp.exe is what you want) then, in the command line on the windows client machine, type something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;pscp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;P&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;jimmy&lt;/span&gt;&lt;span class="nv"&gt;@johnscomputer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nl"&gt;com&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;jimmy&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nf"&gt;stuff&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;&amp;quot;c:\documents and settings\jimmy\Desktop&amp;quot;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The "-r" makes it grab the whole folder, and everything under. the "-P" specifies a port (mostly useful if you aren't using 22. make sure it is capital).&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Linux"></category><category term="scp"></category><category term="ssh"></category><category term="windows"></category></entry><entry><title>running msc's as admin account</title><link href="https://www.surlyjake.com/blog/2008/12/16/running-mscs-as-admin-account/" rel="alternate"></link><published>2008-12-16T11:51:11-08:00</published><updated>2008-12-16T11:51:11-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-12-16:/blog/2008/12/16/running-mscs-as-admin-account/</id><summary type="html">&lt;p&gt;Got tired of right-clicking and "run as" and putting in my uname/password. I just updated the shortcuts to run something similar to this. This example is for exchange 2007 server management console.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;runas /user:DOMAIN\ADMIN_ACCOUNT "cmd /c \"c:\program files\microsoft\exchange server\bin\exchange management console …&lt;/code&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Got tired of right-clicking and "run as" and putting in my uname/password. I just updated the shortcuts to run something similar to this. This example is for exchange 2007 server management console.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;runas /user:DOMAIN\ADMIN_ACCOUNT "cmd /c \"c:\program files\microsoft\exchange server\bin\exchange management console.msc\""&lt;/code&gt;&lt;/p&gt;</content><category term="SysAdmin"></category><category term="exchange 2007"></category><category term="windows"></category></entry><entry><title>Conference rooms with outlook and exchange 2007</title><link href="https://www.surlyjake.com/blog/2008/12/11/conference-rooms-with-outlook-and-exchange-2007/" rel="alternate"></link><published>2008-12-11T09:18:14-08:00</published><updated>2008-12-11T09:18:14-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-12-11:/blog/2008/12/11/conference-rooms-with-outlook-and-exchange-2007/</id><summary type="html">&lt;p&gt;Exchange Server 2007 allows administrators to create objects such as Mailbox, Contacts, Mail User, and Distribution Groups. Here are the steps needed to create a room mailbox object:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Exchange Management Console.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Expand Recipient Configuration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on Mailbox.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the Mailbox pane, click on New Mailbox...&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For our purposes …&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;</summary><content type="html">&lt;p&gt;Exchange Server 2007 allows administrators to create objects such as Mailbox, Contacts, Mail User, and Distribution Groups. Here are the steps needed to create a room mailbox object:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Exchange Management Console.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Expand Recipient Configuration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click on Mailbox.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the Mailbox pane, click on New Mailbox...&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For our purposes, we will pick "room mailbox" This is a mailbox to be assigned specifically to Meeting Rooms. Its associated user account will be disabled in Active Directory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the User Type window, we can choose either to create a new user or to assign an existent user to the new resource mailbox. If we choose to assign it to an existent user, we will have to check if the account does not already have a mailbox associated to it. Click Next to continue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the User Information window, we should fill out the user's personal information and select the Organization Unit where it will be created. After that click on Next&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the Mailbox Settings page, we can define the mailbox information such as Alias, Mailbox Server, and Mailbox Store where the new resource mailbox will be located. The policies for Mailbox and ActiveSync can also be defined in this step. We can choose which fields we are going to fill out and then click Next to continue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the New Mailbox window, we will get a summary of all the information that we have selected in the previous steps. These parameters will be used by the cmdlet New-Mailbox for the creation of this resource mailbox object. To create the resource mailbox, click on New.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the Completion window, we will see the cmdlet New-mailbox and the parameters that we used in the creation process of this new resource mailbox.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Grant yourself and users who will manage the mailbox "full access". Right-click on the mailbox you just created and  select manage full access permission.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sign into OWA.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click the dropdown next to your username on the upper-right corner of the screen and open up the room mailbox you just created.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;go to Options, then Resource settings&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;go through these.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the room mailbox to outlook.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;go to the calendar, right-click on the room's calendar, go to properties.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Under the permissions tab, set the default permission to "reviewer". This will let everyone see what is going on in the room when they are scheduling&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;props to: &lt;a href="http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/managing-resource-mailboxes-exchange-server-2007-part1.html"&gt;http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/managing-resource-mailboxes-exchange-server-2007-part1.html&lt;/a&gt;&lt;/p&gt;</content><category term="SysAdmin"></category><category term="exchange 2007"></category><category term="windows"></category></entry><entry><title>Windows XP's /etc/hosts file</title><link href="https://www.surlyjake.com/blog/2008/12/05/windows-xps-etchosts-file/" rel="alternate"></link><published>2008-12-05T16:48:20-08:00</published><updated>2008-12-05T16:48:20-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-12-05:/blog/2008/12/05/windows-xps-etchosts-file/</id><content type="html">&lt;p&gt;To my surprise, XP has an equivalent to unix' "/etc/hosts" file. you can find it here:
c:\WINDOWS\system32\drivers\etc\hosts'&lt;/p&gt;</content><category term="SysAdmin"></category><category term="windows"></category></entry><entry><title>script to update wordpress</title><link href="https://www.surlyjake.com/blog/2008/11/26/script-to-update-wordpress/" rel="alternate"></link><published>2008-11-26T15:02:37-08:00</published><updated>2008-11-26T15:02:37-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-11-26:/blog/2008/11/26/script-to-update-wordpress/</id><summary type="html">&lt;p&gt;Why? Because i'm lazy. I'll update this to see if it works&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt; 1&lt;/span&gt;
&lt;span class="normal"&gt; 2&lt;/span&gt;
&lt;span class="normal"&gt; 3&lt;/span&gt;
&lt;span class="normal"&gt; 4&lt;/span&gt;
&lt;span class="normal"&gt; 5&lt;/span&gt;
&lt;span class="normal"&gt; 6&lt;/span&gt;
&lt;span class="normal"&gt; 7&lt;/span&gt;
&lt;span class="normal"&gt; 8&lt;/span&gt;
&lt;span class="normal"&gt; 9&lt;/span&gt;
&lt;span class="normal"&gt;10&lt;/span&gt;
&lt;span class="normal"&gt;11&lt;/span&gt;
&lt;span class="normal"&gt;12&lt;/span&gt;
&lt;span class="normal"&gt;13&lt;/span&gt;
&lt;span class="normal"&gt;14&lt;/span&gt;
&lt;span class="normal"&gt;15&lt;/span&gt;
&lt;span class="normal"&gt;16&lt;/span&gt;
&lt;span class="normal"&gt;17&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="c1"&gt;#your current site will be backed up to your home folder with the date in the name&lt;/span&gt;
&lt;span class="c1"&gt;#change this …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary><content type="html">&lt;p&gt;Why? Because i'm lazy. I'll update this to see if it works&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt; 1&lt;/span&gt;
&lt;span class="normal"&gt; 2&lt;/span&gt;
&lt;span class="normal"&gt; 3&lt;/span&gt;
&lt;span class="normal"&gt; 4&lt;/span&gt;
&lt;span class="normal"&gt; 5&lt;/span&gt;
&lt;span class="normal"&gt; 6&lt;/span&gt;
&lt;span class="normal"&gt; 7&lt;/span&gt;
&lt;span class="normal"&gt; 8&lt;/span&gt;
&lt;span class="normal"&gt; 9&lt;/span&gt;
&lt;span class="normal"&gt;10&lt;/span&gt;
&lt;span class="normal"&gt;11&lt;/span&gt;
&lt;span class="normal"&gt;12&lt;/span&gt;
&lt;span class="normal"&gt;13&lt;/span&gt;
&lt;span class="normal"&gt;14&lt;/span&gt;
&lt;span class="normal"&gt;15&lt;/span&gt;
&lt;span class="normal"&gt;16&lt;/span&gt;
&lt;span class="normal"&gt;17&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="c1"&gt;#your current site will be backed up to your home folder with the date in the name&lt;/span&gt;
&lt;span class="c1"&gt;#change this to whatever you want&lt;/span&gt;
&lt;span class="nv"&gt;BACKUPNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;wordpress_site_b4_update&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;BACKUPDATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;date +%y%m%d&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;span class="c1"&gt;#this is the path to your wordpress site&amp;#39;s root&lt;/span&gt;
&lt;span class="nv"&gt;SITEROOT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/usr/local/www/&amp;quot;&lt;/span&gt;
&lt;span class="c1"&gt;#here she goez...&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ~
tar -pczf &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$BACKUPNAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$BACKUPDATE&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;.tar.gz &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$SITEROOT&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /usr/local
fetch http://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
rm latest.tar.gz
cp -R wordpress/* &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$SITEROOT&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;/
rm -R wordpress
chown -R www &lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$SITEROOT&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><category term="SysAdmin"></category><category term="script"></category><category term="update"></category><category term="wordpress"></category><category term="shell scripting"></category></entry><entry><title>FreeBSD time updates with ntpdate and ntpd</title><link href="https://www.surlyjake.com/blog/2008/11/18/freebsd-time-updates-with-ntpdate-and-ntpd/" rel="alternate"></link><published>2008-11-18T00:53:33-08:00</published><updated>2008-11-18T00:53:33-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-11-18:/blog/2008/11/18/freebsd-time-updates-with-ntpdate-and-ntpd/</id><summary type="html">&lt;p&gt;So FreeBSD's time is out of wack. Two options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;ntpdate. This is manual. To run a time sync manually, just run&lt;/p&gt;
&lt;p&gt;ntpdate -b pool.ntp.org&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can replace pool.ntp.org with whatever you want. To tell it to run whenever the system is booted, add this to /etc …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So FreeBSD's time is out of wack. Two options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;ntpdate. This is manual. To run a time sync manually, just run&lt;/p&gt;
&lt;p&gt;ntpdate -b pool.ntp.org&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can replace pool.ntp.org with whatever you want. To tell it to run whenever the system is booted, add this to /etc/rc.conf:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ntpdate_enable=&amp;quot;YES&amp;quot;
ntpdate_hosts=&amp;quot;[your ntp server]&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This works, but if you don't reboot often, could be unreliable.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;ntdp. ntpd just runs all the time and keeps you nsync with internet time servers. You would want to use this for servers that you don't reboot all the time. for this:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;create an /etc/ntpd.conf file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ntp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;driftfile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ntp&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drift&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;logfile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ntpd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;you can start ntpd manually:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ntpd
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and/or add a startup entry for it in /etc/rc.conf:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ntpd_enable=&amp;quot;YES&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I recommend setting up both of these on servers. Ntpdate will snap your system to a good point before you begin synchronizing with ntpd. ntpd by itself will take a lot longer to get you synced up.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="ntpd"></category><category term="ntpdate"></category><category term="time"></category><category term="update"></category><category term="FreeBSD7"></category></entry><entry><title>webalizer installation on freebsd 7</title><link href="https://www.surlyjake.com/blog/2008/11/13/webalizer-installation-on-freebsd-7/" rel="alternate"></link><published>2008-11-13T10:05:54-08:00</published><updated>2008-11-13T10:05:54-08:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-11-13:/blog/2008/11/13/webalizer-installation-on-freebsd-7/</id><summary type="html">&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ports&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webalizer&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;clean&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;rehash&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;mkdir&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;webalizer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;httpd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;access_log&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After that, just added it to the root crontab&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;crontab -e
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webalizer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;stats …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ports&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webalizer&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;clean&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;rehash&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;mkdir&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;webalizer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;httpd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;access_log&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After that, just added it to the root crontab&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;crontab -e
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webalizer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;httpd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;access_log&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;webalizer&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;hourly&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That runs every hour, so that the stats are kept up-to-date.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="apache"></category><category term="FreeBSD 7"></category><category term="logs"></category><category term="stats"></category><category term="webalizer"></category></entry><entry><title>Debian Samba share. no password. read only</title><link href="https://www.surlyjake.com/blog/2008/10/08/debian-samba-share-no-password-read-only/" rel="alternate"></link><published>2008-10-08T13:28:24-07:00</published><updated>2008-10-08T13:28:24-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-10-08:/blog/2008/10/08/debian-samba-share-no-password-read-only/</id><summary type="html">&lt;p&gt;Just install samba server:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;apt-get install samba
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;edit the config:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano /etc/samba/smb.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;set security to "share"&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;security = share
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and guest account to nobody&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;guest account = nobody
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;then you just need to create your share like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[guest share]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;comment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;a guest share&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/path/to/files&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;browseable …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Just install samba server:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;apt-get install samba
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;edit the config:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano /etc/samba/smb.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;set security to "share"&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;security = share
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and guest account to nobody&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;guest account = nobody
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;then you just need to create your share like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[guest share]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;comment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;a guest share&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/path/to/files&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;browseable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;read only&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="na"&gt;guest ok&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="Sysadmin"></category><category term="Debian Etch"></category><category term="Debian"></category><category term="Samba"></category><category term="windows"></category></entry><entry><title>MySQL table storage engine (switching from MyIsam to InnoDB)</title><link href="https://www.surlyjake.com/blog/2008/10/02/mysql-table-storage-engine-switching-from-myisam-to-innodb/" rel="alternate"></link><published>2008-10-02T23:14:56-07:00</published><updated>2008-10-02T23:14:56-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-10-02:/blog/2008/10/02/mysql-table-storage-engine-switching-from-myisam-to-innodb/</id><summary type="html">&lt;p&gt;I know I did this the hard way. there is a command that you can issue that will convert them on the fly. what I did was mysqldump the database, reinstall mysql(because of other reasons), and then edit the dump so that the line that specified the engine reads …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I know I did this the hard way. there is a command that you can issue that will convert them on the fly. what I did was mysqldump the database, reinstall mysql(because of other reasons), and then edit the dump so that the line that specified the engine reads "ENGINE=INNODB" instead of "ENGINE=MyISAM".Then I imported the dump.&lt;/p&gt;
&lt;p&gt;I was getting annoyed that when listing my tables in phpmyadmin,  it would show the list of tables in InnoDB (which is what i wanted), but then, when showing the summary at the bottom of the page, said "MyIsam". I easily got rid of it by adding "default-storage-engine=InnoDB" to my "my.cnf" file.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Debian Etch"></category><category term="MySQL"></category></entry><entry><title>MySQL server --purge and reinstall</title><link href="https://www.surlyjake.com/blog/2008/10/02/mysql-server-purge-and-reinstall/" rel="alternate"></link><published>2008-10-02T23:06:03-07:00</published><updated>2008-10-02T23:06:03-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-10-02:/blog/2008/10/02/mysql-server-purge-and-reinstall/</id><summary type="html">&lt;p&gt;Screwed around for a bit. messed up MySQL. I decided to remove --purge, and start fresh. Unfortunately, the reinstall wouldn't work. Long story short, i had to remove "mysql-server, mysql-server-5.0, and mysql-common". when i ran this, it also pulled out other dependencies, but i just reinstalled them all. voila …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Screwed around for a bit. messed up MySQL. I decided to remove --purge, and start fresh. Unfortunately, the reinstall wouldn't work. Long story short, i had to remove "mysql-server, mysql-server-5.0, and mysql-common". when i ran this, it also pulled out other dependencies, but i just reinstalled them all. voila! worky.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="MySQL"></category><category term="Debian Etch"></category><category term="purge"></category><category term="reinstall"></category></entry><entry><title>apt gives a "Segmentation faulty tree"</title><link href="https://www.surlyjake.com/blog/2008/10/01/apt-gives-a-segmentation-faulty-tree/" rel="alternate"></link><published>2008-10-01T20:59:08-07:00</published><updated>2008-10-01T20:59:08-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-10-01:/blog/2008/10/01/apt-gives-a-segmentation-faulty-tree/</id><content type="html">&lt;p&gt;when running an update:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo aptitude
Ouch!  Got SIGSEGV, dying..
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;apparently, just remove some files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;sudo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;rm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;cache&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;apt&lt;/span&gt;&lt;span class="o"&gt;/*.&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;now everything is back to normal.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="apt"></category><category term="Debian Etch"></category></entry><entry><title>Zabbix 1.6 Proxy with Debian</title><link href="https://www.surlyjake.com/blog/2008/10/01/zabbix-16-proxy-with-debian/" rel="alternate"></link><published>2008-10-01T14:10:21-07:00</published><updated>2008-10-01T14:10:21-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-10-01:/blog/2008/10/01/zabbix-16-proxy-with-debian/</id><content type="html">&lt;p&gt;I set up a Zabbix Proxy today on a little VM. looks to work nicely. Intructions will be kept up to date on &lt;a href="http://www.zabbix.com/wiki/howto/install/debian/zabbix_proxy_on_debian_sqlite"&gt;this page&lt;/a&gt;.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Debian"></category><category term="proxy"></category><category term="Zabbix"></category><category term="Debian Etch"></category></entry><entry><title>Staying on time in Debian</title><link href="https://www.surlyjake.com/blog/2008/09/30/staying-on-time-in-debian/" rel="alternate"></link><published>2008-09-30T12:41:54-07:00</published><updated>2008-09-30T12:41:54-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-09-30:/blog/2008/09/30/staying-on-time-in-debian/</id><summary type="html">&lt;p&gt;To stay on time, you should really use ntpd. It is a daemon that runs all the time and makes tiny changes to the system clock. All you need to do is install ntp:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install ntp
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;after it's installed, I encourage you to go over to &lt;a href="http://www.pool.ntp.org/zone/@"&gt;http://www.pool …&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;To stay on time, you should really use ntpd. It is a daemon that runs all the time and makes tiny changes to the system clock. All you need to do is install ntp:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;aptitude install ntp
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;after it's installed, I encourage you to go over to &lt;a href="http://www.pool.ntp.org/zone/@"&gt;http://www.pool.ntp.org/zone/@&lt;/a&gt; and pick a pool in your continental zone. Debian has some defaults, and they are fine, i just like using the ntp pool. If you want to change where you are syncing to, open up /etc/ntp.conf and change the "server" lines.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;nano /etc/ntp.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;to manually sync Debian's time, just install "ntpdate"&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;apt-get install ntpdate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;run this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ntupdate-debian [a ntp server]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="Debian Etch"></category><category term="ntp"></category><category term="ntpd"></category><category term="ntupdate"></category><category term="time"></category></entry><entry><title>Uninstall MySQL 5 from Debian</title><link href="https://www.surlyjake.com/blog/2008/09/27/uninstall-mysql-5-from-debian/" rel="alternate"></link><published>2008-09-27T09:12:32-07:00</published><updated>2008-09-27T09:12:32-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-09-27:/blog/2008/09/27/uninstall-mysql-5-from-debian/</id><summary type="html">&lt;p&gt;I completely. completely messed up MySQL. Badly. I wiped out the data directory (/var/lib/mysql in Debian) and the went to remove mysql ...
    apt-get remove --purge mysql-server
That only deleted something like 86K. dissapointing. It looks like "mysql-server" is a shortcut pointing to the latest version of the software …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I completely. completely messed up MySQL. Badly. I wiped out the data directory (/var/lib/mysql in Debian) and the went to remove mysql ...
    apt-get remove --purge mysql-server
That only deleted something like 86K. dissapointing. It looks like "mysql-server" is a shortcut pointing to the latest version of the software. The real software is found  under the name "mysql-server-50". So what made it happen was:
    apt-get remove --purge mysql-server*
That'll wipe out whatever mysql install is in place.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="Debian Etch"></category><category term="MySQL"></category><category term="Samba"></category><category term="Zabbix"></category><category term="apt"></category></entry><entry><title>savecore? reboot after panic?</title><link href="https://www.surlyjake.com/blog/2008/09/27/savecore-reboot-after-panic/" rel="alternate"></link><published>2008-09-27T08:56:07-07:00</published><updated>2008-09-27T08:56:07-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-09-27:/blog/2008/09/27/savecore-reboot-after-panic/</id><summary type="html">&lt;p&gt;scary. I updated freebsd, and i can only think that i messed it up when i tried to "shutdown -h" to get it shutdown so i could reboot. anyways, when i rebooted, i saw this message. apparently there was a kernel dump on my swap drive. But problem is that …&lt;/p&gt;</summary><content type="html">&lt;p&gt;scary. I updated freebsd, and i can only think that i messed it up when i tried to "shutdown -h" to get it shutdown so i could reboot. anyways, when i rebooted, i saw this message. apparently there was a kernel dump on my swap drive. But problem is that i didn't have enough room on /var/crash to make it happen. i redirected the commands ot the /usr/home/ program.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html"&gt;http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;fsck&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;mount&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ufs&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sure&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;crash&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;writable&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;savecore&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;crash&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ad0b&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;multi&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="SysAdmin"></category><category term="FreeBSD 7"></category><category term="panic"></category><category term="savecore"></category></entry><entry><title>FreeBSD MYSQL configuration</title><link href="https://www.surlyjake.com/blog/2008/09/26/freebsd-mysql-configuration/" rel="alternate"></link><published>2008-09-26T18:27:49-07:00</published><updated>2008-09-26T18:27:49-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-09-26:/blog/2008/09/26/freebsd-mysql-configuration/</id><summary type="html">&lt;p&gt;FreeBSD does not automatically include a default &lt;code&gt;my.cnf&lt;/code&gt; for MySQL. Instead, a set of sample configuration files can be found under &lt;code&gt;/usr/local/share/mysql&lt;/code&gt;. These configuration files include &lt;code&gt;my-small.cnf&lt;/code&gt;, &lt;code&gt;my-medium.cnf&lt;/code&gt;, &lt;code&gt;my-large.cnf&lt;/code&gt;, &lt;code&gt;my-innodb-heavy-4G&lt;/code&gt;, and &lt;code&gt;my-huge.cnf&lt;/code&gt;. The appropriate file can be copied and used as a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;FreeBSD does not automatically include a default &lt;code&gt;my.cnf&lt;/code&gt; for MySQL. Instead, a set of sample configuration files can be found under &lt;code&gt;/usr/local/share/mysql&lt;/code&gt;. These configuration files include &lt;code&gt;my-small.cnf&lt;/code&gt;, &lt;code&gt;my-medium.cnf&lt;/code&gt;, &lt;code&gt;my-large.cnf&lt;/code&gt;, &lt;code&gt;my-innodb-heavy-4G&lt;/code&gt;, and &lt;code&gt;my-huge.cnf&lt;/code&gt;. The appropriate file can be copied and used as a template configuration by performing the following actions:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cd /usr/local/share/mysql/
cp /usr/local/share/mysq/mysql-large.cnf /etc/my.cnf
/usr/local/etc/rc.d/mysql-server restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;thanks to &lt;a href="http://www.barik.net/archive/2008/05/26/114616/"&gt;http://www.barik.net/archive/2008/05/26/114616/&lt;/a&gt; for the tip.&lt;/p&gt;</content><category term="SysAdmin"></category><category term="FreeBSD 7"></category><category term="MySQL"></category></entry><entry><title>Debian 4.0r4 NIC bonding</title><link href="https://www.surlyjake.com/blog/2008/09/17/debian-40r4-nic-bonding/" rel="alternate"></link><published>2008-09-17T13:26:21-07:00</published><updated>2008-09-17T13:26:21-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-09-17:/blog/2008/09/17/debian-40r4-nic-bonding/</id><summary type="html">&lt;p&gt;Install package ifenslave-2.6.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;apt-get install ifenslave
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;make sure the real NICs kernel modules are loaded automatically&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;modprobe --list | grep -i bonding
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;edit /etc/network/interfaces to look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;auto bond0
iface bond0 inet static
address 192.168.1.59
netmask 255.255.255.0
gateway 192.168.1 …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Install package ifenslave-2.6.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;apt-get install ifenslave
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;make sure the real NICs kernel modules are loaded automatically&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;modprobe --list | grep -i bonding
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;edit /etc/network/interfaces to look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;auto bond0
iface bond0 inet static
address 192.168.1.59
netmask 255.255.255.0
gateway 192.168.1.1
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave -d bond0 eth0 eth1
broadcast 192.168.1.255
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;make sure to remove ALL of the lines refering to old eth0 or eth1 settings.&lt;/p&gt;
&lt;p&gt;add the following lines to your /etc/modprobe.d/arch/i386:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;alias bond0 bonding
options bonding mode=1 miimon=100 downdelay=200 updelay=200
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="Networking"></category><category term="aggregating"></category><category term="bonding"></category><category term="Debian Etch"></category><category term="Networking"></category></entry><entry><title>what not to do in MySQL... and how to pick up the pieces</title><link href="https://www.surlyjake.com/blog/2008/09/16/what-not-to-do-in-mysql-and-how-to-pick-up-the-pieces/" rel="alternate"></link><published>2008-09-16T22:31:13-07:00</published><updated>2008-09-16T22:31:13-07:00</updated><author><name>jacob</name></author><id>tag:www.surlyjake.com,2008-09-16:/blog/2008/09/16/what-not-to-do-in-mysql-and-how-to-pick-up-the-pieces/</id><summary type="html">&lt;p&gt;note to self... do NOT kill mysql processes from phpmyadmin's control panel and force mysql to quit. Bad things happen. In this case, mysql wouldnt start again. InnoDB's indexes, binary logs, etc. were all out of sync. The 20 page log explaining all the ways the DB couldn't start is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;note to self... do NOT kill mysql processes from phpmyadmin's control panel and force mysql to quit. Bad things happen. In this case, mysql wouldnt start again. InnoDB's indexes, binary logs, etc. were all out of sync. The 20 page log explaining all the ways the DB couldn't start is located in the DB's data dir, which in my case was in /dbdisks/&lt;hostname&gt;.err.&lt;/p&gt;
&lt;p&gt;To tell mysql to pick up the messy pieces and throw up whats left of your data, edit or create /etc/my.cnf and add this little line to the "[mysqld]" section:  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;innodb_force_recovery = 3&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The command is talked aboot &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html"&gt;here&lt;/a&gt; the number is btw 1 and 6. bigger the number, the more drastic and desperate it is. I tried 4, and it pulled the tables with no data. 1 gave me nothing. but 3 let me start and mysqldump my database.  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;mysqldump -u root -p &amp;lt;dbname &amp;gt; /path/to/.sql/file&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;so once the dump was completed, i moved the db data directory, commented out the "innodb_force_recovery" line, and restarted the computer. At restart the db data dir was re-created by mysql. fresh and clean. this deletes EVERYTHING. even users. re-import the data with  &lt;/p&gt;
&lt;p&gt;&lt;code&gt;mysql -u root &amp;lt;dbname&amp;gt; &amp;lt; /path/to/.sql/file&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;go ahead and create the users needed, and set root password again. There you go.&lt;/p&gt;</content><category term="Sysadmin"></category><category term="database"></category><category term="FreeBSD 7"></category><category term="MySQL"></category><category term="recovery"></category></entry></feed>