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

<channel>
	<title>Gabe Ortiz &#187; linux</title>
	<atom:link href="http://gabeortiz.net/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://gabeortiz.net</link>
	<description>storybook american generalist</description>
	<lastBuildDate>Tue, 22 Mar 2011 22:15:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to get Dropbox working on a CR48 Google Chrome netbook</title>
		<link>http://gabeortiz.net/2011/how-to-get-dropbox-working-on-a-cr48-google-chrome-netbook/</link>
		<comments>http://gabeortiz.net/2011/how-to-get-dropbox-working-on-a-cr48-google-chrome-netbook/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 19:05:57 +0000</pubDate>
		<dc:creator>gabe</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://gabeortiz.net/?p=105</guid>
		<description><![CDATA[So, sometimes using the web-based Dropbox interface just won&#8217;t cut it and downloading individual files from there to upload elsewhere is a pain. I thought it would be pretty cool to have a local cache of my Dropbox on my CR48, and as it turns out, that&#8217;s not too hard. Put your CR-48 in developer ...]]></description>
			<content:encoded><![CDATA[<p>So, sometimes using the web-based Dropbox interface just won&#8217;t cut it and downloading individual files from there to upload elsewhere is a pain. I thought it would be pretty cool to have a local cache of my Dropbox on my CR48, and as it turns out, that&#8217;s not too hard.</p>
<ol>
<li>Put your CR-48 in developer mode</li>
<li>Drop into a shell (Ctrl+Alt+t, then shell),<br />
make your home partition executable with</p>
<pre>sudo mount -i -o remount,exec /home/chronos/user</pre>
</li>
<li>Get the stable 32bit Dropbox tarball
<pre>wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86"</pre>
</li>
<li>Extract the archive.
<pre>tar -xvzf dropbox.tar.gz</pre>
</li>
<li>Run dropboxd:
<pre>~/.dropbox-dist/dropboxd</pre>
</li>
<li>You should see something like this:
<pre>This client is not linked to any account...
Please visit https://www.dropbox.com/cli_link?host_id=7d44a557aa58f285f2da0x67334d02c1
to link this machine.</pre>
<p>Copy that URL by highlighting and middle clicking it, and paste it into Chrome. Log in and link your account. It will then create a ~/Dropbox folder and start syncing. If you want to put your Dropbox folder somewhere else, say on an SD card, I&#8217;d suggest softlinking ~/Dropbox.</p>
<p>You&#8217;ll want to edit your .bashrc to make the ﻿﻿mount point executable and to start Dropbox. Here&#8217;s mine: <a href="http://signalnine.net/.bashrc.cr48">http://signalnine.net/.bashrc.cr48</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://gabeortiz.net/2011/how-to-get-dropbox-working-on-a-cr48-google-chrome-netbook/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Arch Linux First Impressions</title>
		<link>http://gabeortiz.net/2010/arch-linux-first-impressions/</link>
		<comments>http://gabeortiz.net/2010/arch-linux-first-impressions/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 04:17:52 +0000</pubDate>
		<dc:creator>gabe</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.signalnine.net/?p=66</guid>
		<description><![CDATA[Having become rather tired of reinstalling Ubuntu every six months or so to keep current with releases, I recently decided to give Arch Linux a whirl. I was feeling impulsive so I decided to just jump right in without the benefit of a install guide or anything of that nature, I figured I&#8217;d get a ...]]></description>
			<content:encoded><![CDATA[<p>Having become rather tired of reinstalling Ubuntu every six months or so to keep current with releases, I recently decided to give <a title="Arch Linux" href="http://archlinux.org" target="_blank">Arch Linux</a> a whirl. I was feeling impulsive so I decided to just jump right in without the benefit of a install guide or anything of that nature, I figured I&#8217;d get a better feel for what Arch was all about this way.</p>
<h2>Install process</h2>
<p>Initial install was pretty smooth. I made sure my homedir backup was current, downloaded the 2009.08 ISO, booted up into a live CD environment and ran through the (console mode, so you know we&#8217;re serious) installer pretty quickly. I should note that right away that the impression I got was, &#8220;Hey, we&#8217;ll let you install in a nice ncurses installer app, but after that you&#8217;re on your own.&#8221; However, even running the installer was not something I&#8217;d be comfortable recommending to a inexperienced user.</p>
<h2>First boot</h2>
<p>Okay, so install was relatively fast and easy, at least for a highly experienced sysadmin. I logged in, ran df and noticed I was only at around half a gig usage for the root filesystem. Hmm. They weren&#8217;t kidding when they said it was minimalistic. In fact, upon boot I&#8217;m not getting to init 5. All I&#8217;ve got is console mode. Right, no problem. I know the package manager is called pacman, and man pacman yields predictably useful results. Good job, Arch nerds!</p>
<h2>Configuration</h2>
<p>So, I&#8217;ve got a console and I know how the package manager works. Well, theoretically. It takes me about a minute to figure out that I need to uncomment some repositories in/etc/pacman.d/mirrorlist and run pacman -Sy to sync package databases. So, first order of business is to install X. Obviously, I need xorg-server, some fonts and my video driver. They install, bring in all my dependencies and I&#8217;m really starting to warm up to pacman at this point. Some fiddling with xmonad, dmenu, xmobar and related window manager packages later, I&#8217;m theoretically up and running.  Oh wait, xorg keeps crashing when I try to launch it. Time to install elinks and hit the forums. No really, that&#8217;s what I did.</p>
<h2>Troubleshooting</h2>
<p>After a little googling, I find that I need a graphical login manger and some tweaks to my inittab. However, I&#8217;m in luck. There&#8217;s a lovely graphical login manager called slim that&#8217;s lightweight and crazy configurable and some wisdom on Arch&#8217;s gotta-configure-it-yourself init process. Arch uses a BSD style init, so 99% of the relevant bits are in /etc/inittab and /etc/rc.conf. The last line in /etc/rc.conf looks like this:</p>
<pre>DAEMONS=(syslog-ng hal alsa !network netfs wicd crond slim)</pre>
<h2>Window Managers</h2>
<p>I run xmonad because it is awesome. I needed xmonad-contrib and the related dependencies, and my existing configuration Just Worked, which was nice. .xinitrc works as it should. I did need to add <tt>eval `ssh-agent`</tt> to it in order to get ssh-agent going.</p>
<h2>Conclusions</h2>
<p>So far, so good. I&#8217;m now running current but very stable versions of everything (Hello, kernel 2.6.32!) and performance is great. My intel video driver finally is performing like it should, and overall I&#8217;m quite happy. Rolling releases are great and I&#8217;m way impressed with the package manager. So, give Arch a shot. You won&#8217;t be disappointed.</p>
]]></content:encoded>
			<wfw:commentRss>http://gabeortiz.net/2010/arch-linux-first-impressions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debian Diskless Cluster Howto</title>
		<link>http://gabeortiz.net/2009/debian-diskless-cluster-howto/</link>
		<comments>http://gabeortiz.net/2009/debian-diskless-cluster-howto/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 19:29:56 +0000</pubDate>
		<dc:creator>gabe</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.signalnine.net/?p=12</guid>
		<description><![CDATA[Inital Setup This guide will walk you through the diskless cluster install and setup process. The cluster has a head node that serves boot images to the compute nodes and the database node. We&#8217;re attempting to present a unified system image across the cluster. For this reason, all nodes are looking at the same root ...]]></description>
			<content:encoded><![CDATA[<h2>Inital Setup</h2>
<p>This guide will walk you through the diskless cluster install and setup process. The cluster has a head node that serves boot images to the compute nodes and the database node. We&#8217;re attempting to present a unified system image across the cluster. For this reason, all nodes are looking at the same root filesystem, served via NFS.</p>
<h3>DHCP</h3>
<p>I started from a bare-bones netinstall of Debian Squeeze (testing) on the head node. This should work about equally well on any Debian-derived distribution.</p>
<p>First, we need to install some packages we&#8217;ll need in a minute.</p>
<pre>
sudo apt-get install dnsmasq syslinux nfs-kernel-server nfs-common debootstrap tftpd-hpa xinetd
</pre>
<p>Now, we need to configure dnsmasq, which will serve as our DHCP server for diskless booting.</p>
<p>You replace your existing /etc/dnsmasq.conf with something like this:</p>
<pre>
dhcp-range=192.168.1.50,192.168.1.150,255.255.255.0,12h
dhcp-boot=pxelinux.0,headnode,192.168.1.1
</pre>
<p>Replace 192.168.1.x with your preferred IP subnet and &#8220;headnode&#8221; with the hostname of your head node.</p>
<h3>tftp</h3>
<p>Our tftp server needs to be configured to launch on command from xinetd. The binary is already installed from our previous apt-get command.</p>
<p>create a file, /etc/xinetd/tftp-hpa that looks like this:</p>
<pre>
service tftp
{
        disable         = no
        id              = chargen-dgram
        socket_type     = dgram
        protocol        = udp
        user            = root
        wait            = yes
        server          = /usr/sbin/in.tftpd
        server_args     = -s /var/lib/tftpboot/
}
</pre>
<h3>PXE</h3>
<p>Now we need to tell the PXE server what to serve our clients.</p>
<p>Let&#8217;s set up our pxelinux configuration directory.</p>
<pre>
sudo cp -r /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/
sudo mkdir /var/lib/tftpboot/pxelinux.cfg
</pre>
<p>We&#8217;ll need a kernel and a initial ramdisk to give to your diskless clients. Assuming you&#8217;re going to be running the same kernel on the head node as your diskless clients (recommended), you can just copy the kernel from /boot.</p>
<pre>
sudo cp /boot/vmlinuz-`uname -r` /var/lib/tftpboot/
</pre>
<p>You&#8217;re going to need to create a NFS-root-enabled ramdisk. This accomplished with the tool mkinitramfs. You should have a configuration directory, /etc/initramfs-tools/. Make a copy of it:</p>
<pre>
sudo cp -r /etc/initramfs-tools /etc/initramfs-pxe
</pre>
<p>Note: On Debian Squeeze, the installed <tt>/etc/initramfs-tools</tt> did not work for unknown reasons, it seems to be missing module configurations. I ended up copying a <tt>/etc/initramfs-tools</tt> from an Ubuntu 8.04 install. It worked fine.</p>
<p>Edit /etc/initramfs-pxe/initramfs.conf. Change <tt>BOOT=local</tt> to <tt>BOOT=nfs</tt>.<br />
Now we can create the ramdisk.</p>
<pre>
sudo mkinitramfs -d /etc/initramfs-pxe -o /var/lib/tftpboot/initrd.img-`uname -r` `uname -r`
</pre>
<p>We should be ready to create a default boot configuration now. We&#8217;ll need to create <tt>/var/lib/tftpboot/pxelinux.cfg/default</tt></p>
<pre>
LABEL linux
KERNEL vmlinuz-2.6.29
APPEND root=/dev/nfs initrd=initrd.img-2.6.29 nfsroot=192.168.1.1:/home/nfsroot ip=dhcp rw
</pre>
<p>Change 2.6.29 to match your kernel, obviously.</p>
<p>If you want to pass different parameters to different machines, you can create individual configuration files in <tt>/var/lib/tftpboot/pxelinux.cfg/</tt> based on their MAC addresses. For example, if I create a file, <tt>/var/lib/tftpboot/pxelinux.cfg/01-00-21-97-7a-24-0f</tt>, then my node with a MAC of <tt>00:21:97:7a:24:0f</tt> will load that instead of the default. I like to create softlinks in the configuration directory corresponding to the hostnames of my nodes because if you can remember MAC addresses of individual machines then you&#8217;re a better man than I am.</p>
<h3>NFS</h3>
<p>NFS time! Create a directory to store your NFS root you&#8217;ll be serving clients.</p>
<pre>
sudo mkdir /home/nfsroot
</pre>
<p>Edit <tt>/etc/exports</tt>. It should look something like this:</p>
<pre>
/home/nfsroot 192.168.1.0/255.255.255.0(rw,no_subtree_check,async,no_root_squash)
</pre>
<p>Now we just have to bootstrap a basic Debian install into <tt>/home/nfsroot</tt>. Luckily for us, there&#8217;s a nifty little tool called <tt>debootstrap</tt> that does just that. For a 64-bit Debian Squeeze environment, I do this:</p>
<pre>
debootstrap --arch amd64 squeeze /home/nfsroot/
</pre>
<p>A few minutes later, it&#8217;s installed. Now you need to make some modifications to that system you just installed.<br />
Edit <tt>/home/nfsroot/etc/fstab</tt> to look something like this:</p>
<pre>
# <file system> <mount point> <type>
<options> <dump>
<pass>
proc            /proc         proc   defaults       0      0
/dev/nfs        /             nfs    defaults       0      0
none            /tmp            tmpfs   defaults 0 0
none            /var/run        tmpfs   defaults 0 0
none            /var/lock       tmpfs   defaults 0 0
none            /var/tmp        tmpfs   defaults 0 0
none            /media          tmpfs   defaults 0 0
none		/var/log	tmpfs	defaults 0 0
</pre>
<p><tt>/home/nfsroot/etc/network/interfaces</tt> should be:</p>
<pre>
auto lo
iface lo inet loopback
iface eth0 inet dhcp
</pre>
<p>Note that <tt>auto eth0</tt> isn&#8217;t there anymore. That&#8217;s because your primary ethernet interface is already up. If you try to initialize it again, it might drop your existing connection and it&#8217;ll dump you out of the boot process.</p>
<h3>Testing</h3>
<p>At this point you&#8217;re ready to test. Make sure to restart xinetd, dnsmasq and nfs-kernel-server to make sure your new settings take effect. Then, check your node&#8217;s BIOS to verify that network boot is enabled and give it a shot.</p>
<p>Congratulations! You now have a diskless cluster. Next we&#8217;ll make some special modifications to the configuration of the nodes to make them play nicely together and make maintenance easier.</p>
<h3>Networking</h3>
<p>Each node will receive an IP address from dnsmasq on the head node. We can either just note which IP each node gets, as it should give each node a unique IP by default and these are persistent as long as the node&#8217;s MAC address remains the same, or you can force each node to a specified IP with a configuration similar to this in <tt>/etc/dnsmasq.conf</tt> on the head node:</p>
<pre>
dhcp-host=id:00:21:97:7d:ad:bf,192.168.1.10
dhcp-host=id:00:21:97:7a:24:0f,192.168.1.11
dhcp-host=id:00:21:97:7d:b3:26,192.168.1.12
</pre>
<p>Either way, you&#8217;ll need <tt>/etc/hosts</tt> on your head node to reflect the IP addresses of your nodes. Mine looks like this:</p>
<pre>
127.0.0.1	localhost
10.13.99.1	scoop head
192.168.1.10	dizzy db
192.168.1.11	tumbler
192.168.1.12	scrambler
</pre>
<p>You&#8217;ll want to copy that hosts file over to <tt>/home/nfsroot/etc/hosts</tt> as well.</p>
<h3>Init Tricks</h3>
<p>Sometimes you want the nodes to behave just a little bit differently from each other. I wanted my nodes to have different hostnames, fancy that. So, I wrote this bash script to figure out what their hostname should be:</p>
<pre>
#!/bin/bash
#finds node's hostname based on matching ip in /etc/hosts

grep `ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | /usr/bin/cut -d: -f2 \
| /usr/bin/awk '{ print $1}'` /etc/hosts | /usr/bin/awk '{print $2}'
</pre>
<p>Save the script in <tt>/home/nfsroot/bin/whereami</tt>. You&#8217;ll need awk in order for it to work. Boot up a node and just apt-get it from the node itself before running the script. Package installation is best accomplished from a booted diskless node, just try not to install multiple packages from multiple nodes simultaneously. You might corrupt your apt database.</p>
<p>Now that we have that taken care of, we can modify <tt>/etc/init.d/hostname.sh</tt> to set our hostname on boot based on the IP we&#8217;ve received. This is as simple as changing this:</p>
<pre>
	[ -f /etc/hostname ] &#038;&#038; HOSTNAME="$(cat /etc/hostname)"
</pre>
<p>To this:</p>
<pre>
	[ -f /etc/hostname ] &#038;&#038; HOSTNAME="$(/bin/whereami)"
</pre>
<p>This also allows us to modify other init scripts so they&#8217;ll only run on particular nodes. For example, I wanted MySQL to start only on the database node, dizzy. So I added this to the top of <tt>/etc/init.d/mysql</tt>:</p>
<pre>
hostname=$(hostname)
if [ $hostname != "dizzy" ];
then exit 0
fi
</pre>
<h3>Logging</h3>
<p>Since we&#8217;re not saving local log files on the diskless nodes, it makes sense to centralize our logging on the head node. We&#8217;ll need a better logging daemon to accomplish this.</p>
<p>On both the head node and a diskless node (only do this on one of your nodes, changes populate to the others, remember?)</p>
<pre>
sudo apt-get install syslog-ng
</pre>
<p>Edit <tt>/etc/syslog-ng/syslog-ng.conf</tt> on the <b>head node</b>.</p>
<pre>
## add this to the options section
create_dirs(yes);
long_hostnames(off);
keep_hostname(yes);

## add this to the source section
source s_udp {
	udp ( ip(192.168.1.1) ); # replace with your system's IP address
};

## add this to the destination section
destination df_udp {
        file ("/var/log/$HOST/$FACILITY");
};

## add this to the log section
log {
        source(s_udp);
        destination (df_udp);
};
</pre>
<p>Now edit <tt>/etc/syslog-ng/syslog-ng.conf</tt> on one of the <b>diskless nodes</b>.</p>
<pre>
## add this to the destination section
destination remote_udp { udp("192.168.1.1"); }; # replace with your log server's IP address

## add this to the log section
log { source(src); destination(remote_udp); };
</pre>
<p>Restart syslog-ng on both head and diskless nodes.</p>
<h3>That&#8217;s It</h3>
<p>I hope this was helpful. Feel free to ask questions or leave comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://gabeortiz.net/2009/debian-diskless-cluster-howto/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Gophercore</title>
		<link>http://gabeortiz.net/2009/gophercore/</link>
		<comments>http://gabeortiz.net/2009/gophercore/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 07:02:34 +0000</pubDate>
		<dc:creator>gabe</dc:creator>
				<category><![CDATA[gopher]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.signalnine.net/?p=6</guid>
		<description><![CDATA[gopher://gopher.signalnine.net/ Should work in Firefox, or apt-get yourself a real commandline client if you&#8217;re on a Debian system. And yes, that is in fact a Twitter-to-gopher gateway I wrote. Also, this blog is being re-published as a phlog. Apparently Veronica is still around! I got my server added to the index seed list, I&#8217;m listed ...]]></description>
			<content:encoded><![CDATA[<p><a title="gopher://gopher.signalnine.net/" href="gopher://gopher.signalnine.net/">gopher://gopher.signalnine.net/</a><br />
Should work in Firefox, or apt-get yourself a real commandline client if you&#8217;re on a Debian system. And yes, that is in fact a Twitter-to-gopher gateway I wrote. Also, this blog is being re-published as a phlog. Apparently Veronica is still around! I got my server added to the index seed list, I&#8217;m listed as the <em>136th</em> gopher server still on the internet.</p>
]]></content:encoded>
			<wfw:commentRss>http://gabeortiz.net/2009/gophercore/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VLC streaming webcam server</title>
		<link>http://gabeortiz.net/2009/vlc-streaming-webcam-server/</link>
		<comments>http://gabeortiz.net/2009/vlc-streaming-webcam-server/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 22:06:06 +0000</pubDate>
		<dc:creator>gabe</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://blog.signalnine.net/?p=4</guid>
		<description><![CDATA[I recently had occasion to create a streaming server to serve a video and audio feed, for use as a baby monitor. So, I decided to re-purpose my aging Eee 701 that&#8217;s become next to useless because the LCD is failing. However, it makes a perfect compact low-power headless Linux server. I bought a cheap-ass ...]]></description>
			<content:encoded><![CDATA[<p>I recently had occasion to create a streaming server to serve a video and audio feed, for use as a baby monitor. So, I decided to re-purpose my aging Eee 701 that&#8217;s become next to useless because the LCD is failing. However, it makes a perfect compact low-power headless Linux server. I bought a <a href="http://www.amazon.com/gp/product/B000EVM5DK/ref=as_li_ss_tl?ie=UTF8&#038;tag=ventoozler-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B000EVM5DK">cheap-ass webcam</a>.</p>
<p>Getting the webcam to recognize under Intrepid was a little bit of a pain, but the <a href="http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz">gspca drivers</a> will compile under the 2.6.27-11 kernel if you apply <a href="http://signalnine.net/gspca.patch">this patch</a>.</p>
<p>So, after making sure you have both vlc and v4l-config installed, here&#8217;s the VLC command you&#8217;ll need:</p>
<p><tt>cvlc v4l:// :v4l-vdev="/dev/video0" :v4l2-adev="/dev/audio" :v4l-norm=1 :v4l-chroma=UYVY :v4l-height=640 :v4l-width=480  --sout "#transcode{vcodec=h264,vb=800,scale=1,acodec=mp3,ab=64,channels=1,audio-sync,vfilter=deinterlace}:duplicate{dst=std{access=mmsh,mux=mp4,dst=192.168.0.24:1755}}"</tt></p>
<p>Replace 192.168.0.24:1755 with your server&#8217;s IP and preferred port. This is serving MMS, you can replace mmsh with http or whatever your preferred protocol is. You can also change vcodec and vb, the video codec and bitrate respectively. h.264 is very efficient, but somewhat processor-intensive, but remarkably, my Eee 701 with a 600mhz Celeron handles it just fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://gabeortiz.net/2009/vlc-streaming-webcam-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

