<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1596399328636038337</id><updated>2011-11-30T02:11:31.252-08:00</updated><category term='fedora'/><category term='diagnostics'/><category term='MSS'/><category term='reprap'/><category term='raid'/><category term='repairs'/><category term='dd-wrt tomato tomatousb rt-n16 router hack workaround'/><category term='rfid'/><category term='ohshit'/><title type='text'>"Oops!" is fixable"Oh shit!" is not</title><subtitle type='html'>&lt;center&gt;My mistakes. Let me show you them&lt;/center&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blag.fixplz.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-4512411564321039420</id><published>2011-11-30T02:11:00.000-08:00</published><updated>2011-11-30T02:11:31.270-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dd-wrt tomato tomatousb rt-n16 router hack workaround'/><title type='text'>Mmm, tomatoes...</title><content type='html'>So I installed TomatoUSB on my Asus RT-N16. The router has 2 USB ports (can be extended with a hub) and firmware has support for block devices &amp;amp; printers. IPv6 support, 1Gbps ethernet, jumbo frames, per-IP QoS... even has a torrent app built in so you can download while your computers are offline.&lt;br /&gt;Anyway, first few hurdles:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Found a way to route to DSL modem, same exact script as DD-WRT (how convenient!)&lt;br /&gt;&lt;li&gt;Found a way to add a non-root user, altered it to allow public key only and saved to nvram! (didn't know how to do it in dd-wrt, had to manually run the user setup script after each reboot). The only issue was permissions, which is easily fixed/hacked with init script&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Found a way to enable multiple printers (more on that in a moment)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Found a way to send firmware to a printer that needs it (TODO as soon as I get a new USB2.0 hub)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Found a way to &lt;a href="http://www.shcherbyna.com/?p=983"&gt;set up sane to share a scanner&lt;/a&gt;! This is what pushed me to choose Tomato over DD-WRT on this router, actually. I'm sure there's a way to do the same thing there, but convenient google result is more convenient :)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;For running multiple printers, I have an Epson CX8400 printer/scanner and HP LJ 1018. But there's a minor problem: whichever printer is turned on first, becomes lp0 and is then automagically shared on port 9100. But what if someone turns on both? I don't want to make anyone remember that they first have to turn one, and only then another!Well, turns out there's a hacky way. First, some background&lt;ul&gt;&lt;li&gt;the way to share a printer on the next port (9101) is simply run "p910nd -b -f /dev/usb/lp1 1", where "-f /dev/usb/lp1" points it to the lp# device symlink, "1" means I want to use port 9101 (default is 9100 and the only remaining one is 9102), and in this case p910nd executable will rename itself to p9101d&lt;/li&gt;&lt;li&gt;&lt;a href="http://tomatousb.org/tut:loading-printer-s-firmware-hotplug-script"&gt;Loading Printer's Firmware in Hotplug Script&lt;/a&gt; page tells me there's an easy way to trap add/remove action on these guys, even tells me how to find the product ID. But after printing all vars, it's apparent there's no mention of the /dev/*lp# device.&lt;/li&gt;&lt;/ul&gt;Oops!As luck would have it, though, one of those vars, DEVPATH, corresponds to the same file in /sys -- and the correct subdevice has a symlink to lp0 or lp1!&lt;pre&gt;DEVPATH='/devices/pci0000:00/0000:00:04.1/usb1/1-2/1-2:1.1'&lt;/pre&gt;&lt;pre&gt;root@rooter:/tmp/home/root# ls -ld /sys/devices/pci0000:00/0000:00:04.1/usb1/1-2/1-2\:1.1/usb\:lp1&lt;br /&gt;lrwxrwxrwx    1 root     root             0 Dec 31  1969 /sys/devices/pci0000:00/0000:00:04.1/usb1/1-2/1-2:1.1/usb:lp1 -&gt; ../../../../../../class/usb/lp1&lt;br /&gt;&lt;/pre&gt;This is easily parseable by a shell script (hotplug). Said script can immediately create an extra symlink, specific to the printer model -- that one is guaranteed to be the right one! Then, all I need to do is share it -- and there's already a way to do all these things.So, without further stalling for time, here's the hacky script:&lt;pre&gt;if [ $INTERFACE = "7/1/2" ]; then&lt;br /&gt; f=/sys/${DEVPATH}/usb:*; [ -e $f ] &amp;&amp; d=`ls -d $f |sed 's/.*://'`&lt;br /&gt; if [ $PRODUCT = "3f0/4117/100" ]; then&lt;br /&gt;  l=/dev/usb/HP1018&lt;br /&gt;  if [ $ACTION = "add" ] &amp;&amp; [ "n$d" != "n" ]; then ln -sf /dev/${d} $l; p910nd -b -f $l 2&lt;br /&gt;   #TODO: send firmware to the printer&lt;br /&gt;  elif [ $ACTION = "remove" ]; then rm -f $l; killall p9102d 2&gt;/dev/null&lt;br /&gt;  fi&lt;br /&gt; elif [ $PRODUCT = "4b8/839/100" ]; then&lt;br /&gt;  l=/dev/usb/EpsonCX8400&lt;br /&gt;  if [ $ACTION = "add" ] &amp;&amp; [ "n$d" != "n" ]; then ln -sf /dev/${d} $l; p910nd -b -f $l 1&lt;br /&gt;  elif [ $ACTION = "remove" ]; then rm -f $l; killall p9101d 2&gt;/dev/null&lt;br /&gt;  fi&lt;br /&gt; fi&lt;br /&gt;fi&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Not only does it create everything - it cleans up, too! And it can do the firmware trick as well (need usb hub for the thumbdrive - I'll probably need it for optware/sane, so might as well use it for the printer firmware, too, instead of mucking about with built-in flash)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-4512411564321039420?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/4512411564321039420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2011/11/mmm-tomatoes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/4512411564321039420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/4512411564321039420'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2011/11/mmm-tomatoes.html' title='Mmm, tomatoes...'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-4755010395064763086</id><published>2010-10-19T00:59:00.001-07:00</published><updated>2010-10-19T01:28:01.080-07:00</updated><title type='text'>IP Aliasing (Fedora), Multiple IPs (DD-WRT)</title><content type='html'>&lt;pre&gt;# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1&lt;br /&gt; .. edit ifcfg-eth0:1 - change UUID and all references to eth0 become eth0:1&lt;br /&gt;# ifup eth0:1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;(from http://fedoraforum.org/forum/showthread.php?t=239242)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;# Save Startup&lt;br /&gt;WANIF=`nvram get wan_iface`&lt;br /&gt;WANMASK=`nvram get wan_netmask`&lt;br /&gt;ifconfig $WANIF:1 173.X.X.250 netmask $WANMASK broadcast [BROADCAST]&lt;br /&gt;ifconfig $WANIF:2 173.X.X.251 netmask $WANMASK broadcast [BROADCAST]&lt;br /&gt;ifconfig $WANIF:3 173.X.X.252 netmask $WANMASK broadcast [BROADCAST]&lt;br /&gt;&lt;br /&gt;# Save Firewall&lt;br /&gt;&lt;br /&gt;# WAN .250 -&gt; LAN .15&lt;br /&gt;iptables -t nat -I PREROUTING -d 173.X.X.250 -j DNAT --to 192.168.0.15&lt;br /&gt;iptables -t nat -I POSTROUTING -s 192.168.0.15 -j SNAT --to 173.X.X.250&lt;br /&gt;iptables -I FORWARD -d 192.168.0.15 -p tcp --dport 21 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -d 192.168.0.15 -p tcp --dport 80 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -d 192.168.0.15 -p tcp --dport 5900 -j ACCEPT&lt;br /&gt;&lt;br /&gt;# WAN .251 -&gt; LAN .20&lt;br /&gt;iptables -t nat -I PREROUTING -d 173.X.X.251 -j DNAT --to 192.168.0.20&lt;br /&gt;iptables -t nat -I POSTROUTING -s 192.168.0.20 -j SNAT --to 173.X.X.251&lt;br /&gt;iptables -I FORWARD -d 192.168.0.20 -p tcp --dport 21 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -d 192.168.0.20 -p tcp --dport 80 -j ACCEPT&lt;br /&gt;iptables -I FORWARD -d 192.168.0.20 -p tcp --dport 5900 -j ACCEPT&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;(from http://www.dd-wrt.com/wiki/index.php/One-to-one_NAT)&lt;br /&gt;&lt;br /&gt;Pretty sweet!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-4755010395064763086?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/4755010395064763086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/10/ip-aliasing-fedora.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/4755010395064763086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/4755010395064763086'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/10/ip-aliasing-fedora.html' title='IP Aliasing (Fedora), Multiple IPs (DD-WRT)'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-9101134564110011444</id><published>2010-10-18T15:52:00.000-07:00</published><updated>2010-10-18T15:52:56.972-07:00</updated><title type='text'>N900 MMS</title><content type='html'>So I've been having problems getting MMS messages on my phone.&lt;br /&gt;&lt;a href="http://talk.maemo.org/showthread.php?t=51890"&gt;Turns out&lt;/a&gt;, I had it set to "polite" mode, though the "proper" mode is the "havoc". Started working instantly... bugger&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-9101134564110011444?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/9101134564110011444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/10/n900-mms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/9101134564110011444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/9101134564110011444'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/10/n900-mms.html' title='N900 MMS'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-6907963195047058595</id><published>2010-10-17T23:51:00.000-07:00</published><updated>2010-10-17T23:54:11.257-07:00</updated><title type='text'>SSL certs - self-signing</title><content type='html'>Basic setup from &lt;a href="http://www.yatblog.com/2007/02/27/how-to-create-a-ssl-certificate/"&gt;http://www.yatblog.com/2007/02/27/how-to-create-a-ssl-certificate/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ openssl genrsa -des3 -out server.key 1024&lt;br /&gt;$ openssl req -new -key server.key -out server.csr&lt;br /&gt;$ cp server.key server.key.org&lt;br /&gt;$ openssl rsa -in server.key.org -out server.key&lt;br /&gt;$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Works great and can use it with wildcard subdomains. But there's a caveat when using wildcard -- the cert is only valid for *.domain.com, not for domain.com&lt;br /&gt;There's something called subjectAltName, but getting it to work is tricky (or, rather, it was tricky finding out how to get it to work...)&lt;br /&gt;&lt;br /&gt;Finally found it here &lt;a href="http://lists.mandriva.com/cooker-server/2004-01/msg00189.php"&gt;http://lists.mandriva.com/cooker-server/2004-01/msg00189.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Instead of the last command, do this:&lt;br /&gt;&lt;pre&gt;$ cat &amp;gt;ext.cnf &amp;lt;&amp;lt;EOF&lt;br /&gt;[ alt_name ]&lt;br /&gt;subjectAltName = DNS:domain.com,DNS:*.domain.com&lt;br /&gt;EOF&lt;br /&gt;$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt -extfile ext.cnf -extensions alt_name&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-6907963195047058595?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/6907963195047058595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/10/ssl-certs-self-signing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/6907963195047058595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/6907963195047058595'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/10/ssl-certs-self-signing.html' title='SSL certs - self-signing'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-2410404822064492083</id><published>2010-10-15T20:53:00.001-07:00</published><updated>2010-10-15T20:53:42.306-07:00</updated><title type='text'>Cool bash trick</title><content type='html'># yum install bash-completion&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-2410404822064492083?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/2410404822064492083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/10/cool-bash-trick.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/2410404822064492083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/2410404822064492083'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/10/cool-bash-trick.html' title='Cool bash trick'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-8325746292917107558</id><published>2010-07-20T13:46:00.000-07:00</published><updated>2010-07-20T13:46:43.310-07:00</updated><title type='text'>RAID -- downgraded to Oops</title><content type='html'>As planned, I reverted the chunk size back to 64. Meanwhile, it occurred to me to try the same operation in a sandbox. So I made 4 10m files and tried to make an array out of them. That failed, since files are not block devices. Next I tried /dev/ram## devices and the array was up. I copied some files to it and played around trying to replicate the same actions I made on the live array. I was able to shrink it, change chunk size there and back multiple times without any problems. That brought my hopes up, obviously.&lt;br /&gt;&lt;br /&gt;So, this morning re-re-chunking finally finished and I tried to resize the array:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;# mdadm --grow -z max --backup-file=/root/grow_md0_size_back.bak /dev/md0&lt;br /&gt;mdadm: component size of /dev/md0 has been set to 293033536K&lt;br /&gt;# cat /proc/mdstat&lt;br /&gt;Personalities : [raid6] [raid5] [raid4]&lt;br /&gt;md0 : active raid5 sdd1[3] sda4[0] sdc1[2] sdb1[1]&lt;br /&gt;293033472 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Uhh.. what? Moshi-mosh..?&lt;br /&gt;Can't do anything, array size is staying too small. Finally, I decide to take a leap of faith: stop the array and reassemble it (normally it's just like unmount/remount, but who knows what would happen with an array this messed up)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;# mdadm --stop --scan&lt;br /&gt;...&lt;br /&gt;# mdadm --assemble --scan&lt;br /&gt;mdadm: /dev/md0 has been started with 3 drives (out of 4).&lt;br /&gt;# cat /proc/mdstat&lt;br /&gt;Personalities : [raid6] [raid5] [raid4]&lt;br /&gt;md0 : active raid5 sda4[0] sdc1[2] sdb1[1]&lt;br /&gt;879100608 blocks level 5, 64k chunk, algorithm 2 [4/3] [UUU_] &lt;br /&gt;# mount /raid&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Huh.. 3 out of 4, but it mounts. Woohoo! Time for backups...&lt;br /&gt;&lt;br /&gt;Meanwhile, investigating:&lt;br /&gt;&lt;br /&gt;in /var/log/messages:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;Jul 20 09:56:41 slon kernel: md0: detected capacity change  from 0 to 900199022592&lt;br /&gt;Jul 20 09:56:41 slon kernel: md0: unknown  partition table&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;That looks scary, but is normal. To the kernel, md0 is just a block device like a normal HDD -- and it doesn't have its own partition table. This is OK because ext filesystems don't require a partition table, you can use the entire drive for one.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Eventually, I found 2 errors I've made:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The new partition had type "83 Linux" instead of "fd Linux raid autodetect" &lt;/li&gt;&lt;li&gt;I left out a / in front of /dev/sdf1 in /etc/mdadm.conf -- so when mdadm looked at /dev/sdf1 it thought it wasn't part of my array&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;No idea if one of these was the cause of the resizing problem, but everything is up and running now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-8325746292917107558?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/8325746292917107558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/07/raid-downgraded-to-oops.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/8325746292917107558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/8325746292917107558'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/07/raid-downgraded-to-oops.html' title='RAID -- downgraded to Oops'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-812141881350746321</id><published>2010-07-19T11:54:00.000-07:00</published><updated>2010-07-19T11:54:30.782-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='raid'/><category scheme='http://www.blogger.com/atom/ns#' term='ohshit'/><title type='text'>RAID -- Oh shit!</title><content type='html'>I wanted to add a 4th drive to the RAID box. That was easy enough:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;mdadm --add /dev/md1 /dev/sdb3&lt;br /&gt;mdadm --grow --raid-devices=4 --backup-file=/root/grow_md0.bak /dev/md0&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Normally, at this point you're supposed to resize the FS to use the whole capacity (otherwise it keeps using the old size, only spread out over 1 more drive).&lt;br /&gt;&lt;br /&gt;Then I decided to try 512k chunks because of some pages claiming it gives better performance.&lt;br /&gt;Cue Trouble.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;# cat /proc/mdstat &lt;br /&gt;Personalities : [raid6] [raid5] [raid4] &lt;br /&gt;md0 : active raid5 sdd1[3] sda4[0] sdc1[2] sdb1[1] &lt;br /&gt;      879100608 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]&lt;br /&gt;# mdadm --grow -z 293033472  --backup-file=/root/grow_md0_size.bak /dev/md0&lt;br /&gt;mdadm: component size of /dev/md0 has been set to 293033472K&lt;br /&gt;# cat /proc/mdstat&lt;br /&gt;Personalities : [raid6] [raid5] [raid4] &lt;br /&gt;md0 : active raid5 sdd1[3] sda4[0] sdc1[2] sdb1[1] &lt;br /&gt;      293033472 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]&lt;br /&gt;&lt;br /&gt;mdadm --grow -z 293033472 --backup-file=/root/grow_md0_size.bak /dev/md0&lt;br /&gt;&lt;br /&gt;mdadm --grow -c 512 --backup-file=/root/grow_md0_rechunk.bak /dev/md0&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Of course, I didn't notice that the -z command changed the total array size to the number of blocks I specified, instead of setting it per-drive (as the man page says). So, thinking that I took off 64k from end of each drive (which should've been empty because FS was not resized yet), I kept on g[r]owing:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;# mdadm --grow -c 512 --backup-file=/root/grow_md0_rechunk.bak /dev/md0&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;Since it was taking a whole day to do this, I thought I'd remount the FS and keep using it. No such luck:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;# mount -oro /raid/&lt;br /&gt;mount: wrong fs type, bad option, bad superblock on /dev/md0,&lt;br /&gt;       missing codepage or helper program, or other error&lt;br /&gt;       In some cases useful info is found in syslog - try&lt;br /&gt;       dmesg | tail  or so&lt;br /&gt;&lt;br /&gt;# dmesg|tail&lt;br /&gt;[...]&lt;br /&gt;EXT4-fs (md0): bad geometry: block count 146516768 exceeds size of device (73258368 blocks)&lt;br /&gt;&lt;br /&gt;# vim /var/log/messages&lt;br /&gt;[...]&lt;br /&gt;Jul 18 12:00:44 slon kernel: md0: detected capacity change from 900199022592 to 300066275328&lt;br /&gt;Jul 18 12:00:44 slon kernel: md0: unknown partition table &lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;After re-chunking process finished, I set it to resize the chunks back the way they were before. When that is done, I'll try to resize the array back to the old size.&lt;br /&gt;I don't think I'm THAT lucky, but there's a chance it'll work.&lt;br /&gt;&lt;br /&gt;A major fuckup, indeed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-812141881350746321?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/812141881350746321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/07/raid-oh-shit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/812141881350746321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/812141881350746321'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/07/raid-oh-shit.html' title='RAID -- Oh shit!'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-5913663174677367849</id><published>2010-07-13T11:37:00.000-07:00</published><updated>2010-07-13T11:37:39.644-07:00</updated><title type='text'>iptables + MythTV + PS3</title><content type='html'>MythTV boasts &lt;a href="http://www.mythtv.org/wiki/UPnP"&gt;UPnP/DLNA support&lt;/a&gt;, and PS3 is one of the supported clients. Unfortunately, most pages omit the firewall setup step, tell you to "enable UPnP on your firewall," or tell you to turn it off altogether.&lt;br /&gt;Time for a little investigatin' with tcpdump.&lt;br /&gt;First, with iptables disabled:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;10:47:38.891960 00:1f:a7:c6:ec:5a (oui Unknown) &amp;gt; Broadcast Null Unnumbered, xid, Flags [Response], length 46: 01 00&lt;br /&gt;10:47:41.797553 IP 0.0.0.0.bootpc &amp;gt; 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1f:a7:c6:ec:5a (oui Unknown), length 300&lt;br /&gt;10:47:44.240437 IP 0.0.0.0.bootpc &amp;gt; 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1f:a7:c6:ec:5a (oui Unknown), length 300&lt;br /&gt;10:47:44.255077 ARP, Request who-has PSthWii.home.lan tell 0.0.0.0, length 46&lt;br /&gt;10:47:44.755239 ARP, Request who-has PSthWii.home.lan tell PSthWii.home.lan, length 46&lt;br /&gt;10:47:44.756140 ARP, Request who-has PSthWii.home.lan tell PSthWii.home.lan, length 46&lt;br /&gt;10:47:44.756507 IP PSthWii.home.lan &amp;gt; 239.255.255.250: igmp v2 report 239.255.255.250&lt;br /&gt;10:47:44.757841 IP PSthWii.home.lan.51812 &amp;gt; 239.255.255.250.ssdp: UDP, length 223&lt;br /&gt;10:47:44.758199 IP PSthWii.home.lan.51811 &amp;gt; 239.255.255.250.ssdp: UDP, length 137&lt;br /&gt;10:47:44.766670 ARP, Request who-has rooter.home.lan tell PSthWii.home.lan, length 46&lt;br /&gt;10:47:44.823698 ARP, Reply PSthWii.home.lan is-at 00:1f:a7:c6:ec:5a (oui Unknown), length 46&lt;br /&gt;10:47:44.823718 IP slon.home.lan.56740 &amp;gt; PSthWii.home.lan.51812: UDP, length 364&lt;br /&gt;10:47:44.857535 IP PSthWii.home.lan.51812 &amp;gt; 239.255.255.250.ssdp: UDP, length 223&lt;br /&gt;10:47:44.905061 IP slon.home.lan.56740 &amp;gt; PSthWii.home.lan.51812: UDP, length 364&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&amp;nbsp;The first 6 lines are DHCP-related, and are of no consequence in this case. Then, there's an IGMP query to a multicast address and 2 &lt;a href="http://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol"&gt;SSDP&lt;/a&gt; packets (i.e. PS3 is asking "is there any servers that want to serve content to me?"). Two more packets for DHCP and then the MythTV backend already talking directly to the PS3.&lt;br /&gt;That was easy enough. Now same thing with iptables enabled:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;10:58:52.370765 00:1f:a7:c6:ec:5a (oui Unknown) &amp;gt; Broadcast Null Unnumbered, xid, Flags [Response], length 46: 01 00&lt;br /&gt;10:58:53.402886 IP 0.0.0.0.bootpc &amp;gt; 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1f:a7:c6:ec:5a (oui Unknown), length 300&lt;br /&gt;10:58:56.187136 IP 0.0.0.0.bootpc &amp;gt; 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1f:a7:c6:ec:5a (oui Unknown), length 300&lt;br /&gt;10:58:56.399562 IP 0.0.0.0.bootpc &amp;gt; 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1f:a7:c6:ec:5a (oui Unknown), length 300&lt;br /&gt;10:58:59.562880 IP 0.0.0.0.bootpc &amp;gt; 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:1f:a7:c6:ec:5a (oui Unknown), length 300&lt;br /&gt;10:58:59.571572 ARP, Request who-has PSthWii.home.lan tell 0.0.0.0, length 46&lt;br /&gt;10:59:00.073984 ARP, Request who-has PSthWii.home.lan tell PSthWii.home.lan, length 46&lt;br /&gt;10:59:00.074317 ARP, Request who-has PSthWii.home.lan tell PSthWii.home.lan, length 46&lt;br /&gt;10:59:00.074618 IP PSthWii.home.lan &amp;gt; 239.255.255.250: igmp v2 report 239.255.255.250&lt;br /&gt;10:59:00.074977 IP PSthWii.home.lan.52104 &amp;gt; 239.255.255.250.ssdp: UDP, length 223&lt;br /&gt;10:59:00.076220 IP PSthWii.home.lan.52103 &amp;gt; 239.255.255.250.ssdp: UDP, length 137&lt;br /&gt;10:59:00.079967 ARP, Request who-has rooter.home.lan tell PSthWii.home.lan, length 46&lt;br /&gt;10:59:00.178902 IP PSthWii.home.lan.52104 &amp;gt; 239.255.255.250.ssdp: UDP, length 223&lt;br /&gt;10:59:00.276588 IP PSthWii.home.lan.52104 &amp;gt; 239.255.255.250.ssdp: UDP, length 223&lt;br /&gt;10:59:08.117789 IP PSthWii.home.lan &amp;gt; 239.255.255.250: igmp v2 report 239.255.255.250&lt;br /&gt;10:59:15.317776 IP PSthWii.home.lan &amp;gt; 239.255.255.250: igmp v2 report 239.255.255.250&lt;br /&gt;10:59:37.882885 IP PSthWii.home.lan &amp;gt; 239.255.255.250: igmp leave 239.255.255.250&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;The first 8 lines are DHCP-related, then same IGMP query as before and same SSDP queries as before... And that's it!&lt;br /&gt;First guess: iptables doesn't allow the ssdp query to come in. Google tells me that SSDP port is 1900, so I add this entry to /etc/sysconfig/iptables:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;-A INPUT -i eth0 -s 192.168.0.0/24 -d 239.255.255.250 -m udp -p udp --dport 1900 -j ACCEPT&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;Turn on iptables and restart the PS3 - everything works :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;Note: binding to eth0 and LAN ("-s 192.168.0.0/24") is not 100%  necessary.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The only thing remaining is to make the NIC join the multicast group automatically. Simple enough -- add a file /etc/sysconfig/network-scripts/route-eth0 with these 3 lines in it:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;GATEWAY0=0.0.0.0&lt;br /&gt;NETMASK0=255.0.0.0&lt;br /&gt;ADDRESS0=239.0.0.0&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-5913663174677367849?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/5913663174677367849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/07/iptables-mythtv-ps3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/5913663174677367849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/5913663174677367849'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/07/iptables-mythtv-ps3.html' title='iptables + MythTV + PS3'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-2152628614305518547</id><published>2010-07-08T01:00:00.000-07:00</published><updated>2010-07-08T01:07:57.355-07:00</updated><title type='text'>Wine/Steam Oops</title><content type='html'>So apparently Steam requires Corefonts to be installed or it'll crash. How nice of wine to tell me abou.. wait a minute, it didn't!!&lt;br /&gt;Luckily there's &lt;a href="http://www.kegel.com/wine/winetricks"&gt;winetricks&lt;/a&gt; which warns you about it.&lt;br /&gt;&lt;br /&gt;P.S. crossover-games installs it semi-silently (you can see individual fonts installing, but there's no notice that says you need them). It also installs Flash and MS XML parser.. guess we don't need those so much :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-2152628614305518547?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/2152628614305518547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/07/winesteam-oops.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/2152628614305518547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/2152628614305518547'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/07/winesteam-oops.html' title='Wine/Steam Oops'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-4657324887006951213</id><published>2010-07-05T21:16:00.000-07:00</published><updated>2010-07-05T21:16:11.580-07:00</updated><title type='text'>MSS network problem: take 2</title><content type='html'>Well, the network problem is solved.&lt;br /&gt;The driver was really messy when it came to transmit queue. Tx interrupt handler guessed the current size of queue (and failed to restart it in some cases), while xmit tried going to hardware to check if the queue is full and stopped it left and right.&lt;br /&gt;And tx_timeout wasn't resetting everything (missed resetting the cur/dirty frame counters).&lt;br /&gt;&lt;br /&gt;Anyway, now it's halfway-working. I'm planning to add checksum offloading, vlans, all the good stuff from the solaris driver.&lt;br /&gt;&lt;br /&gt;But for now it's time to start using my MSS, it's been doing nothing but standing there for way too long.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-4657324887006951213?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/4657324887006951213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/07/mss-network-problem-take-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/4657324887006951213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/4657324887006951213'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/07/mss-network-problem-take-2.html' title='MSS network problem: take 2'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-6834251368116985277</id><published>2010-06-28T13:23:00.000-07:00</published><updated>2010-06-28T13:29:16.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='diagnostics'/><category scheme='http://www.blogger.com/atom/ns#' term='MSS'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>MSS network problem: take 1</title><content type='html'>So I got the RAID to work fine, but network interface refuses to cooperate.&lt;br /&gt;First of all, it takes a while to come up (few seconds, doesn't come up during boot for some reason). When it does come up, it's not very stable - last time I tried backing up with clonezilla to the MSS, it &lt;a href="https://bugzilla.kernel.org/show_bug.cgi?id=15614"&gt;copied over 20G and froze&lt;/a&gt; - the NIC refused to receive any more data until I reset it. It also &lt;a href="https://bugzilla.kernel.org/show_bug.cgi?id=16189"&gt;breaks when I run iperf&lt;/a&gt;.&lt;br /&gt;Unfortunately, kernel folk have no time for me, so I've decided to take matters into my own hands. Apparently there have been a number of bugs on sis190 driver, though most patches are already in. I haven't read through &lt;a href="https://bugzilla.kernel.org/show_bug.cgi?id=10694"&gt;this one&lt;/a&gt; yet, may have something good.&lt;br /&gt;Also, there's a &lt;a href="http://people.freebsd.org/%7Eyongari/sge/"&gt;FreeBSD driver&lt;/a&gt; that was based on Linux + OpenSolaris drivers - it claims to support vlans and hardware checksums (neither is supported in Linux driver), &lt;br /&gt;So far, I've determined that the error "ADDRCONF(NETDEV_UP): eth0: link is not ready" is from ipv6 implementation, so I've turned that off and the message is not there anymore... but interface still takes a while to come up, so it's not really a fix. I've traced through the driver somewhat and found where printouts happen.&lt;br /&gt;&lt;br /&gt;I will continue tracing through the code until I understand more or less how the damn thing works. On one hand, it's only 2000 lines, but then &lt;a href="http://underhanded.xcott.com/"&gt;You can hide a semi truck in 300 lines of C&lt;/a&gt; :)&lt;br /&gt;The rest of the plan so far is to "branch" the sis190 driver and build it as a &lt;a href="http://fedoraproject.org/wiki/Docs/CustomKernel#Building_Only_Kernel_Modules_.28Out_Of_Tree_Modules.29"&gt;custom driver&lt;/a&gt; while I debug. Hopefully it will be enough.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-6834251368116985277?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/6834251368116985277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/06/mss-network-problem-take-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/6834251368116985277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/6834251368116985277'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/06/mss-network-problem-take-1.html' title='MSS network problem: take 1'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-1169175997061714630</id><published>2010-06-11T23:34:00.000-07:00</published><updated>2010-06-11T23:34:56.087-07:00</updated><title type='text'>Yum troubles - oops!</title><content type='html'>Ran a yum update earlier today - it got frozen at "cleaning up" stage. So, I reboot and tell it to clean up after itself. Problem is, the dumb program erased the programs I've updated (apparently, "clean up" means "rm -rf" in RH python)&lt;br /&gt;&lt;br /&gt;When I realized what happened, an old story came to mind. Something about a mainframe where user ran something to the effect of 'rm -rf /' and had no backups to restore from. Thinking quickly, he did NOT reboot the server (most luser's first reaction to any problem) and tried to see what he could salvage, if anything. After an awesome hack with text editor (vi?), hacking together a program with some hex code, he was able to bring the system back to more or&amp;nbsp; less working condition.&lt;br /&gt;The key concept here is "Don't Panic!" (phrase popularized by HHGttG).&lt;br /&gt;&lt;br /&gt;So, anyway, I started looking around for what I can still do and/or salvage. No new programs could be started (including any command-line utilities like ls), but built-in shell commands (like echo) worked. The yum log mentioned a list of backed up files (e.g. /etc/shadow was renamed to /etc/shadow.rpmsave, and so on). I didn't remember if those appeared in /var/log/yum.log, so I decided to save it. I selected the text I wanted to save and checked that Clipman got it. Unfortunately, I had 'save on quit' turned off in it, and no way to re-enable (prefs start a new program). As my luck would have it, Firefox was still open and kind of working. I say "kind of" because the tabs &amp;amp; bookmarks lost their text, as did input fields on the pages - but I was able to [blindly] type in pastebin.com and open it up. From there, pasted in the log and specified my gmail addy. Verified that gmail got a copy of the link and finally decided to reboot.&lt;br /&gt;Now, at this point I was hoping it'd "just work," but already had a plan in mind - boot off a Fedora live CD, chroot &amp;amp; reinstall everything that was removed. Or, worst case, copy over the binaries from the live CD to get yum working.&lt;br /&gt;Guess what, I ended up having to do just that - chroot refused to work because ld-*.so was removed and bash refused to start. I copied it and some other libs over one by one (thankfully, the shell/program immediately complained specifically about which library was missing). Got yum working, installed keepassx in the live copy (needed to get at my password file with gmail password.. yes, I don't know it by heart :P), wrote a $0.02 script to list all packages 'erased' earlier today, and told yum to get reinstallin'. No problem, it didn't even have to download any of them (they were still in cache); meanwhile, copied the .rpmsave files (backed them up first) into their original locations.&lt;br /&gt;Lo and behold, the system works!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next, I'm planning to convert the FS to btrfs so I'd have checkpoints before any yum update (so this kind of shit won't happen again). Of course, I need to back up the existing data first, so I need to fix the MSS network interface.. but that's another story.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-1169175997061714630?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/1169175997061714630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/06/yum-troubles-oops.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/1169175997061714630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/1169175997061714630'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/06/yum-troubles-oops.html' title='Yum troubles - oops!'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-5875536303663966725</id><published>2010-02-15T00:42:00.000-08:00</published><updated>2010-02-15T00:43:56.454-08:00</updated><title type='text'>MSS LED problem: take 4</title><content type='html'>I think the burned MOSFET and LM258 (the IC right next to it) form a brightness control for the LEDs. LM258 is an amplifier, its output goes directly to the gate of AO3409.&amp;nbsp; Some IC must be sending the signal at low voltage, but the signal isn't making it through right now. 258's output is ~2-3V.&lt;br /&gt;The LM258 is pretty robust -- according to the spec sheet, you can even short the output (if &amp;lt;15V and temp 25C) to the ground for unlimited amount of time without making it burn out... Anyway, I tried shorting IN+ (pin 3) to the ground -- that caused 258 to output 0V and made front panel LEDs work until OS booted up. Shorting IN- (pin 2) to the ground didn't make front panel work, so I tried shorting it to IN+. That made 258's output 12V and the front panel LEDs started working. I then booted up to windows and tried the LED controls -- everything works except for brightness (which is of course stuck at high). It's probably a bad idea to short circuit the inputs like that, though. For all I know, maybe keeping the LEDs in the high brightness mode too long is why Q1 burned out in the first place.&lt;br /&gt;I've tried visually tracing where the signals to the 258 come from, but didn't find anything. I couldn't see traces under the 258, so I had to guess some of them - so that might've been the problem. Also, there might be multiple layers of traces, which is pretty common for motherboards.&lt;br /&gt;&lt;br /&gt;Anyway, at least it's partial success :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-5875536303663966725?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/5875536303663966725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/02/mss-take-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/5875536303663966725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/5875536303663966725'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/02/mss-take-4.html' title='MSS LED problem: take 4'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-4431669929394320371</id><published>2010-02-12T23:14:00.000-08:00</published><updated>2010-02-15T00:43:47.435-08:00</updated><title type='text'>MSS LED problem: take 3</title><content type='html'>&lt;style&gt;.bt {  font-size: 7pt;  -webkit-transform: rotate(-90deg);  -moz-transform: rotate(-90deg);  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);}&lt;/style&gt;&lt;br /&gt;Well, I installed the little bastard and still no lights :(&lt;br /&gt;The chip from Digikey is &lt;b&gt;AO3409&lt;/b&gt; and has markings &lt;b&gt;A9N̅A&lt;span class="bt"&gt;1H&lt;/span&gt;&lt;/b&gt;. The original chips had markings &lt;b&gt;340&lt;/b&gt; and &lt;b&gt;A91̲A&lt;span class="bt"&gt;2D&lt;/span&gt;&lt;/b&gt;.&lt;br /&gt;That's pretty close, and people say Jrock is a reliable source. I didn't overheat the mosfet while soldering, either. So that leaves me with "something else is broken"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Guess I'll have fun figuring that out&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-4431669929394320371?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/4431669929394320371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/02/mss-take-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/4431669929394320371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/4431669929394320371'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/02/mss-take-3.html' title='MSS LED problem: take 3'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-640576515148095063</id><published>2010-02-10T15:15:00.000-08:00</published><updated>2010-02-15T00:43:38.170-08:00</updated><title type='text'>MSS LED problem: take 2</title><content type='html'>User &lt;a href="http://www.mediasmartserver.net/forums/viewtopic.php?p=58549#p58549"&gt;Jrock found what the Q1 is&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;I have it from a reliable source that Q1 is a AO3409 P-Channel Enhancement Mode Field Effect Transistor.  Data sheet is here:&lt;br /&gt;&lt;br /&gt;&lt;a class="postlink" href="http://www.aosmd.com/pdfs/datasheet/AO3409.pdf"&gt;http://www.aosmd.com/pdfs/datasheet/AO3409.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Looks like it's in stock at Digikey too for about 51 cents :).&lt;/blockquote&gt;&lt;br /&gt;Ordered 25 of these from Digikey, will send some to other MSS users if they want to save on digikey shipping.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-640576515148095063?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/640576515148095063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/02/mss-take-2_10.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/640576515148095063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/640576515148095063'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/02/mss-take-2_10.html' title='MSS LED problem: take 2'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-526252695957947899</id><published>2010-02-01T14:18:00.000-08:00</published><updated>2010-02-07T21:37:24.013-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='repairs'/><category scheme='http://www.blogger.com/atom/ns#' term='MSS'/><title type='text'>Reminders for myself</title><content type='html'>MSS:&lt;br /&gt;* might not be a mosfet &lt;br /&gt;* check if the 3 circles around the 0 in 340 are a logo&lt;br /&gt;* check where the leads go, a sample diagram for nearby chips might provide extra info&lt;br /&gt;* motherboard is marked SJ-D4. According to CPU-Z, manufacturer is &lt;a href="http://www.wistron.com/"&gt;Wistron&lt;/a&gt;. Yet another marking says HannStar J MV-4 94V-0. eBay doesn't seem to have any replacements for it :(&lt;br /&gt;* Other users took a photo of their chips, one is marked &lt;a href="http://i46.tinypic.com/16k0tn8.jpg"&gt;340&lt;/a&gt;, and another &lt;a href="http://i50.tinypic.com/fwhg8n.jpg"&gt;A91A 2D&lt;/a&gt;. Still no idea what they are, but at least there's a better chance of finding out now. Asked on &lt;a href="http://www.edaboard.com/viewtopic.php?p=1234981"&gt;electronics board&lt;/a&gt; but so far it's about as effective as #electronics.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RFID:&lt;br /&gt;* found &lt;a class="postlink" href="http://maxmicrochip.com/"&gt;maxmicrochip.com&lt;/a&gt; -- might help figuring out how to read FECAVA chips&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-526252695957947899?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/526252695957947899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/02/mss-take-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/526252695957947899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/526252695957947899'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/02/mss-take-2.html' title='Reminders for myself'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-7898533600314880451</id><published>2010-02-01T14:12:00.000-08:00</published><updated>2010-02-01T14:19:10.445-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>Fedora: volume problem</title><content type='html'>Fedora 12 has a nifty (and by "nifty" I really mean "extremely annoying") feature -- it lets audio applications control the globally set volume. This means if you open a clip in mplayer, it turns the Master and PCM volumes all the way to maximum. And when you stop playback, they both go to 0. Fun, indeed.&lt;br /&gt;&lt;br /&gt;To disable it, edit /etc/pulse/daemon.conf, add this line and log out/in:&lt;br /&gt;&lt;blockquote&gt;&lt;pre wrap=""&gt;flat-volumes = no&lt;br /&gt;  &lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-7898533600314880451?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/7898533600314880451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/02/fedora-volume-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/7898533600314880451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/7898533600314880451'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/02/fedora-volume-problem.html' title='Fedora: volume problem'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-121876871980700554</id><published>2010-02-01T00:59:00.000-08:00</published><updated>2010-02-01T14:19:36.781-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='diagnostics'/><category scheme='http://www.blogger.com/atom/ns#' term='MSS'/><title type='text'>MediaSmart Server (MSS) project: take 1</title><content type='html'>MSS is a weird computer. It's built to run "Windows Home Server" which basically stores all users' files remotely like a NAS. Which is what I want to turn it into. Except I'll use Linux and make it run software RAID (probably RAID5). Win 2k3 only copies certain directories (you have to mark them) to multiple drives for redundancy, there's no RAID. Anyway, screw Windows :P&lt;br /&gt;&lt;br /&gt;I got it at Newegg a few months ago with a Rosewill eSATA extender - that makes for up to 8 hotpluggable SATA drives. The MSS was marked as "Recertified". Due to bundle discount and $50 refunded due to a wrong size HDD sent with MSS (should've been 500G, they sent 320G), the total came down to $300&lt;br /&gt;&lt;br /&gt;One thing about MSS is that it doesn't have an external VGA header. You have to open it up and make your own VGA cable (or buy one for something like $30). I of course chose to make my own, but that's not too interesting.&lt;br /&gt;Anyway, I started with installing Fedora 12 (it was beta/RC at the time). It didn't go too smoothly, unfortunately. Apparently it doesn't work unless the SATA bus is set to IDE mode, but I guess that's not all that big a deal. Video card drivers don't drive the video properly -- there's corruption on the X screen.. but then I didn't get this box for its video card.&lt;br /&gt;With a &lt;a href="http://www.mediasmartserver.net/forums/viewtopic.php?f=2&amp;amp;t=2335&amp;amp;p=30987#p30987"&gt;small C program&lt;/a&gt;, I got the HDD LED lights to work -- it was pretty sweet. I also eventually found the elusive* AMD 3800 X2 EE SFF (model ADD3800IAA5C) and &lt;a href="http://www.mediasmartserver.net/forums/viewtopic.php?p=10271&amp;amp;highlight=#p10271"&gt;got MSS to work with it&lt;/a&gt;. Then I booted it up (successfully) and thought I'd finally finish installing Fedora &amp;amp; setting up the drives. And then I noticed that the LED weren't working at all.&lt;br /&gt;&lt;br /&gt;I've tried re-flashing and switching back to the old chip -- no dice. Tried recovering 2k3 WHS -- also nothing. It appeared that the damn signal was being sent in reverse (what should've been ground was +5V compared to the other)&lt;br /&gt;Today, I thought I'd trace where the bad signal is coming from. Connected with multimeter, got polarity. Put the software in blinking mode and tried with the scope - not very interesting (it was going up and down only ~1V). Then for whatever reason I thought I'd connect the scope backwards (ground to what was supposed to be ground, instead of the alternative). That made MSS emit a high pitched faint noise. I said "huh" and replaced the LED connector. For some reason I thought I saw the LEDs flash quickly, so I replaced it a few more times. Then there was a click, burnt electronics smell and the LEDs lit up! Oops!&lt;br /&gt;&lt;br /&gt;I took out the mobo and literally followed my nose to find this little guy&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://i46.tinypic.com/14x2ema.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="234" src="http://i48.tinypic.com/2d0dv1f.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Interestingly, it was obviously fried but the LEDs worked. I took a few pictures and decided to solder it off the board. After that the LEDs don't work again.&lt;br /&gt;Now I'm trying to find what that chip might've been. &lt;a href="http://www.marsport.org.uk/smd/smd3.htm"&gt;This page&lt;/a&gt; says it might be Fairchild FDV340P (p-ch mosfet 20V 70 mA). I didn't find FDV340P on &lt;a href="http://fairchildsemi.com/"&gt;FairchildSemi&lt;/a&gt; (nor at &lt;a href="http://mouser.com/"&gt;Mouser&lt;/a&gt; and &lt;a href="http://digikey.com/"&gt;Digikey&lt;/a&gt;), but there's a FDN340P. No idea if that's the right part though.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* It's a very nice chip, actually. Only 35W but dual core and 3800+ rating. But because it's so nice, it's also hard to find (AMD doesn't make it anymore and most people buy it right away if listed on ebay)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-121876871980700554?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/121876871980700554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/02/mediasmart-server-project-take-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/121876871980700554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/121876871980700554'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/02/mediasmart-server-project-take-1.html' title='MediaSmart Server (MSS) project: take 1'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i48.tinypic.com/2d0dv1f_th.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-9037795826969966935</id><published>2010-01-31T15:18:00.000-08:00</published><updated>2010-01-31T15:19:39.667-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rfid'/><title type='text'>RFID: take 1</title><content type='html'>I was wondering if I could read my &lt;a href="http://www.24petwatch.com/rfid-microchips.asp"&gt;cat's RFID tag&lt;/a&gt; with an RFID reader. According to this &lt;a href="http://rfid.home.att.net/pet-chip.htm"&gt;pet ID info page&lt;/a&gt; and the actual number given to me, it should be &lt;b style="font-weight: normal;"&gt;FECAVA type chip which works at &lt;/b&gt;125 kHz&lt;b style="font-weight: normal;"&gt;.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The first reader I got was &lt;a href="http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/ProductID/114/List/1/Default.aspx?SortField=UnitCost,ProductName"&gt;parallax serial RFID reader&lt;/a&gt; (MakerShed, $40.. also got the P4 adapter and a free Maker Faire ticket :). Stupid mistake: didn't get a compatible card to test the reader. I thought I'd find something around the house to do that.. apparently it's not as easy as I thought. Reading the cat's tag didn't work, neither did trying to read some ID cards I had. Later I ordered a card from &lt;a href="http://www.sparkfun.com/"&gt;SparkFun&lt;/a&gt;. That worked great -- I saw the card ID in minicom.. but reading the cat's tag failed :(&lt;br /&gt;&lt;br /&gt;2nd reader I got from &lt;a href="http://www.seeedstudio.com/"&gt;SeeedStudio&lt;/a&gt; along with a small pack of cards (trying to not make the same mistake.. just in case reader wasn't compatible). Sadly, when I hooked it up I only got garbage on screen. After some &lt;a href="http://www.seeedstudio.com/forum/viewtopic.php?f=4&amp;amp;t=592"&gt;back and forth&lt;/a&gt;, I hooked the reader to my oscilloscope and saw that the output wasn't consistent with 9600 baud they advertised (for 9600, the bits should be about 100µs -- a.k.a. 0.1ms -- apart. Actual spikes were ~1ms apart). I then suspected that I got the Wiegand version of the reader (though I definitely ordered UART version). After reading the &lt;a href="http://www.seeedstudio.com/depot/datasheet/RDM630-Spec..pdf"&gt;datasheet&lt;/a&gt;, I saw that the pins labeled TX/RX for UART are labeled Data0/Data1. Wiegand version uses both to transmit data, UART can use either (RX is apparently inverse of TX). I hooked up the scope to both output pins and confirmed that the output looks like the Wiegand output from the doc.&lt;br /&gt;&lt;br /&gt;However, so far I haven't seen either reader react to my cat's chip. Guess using the same frequency isn't enough :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-9037795826969966935?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/9037795826969966935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/01/rfid-take-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/9037795826969966935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/9037795826969966935'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/01/rfid-take-1.html' title='RFID: take 1'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1596399328636038337.post-1342726264195136224</id><published>2010-01-30T21:49:00.000-08:00</published><updated>2010-02-01T14:26:38.120-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reprap'/><title type='text'>RepRap: take 1</title><content type='html'>&amp;nbsp; So I've decided to build a &lt;a href="http://reprap.org/"&gt;RepRap&lt;/a&gt;. After a little research, I decided that although Cupcake can get me up and running faster, RepRap would be a lot more fun since I get to build it myself.&lt;br /&gt;I thought for a while that I could get away with getting imperial-sized parts instead of metric as specified in the docs.. but then I realized how much of a pain that would be to adjust everything, including the printed parts. So the only things I got in imperial are threaded rods (and their matching nuts).&lt;br /&gt;&lt;br /&gt;For the bars, docs say "silver steel ground bars" are the best reasonable option -- US equivalent is apparently called "oil hardening drill rods". Got those and threaded rods (and some screws) from &lt;a href="http://wttool.com/"&gt;Wholesale Tool Co&lt;/a&gt; -- $44.99 (w/shipping+tax)&lt;br /&gt;&lt;br /&gt;Got a bunch of metric screws/nuts/washers at &lt;a href="http://fastener-warehouse.com/"&gt;Fastener Warehouse&lt;/a&gt;.&lt;br /&gt;*** WARNING*** : this is a shitty store, I had to wait 5 weeks to get 6 out of 8 items.. the other 2 are still "backordered".&amp;nbsp; No idea if I'll ever get them. $49.58&lt;br /&gt;&lt;br /&gt;Bearings came from &lt;a class="moz-txt-link-abbreviated" href="mailto:help@thebigbearingstore.com"&gt;The Big Bearing Store&lt;/a&gt;. I didn't expect them to be so expensive... but they were cheapest there. $76.37&lt;br /&gt;Update: &lt;a href="http://www.vxb.com/page/bearings/PROD/kit9060"&gt;VXB&lt;/a&gt; has a kit for $50&amp;nbsp; &lt;br /&gt;&lt;pre wrap=""&gt;&lt;/pre&gt;&lt;br /&gt;Got electronics at &lt;a href="http://store.makerbot.com/"&gt;MakerBot store&lt;/a&gt;. They're fun to solder but not all that much fun.. I just got the premade ones and the stepper motors. $255.15&lt;br /&gt;&lt;br /&gt;Total so far is ~$425. Not too bad, since official estimate is $520. Then again, I don't have the extruder and replicated parts yet.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For comms I thought I'd use the &lt;a href="http://www.1strecon.org/TheShoppe/pa/index.shtml#P4"&gt;P4 adapter&lt;/a&gt; I got from &lt;a href="http://makershed.com/"&gt;MakerShed&lt;/a&gt; along with unrelated items.&lt;br /&gt;&lt;br /&gt;When electronics came in, I tried &lt;a href="http://objects.reprap.org/wiki/Testing_RepRap_Electronics"&gt;testing the motherboard&lt;/a&gt;. Didn't get the proper reply with P4 so I checked the &lt;a href="http://objects.reprap.org/wiki/Mendel_USB_and_power_connector"&gt;USB connector page&lt;/a&gt; and saw that it uses CTS and RTS. Since P4 only has DTR, I assumed it wouldn't work and moved on. My next available choice was the Bus Pirate (I have a v2go). I contacted the author and asked him to add CTS/RTS. He did that (really quickly, might I add!) and I tried again -- no dice :(&lt;br /&gt;&lt;br /&gt;Yesterday I finally found some time to sit down and check things out. Thanks to the helpful folk in #reprap@irc.freenode.net, I finally figured out that the firmware for Cupcake CNC is different from RepRap firmware. Thus began the saga of trying to &lt;a href="http://objects.reprap.org/wiki/Microcontroller_firmware_installation"&gt;get the  firmware onto the mobo&lt;/a&gt;. The part that kept failing was uploading firmware. The guys on #reprap told me to keep trying reset with different timings -- did that for a while, but to no avail. At some point I noticed that it was reporting a bad byte -- either 0x48 or 0x52. When looking at the output in minicom I realized why -- Cupcake sends &lt;span style="font-size: small;"&gt;"R3G Master v106" at startup and &lt;/span&gt;&lt;span style="font-size: small;"&gt;"Host timeout" on any other simple input (space, enter, etc.).&lt;/span&gt;&lt;br /&gt;Things learned:&lt;br /&gt;# Cupcake firmware runs the serial comms at 38400 baud. RepRap uses 19200 &lt;br /&gt;# Setting the &lt;a href="http://dev.www.reprap.org/bin/view/Main/Motherboard_1_2#6_pin_serial_header"&gt;autoreset jumper&lt;/a&gt;*&amp;nbsp; is NOT enough. Apparently, sanguino (which is what the RepRap motherboard basically is) expects the reset signal to be sent through a special pin (which I left unconnected with P4 at first). Luckily, P4 &lt;a href="http://www.wulfden.org/TheShoppe/freeduino/rcsang/rcsang1.shtml"&gt;supports the autoreset feature&lt;/a&gt; on sanguino quite well -- just connect the RT (a.k.a. RST, a.k.a. DTR) pin on P4 to GRN (a.k.a. RTS) pin on the motherboard.&lt;br /&gt;* Note: the autoreset leads don't come with cupcake version, I soldered them in on mine. They're labeled, though.&lt;br /&gt;# Cupcake firmware doesn't even have the same bootloader as the RepRap (as far as I can tell, RepRap uses plain sanguino bootloader). As far as I can tell, you can't flash RepRap firmware directly onto the Cupcake mobo.&lt;br /&gt;&lt;br /&gt;I've decided to re-flash the bootloader with the only method available to me -- the Bus Pirate. It's &lt;a href="http://hintshop.ludvig.co.nz/show/buspirate-avr-programming/"&gt;amazingly easy&lt;/a&gt;.. the hardest part was getting the BP hook leads to connect to the &lt;a href="http://dev.www.reprap.org/bin/view/Main/Motherboard_1_2#ICSP_Header"&gt;ICSP&lt;/a&gt; &lt;a href="http://www.flickr.com/photos/hoeken/3527845382/sizes/o/"&gt;connector&lt;/a&gt; (I didn't have a 6-pin female connector readily available so I crammed them in there :). Note, though -- I installed avrdude 5.8 from Fedora repos and it didn't support Bus Pirate. Looking at timestamps, I think 5.10 is the earliest version that supports it.&lt;br /&gt;I don't think I needed the mobo to be on for this, but it seemed to work ok. Command used:&lt;br /&gt;&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;avrdude -p m644p -c buspirate -P /dev/ttyUSB0 -U flash:w:ATmegaBOOT_644P.hex&lt;/blockquote&gt;&lt;br /&gt;Next step was to get the actual code onto the motherboard. Another snag -- software kept saying connection timed out. Apparently the bootloader didn't power on the PSU -- but I was powering the P4 from it.. oops!&lt;br /&gt;Shorted the right pins in the PSU to turn it on, ran the update program... and it worked! I was afraid for a while because the red LED (debug) kept blinking for a long time and the arduino proggy didn't say "&lt;i&gt;Done uploading&lt;/i&gt;". On the other hand, the LED was blinking consistently at ~2Hz unlike at the beginning of the process -- apparently that's the &lt;a href="http://objects.reprap.org/wiki/Microcontroller_firmware_installation#Uploading"&gt;RepRap program running on the mobo&lt;/a&gt;. I had to powercycle the PSU before I saw something in minicom.&lt;br /&gt;&lt;br /&gt;And that's how far I got so far.&lt;br /&gt;Update: mobo tested perfectly.&lt;br /&gt;WOOHOO!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1596399328636038337-1342726264195136224?l=blag.fixplz.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blag.fixplz.com/feeds/1342726264195136224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blag.fixplz.com/2010/01/reprap-take-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/1342726264195136224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1596399328636038337/posts/default/1342726264195136224'/><link rel='alternate' type='text/html' href='http://blag.fixplz.com/2010/01/reprap-take-1.html' title='RepRap: take 1'/><author><name>Fry-kun</name><uri>http://www.blogger.com/profile/08349143263285529863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
