Linux sysadmin woes. You get it free with the collection of duct tape scripts: http://zwizwa.be/darcs/pool Entry: object channels Date: Tue Apr 4 20:08:39 CEST 2006.... I ran into this problem today: suppose you are given a single channel connected to a remote process. You can choose what that process is, but the connection is a simple pipe. How to make sure they can communicate objects bidirectionally in a synchronous way? They should be able to communicate anything, and you are only allowed to solve the problem once. This looks like what all the XML fuss is about. But it seems easier to me to solve it with s expressions. Mostly because packet forth and emacs are able to read and write them. The only real problem is to make sure strings can accomodate any binary data, and to make sure they are quoted properly. The rest is optimization. Symbols can be made to work, i.e. there has to be a protocol anyway. The (toy) problem here is the following: i want to tunnel a connection to emacs on a remote host over a ssh link. Let's call SERVER the machine which has emacs running, and CLIENT the one wanting to use it. The story goes like this: A) client opens secure channel B) client passes data to server C) server passes data to emacs D) server waits for editing to finish E) server returns edited file to client F) client closes secure channel Using gnuserv i can pass arbitrary expressions to emacs directly. In principle the client could talk to a gnuclient instance and just evaluate an expression. What should this be? A) client opens secure channel: ssh SERVER gnuclient -batch B) client passes data to server: (edit "blabla") C) server evaluates command, which creates a buffer with "blabla" D) user gives signal: (done) after "blabla" -> "boeboe" E) this makes the expression in (B) evaluate to "boeboe" F) client closes channel The nice thing would be to reuse the connect and perform B-E multiple times. So this is really nothing more than your standard client/server model, only with s expressions. Entry: simpler channels Date: Fri Apr 7 00:28:53 CEST 2006 Now that my confidence is built, let's make it a bit simpler. It all works fine, except for some gnuserv/unicode troubles, so lets take it out of the loop. It would be easier to just start a program from within emacs, which logs into a remote host, and starts a channel server there. Then the only hairy thing is the output filter and protocol, since we can't make emacs block on read, we need to delimit the atoms. Currently we have 3 scheme programs and gnuserv, this should be limited to 2 scheme programs (client-server) So it is possible to read without delims, using: (condition-case oops (read-from-string "(1 2 3") (error oops)) Entry: channels end Date: Sun Apr 9 11:56:18 CEST 2006 It all seems to work rather nicely with: * emacs-channel.el spawns server (through ssh) * channel-unix.scm interfaces stream to unix domain server * channel-unix-emacs.scm message based client The idea is that the channel-unix.scm program keeps the connection to emacs open, but accepts single expressions on a unix socket. The connection to emacs can be tunneled over any stream connection. This allows internet encryption/security to be offloaded to ssh (just start the server remotely from within emacs), and local host security to unix permissions. Entry: mobility Date: Mon Apr 24 22:34:13 CEST 2006 What i need is something which tells running processes at which terminal i am, wether i'm running emacs, wether i'm running X, etc.. Some features: * migrate mutt -> emacs if emacs running * kill emacs channel if current terminal does not have emacs * emacs channel testing: some cases it gets messed up * migrate emacs session?? * migrate firefox session?? i.e. an agent. Entry: network agent Date: Wed Apr 26 19:31:47 CEST 2006 Currently i'm experiencing problems due to the different string formats in emacs and guile. I can patch around this probably, but the easiest thing might be just to communicate between emacs and guile using files, like the original emacs-client approach, with guile on both sides of the channels. It might be easiest to combine all this with the network agent idea stated above. Here's a second iteration: I need an agent to solve roaming problems. Basically, present a single unified interface to a collection of machines, from a collection of terminals. some requirements: (1) every program on every machine can connect to agent (2) agent can locate owner (host / terminal) (3) agent can locate resources (4) agent can synchronize resources ingredients: - guile (1) - emacs (2) - screen (2) - ssh (1) - darcs (4) - mutt (3) - evilwm (2) Entry: databases Date: Fri Jul 14 18:24:40 CEST 2006 more computers, more problems to glue it all together. i seem to be converging to the following tools: * code in darcs, including scripts and config * compiling config files my current problem is managing mac addresses for all sorts of things. i need some database and maybe it's time now to start using the filesystem as a database with lots of small files, following reiser's ideas a bit. this maps easily to scheme code, and i already use it in CAT, which has 3 directories: code (ro), state (persistent rw) and current (working memory). one thing to find out is how to use emacs to edit/navigate a tree of small files. hmm... reading http://www.namesys.com/whitepaper.html it seems to be about a lot more than making small files work fast :) 3 classes of organization - hierarchical - relational - semantical (keywords) anyways, small files solve my particular problem as they serve as a unifying syntax for variables in scripts. making them map better to the language (scheme or CAT) makes things easier to use, since parsing and ad-hoc syntax can be largely eliminated. i'm not sure how to implement invertable relations though. in databases, this is implemented by explicitly storing both directions in tables. for the DNS problem, i have projective maps from names to unique-name/ip/mac, where i should be able to relate all 3 components to each other. Entry: bsd Date: Mon Aug 21 22:47:16 CEST 2006 nice system. managed to compile a kernel from linux. really works like a charm. took a bit to figure out the driver system, but it seems very clean indeed. kernel is about 2M on 32M MMX laptop. installed openbsd on the sparc64 last weekend. read this interview with deraadt about him starting his day by picking a random piece in the code, read it, and improve it. maybe it's a good idea to start doing that same practice. Entry: net booting Date: Tue Aug 22 22:52:34 CEST 2006 netbsd: only config issue linux: initrd? Entry: 1GIG flash Date: Tue Aug 22 22:54:43 CEST 2006 wat? * freedos in hda1 + grub in hda + puredyne dist? * linux swap Entry: pd font Date: Thu Aug 31 05:34:25 CEST 2006 font create defaultFont -family terminus -size 10 option add *font defaultFont Entry: xbox Date: Mon Sep 4 02:55:24 CEST 2006 messed up the xbox again.. copied xromwell.xbe -> default.xbe like stuff on the net said, while i though it should have been xboxdash.xbe so... hotswap trick again. this time, using old zwizwa. k6-2 (or k6)? kernel probably doesn't work with xbox disk + old disks slow and noisy, so i want to boot it over network. 2.6 kernel i have doesnt work, so building a new one on daddies machine. dus zit ik weer naar scrollende scherpjes te staren! reden om xbox naar de kloten te helpen is natuurlijk dat ik nie veel aan de kernel kan verandere.. ouwe boot methode is klote, want als er iets misloopt moet ik toch hotswappen. dus cromwell gebruikt. ben eens benieuwd deze keer. blijkbaar is 2.6.16 kernel niet stabiel voor xbox? een hoop waarschuwingen ivm FATX. in de 2.4.32 komen die niet voor. vraag ik me wel af of die netwerkdrivers dan gaan werken.. het lijkt alsof het allemaal weer voor niks is geweest.. yep: http://www.xbox-linux.org/wiki/Nl/Status "De FatX driver aanpassen in de Linux 2.6 tree. Het gebruik van FatX met Linux 2.6 kan leiden tot problemen in het bestandssysteem" Entry: ip over dns Date: Sat Oct 28 16:42:04 EDT 2006 lijkt redelijk te lukken met iodine. nstx is te buggy. ik zou nu zwizwa willen configureren zodat van buiten af die dns brug werkt met een of ander veiligheidsmechanisme (port knocking?). ik snap alleen nie goe hoe ik moet forwarden van een poort van host naar een andere. dan om een of andere reden werkt poort 5353 nie? huh? ik weet niet waarom, maar nu werkt het wel. 5353 is itunes, misschien was er iets mis met mn internet connectie vorige keer. anyways, iodine aangepast en het werkt prima. probleem van authenticatie lijkt me best opgelost met openvpn of gewoon ssh. er zijn voorbeelden van ppp over een tunnel, of ppp over een ssh tunnel. openvpn lost eigenlijk alles op, in combinatie met iptables op de dns tunnel interface. Entry: wireless repeaters : WDS Date: Wed Nov 1 13:09:07 EST 2006 using wireless repeaters? check http://wiki.openwrt.org/OpenWrtDocs/Configuration werkt netjes. gedaan met kabelkes. werkt met bridging.. routing zou ook moeten werken. inderdaad, it does. dus, wds is gewoon een ptp link tusses basisstations, die in de router in linux weergegeven wordt als een extra interface. de eth1 (wireless) en wds0.* virtuele interfaces delen de fysische link. het kanaal moet natuurlijk hetzelfde zijn, omdat kanaal een eigenschap is van de RF tuner, niet van het digitale kanaal. waarschijnlijk kan dat niet zomaar snel geschakeld worden. Entry: getting rid of bind9 Date: Wed Nov 1 15:57:09 EST 2006 tschijnt is djbdns veel beter dan bind. tis opgesplitst in 2 delen: - tinydns : UDP authorative name server - dnscache : recursive dns cache (/etc/resolv.conf) ik vraag me af of ik wel een .i domain kan maken op die manier, zonder een root server te faken? Entry: structured ipchains programming Date: Sat Nov 4 15:29:28 EST 2006 extra chains zijn eigenlijk gewoon subroutines. dus ik kan hier beter gebruik van maken de volgende keer dat ik nog eens achter een zwizwa of zzz terminal zit. op't moment ist een beetje messy. lijkt goed te werken op del. Entry: network roaming Date: Sun Nov 5 19:37:28 EST 2006 misschien is het beter om een soort daemon te draaien die mn internet connectiviteit op houdt. ik ben het een beetje beu om dat telkens manueel te doen en openvpn/dhclient/... te herstarten. dit is de truuk: iwlist $1 scanning |grep Address|awk '{print $5}'|sed s/://g met een paar scripts die dan op basis van base station mac address een script runnen. Entry: nslu2 Date: Thu Nov 9 20:44:12 EST 2006 als ik er een kan vinden voor 50$ dan denk ik wel dak em koop. 233Mhz XScale (arm) met 32MB ram en 8MB flash. dat is 2X linksys WRT54G. met 2 usb poorten en 1 bidirectionele seriele poort. in vergelijking met die asus wg-700le is dit ongeveer dezelfde prijs als ge der een harde schijf bij denkt. Entry: basix msx fpga Date: Wed Nov 15 11:53:21 EST 2006 nadeel: - kost 200 euro - is 'maar' een msx voordeel: - volledig programmeerbaar - volledige source code beschikbaar - goede leer investering ik ken niks over de fpga, misschien moet ik dat maar eens bekijken? Altera Cyclone EP1C12Q240C8N FPGA chip. 20k gates. kost 1 dollar in volume. dat moet goedkoper kunnen. misschien eerst bordjes en SMD doen, dit is te duur. zoiets lijkt me veel interessanter: http://www.enterpoint.co.uk/moelbryn/raggedstone1.html Entry: zwizwa && zzz firewall fixes Date: Sat Nov 18 19:22:15 EST 2006 best om een paar chains te maken. ik weet nu hoe dat moet. en ivm. de toegankelijkheid zwizwa.l over wifi zonder tunnel: dat maakt niet uit: de dns naam is beveiliging genoeg. dan moet ie al gesnift worden. Entry: dnsmasq Date: Sun Nov 26 11:50:48 EST 2006 what about this: replace both bind9 and dhcp3-server with something simpler: dnsmasq configured per interface, serving of a generated hosts and ether file. run it chrooted. boot files and other things can be added to the command using --dhcp-option EDIT: Sun Dec 10 20:35:46 CET 2006 Dus wat ik hier wil doen is hetvolgende: * simpelere dns/dhcp backend * eigen programma dat dns truuken doet implementatie: * daemon in scheme * update = hercompileer config + start dnsmasq ok.. lijkt grotendeels te werken. problemen: * ether -> ip koppeling per netwerk (of config file genereren) DONE * runit + logger DONE * generate openvpn configs (zie oude file) DONE * speciale dhcp options -> alst nodig is Entry: openvpn UDP + tap interface Date: Mon Dec 11 00:01:49 CET 2006 in that case, it's possible to just use dhcp.. nie? ja, maar dit maakt echt niet veel uit. ik moet toch config files maken. Entry: INPUT vs FORWARD Date: Mon Dec 11 20:02:02 CET 2006 als ik vanuit net 13 naar 15 ssh dan lukt dat... blijkbaar telt dat niet als forward. ok. kan ik mee leven. maar als ik een sessie open zonder openvpn en dan openvpn start, loopt het mis. routes? dit is waarschijnlijk een probleem met firewall connection tracking. misschien is het best om die interface onbereikbaar te maken om dat soort problemen ongedaan te maken. wacht: het probleem licht mischien eerder bij de ip stack: alles gaat over een andere interface. dat is gemakkelijk te testen door de firewall af te zetten. inderdaad: met firewall af geeft het nog altijd problemen. Entry: upload cap Date: Tue Dec 12 15:09:44 CET 2006 ik moet een manier verzinnen om op zwizwa en zzz de upload bandbreedte te beperken zodat backups and downloads niet alles in de war sturen. Entry: ssh port forwarding with ip address mapping Date: Wed Dec 13 20:34:10 CET 2006 1. enable port forwarding on the target host like this: ssh -NR 22001:localhost:22 tom@forward.host 2. make sure forward.host:/etc/ssh/sshd_config contains the line GatewayPorts yes 3. add a firewall rule on forward.host iptables -t nat -A PREROUTING -p tcp -d 10.22.0.1 --dport 22 -j REDIRECT --to-port 22001 4. on any host on the network, do this to log in ssh user@10.22.0.1 don't know how to fix this for host outgoing though.. Entry: vpn connect Date: Wed Dec 20 14:52:49 CET 2006 now using i.vpn-host.net (freedns.afraid.org) to point to zwizwa.h1x.com this is overridden in the local DNS to point to local vpn host. (zzz/zwizwa) Entry: emacs in terminal Date: Fri Dec 22 23:37:37 CET 2006 trying to figure out how to make emacs run better in a terminal window. current problems: * character sets (utf8?) * colors? the X colors are nicer, 24bit * some keys don't work (meta is different) Entry: networking Date: Sat Dec 16 01:01:32 CET 2006 still to do: roaming. whenever one of the roaming computers registers through dhcp or openvpn, it's ip should be broadcast. this can also happen manually. probably easiest. Entry: sniffing Date: Wed Dec 20 15:29:51 CET 2006 10.91.143.132 ?? (00:04:23:58:60:7d) 9-mar-1979 23:00 Lanciano Italy Entry: emacs22 Date: Sat Dec 23 03:58:46 CET 2006 samen met dtach = perfect roaming systeem. misschien interessant om het effe te gebruiken in terminal zodat ik term en X wat kan effenen. problems: - f11 / f12 - meta confusion? esc-map op del, maar Meta op zzz? Entry: emacs recap Date: Sat Dec 23 22:42:36 CET 2006 * getting rid of emacs channel stuff -> use client + tramp * ALT + righthand for cursor navigation C-x C-p mark-page ( C-x C-p C-w = clear buffer ) C-x k kill-buffer Entry: qemu Date: Sun Dec 24 01:14:12 CET 2006 tis fijn voor't testen van minimal images en netbsd, maar ik ben ook alweer vergeten waarom ik netbsd zou gebruiken, buiten het feit dat het leuk draait op oude pentium mmx laptop: ** qemu vde (zless /usr/share/doc/vde/README.Debian.gz) ** qemu -> netbsd minimal boot + x Entry: distributed filesystem Date: Tue Dec 26 13:31:39 CET 2006 eigenlijk wil ik gewoon een redundant filesysteem voor mn emails: tom@goto10.org en tom@zzz.kotnet.org -> elk hun eigen delivery systeem om downtime van de servers te vermijden, maar ieder moet wel een gemeenschappelijke store gebruiken voor email archief. meer algemeen: hoe kan ik een gedistribueerd systeem maken dat werkt over rsync? ik had gedacht aan bestanden te indexeren via hun MD5 sum, en daanaast een tree van symlinks te maken. -> gemakkelijk te updaten: alle bestanden die in de tree staan en geen link zijn: maak MD5 sum , verplaats naar pool en vervang door link -> gemakkelijk backups te maken. -> botsingen zijn dezelfde files -> gemakkelijk te hersynchroniseren -> kompatiebel met alle programmas die werken met directorystructuur en geen files verplaatsen. Entry: routing Date: Tue Dec 26 23:11:09 CET 2006 ben eens aan't denken.. waarom maak ik geen 'personal area network' voor mijn laptop, en probeer het routing probleem op te lossen met standaard routing tools? bv: 12-15 zwizwa site (lan/wifi/vpn) 16-19 zzz site (lan/wifi/vpn) 20 azrael (roeland wifi/lan) 21 gargamel (ben wifi/lan) 22 del (pan) bv.. 20.* is pan netwerk van del laptop, gimplementeerd als ethernet bridge, met del als router 20.254 -- de route naar 20.254 hang af van lan/wifi/vpn connectie : mogelijkheden: interne lans, vpn via zwizwa/zzz site of wireless Entry: vpn tap stuff Date: Wed Dec 27 20:23:40 CET 2006 -> zwizwa udp vpn is nu tap -> zzz-zwizwa tunnel vervangen door zzz -> zwizwa udp tap vpn -> zzz maakt tcp tunnel voor 22 poort via /var/service Entry: routing ospf / bgp Date: Wed Dec 27 22:29:28 CET 2006 ospf: gebruikt backbone netwerk voor router info propagatie, en maakt een minimal spanning tree (dijkstra algo) uit topologie beschrijving. bgp: decentralized, core internet routing protocol rip: obsolete maar simpel? hoe toepassen op i roaming probleem? backbone = vpn connectie naar zwizwa.h1x.com locale link = vpn.i Entry: tunnel + congestion Date: Fri Dec 29 02:49:57 CET 2006 probleem is: * UDP en congestion gaat nie goed samen * TCP over TCP is nie ok openvpn is een packet level VPN. is het mogelijk om een deel om te zetten naar een stream level VPN? ssh heeft al goed werkende stream vpn. is het mogelijk zoiets transparant te doen? komt neer op: 1. router ziet nieuwe tcp connectie naar buiten 2. opent een stream level proxy over een reliable channel 3. redirect alle verkeer naar x naar de locale proxy Entry: vlans Date: Sun Dec 31 01:01:22 CET 2006 alternatief voor vtun? (ethernet over UDP) ethernet over ethernet? (vlan?) -> ik snap niet goed hoe dit werkt als de linksys router zelf al vlans gebruikt voor de verschillende poorten. ethernet over IP -> zowiso een kernel ding.. niks gevonden. waarschijnlijk not worth the trouble. Entry: kphone Date: Mon Jan 1 03:34:48 CET 2007 cool stuff. most coolness in: - STUN - external application * SIP *** registrar: central 'where is he?' (zwizwa) *** route/proxy servers: divert traffic *** signalling (sip) / media (mgcp: create/modify/delete connection) *** media: rtp *** sip for generic connections: firewall piercing *** asterix (sip <-> pstn) *** media gateway controller? *** protocol: http-like / UDP *** server: libosip / exosip *** client: kphone / linphone Entry: socat ontdekt Date: Tue Jan 9 01:06:32 CET 2007 # convert CR -> NL for read/write socat - /dev/ttyUSB0,raw,cr,ixon=1,b38400,echo=0 # this uses the termios ignore cr on input in addition socat - /dev/ttyUSB0,raw,echo=0,cr,igncr=1,ixon=1,b38400 Entry: routing en vpn Date: Thu Jan 18 15:14:32 GMT 2007 af en toe loopt het nog mis. dingen die ik eens degelijk moet oplossen: * vpn starten of niet? hangt niet enkel af van interface, maar van netwerk * vpn en quagga interferentie * meer optimale routing, ipv enkel hop gebaseerd. Entry: zwizwa name server trouble Date: Sat Jan 20 17:24:34 GMT 2007 i think i found it: /var/log/messages Jan 19 21:35:52 zwizwa pppd[2430]: LCP terminated by peer Jan 19 21:35:52 zwizwa pppd[2430]: Connect time 2159.9 minutes. Jan 19 21:35:52 zwizwa pppd[2430]: Sent 66615753 bytes, received 115497447 bytes. Jan 19 21:35:55 zwizwa pppd[2430]: Connection terminated. Jan 19 21:35:55 zwizwa pppd[2430]: Modem hangup Jan 19 21:35:59 zwizwa pppd[2430]: Hangup (SIGHUP) Jan 19 21:35:59 zwizwa pppd[2430]: Serial connection established. Jan 19 21:35:59 zwizwa pppd[2430]: Using interface ppp0 Jan 19 21:35:59 zwizwa pppd[2430]: Connect: ppp0 <--> /dev/pts/1 Jan 19 21:36:01 zwizwa pppd[2430]: PAP authentication succeeded Jan 19 21:36:02 zwizwa pppd[2430]: local IP address 80.200.51.247 Jan 19 21:36:02 zwizwa pppd[2430]: remote IP address 80.200.51.1 /var/log/openvpn/10.70.60.log Fri Jan 19 21:36:56 2007 RESOLVE: Cannot resolve host address: goto10.org: [TRY_AGAIN] A temporary error occurred on an authoritative name server. zwizwa valt nog steeds uit.. 23 jan 2007 18:00 net skype gebruikt, maar dns verkeerd... misschien moet ik eens proberen bepaalde dingen in IP te hardcoden, als dit gewoon een dns probleem is. enkel www.changeip.com moet toegankelijk zijn. misschien overschakelen op iets anders? de ping test misschien ook.. nodig: - dns moet robuust gemaakt worden: het is niet toegelaten om zonder dns te vallen. - adsl restart onafhanklijk van dns - mail onafhankelijk van dns? de dingen hierboven zijn geimplementeerd. 2 daemons: check-ppp en check-dns. de laatste checkt of publieke dns werkt (if not restart dnsmasq) en of publiek en locaal gelijk zijn (if not updatedns). ik vraag me af of dnsmasq restart wel genoeg is.. Entry: network connect Date: Sun Jan 28 11:32:26 GMT 2007 i should automate this.. needed functionality: * choose between wireless and wired * start / restart openvpn if necessary Entry: la fonera WPA Date: Wed Mar 7 07:49:31 EST 2007 trying to get WPA working on debian.. looks like i'm missing some kernel extensions. i don't really understand how it works.. wpa_supplicant daemon et all. i prefer to just have an open network really, but if i can get it to work without too much trouble, why not.. ok. that was easy. just some driver missing. now to integrate it with previous /etc/wifi stuff ok.. was easy too. Entry: new toy Date: Fri Mar 9 16:50:17 EST 2007 i want a new toy! looking fore some NAS device. either a maxtor shared storage, or a simpletech simpleshare. the latter has 8MB flash and a JTAG port in case one messes up the firmware. it has a simple 2-image TRX firmware. the maxtor has 2MB flash and a 2-stage boot: small image in flash and larger image on harddisk. it might be nice to keep things separate from HD. the simpletech should run openwrt too, wich might be a better choice. i don't really have time to muck with this too much, but it might be interesting as an exercise in 'how not to shoot yourself in the foot'. Entry: hacking la fonera Date: Fri Mar 9 21:41:37 EST 2007 after reset i have 0.7.0.r4, guess i'm lucky :) Entry: weller soldering irons Date: Sat Mar 10 10:33:52 EST 2007 there's only weller.. WESD51/WES51 TC. F/C selectable. *D = 220V. EC4001 oud model, TC, digital WTCPT closed loop, fixed temperature tip WDS81 discontinued -> WD1000. probably too much. WES51 $100 + $7 -> $73 + $7 WESD51 $140 + $7 Entry: broke fonera dnsmasq Date: Mon Mar 19 20:28:16 EDT 2007 something broke, and i don't really know what exactly i changed.. some bug in dnsmasq pops up: i get query refused. if i start it with -d, everything works ok.. maybe i should have a look at how it really works hmm.. ok. i found it using 'logread' :) the /etc directory had permissions 700, which i thought was necessary for dropbear, but apparently it's not.. changed back to 755 because dnsmasq needs it (runs as nobody) Entry: lansing net Date: Tue Mar 20 12:25:50 EDT 2007 * freggle: wifi client + openvpn + firewall * simple: in 'dmz' * fonera: dns freggle masq -> vpn, so routes do not need to be broadcasted. i can't get nfs mounting to work. what's new... going to switch to ssh only. then install mipsel debian. got it running as a chroot /disk switched root dropbear to 2222, shared key with debian on /disk, and starting debian sshd on 22, after mounting /proc and /dev/pts Entry: distributed filesystems Date: Wed Mar 21 12:01:45 EDT 2007 looks like there is really no ready-made solution. what i want is something that works a bit like 'darcs': - archives are completely distributed and self-contained (cache and backup) - transaction based: all 'editing' changes are propagated. - deleted files are not retained: no editing history - separate directory tree and storage pool - file aliases basicly this is rsync, but with poper 'merging'. in rsync, there is always a master. so what about these paths: 1. rsync with proper merge 2. darcs with symlinks and a data pool my orginal idea of putting the directory tree in a darcs file, and using a pool with MD5 hash names isn't so bad really. the tree could really be an s-expression, and a copying garbage collector should work just fine (between pool directories). elements - fuse for interface - scheme for handling the internal representation + daemon - rsync for transferring pools everything seems technically feasible, except for the 'merge' idea. AFS seems really heavy, and is client/server. this seems close: http://wiki.apache.org/nutch/NutchDistributedFileSystem let's have a go at this: 1. all operations on the store need to be serialized 2. nodes can perform operations in parallel 3. the merger needs to handle conflicts the operations are: * add file * change file properties (permissions / name) * delete file what about hard linked pool? and sync only the pool? hard links are better because they are not directional. it would be really nice to have standard representation. something that can easily be tranferred to non-managed space, and also easy to debug and regenerate.. so file tree <--> pool + file log (md5 + path) this is for another time. don't have enough context in my head for it.. would be a nice opportunity to give scheme shell a try though. Entry: dvd ripping Date: Thu Mar 22 13:17:42 EDT 2007 dvdbackup -i /dev/dvd -M -o where_to_save for naked lunch i had to "mplayer -aid 128". by default it took 129 which was a voice over narrative. probably best to have -o be the toplevel rip directory (dir containing ripped cds) and set the title with -n in case of multiple disks (naked lunch was named the same) something like dvdbackup -i /dev/dvd -M -o /data/dvdbackup -n Entry: bidir udp Date: Sat Mar 24 18:40:25 EDT 2007 2 ends / symmetric socat - UDP4:localhost:11111,sourceport=22222 socat - UDP4:localhost:22222,sourceport=11111 that seems to work ok, now using firewalls A FW_A FW_B B using firewall doesnt work.. the thing to know is how ports are mapped. assuming this is just copied apparently doesnt work.. if it is known then A -> FW_B and B -> FW_A see http://www.gotroot.com/tiki-view_blog_post.php?blogId=2&postId=4 Entry: scheme shell on openwrt Date: Tue Mar 27 17:42:50 EDT 2007 i managed to finally compile it, using a native compiler from http://uclibc.org/FAQ.html#dev_systems apparently, scsh/scheme48 doesn't like cross compilation, since it uses the generated image to perform further compilation. the debian uclibc-toolchain wrapper seems to be broken too. i tried this on mipsel debian (and i386). the only problem i have left is that the versions don't match. currently i just use another root fs, but that's not very elegant. Entry: mencoder Date: Mon Apr 2 12:04:46 EDT 2007 cd /data/mencoder ln -s .../*.VOB . then delete all unwanted VOBS mencoder -vf crop=:460 -ovc frameno -oac mp3lame -lameopts vbr=3 -o frameno.avi -mpegopts format=dvd VTS_01*VOB 2>&1 -> ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Recommended video bitrate for 650MB CD: 903 Recommended video bitrate for 700MB CD: 981 Recommended video bitrate for 800MB CD: 1138 Recommended video bitrate for 2 x 650MB CD: 1923 Recommended video bitrate for 2 x 700MB CD: 2080 Recommended video bitrate for 2 x 800MB CD: 2394 Video stream: 0.767 kbit/s (95 bps) size: 512744 bytes 5344.845 secs 128188 frames Audio stream: 102.225 kbit/s (12778 bps) size: 68303400 bytes 5345.352 secs mencoder -vf crop=:460 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=22000 -o movie.avi *.VOB ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Video stream: 118.936 kbit/s (14867 bps) size: 79458950 bytes 5344.645 secs 128188 frames Audio stream: 102.228 kbit/s (12778 bps) size: 68302344 bytes 5345.088 secs oops. changed bitrate to 981 // last try, something wrong with aspect, so setting manually mencoder -vf crop=:460 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:aspect=16/9:vbitrate=980 -o movie.avi *.VOB -- again // crop if necessary mencoder -ovc frameno -oac mp3lame -lameopts vbr=3 -o frameno.avi -mpegopts format=dvd *.VOB Entry: scsh -- the pain of unix Date: Thu Apr 5 13:08:52 EDT 2007 the pain of unix is really impedance matching. it's nice to have all these small utilities output data tables in their own adhoc way, but it sucks to parse them == match them to other things. i guess, the 'worse is better' motto applies here. it's good to not have standards since it would slow dev, but it's good to have standards to allow interopration. looks like we just need to fill the gap with something that does the trick, and perl is really not the answer.. scsh to the rescue, i hope. i'd like to get rid of sh,grep,awk or perl, and do it properly: parse output into an s-expression, then work with that. problem is i can't get scsh to run on the routers. cross compilation doesn't seem to work, and it seems to be a bit too big too. so what about tethering? all i really need is ssh and some basic 'machine language' which could be the shell. Entry: fred and sam Date: Fri Apr 6 10:29:30 EDT 2007 fix openvpn when network is switched. wow that thing is borked! it looks like there are 4 copies of the wds-ifup script spawned, so i had to add some sync code (rm /tmp/ifup-wds || exit) seems to work now. firewall is decent too. Entry: plt scheme XML Date: Tue Apr 10 17:59:51 EDT 2007 see /usr/lib/plt/collects/xml/private/xexpr.ss (require (lib "xml.ss" "xml")) (xml->xexpr (document-element (read-xml (open-input-file "test.xml")))) Entry: how to simplify xml Date: Wed Apr 11 14:53:20 EDT 2007 using the xexpr representation mentioned above, with spaces stripped. still this is too complicated a structure. the idea is to make it just a nested s-expression, with only name -> value pairs, and use attributes for things that are not text or nested expressions. (tag ((a1 v1) (a2 v2)) "text1" (tag1 ((a11 v11) (a12 v12)) (tag11 ..) (tag12)) "text2" (tag2 <attrib> <elements>)) what i want is just this: (tag (a1 . v1) (a2 . v2) (string . "text1") (tag1 ((a11 . v11) (a12 . v12) (tag11 . (...)))) (string . "text2") (tag2 . (...)) ...) this means the fist simplification is to not allow text floating inbetween nested things: it needs to be wrapped in a 'string' tag. Entry: problem with dnsmasq.. Date: Sun Apr 15 16:51:41 CEST 2007 blijkbaar loopt er af en toe iets mis met dnsmasq: google.com A record query refused by localhost als ik dan rechtstreeks naar de dns server een query stuur werkt het wel. firewall probleem? voodoo. Entry: ip aliasing ipv tunneling voor wrt routers Date: Sun Apr 15 21:37:53 CEST 2007 wat ik nu heb is ethernet over udp (vtun), gebridged. wat ik wou doen is ip over ethernet, dmv ip aliasing. lijkt me meer robuust en simpeler dan udp tunnels, maar dhcp gaat dan niet werken, tenzij ik andere truuken ga gebruiken. ok, obviously (after trying :) an ip alias is not ethernet but ip layer, so it can't be bridged. for this vlans are necessary. so it looks like udp is still the right solution, unless i can get vlans to work. my only concern here is the namespace. if the router uses 0 and 1, what do i call the segment that represents the unsafe network on the main ethernet? the question is: do the tags survive the eth0 <-> switch part? Entry: robocfg Date: Mon Apr 16 00:13:27 CEST 2007 switch config. vconfig is kernel side, robocfg performs switch configuration. what i need is: * all ports on local net (vlan1) * main uplink port is tagged -> wireless transport first works, the rest not yet. does an ordinary hub preserve packets? i guess so. it's a dumb device.. ok, look like i just got a number wrong. (WAN port is 4 instead of 0) ok. its working. Entry: fonera dissect Date: Mon Apr 16 18:26:28 CEST 2007 - wifi: Atheros AR2313 wifi0 -> mother device ath0/ath1 -> access points (software:hostap) tun0 is chillispot - watchdog: software? - lock /var/run/restart-services is from /etc/init.d/rcS it runs in a loop. killing it breaks the loop. got br0 = { vlan2, ath1 } with ath1 ip address disabled, and dnsmasq disabled. works fine. Entry: quagga default route Date: Tue Apr 17 14:32:26 CEST 2007 something went wrong with quagga setting the default route during pppoe restart: now, in check-ppp, quagga is stopped before pppd is started, and the ip-up script will start it again. this can probably be solved in quagga config though. Entry: iptables user match Date: Fri Apr 20 21:35:23 CEST 2007 iptables -A OUTPUT -m owner --uid-owner 1100 -j DROP Entry: i hate my mac Date: Sun Apr 22 01:41:19 CEST 2007 guess cdrom is broken, or my cd set is somehow corrupt.. i don't see what's wrong, but i'm getting tired of it. the 10.3 on th 477MHz crap box met its end. if i want to do 10.4 testing, i guess i need to used other ppls stuff.. i'm tired of this crap. osx is not ok. so i'm going to format the whole disk and turn it into a ubuntu box. maybe a bit less drastic would be to erase the debian partition, since i just don't use it. i think it's probably easier to find a bootleg 10.4 to run on a pc, then to mess with this old piece of crap. Entry: apache on zwizwa Date: Fri Apr 27 20:34:04 CEST 2007 # ls -al /usr/sbin/apache2 -rw-r--r-- 1 root root 332448 2007-03-27 15:21 /usr/sbin/apache2 Entry: mutt and dtach Date: Sun Jun 3 12:39:33 CEST 2007 key not bound.. ??? clearly something with evil's windows-q Entry: fixing sam Date: Tue Jun 5 14:58:05 CEST 2007 - alias werkt - password afzetten? -> afschermen van intern net? Entry: squatting la fonera Date: Tue Jun 5 15:42:00 CEST 2007 - enable ssh and disable thinclient (also disable saving of script) - http://giancarloromeo.netsons.org/2007/04/02/la-foneras-ipkg-fixed/ - set ipkg repo to: http://ipkg.k1k2.de/packages - patch /bin/thinclient and change ipkg -> /rom/usr/bin/ipkg - copy the script.tar from tuur/sam Entry: gateway trick Date: Thu Jun 21 18:26:35 CEST 2007 using a gateway with different outgoing ip. the deal is: sending packets out is one thing, but they need to come back too. so if i have: GW2 GW1 | | FRED-------ZZZ | ME sending out through GW1 is ok, because ZZZ knows how to send back. so if i want to use GW2 i need: ME configured with GW2 as gateway FRED configured with masquerading FRED can reach ME if i make a tunnel using vtun directly to fred, it works without problems. i guess somewhere along the line things get messed up.. i don't understand how. maybe a gateway needs to be on a local subnet? let's try again Entry: bye bye mutt Date: Mon Jul 16 15:51:21 CEST 2007 I'd like to get rid of mutt, and switch to an emacs based mail reader, possibly vm. Problem is that vm doesn't read maildirs, only mbox. So maybe it's time to switch to IMAP properly? No more host local mail boxes? Also, COURIER imap uses some special kind of map layout. Maybe i should just start using it.. But. Courier uses system password auth.. and i'd like to move to ssh pubkey + ssh-agent only auth. ok. gnus supports maildir. so maybe i should use gnus instead? Entry: zwizwa ppp problems Date: Fri Jul 20 11:27:38 CEST 2007 * sometimes more than one instance of pppd/pppoe is loaded. * quagga might mess up the route how to fix this? -> shut down everything with one command -> wait for auto-reconnect to come up another problem: downloading stuff might fill up some important partitions: need to move stuff around so this won't happen again. Entry: backups Date: Fri Jul 20 16:56:48 CEST 2007 maybe it's time to fix this problem for once and for all.. the deal is: * the backup user needs read permissions for everything * the backup user doesn't need write permissions * file attributes (including uid/guid/timestamps) need to be preserved * if possible make incremental backups * if possible, creation of backup (backup user) should be independent of storage of backup (just a secure place somewhere) Entry: sending email from anywhere Date: Sat Jul 21 13:54:19 CEST 2007 the thing i'd like to do is to be able to send email from any host, basicly composing in emacs, and have it envelope from @goto10.org currently, it's something like tom@del.i Entry: fakeroot backups Date: Sun Jul 22 15:25:15 CEST 2007 this seems to sort of work: fakeroot -i STATE -s STATE \ rsync -e "ssh -o 'UserKnownHostsFile /tmp/known'" \ -av root@localhost:/tmp/fakeroot/REAL/ . see /usr/share/doc/fakeroot/README.saving update: # ssh wrapper that can be executed from within a fakeroot environment DOTSSH=/home/goto/.ssh exec ssh \ -q \ -o "UserKnownHostsFile $DOTSSH/known_hosts" \ -o "IdentityFile $DOTSSH/id_dsa" \ "$@" # using stat. this is quite expensive.. one process per entry! find / -exec stat -t '{}' ';' Entry: XBOX hot swap Date: Mon Jul 23 11:35:31 CEST 2007 got: * old zwizwa (kapari netboot with 2.4 + fatx) * monitor and keyboard / terminal don't got: * TV * maybe null modem cable then: * flash the rom * install debian or something on silent hd ? Entry: distributed editing and backups Date: Wed Jul 25 13:42:21 CEST 2007 thos are not the same!! BACKUP: 1 source / multiple targets: rsync --delete is safe MERGE: multiple source / multiple targets: rsync --delete is NOT safe i guess you really need a source control to do MERGE properly, and have the tool ask you what to do in case of conflicts it cannot resolve. Entry: laptop connectivity Date: Thu Jul 26 15:06:39 CEST 2007 if no connectivity, try the following until one succeeds: CONNECTIVITY * check wireless * check wired VPN * check if we are on local net: all vpns are reachable * start openvpn maybe have wired override wireless? Entry: playing a copied dvd Date: Sat Aug 4 13:47:12 CEST 2007 mplayer dvd:// -dvd-device <copied-dvd-root> Entry: mencoder frameno deprecated Date: Sun Aug 5 14:32:51 CEST 2007 it looks like frameno is problematics for sync, as i already saw. so it looks like there's no way around doing things double. 1: use frameno + audio encoding only for bitrate estimation 2: perform a pass1 with audio encoding optionally: 3+: perform multiple pass3 maybe i can fix the subtitles too in the first pass. Entry: distributed state Date: Fri Aug 17 15:38:46 CEST 2007 i'd like to solve the problem of distributed state: basicly, how to have a 'master' of something that is not located in a single spot? the real problem is merging: if it is possible to define 'changing state' in a way that conflicts can never occur, this can be made sound. i need it for: * distributed programming projects: i already have darcs, and i do get conflicts, so i guess here it's not possible to solve the problem because i really have different versions, not a single master. * document store, i.e. collection of pdf documents, email archive: the only operations are "add-file" "rename-file" "delete-file". here it should be possible to solve the problem. Note that i do not have an 'undo' operation. The whole idea is - single serialized thread operating on the abstract store - accessing information updates the local cache - things need to be stored at least at 1 place - background process can do caching, which doesnt change semantics - caching requests the document from the fastest available link - undo implemented outside of the system due to snapshotting Is this journalling? Entry: the single machine experience Date: Sat Aug 18 01:53:08 CEST 2007 that's what it is no? a luxury problem created by the abundance of machines. the thing i am interested in is distributed systems: how to get something going without a central point of control? Entry: router access by page visit Date: Tue Sep 11 03:34:10 CEST 2007 apparently it's possible to embed a link in a remote page that accesses http://192.168.0.1/bla to set some config, given you know the (default) password. so ppl, set your passwords! Entry: self promotion Date: Thu Sep 13 19:30:17 CEST 2007 time to do the dirty deed.. -> packets + catkit + purrr -> clean up zwizwa main site: 'typical home page' code: parser for wiki syntax + ramblings docs. dus -> mzscheme / planet parser-tools Entry: ejabberd Date: Wed Sep 19 12:57:59 CEST 2007 needed for simon.. the interesting thing is that it's some kind of skeleton for distributed apps using erlang. this might be exactly what i'm looking for to write my 'single machine experience' on the i network. Entry: sane server disk partitioning Date: Wed Sep 19 16:07:51 CEST 2007 - keep local system partion safe: export read-only. this contains all sensitive data. - export the data partition using no_root_squash, maybe even 'insecure' it seems to make more sense to try this: 20 GIG system: export ro, with root squash 20 GIG external system: export rw, no root squash rest external data: export rw, with root squash, possibly with insecure (since network is trusted for non-root stuff) transferring a system while it's running: looks like this is doable, as long as you resync the most important stuff (like email) after shutting down the services. Entry: emacs todo Date: Mon Oct 1 16:33:00 CEST 2007 - auto-fill-mode - alt navigation keys: minibuffer (i.e. grep) Entry: debootstrap Date: Fri Oct 5 18:30:25 CEST 2007 - debootstrap lenny - apt-get install emacs22 darcs dtach quack-el w3m-el nxml-mode make sudo - install mzscheme from http://download.plt-scheme.org/mzscheme - darcs get http://zwizwa.be/darcs/pool http://zwizwa.be/darcs/snot http://zwizwa.be/darcs/brood - /etc/sudoers tom ALL=(ALL) NOPASSWD: ALL Entry: gambit C on openwrt Date: Sat Oct 13 21:21:34 CEST 2007 i'd like to have a tool to write stuff in scheme on the openwrt box, without an expensive runtime. apparently gambit still needs some shared library support.. Entry: OSPF routing Date: Sat Oct 13 21:45:19 CEST 2007 using quagga.. first some question what is a passive interface? what is link-detect? what is "ip forwarding" ? what is "ipv6 nd suppress-ra" ? what is "line-vty" ? Entry: vserver Date: Mon Oct 15 13:02:08 CEST 2007 http://www.howtoforge.com/linux_vserver_debian vserver broem build -n broem --hostname broem.i --interface eth0:192.168.14.1/24 -m debootstrap -- -d lenny works pretty well Entry: emacs email Date: Tue Oct 16 14:30:21 CEST 2007 it's a pain.. but let's stick with the way VM wants to handle it. the idea is that vm is a mode for mbox files: you can basicly open an mbox file and navigate it, reply to messages etc... that's a nice paradigm. the problem is: i'm using Maildir. actually, thinking about it more, this is not a real problem. the real problem is that in order to solve locking issues, VM uses movemail to move email from a standard multi-access point (i.e. a Maildir inbox) to a locally managed single-access mbox file. Fine with me, but it's a leaky abstraction.. i'm trying apt-get install mailutils Entry: more emacs email Date: Fri Oct 19 19:45:47 CEST 2007 got it organized like this now: * converted all Maildirs -> mbox format (using movemail) * kept procmail to deliver to xxx.mdir * wrote a movemail script to move .mdir to .mbox * maybe best let vm run the script to update boxes? * added auto-mode for .mbox seems to me mbox is better in the end. the only real problem is shared access, but the current movemail approach solves it. mbox are easier to process too. it does mean i give up on courier imap folders, and would use imap only to fetch mail. so, on each machine i have ~/mail/INBOX.mdir where the mailer will store incoming messages. this is the directory both vm and mutt check for new mail. when vm checks mail, it moves messages to ~/mail/INBOX.mbox Entry: trying out gnus Date: Fri Nov 23 01:35:13 CET 2007 vm sucks.. i can't get it to work properly, seems heavily "state bound" and i do things that get it in a wrong state. stupid stuff like saving messages, opening the viewer windows, etc... thought i'd give gnus a try. trying this: http://zarb.org/~gc/html/howto-adopt-gnus.html i guess i can keep my current procmail sorting setup and have gnus monitor these dirs as groups. the incoming groups could be kept in mdir format as now, and periodically i could 'movemail' them to the mbox files. Entry: NFS Date: Tue Jan 29 19:11:24 CET 2008 the problem with nfs is that it is security based on physical network access. i'm trying to figure out some security model so i don't need to think about it any more. problems: * nfs is very convenient for playing movies + videos over the network * nfs is necessary for diskless access (root + home dirs) how to solve this? - regard local realm as secure * physical access: managable = +- same as physical computer access * logical (VPN): more difficult: VPN keys are then high rank intermediate solution: no NFS over vpn? there's no clean cut.. problem is: anything connected through NFS should be regarded as a single machine. if there's physical access to any part of the machine (or VPN access) then you're in. trying sshfs, but this is not so obvious either. looks like it's slow too. so these are 2 security models: * user/key (ssh) based: fairly secure over insecure network * NFS: needs network level security (network = machine) maybe best to limit NFS to diskless root (limited) + readonly access to public data. Entry: where am i? Date: Fri Feb 22 18:17:20 CET 2008 back to the thing i wanted to do: make some distributed daemon that + knows what (X) terminal i'm at, and can send media that way + send emails to edit to my current setup + checks if email system is functional. Entry: debian udev Date: Tue Feb 26 14:48:23 CET 2008 the world evolved behind my back.. looks like 'hotplug' package in debian is completely replaced by 'udev', but /etc/hotplug is still there: some applications install scripts. (maybe udev uses these too?) http://lists.debian.org/debian-laptop/2006/08/msg00109.html > It's the existence of /etc/hotplug which confuses me. Easy, hotplug is not in its own package anymore, it is now included with udev, or replaced with udev. the idea is you put stuff in /etc/udev/rules.d for example, my 026_microchip.rules: #ICD2 SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="8000", MODE="0660", GROUP="microchip" #ICD21 SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="8001", MODE="0660", GROUP="microchip" i had a file lingering in /etc/udev/libgphoto2.rules, but i'm not sure if it's loaded.. this here: https://bugs.launchpad.net/ubuntu/+source/libgphoto2/+bug/90724 points to the following solution: /usr/lib/libgphoto2/print-camera-list udev-rules mode 0660 group plugdev >/etc/udev/rules.d/45-libgphoto2.rules Entry: go Date: Wed Feb 27 12:54:56 CET 2008 often i type 'ssh' when i mean 'cd'. what about replacing this with a command 'go' that can figure out the difference? might go together with the where-am-i functionality, and somewhat related to continuations and a stack of host connections ala pushd. Entry: fonera repeater Date: Tue Mar 4 20:47:34 CET 2008 # the atheros chipset in the fonera allows difinition of master + # client on the same channel. works pretty well. something like: REMOTE_ESSID="essid remote ap 00:01:02:03:04:05" LOCAL_ESSID="essid local" CHAN=3 REMOTE_NS=1.2.3.4 REMOTE_GW=1.2.3.1 REMOTE_IP=1.2.3.50 LOCAL_NET=192.168.0 # this assumes there's no default route # i.e. start it from the management interface # we're going to introduce a new default route, so kill the old one OLDGW=`route -n |grep ^0|grep eth0|awk '{print $2}'` [ -z "$OLDGW" ] || route del default gw $OLDGW # kill old stuff wlanconfig ath0 destroy wlanconfig ath1 destroy killall -9 dnsmasq killall -9 udhcpc # ap wlanconfig ath0 create wlandev wifi0 wlanmode ap iwconfig ath0 $LOCAL_ESSID iwconfig ath0 channel $CHAN ifconfig ath0 $LOCAL_NET.1 netmask 255.255.255.0 up dnsmasq -i ath0 -F $LOCAL_NET.2,$LOCAL_NET.31 # station wlanconfig ath1 create wlandev wifi0 wlanmode sta nosbeacon iwconfig ath1 $REMOTE_ESSID # prevent resolv.conf updates killall udhcpc echo "nameserver $REMOTE_NS" >/tmp/resolv.conf ifconfig ath1 $REMOTE_IP netmask 255.255.255.0 up route add default gw $REMOTE_GW iptables -t nat -A POSTROUTING -o ath1 -j MASQUERADE Entry: openwrt + debian Date: Sat Mar 8 15:25:48 CET 2008 the trick i'm using on zorro (simpleshare) might also work for ordinary pc: have a basic openwrt running (i.e. from ram) that can shut down the hard drive when it's not used. Entry: usb -> serial Date: Sat Mar 8 15:57:03 CET 2008 Nozell, rhymes with Oh Hell » Blog Archive » USB to Serial Adapter ... - [ Vertaal deze pagina ] I ordered from CompUSA a USB to Serial Adapter by CablesToGo (model 26886) and it works great out of the box on Ubuntu/Feisty. ... nozell.com/blog/2007/06/18/usb-to-serial-adapter-for-ubuntu/ - 8k - for connecting the modem to zorro. Entry: wds Date: Sat Mar 8 18:56:36 CET 2008 trying to connect wrt (client) to atheros (ap) using wds. didn't work.. something i don't understand is how to allow connections on the atheros using wds. maybe the problem is that the wrt is in client mode? Entry: mac80211 inject Date: Wed Mar 12 13:35:40 EDT 2008 http://trac.aircrack-ng.org/ticket/139 BTW, I see you are involved in aircrack-ng. For monitoring mac80211 drivers/devices, I recommend using virtual interfaces instead of taking the current interface down and setting it to monitor mode. Pick an interface name, send it to /sys/class/ieee80211/wiphyX/add_iface, set that interface to monitor mode, and bring it up. This allows you to capture frames (and in the future, inject frames) without affecting the current connection, provided there is no channel changing. this doesn't work for rt8180 2.6.25-rc5, however, injection should work just fine with mac80211 Entry: openwrt usb on zorro Date: Thu Mar 13 13:59:31 EDT 2008 src snapshots http://downloads.openwrt.org/kamikaze/7.09/brcm-2.4/packages needed ipkg install kmod-usb-ohci for (dmesg): usb-ohci.c: USB OHCI at membase 0xb8003000, IRQ 6 usb-ohci.c: usb-00:03.0, PCI device 14e4:4715 the other usb interfaces are bogus? not connected to ports?? lspci: 00:00.0 FLASH memory: Broadcom Corporation Sentry5 Chipcommon I/O Controller (rev 08) 00:01.0 Ethernet controller: Broadcom Corporation Sentry5 Ethernet Controller (rev 08) 00:02.0 Ethernet controller: Broadcom Corporation Sentry5 Ethernet Controller (rev 08) 00:03.0 USB Controller: Broadcom Corporation Sentry5 USB Controller (rev 08) 00:04.0 PCI bridge: Broadcom Corporation Sentry5 PCI Bridge (rev 08) 00:05.0 MIPS: Broadcom Corporation BCM3302 Sentry5 MIPS32 CPU (rev 08) 00:06.0 Modem: Broadcom Corporation BCM47xx V.92 56k modem (rev 08) 00:07.0 Network and computing encryption device: Broadcom Corporation Sentry5 Crypto Accelerator (rev 08) 00:08.0 RAM memory: Broadcom Corporation Sentry5 DDR/SDR RAM Controller (rev 08) 01:00.0 Host bridge: Broadcom Corporation BCM4704 PCI to SB Bridge 01:02.0 Mass storage controller: Artop Electronic Corp ATP865 NO-ROM (rev 07) 01:03.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03) 01:03.3 USB Controller: ALi Corporation USB 2.0 Controller (rev 01) Entry: dial-in server Date: Fri Mar 14 11:26:33 EDT 2008 instead of trying to make a backup using dial-out, it might be best to use dial-in! what about making a web interface for setting something like that up? got the HCF modem working using free drivers from http://www.linuxant.com/drivers/hcf/downloads-installer.php the alsa+slmodemd thing on the D610 doesnt seem to work tho.. mgetty seems to be straightforward. what remains is to figure out mgetty's locking features to enable dial-out with mgetty active. -> simple: make sure the file in /etc/ppp/peers has the same devince name for the serial port as the mgetty line in /etc/inittab (i had /dev/modem for the former, instead of /dev/ttySHCF0) Entry: traffic control Date: Wed Mar 19 10:22:04 EDT 2008 i did this before.. don't remember where. maybe on zzz? the deal is: when i'm uploading through ssh on zzz, interactivity is killed. (7 seconds ping times). Entry: magnolia Date: Wed Mar 19 21:59:37 EDT 2008 magnolia connected to: * PC (ethernet) * wifi (usb) * phone (linuxant modem) * headphones / speaker? some things need to work out thoug: - fregglenet on WEP in stead of WPA? maybe without passwd? (check routing) this might require using the other fonera. - getting a wifi card to work on magnolia. either the isl3890 or the ra2740. the former seems to give problems on windows when used on linux (flashed?) - make sure the modem works on the new kernel. - asterisk? how to get phone output to work? setup PC as gateway so magnolia tries to connect to internet. connect both through null ethernet. Entry: squirrel Date: Fri Mar 21 12:10:00 EDT 2008 a full 'clean' XP/SP2 install with * firefox * cygwin (ssh) * openoffice * how to backup + restore? http://justinsomnia.org/2007/02/how-to-regularly-backup-windows-xp-to-ubuntu-using-rsync/ ntfsclone for backing up ntfs filesystems. rsync in image mode? can the disk image be accessed in windows? maybe a better approach is to use qemu-img to convert images to vmdk images or any other growable image. the disadvantage here is that it can't be streamed.. Entry: wordpress on debian Date: Tue Mar 25 21:12:07 EDT 2008 sucks. single install, multiple blogs? this is not a good thing for file uploads: best to keep them local. also, one db for all blogs might be bad too.. why doesn't wordpress just put things in the database? ok.. seems that there's a single directory with uploads shared by all users. tsss.. files created are 666 ;) this needs to be done differently. shared blogs = crap. upload needs to be per user. let's try to understand this better, 1. suexec i don't trust php code accessing global server data, so let's limit it to single users with wp 2.0.10 in user dir. 2. mysql auth can't find a way to have (system) root automatically be database root. solved with /root/bin/mysql = #!/bin/sh exec /usr/bin/mysql -pxxxxxxxx "$@" and this path enabled for interactive sessions 3. sqlite would be nice to have wp run off sqlite.. mysql 100MB is total overkill. can't really trim it down much. looking around for sqlite i find only buggy patches.. maybe stay out of this.. Entry: lucent winmodem Date: Fri Mar 28 16:47:29 EDT 2008 00:10.0 Communication controller: Agere Systems 56k WinModem (rev 01) 00:10.0 0780: 11c1:0441 (rev 01) Subsystem: 13e0:0410 Flags: bus master, medium devsel, latency 0, IRQ 9 Memory at f4048400 (32-bit, non-prefetchable) [disabled] [size=256] I/O ports at 1018 [disabled] [size=8] I/O ports at 1800 [disabled] [size=256] Capabilities: [f8] Power Management version 6 usable? yes http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/ both ltmodem seem to work. agrsm not. Entry: magnolia w. dialup Date: Sat Mar 29 13:56:25 EDT 2008 with different dialup provider: ZORRO + USB/SERIAL + MODEM + WIFI CARD ? basicisp.net Call From State - City (Ratecenter) Call To State - City (Ratecenter) Number V92? MI - Lansing (LANSING) MI - Bath (BATH) 517-641-0245 YES MI - Lansing (LANSING) MI - Dewitt (DE WITT) 517-668-4245 YES MI - Lansing (LANSING) MI - Eagle (GRANDLEDGE) 517-626-3245 YES MI - Lansing (LANSING) MI - Eaton Rapids (EATON RPD) 517-233-0245 YES MI - Lansing (LANSING) MI - Laingsburg (LAINGSBURG) 517-651-4245 YES MI - Lansing (LANSING) MI - Lansing (LANSING) 517-913-1245 YES MI - Lansing (LANSING) MI - Mason (MASON) 517-833-1245 YES MI - Lansing (LANSING) MI - Williamston (WILLIAMSTN) 517-717-1245 YES Entry: lansing network simplification Date: Mon Mar 31 08:14:11 EDT 2008 fred + zorro/modem/wg121 the wg121 should be able to run with multiple ap or at least support wds for fred. trying to eliminate sam. * reset the wg121. probably firmware got broken, so reinstalling in windows. -> that works. but i get the same errors on linux. giving up there. 2nd option: get a 2nd wrt54g. what's the trade-off - almost certainly going to work (if the version n# is ok) - trades wrt54g for wg121+fonera+ethernet (which is what i pay for) OK so i'm waiting for the 2nd wrt54g to arrive. curious how this will work out. the breaking point is going to be wether i can have an un-encrypted wds link together with an encrypted client connection. as far as i understand, wds isn't ESSID based, but MAC based. also, i saw it's possible to make wds links without having an AP. should work then.. if that works, the best route to go is to use zorro with modem attached, possibly mgetty, a way to choose between wifi and dialup, and setup samba. Entry: without zorro Date: Thu Apr 3 16:35:06 EDT 2008 if the wrt solution works, and i can get access to the pc's disk from outside, zorro can be eliminated. magnolia + lucent modem + 2 x wrt + access to PC. saves: wifi cards, foneras, zorro, external modems. http://www.modemhelp.net/u/usrobotics.shtml Entry: burning dvds Date: Fri Apr 11 17:27:11 EDT 2008 EDIT: just burning speed, using -speed=1 it works fine, see http://zwizwa.be/darcs/pool/bin/dvd data dvds no problem. multisession ok too. but video, i can't seem to get right.. tom@del:~/bin$ dvd video /pub/dey.iso Executing 'builtin_dd if=/pub/dey.iso of=/dev/scd0 obs=32k seek=0' /dev/scd0: "Current Write Speed" is 3.3x1352KBps. 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% 0/166002688 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0% :-[ WRITE@LBA=0h failed with SK=0h/ASC=00h/ACQ=02h]: Input/output error :-( write failed: Input/output error tom@del:~/bin$ don't know what that's about.. the script: #!/bin/bash # # Note: the pathspec does not have the semantics of unix 'cp'. # # * FILE: placed in the root directory. # * DIRECTORY: the CONTENTS are placed in the root directory. # # To copy a directory, you need to move the root dir. # # dvd init|add -root dirname dirname # usage () { echo "usage:" echo " `basename $0` init|add [options ...] <pathspec> [pathspec ...]" echo " `basename $0` video [options ...] <video.img>" } [ -z "$2" ] && usage && exit 1 unset SUDO_COMMAND export MKISOFS=/usr/bin/mkisofs CMD=$1 shift DEV=/dev/scd0 ARGS="$DEV -speed=1 -r -J" add () { growisofs -M $ARGS "$@" } init () { growisofs -Z $ARGS "$@" } video () { growisofs -dvd-compat -Z $DEV=$1 } $CMD "$@" Entry: dell PIII Date: Fri Apr 11 20:04:14 EDT 2008 with old maxtor 10G, tested with seagate utils. seems to work fine. tested scanjet too. TODO: backup the nt image (seagate tools + .net + gimp + ALZIP installed) Entry: wds / apsta Date: Sat Apr 12 11:13:04 EDT 2008 http://downloads.openwrt.org/kamikaze/docs/openwrt.html#x1-110001.2.2 Limitations: There are certain limitations when combining modes. Only the following mode combinations are supported: * Broadcom: o 1x sta, 0-3x ap o 1-4x ap o 1x adhoc WDS links can only be used in pure AP mode and cannot use WEP (except when sharing the settings with the master interface, which is done automatically). which makes me wonder if it's at all possible to use combined station and ap mode on the wrt54g? thought that was only possible with hostap/atheros? ha! http://forum.openwrt.org/viewtopic.php?pid=66191 The latest (4.150) broadcom drivers added support for multiple bssid configuration also: check 'wlc' command instead of wl. some solution using 'apsta' mode: http://forum.openwrt.org/viewtopic.php?pid=57449 ere's what I use for routed client mode (sta) on my WRT54GL running Kamikaze - your mileage may vary - /etc/config/network Code: config switch eth0 option vlan0 "0 1 2 3 4 5*" config interface loopback option ifname "lo" option proto static option ipaddr 127.0.0.1 option netmask 255.0.0.0 config interface lan option type bridge option ifname "eth0.0" option proto static option ipaddr 10.8.8.1 option netmask 255.255.255.0 config interface wan option ifname wl0 option proto dhcp /etc/config/wireless Code: config wifi-device wl0 option type broadcom config wifi-iface option device wl0 option network wan option mode sta option ssid linksys ## For having a repeater AP, comment this section out if you don't want it config wifi-iface option device wl0 option network lan option mode ap option ssid OpenWrt option encryption psk2 option key 'a-wpa-key-goes-here' If the IP of the AP you're connecting to is 192.168.1.1, make sure you change network.lan.ipaddr to something else. -- this needs to sink in a bit. but it looks like repeater AP is really no problem.. enough for today. it's fun to play with these things, but sometimes a bit difficult to work around bugs and missing features.. let's see what the constraints are: * need wrt54g as client -> better antennas. * if possible, run it in repeater mode (apsta) then, on the PC client side a lot of things are possible. probably leaving one fonera + the netgear hub is going to be good enough. so.. in order to figure out how it works, somehow sniff the commands that get sent to wlc. Entry: todo Date: Sun Apr 13 14:22:04 EDT 2008 * squirrel - usb wifi - dvd ? * pc - cygwin - vnc / remote desktop - routing / dialup * magnolia - automatic dialup or console/web interface? what about this: conf 1: * PC + router apsta upstairs conf 2: * PC + dialup, router figures out it needs to connect through pc's dialup + openvpn + wakeonlan + webcam + some kind of file sharing + apsta kamikaze Entry: openvpn on windows Date: Sun Apr 13 20:12:56 EDT 2008 openvpn on windows: http://www.runpcrun.com/howtoopenvpn http://openvpn.se/download.html OK... need to clean up zwizwa's openvpn stuff, mostly segment the network so access is limited. quite straightforward actually. ``just works'' nice surprise. now to automatically connect: openvpn-gui --connect i-vpn.ovpn but how to put this in a .lnk ? maybe a batch file is necessary it's probably easier to just figure out how to start a batch/bash file as a service. or find out if runit works on cygwin. can use this too: http://www.ciscopress.com/articles/article.asp?p=605499&seqNum=9 http://www.itsatechworld.com/files/openvpn%20startup.reg Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] "openvpn-gui"="C:\\Program Files\\OpenVPN\\bin\\openvpn-gui.exe --connect client1.ovpn" EDIT: enabling the service, and making sure they are readable (by SYSTEM user) works nice: will restart automaticly when internet connectivity changes. Entry: installing cygwin Date: Sun Apr 13 18:47:17 EDT 2008 * download the setup program http://cygwin.com * install in C:\ (this is really ok, despite warning) * pick a mirror * install openssh, python, rsync, wget, links * install cyg-apt in /bin (cyg-apt update) http://download.linuxaudio.org/lilypond/binaries/cygwin/cyg-apt * setup ssh as a service http://pigtail.net/LRP/printsrv/cygwin-sshd.html enable port 22! - need to be Administrator: (Compaq_Owner) - to login, need to have password set! Entry: administrator cmd.exe Date: Sun Apr 13 20:24:31 EDT 2008 how to get to a cmd.exe or cygwin bash shell as administrator from normal logged in user? Entry: rsync Date: Sun Apr 13 20:53:32 EDT 2008 recently i ran into the rsync paper, about how rsync does its magic. quite interesting: it uses 2 layers of hashing: a fast incremental hashing, and a block hashing. the first one is used to scan for blocks that are the same, the second one to verify they are. anyways.. rsync. i'm using it in the following modes: * mirror / backup (make an identical copy) http://zwizwa.be/darcs/pool/bin/rsync.backup * merge (like copy, but doesn't delete) http://zwizwa.be/darcs/pool/bin/rsync.backup * in-place copy (for transferring large files with possible connection drops) http://zwizwa.be/darcs/pool/bin/rsync.inplace Entry: upgrading a harddisk w. grub Date: Sun Apr 13 22:04:37 EDT 2008 to keep it easy, make sure the partitions are the same. might also keep the filesystem the same to make sure it boots properly. for me that's hda1 = swap, hda2 = reiserfs. mount the new filesystem, cd to it and "cp -ax / ." then, cd to /boot/grub and create a file 'move_map' with an entry: (hd0) /dev/hdb where hdb is the where the new root is currently mounted. this assumes it will be the first harddrive visible to grub when booting (hd0). then run grub with: grub --device-map move_map root (hd0,1) # set root dir find /boot/grub/stage1 # make sure it's the right one setup (hd0) # install in MBR to make sure you got the right drive, do "touch BLA" in the mounted new root, and try "find /BLA" in grub. that should work, but for me atm it doesnt.. bios prob? EDIT: i tried to run grub from within the image, but something doesn't want to work apparently.. Entry: mounting a partition in a raw harddisk image Date: Mon Apr 14 16:27:07 EDT 2008 can get the offset from "fdisk -ul -C 1" the '-C 1' is there to make fdisk shut up about total number of cylinders. offset can be found multiplying the sector count by 512. then "mount <file> <mountpoint> -o loop,offset=<offset>" something else: apparently when you DD a small image onto a larger harddrive, the remaining space shows up as unpartitioned. apparently, loopback devices can have partitions: http://lwn.net/Articles/110468/ Entry: wake on lan Date: Tue Apr 15 11:31:27 EDT 2008 trying to get to a scheme where the router can wake up magnolia. basicly the same thing as with zorro (openwrt + debian) but using 2 different machines. EDIT: need wake-on-lan cable. should work with the 3com, but have no equipment here.. maybe the PC can work like that? Entry: dialin + schedule tasks Date: Thu Apr 17 13:33:45 EDT 2008 on vpn: some kind of mechanism to determine wether cliens are active, and when they are, schedule tasks like backup + file transfer. Entry: magnolia network Date: Thu Apr 17 13:55:05 EDT 2008 fred: dhcp master compaq: dhcp client magnolia: dhcp client all 3 connect to vpn. if compaq connects through dialup with the lan active, can i reach the other 2? (their vpn would be down due to different default route). yes. works fine. connecting vpn through 2 dialup accounts seems to work fine. it does need to restart the openvpn GUI apparently. maybe i make that a bit more robust? so.. more i really don't need. just need to setup magnolia to accept dialin. Entry: magnolia dvd Date: Thu Apr 17 16:06:51 EDT 2008 doesn't accept dvd+r. does takes cd-r though, and plain dvd. Entry: fixmbr problems Date: Thu Apr 17 20:07:32 EDT 2008 i suspect fixmbr changed the partition table to heads=15 from heads=255, so the disk won't boot any more. this is what cfdisk reports: Size: 4325529600 bytes, 4325 MB Heads: 15 Sectors per Track: 63 Cylinders: 8940 Name Flags Part Type FS Type [Label] Sectors ---------------------------------------------------------------------------------- hda1 Primary Linux swap / Solaris 250425 hda2 Boot Primary Linux ReiserFS 8197875 something is starting to make sense now: the bios limit is 1024 cylinders. if the number of heads is set low, that limit will be reached faster. maybe it boots with lba addressing in bios? trying to fix it with: cfdisk -c 526 -h 255 -s 63 /dev/hda doesn't work.. EDIT: grub, booting from a disk, does recognize the disk as 524/255/63 (and the other as 1023/255/63 really 1244/255/63) so this does seem to be the problem.. maybe passing the geometry to grub should help then? Q: how does the kernel determine CHS ? my guess is either through the partition table, or the ATA spec. see this: http://lists.freebsd.org/pipermail/freebsd-questions/2003-October/023890.html The BIOS addressing limitations are usually given as 1024 cylinders, 255 heads, and 63 sectors per track. (Note: 1024*255*63 sectors is just under 8GB.) The ATA/IDE specifications limit you to 65535 cylinders, 16 heads, and 255 sectors per track. If you accept both sets of limitations at once, you get a maximum of 1024 cylinders, 16 heads and 63 sectors, resulting in the infamous "528" MB hard disk size limitation. maybe this will fix it: * clear partition table on hda * reboot! * create a new one, with exactly the same layout maybe this is simpler: * manyally set CHS in grub neither work.. after running /usr/bin/grub-install on the new 10G disk it worked.. ok, same for the 4G disk. so what does that do over 'setup' in the grub shell? Entry: resizing filesystems Date: Sat Apr 19 12:33:31 EDT 2008 i'd like to save the WINXP filesystem on a dvd for easy cloning. got ntfsclone working now, but that can't be mounted. it would be more interesting to prepare a disk image that fits on a dvd, and can be dd'ed straight to an empty disk to give a bootable system, and used inside vmware/qemu. after that, remaining space can be partitioned. so.. what i want is: 1. resize squirrel so it fits on a dvd 2. use it as disk in vmware resized to 4500MiB = 4499993088 bytes = 8789049 sectors original: Disk /dev/loop0: 12594959s Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 63s 12594959s 12594897s primary ntfs boot disk size = 8789112 sectors make it a multiple of cylinders: cylinder size = 63 * 255 sectors rounded to cylinder boundary: 8803620 sectors Entry: openvpn / dns prob Date: Sun Apr 20 10:40:37 EDT 2008 Sat Apr 19 08:58:29 2008 RESOLVE: Cannot resolve host address: zwizwa.h1x.com: [TRY_AGAIN] A temporary error occurred on an authoritative name server. there are several occurences earlier in the year. - disk space ok - "sv restart dnsmasq" didn't do anything kotnet dns server? 2008-04-20_14:41:22.82860 dnsmasq: using nameserver 10.0.7.249#53 2008-04-20_14:41:22.82896 dnsmasq: using nameserver 10.0.7.250#53 2008-04-20_14:41:22.82927 dnsmasq: using nameserver 134.58.127.1#53 2008-04-20_14:41:22.82958 dnsmasq: using nameserver 134.58.126.3#53 the first 2 do not respond.. the last 2 don't give zwizwa.h1x.com zwizwa.mooo.com is ok. maybe the problem is with changeip? time to switch? Entry: fault tolerance Date: Sun Apr 20 11:27:04 EDT 2008 maybe.. should have a look at erlang. i keep running into problems that could do with a bit more robustness. all hacked up solutions that are quite important to stay up.. Entry: mjpegtools Date: Sun Apr 20 20:41:46 EDT 2008 dvd authoring. maybe time to figure out how to link packetforth to mjpegtools? 1st attempt: without switches, gives mpeg1 2nd attempt: lav2yuv mvi_1271.avi | mpeg2enc -f 8 -n n -o test.mpg lav2wav mvi_1271.avi | mp2enc -V -o test.mp2 lav2wav complains: **ERROR: [lav2wav] Input file(s) must have 16 bit audio! get it out with mencoder or ffmpeg? mencoder \ -of mpeg -mpegopts format=dvd:tsaf \ -lavcopts vcodec=mpeg2video:vbitrate=9800 mencoder \ -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=9800 \ -oac pcm \ -of mpeg -mpegopts format=dvd:tsaf \ mvi_1271.avi -o test2.mpg this hangs.. updating, taking mplayer from lenny. myabe the smoothest ride is to use mencoder to produce raw files, then use mpeg2enc and mp2enc ? upgraded dev-SVN-r25315 from debian-multimedia.org, still hangs damn minefield.. EDIT: dump audio from movie mplayer -vc null -vo null -ao pcm -benchmark test.avi WTF? .. and this dumps core: mencoder -dumpaudio -dumpfile test4.wav mvi_1271.avi i got something working now: dvd_ntsc_half () { mencoder \ $1 \ -vf scale=352:240 \ -ovc lavc -oac lavc \ -of mpeg -mpegopts format=dvd:tsaf \ -srate 48000 \ -lavcopts \ vcodec=mpeg2video:\ vbitrate=4800:\ vrc_maxrate=9800:\ vrc_buf_size=1835:\ keyint=18:\ aspect=4/3:\ acodec=ac3:\ abitrate=192 \ -o $2 } EDIT: changing to 30000/1001 and using dvdauthor: dvdauthor -o dvd -t easter3.vob ... ... dvdauthor -o dvd -T mkisofs -dvd-video -udf -o dvd.iso dvd/ Entry: dvd: success Date: Wed Apr 23 11:39:23 EDT 2008 tested on apex dvd player, using transcode dvd_ntsc xxx.avi xxx.vob vobs2iso dvd.iso vob/* burn.dvd video dvd.iso for i in <movies>; do transcode dvd_ntsc $i $j.vob; done the winning entry: DVD_OPTS=" -ovc lavc -oac lavc \ -ofps 30000/1001 \ -of mpeg -mpegopts format=dvd:tsaf \ -srate 48000 \ -lavcopts \ vcodec=mpeg2video:\ vbitrate=4800:\ vrc_maxrate=9800:\ vrc_buf_size=1835:\ keyint=18:\ aspect=4/3:\ acodec=ac3:\ abitrate=192 " dvd_ntsc () { mencoder \ "$1" -vf scale=720:480,harddup $DVD_OPTS -o "$2" } Entry: ppp problems Date: Wed Apr 23 15:17:10 EDT 2008 after setting the 'debug' option in /etc/ppp/options i get in syslog: Apr 23 07:15:42 magnolia pppd[3109]: Peer refused to agree to our IP address this is because the dialin has an IP address set. romved that. dial-out works now. probably going to wait with dial till till i'm back. Entry: dvd backup Date: Sat May 10 10:58:41 CEST 2008 rip dvd with dvdbackup (pool/bin/dvdcopy). burning this with mkisofs gives problems with region encoding.. so trying to re-mux it like this: vobs2iso GATTACA2/VIDEO_TS/VTS_01_[1-4].VOB looks like dvdauthor can take stream input. using this: dvd_copy () { mencoder -dvd-device "$1" dvd://1 \ -oac copy -ovc copy \ -of mpeg -mpegopts format=dvd:tsaf \ -o "$2" } a title in the dvd can be transcoded to a .vob file, which can then be fed to dvdauthor to re-author a dvd image. the author itself needs disk access since it's 2-pass. hmm.. mencoder can't generate to a pipe.. so. dvdbackup + mkisofs works fine to remove encryption, but the resulting dvd will still be region-specific. to remove this, the only thing i was able to make work is to use "transcode dvd_copy" and "vobs2iso". hmm.. vob files are really just split at a fixed size, so concatenating them should work? Entry: vpn Date: Sat May 17 15:16:17 CEST 2008 time to make a 2-level vpn: one for accessing remote nodes + no access to internal network, and one for internal trusted nodes only. Entry: everything is a file Date: Sat May 17 22:19:39 CEST 2008 I've been thinking about how to interface PLT scheme to anything, especially emacs and mutt. The thing that keeps coming back is fuse. http://fuse.sourceforge.net/ some things can be done with pipes, but really, emulating files might not be such a bad idea.. if a program's access pattern is predictable, this might be a lot easier to manage. Entry: gs crashing? Date: Sun May 18 12:04:09 CEST 2008 root 15686 30.6 65.3 494572 337516 ? D 06:59 92:24 gs -r72 -dNODISPLAY -dFIXEDMEDIA -dDELAYBIND -dWRITESYSTEMDICT -q -dNOPAUSE -dSAFER /tmp/ps2t8EpBGq -- /var/tmp/pgfmanual.pdf no idea what this is about.. i can't remember the file either. visitors? EDIT: problem was in ruby-1.8 doc update via cron.weekly Entry: exim4 gnu TLS problem Date: Wed May 21 21:26:51 CEST 2008 giebrok:~# /usr/share/exim4/timeout.pl 100 /usr/bin/openssl gendh 1024 Can't locate Pod/Usage.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/share/exim4/timeout.pl line 28. BEGIN failed--compilation aborted at /usr/share/exim4/timeout.pl line 28. in /usr/share/exim4/exim4_refresh_gnutls-params maybe installing gnutls solves the problem? nope, debian dependency problem: installing 'perl-modules' solves the problem. Entry: Canon PowerShot A540 Date: Wed May 28 22:38:26 CEST 2008 http://malbe.nm.ru/chdk/allbest-a540-100b-50.zip 11-Apr-2008 15:47 227947 md5: 38eb04f1a6d45a6a1faf4ca14a0b846c Quite a surprise, i thought it wouldn't work for the 540, and was considering to buy a 620! Entry: TV-out on xorg intel Date: Fri May 30 18:40:06 CEST 2008 i noticed this: (II) intel(0): Output TV has no monitor section wtf? this has to do with names of the monitors: each device refers to a monitor section OUTSIDE of the screen section.. Entry: qemu Date: Sat Jun 7 22:41:27 CEST 2008 works pretty well with xp. cool thing is that this can be started as a daemon with the gui on vnc. in order to make the networking work better, i think it's best to use a bridge (got one on del already for quagga roaming routing) and connect the tap device on boot to this bridge. this allows dnsmasq to run on the bridge without requiring restart. options that work well for me: sudo qemu -net nic -net tap -hda /data/xp.img -vnc :0 -usbdevice tablet /etc/qemu-ifup: #!/bin/sh sudo ifconfig $1 up sudo brctl addif br0 $1 Entry: giving gnus another chance Date: Sun Jun 8 10:43:54 CEST 2008 mutt is really not that bad, but there are minor annoyances. it would be nice to have email in emacs.. Entry: upgrading to darcs 2 Date: Sun Jun 8 10:47:00 CEST 2008 i need it on debian stable (giebrok) so probably best to compile it there, then package it, or find a backport. Entry: my problem with passwords Date: Sun Jun 8 10:51:03 CEST 2008 I'd like to use a single authentication method. Basically, this is ssh + key manager. The problem i run into is that anything that runs on TCP needs its own authentication + encryption mechanism. I much more prefer the combination of unix sockets (which have unix user level protection) + ssh tunnels (as point-to-point between hosts). An ideal solution seems to be to have a mzscheme instance running on each host, with point-to-point links to all other hosts. Then interface this to a virtual filesystem + web server. This is the most generic interface to most applications.. The problem with this however is its non-portability. If i write something like this, i'd like to run it on windows too.. So is SSL the only option? Maybe OpenVPN is the solution. However, it gives only machine level security. Maybe i should stick with machine level sec and use unix virtual machines? The only problem to solve then is local storage access: each VM needs some access to host based storage, so the image itself can be kept small. What's the smallest operating system mzscheme runs under? That has to be linux. What about using linux-2.4 for this? The problem with running this on windows is that there's no such thing as kqemu, so vmware might be necessary. No, this is overkill. PLT Scheme has enough operating system abilities to not need such a virtualization layer. The only thing really is to connect multiple instances in a secure way, and forget about wanting to do this with ssh. Entry: ssl for connecting scheme instances Date: Sun Jun 8 11:41:21 CEST 2008 endpoint auth: only server authenticated mutual auth: both are authenticated -> can use PKI or pre-shared keys using SRP i don't really need a PKI for the p2p links: all my hosts are known, and pre-shared keys can be easily distributed using ssh PKI. what i want is probably TSL-PSK hmm.. in openssl this seems to be a recent feature, only since 0.9.9 (debian has 0.9.8) Entry: hacking it with socat Date: Sun Jun 8 12:06:48 CEST 2008 the thing to do is this: * use a unix datagram socket (filesystem for user authentication) * write a merger that merges all incoming messages and connects it to the head of a mzscheme process the problem with something like this is that the merger needs to know the message size, so it also needs to know the protocol. it looks like sockets really need to be handled in-core, using built-in thread and queue mechansims.. then, if use on windows is necessary, use cygwin or add a tls-psk layer or something.. Entry: printing lpr Date: Thu Jul 10 10:43:35 CEST 2008 - use lpr (i think lpt is more lowlevel?) - it accepts postscript and text printing odd/even: zcat ~/doc/essence.ps.gz |psselect -e |lpr (now rotate papers around long axis, put them back in) zcat ~/doc/essence.ps.gz |psselect -o |lpr another thing: some papers seem to be written in A4, schrunk to fit on letter, then padded to A4 again. yet another: use "psnup -<n>" to print multiple pages, but when printing double sided: beware of the orientation: flip over short axis instead of long one! Entry: wifi vlan stuff Date: Fri Aug 8 15:28:44 CEST 2008 The idea: don't do any processing on the wifi router (smurf), but transport the untrusted wifi traffic to a centrail point (zzz) which will perform firewall + routing + dhcp. On the router (smurf) create vlan2 which connects the cpu port (5t) to any of the external ports (4t). The cpu needs tagged packets to be able to create a vlan interface, and the external ports will also carry tagged packates to create a vlan port on (zzz). Additionally, all external ports route ordinary traffic. The problem is: wrt seems to not receive anything. This does look like a hardware problem. Some packets come through, most do not. I checked all the cables and connections, the problem has to be inside the box. Going to replace it. Fuck. I messed up the other one too now by making an nvram change.. Entry: the local webserver Date: Fri Aug 22 16:58:28 CEST 2008 I'm trying to figure out a security model for non-admins on the network. Currently, I'm the only admin with full access. My root passphrase gives access to all the functionality, and is only committed to my memory. SSH is used for everything here. Per user security is implemented in the same way. Below that, there is everything accessible to PHYSICAL users: local net + VPN nodes (where the physical machine is authenticated, not the user). This includes a read-only data store. Wifi is seen as an outside connection, and provides only logged internet access, and access to public services, no local net. What I'm trying to figure out now is what SERVICES are accessible to the physical users without authentication. Ok. Let's use http://pub.i/ urls to be redirected to the local service provider on a port that's DIFFERENT from the public http port, so port based security is available. This can then implement standard behaviour. The following apps are defined: * music expose the local music collection * video video * install application archive Entry: wrt troubles Date: Fri Aug 29 15:59:14 CEST 2008 hmm.. revived the other wrt and it exhibits exactly the same problem as the original one: zzz sees the dhcp requests, and sends answers, but they do not arrive back. this looks more like a config error at zzz than anything else.. anyways.. this is for another time. maybe add a console tag to the other router and move on. i put some headers on the WRT serial ports. works fine with 3.3V ttl serial cable. checked my brother's too, but it seems to be quite dead. Entry: Todo neerpelt Date: Sun Aug 31 12:12:14 CEST 2008 * debian updates for all hosts OK * lex dvd -> avi backup OK * marka data size + backup check * lex check video out again? dvd -> avi using -avc xvid instead of -avc lavc Let's see if that goes a bit better.. lavc gives sync problems. ok.. "-mc 0" seems to give better sync, both codecs are comparable in quality, but lavc is a lot faster and xvid is supported better (lavc produced divx is not supported by my PHILIPS dvd player.) to fix still: * audio sync (xvid with -mc 0) * audio volume * aspect size (fixed by rescaling -xy 512 -> 512x288 Entry: ed / audio equipment update Date: Wed Sep 3 15:32:18 CEST 2008 ed is broken again, and i need to find a solution for the synth hardware. keep or not? what about this: * keep ed, but only to drive the delta1010, so it can be packed together with the behringer power supply and any other loud machine in the electronics lab. * get a new silent machine for the 2 digital cards connected to the yamaha mixer, that would go into the recording studio / silent study room. * hook up the analog synth + 606 to a special-purpose analog postprocessing network. Easy. * hook up the MC303s and the JUNO as a user interface, possibly connecting their audio out to analog effects. I'd like to do something special with this.. I have some affection for the machine, but it's quite hard to interface. Edit: took apart the MC303 and found a service manual. Hooking up a microcontroller to the front panel seems like a straightforward mod. The motherboard could still be used in stand-alone mode, hooked up to midi. Entry: Typesetting from .odf Date: Fri Sep 5 10:21:42 CEST 2008 Trying to typeset Maricela's book, written in oo writer, to something nice and print it out in booklet form. Entry: resolvconf Date: Mon Sep 8 20:20:45 CEST 2008 /etc/resolv.conf gets overwritten after update installing resolvconf http://ubuntuforums.org/archive/index.php/t-306308.html Entry: resolvconf Date: Sun Sep 14 11:09:35 CEST 2008 Problem: dhcp update overwrites zzz's static /etc/resolv.conf Solution: switch to resolvconf and add the following line to the dnsmasq startup script /var/service/dnsmasq/run resolvconf -a lo.dnsmasq <$RESOLVCONF this refers to the file /etc/i/$HOSTNAME.resolv.conf EDIT: simplest way to prevent update of /etc/resolv.conf is to remove the follwing items from /etc/dhcp3/dhclient.conf: # domain-name, domain-name-servers, domain-search, host-name Entry: installing fluxus Date: Mon Sep 22 01:34:49 CEST 2008 same old... tom@zzz:~/fluxus-0.15rc3$ scons scons: Reading SConscript files ... -------------------------------------------------------- Fluxus: Configuring Build Environment -------------------------------------------------------- Checking for C library m... yes Checking for C library pthread... yes Checking for C library dl... yes Checking for C library mzscheme3m... no ERROR: 'mzscheme3m' must be installed! The problem seems to be the lack of shared libraries. The normal binary distribution does not come with shared libs. Then I run into another problem with 4.1.0.3 and 4.0.1 To: Fluxus-request@lists.pawfal.org Hello, Looks like there are changes that prevent fluxus-0.15rc3 to build with PLT Scheme 4.1.0.3. The function seems to be replaced with 'scheme_set_primordial_stack_base'. g++ -o src/main.o -c -ggdb -pipe -Wall -O3 -ffast-math -Wno-unused -fPIC -DFLUXUS_MAJOR_VERSION=0 -DFLUXUS_MINOR_VERSION=15 -DCOLLECTS_LOCATION="\"/usr/local/lib/plt/collects/"\" -DDATA_LOCATION="\"/usr/local/share/fluxus-015"\" -DGLSL -DMZ_PRECISE_GC -D__LINUX_ALSASEQ__ -I/usr/local/include -I/usr/include -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/local/include/plt -I/home/tom/libfluxus/src src/main.cpp src/main.cpp: In function 'int main(int, char**)': src/main.cpp:181: error: 'scheme_set_stack_base' was not declared in this scope scons: *** [src/main.o] Error 1 scons: building terminated because of errors. Cheers, Tom Allo again, Some other build problems with g++ --version g++ (Debian 4.3.1-9) 4.3.1 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * added #include<string.h> (memcpy,memset,strlen) fluxa/src/JackClient.cpp fluxa/src/OSCServer.cpp libfluxus/src/dada.h libfluxus/src/Utils.cpp modules/fluxus-audio/src/AudioCollector.cpp modules/fluxus-audio/src/JackClient.cpp modules/fluxus-osc/src/OSCServer.cpp * added #include<stdlib.h> in libfluxus/src/PNGLoader.cpp (malloc,free) libfluxus/src/dada.cpp (rand) libfluxus/src/OBJPrimitiveIO.cpp (atof) libfluxus/src/PDataContainer.h: In member function 'std::vector<T, std::allocator<_Tp1> >* Fluxus::PDataContainer::GetDataVec(const std::string&)': libfluxus/src/PDataContainer.h:144: error: must #include <typeinfo> before using typeid libfluxus/src/PDataContainer.h libfluxus/src/PDataArithmetic.h * scons failed to detect the absence of libasound-dev * finding PLT Scheme I saw the plt path is hardcoded.. This can be easily autodetected. There's a config module that tells you the paths: http://docs.plt-scheme.org/config/index.html As long as the mzscheme binary is in the path, this could be used in SConstruct as: mzscheme -e '(require config)(display (path->string (force lib-dir)))' When I run it now (built with 4.1.0.3 with the 'primordial' change), it segfaults. Looks like the meaning of that function changed with its name.. tom@zzz:~/fluxus-0.15rc3$ gdb ./fluxus GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu"... (gdb) r Starting program: /data/home/tom/fluxus-0.15rc3/fluxus [Thread debugging using libthread_db enabled] [New Thread 0xb72c16c0 (LWP 14649)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb72c16c0 (LWP 14649)] update_want_level (logger=<value optimized out>) at xsrc/error.c:2755 2755 parent -> want_level = want_level ; Current language: auto; currently c (gdb) bt #0 update_want_level (logger=<value optimized out>) at xsrc/error.c:2755 #1 0xb7c80301 in scheme_log_message (logger=0x0, level=4, buffer=0xb71c0008 "GC [minor] at 1533896 bytes; 645988 collected in 20 msec", len=56, data=0x0) at xsrc/error.c:2796 #2 0xb7c803ea in scheme_log (logger=0xb714cce0, level=4, flags=0, msg=0xb7e03300 "GC [%s] at %ld bytes; %ld collected in %ld msec") at xsrc/error.c:796 #3 0xb7db9eaa in inform_GC (major_gc=0, pre_used=1533896, post_used=887908) at xsrc/thread.c:7589 #4 0xb7dd7a5a in garbage_collect (force_full=<value optimized out>) at ./newgc.c:3187 #5 0xb7dda2e4 in GC_malloc_atomic (s=256) at ./newgc.c:532 #6 0xb7c87bd5 in clearing_stack_push (vc=0xb72bfea8, pos=12, val=1) at xsrc/eval.c:11307 #7 0xb7c91980 in scheme_validate_expr (port=0xb714d238, expr=0x80c9b60, stack=0xb71be670 "", tls=0xb71b5950, depth=20, letlimit=12, delta=5, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x80cf1f8, proc_with_refs_ok=2, result_ignored=0, vc=0xb714d208, tailpos=0) at xsrc/eval.c:11829 #8 0xb7c90ad3 in scheme_validate_expr (port=0xb714d238, expr=0xb714d280, stack=0xb71be670 "", tls=0xb71b5950, depth=20, letlimit=12, delta=5, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0xb71be688, proc_with_refs_ok=3, result_ignored=0, vc=0xb714d208, tailpos=0) at xsrc/eval.c:11938 #9 0xb7c90b43 in scheme_validate_expr (port=0xb714d238, expr=0xb714d298, stack=0xb71be670 "", tls=0xb71b5950, depth=20, letlimit=12, delta=7, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x80cf1d8, proc_with_refs_ok=3, result_ignored=0, vc=0xb714d208, tailpos=0) at xsrc/eval.c:11939 #10 0xb7c90b43 in scheme_validate_expr (port=0xb714d238, expr=0xb714d2b0, stack=0xb71be670 "", tls=0xb71b5950, depth=20, letlimit=12, delta=9, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x0, proc_with_refs_ok=0, result_ignored=0, vc=0xb714d208, tailpos=0) at xsrc/eval.c:11939 #11 0xb7c90d1f in scheme_validate_expr (port=0xb714d238, expr=0xb72b2a10, stack=0xb71be670 "", tls=0xb71b5950, depth=20, letlimit=12, delta=12, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x0, proc_with_refs_ok=0, result_ignored=0, vc=0xb714d208, tailpos=0) at xsrc/eval.c:11973 #12 0xb7c90b43 in scheme_validate_expr (port=0xb714d238, expr=0xb714d2e0, stack=0xb71be670 "", tls=0xb71b5950, depth=20, letlimit=17, delta=14, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x0, proc_with_refs_ok=0, result_ignored=0, vc=0xb714d208, tailpos=1) at xsrc/eval.c:11939 #13 0xb7c90d1f in scheme_validate_expr (port=0xb714d238, expr=0xb72b36b8, stack=0xb71be670 "", tls=0xb71b5950, depth=20, letlimit=17, delta=17, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x0, proc_with_refs_ok=0, result_ignored=0, vc=0xb714d208, tailpos=1) at xsrc/eval.c:11973 #14 0xb7c91df2 in scheme_validate_closure (port=0xb729f520, expr=0x0, closure_stack=0xb72bfe88 "\003", tls=0xb72bc258, num_toplevels=43, num_stxes=5, num_lifts=8, self_pos_in_closure=-1) at xsrc/eval.c:11575 ---Type <return> to continue, or q <return> to quit--- #15 0xb7c9207d in validate_unclosed_procedure (port=0xb729f520, expr=0xb72baa18, stack=0xb72bc248 "\230æ\033·", tls=0xb72bc258, depth=9, delta=8, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x0, proc_with_refs_ok=0, self_pos=-1) at xsrc/eval.c:11661 #16 0xb7c90e0d in scheme_validate_expr (port=0xb714d238, expr=0xb72baa18, stack=0xb71be698 "", tls=0xb71b5950, depth=9, letlimit=8, delta=8, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x0, proc_with_refs_ok=0, result_ignored=0, vc=0xb714d338, tailpos=0) at xsrc/eval.c:12022 #17 0xb7db349c in define_values_validate (data=0xb72ba970, port=0xb729f520, stack=0xb72bc248 "\230æ\033·", tls=0xb714cce0, depth=9, letlimit=8, delta=8, num_toplevels=43, num_stxes=5, num_lifts=8, vc=0xb72bc280, tailpos=1) at xsrc/syntax.c:903 #18 0xb7c91246 in scheme_validate_expr (port=0xb714d238, expr=0xb72baa90, stack=0xb71be698 "", tls=0xb71b5950, depth=9, letlimit=8, delta=8, num_toplevels=43, num_stxes=5, num_lifts=8, app_rator=0x0, proc_with_refs_ok=0, result_ignored=0, vc=0xb714d338, tailpos=1) at xsrc/eval.c:11889 #19 0xb7c923c7 in scheme_validate_code (port=0xb714d238, code=0xb714cce0, depth=9, num_toplevels=43, num_stxes=5, num_lifts=8, code_vec=1) at xsrc/eval.c:11385 #20 0xb7d0b3ea in module_validate (data=0xb714d428, port=0xb714d238, stack=0xb72bc210 "¨æ\033·", tls=0xb7f24358, depth=1, letlimit=0, delta=0, num_toplevels=1, num_stxes=0, num_lifts=0, vc=0xb72bc218, tailpos=1) at xsrc/module.c:4937 #21 0xb7c91246 in scheme_validate_expr (port=0xb714d238, expr=0xb72bc1e8, stack=0xb71be6a8 "\003", tls=0xb7f24358, depth=1, letlimit=0, delta=0, num_toplevels=1, num_stxes=0, num_lifts=0, app_rator=0x0, proc_with_refs_ok=0, result_ignored=0, vc=0xb714d4b8, tailpos=1) at xsrc/eval.c:11889 #22 0xb7c92456 in scheme_validate_code (port=0xb729f520, code=0xb72bc1e8, depth=1, num_toplevels=1, num_stxes=0, num_lifts=0, code_vec=0) at xsrc/eval.c:11391 #23 0xb7d55e0f in read_inner_inner (port=0xb714d500, stxsrc=0x0, ht=0xb71b5980, indentation=0xb7f3d714, params=0xbf8c3020, comment_mode=2, pre_char=-1, table=0x0) at xsrc/read.c:5314 #24 0xb7d52820 in _scheme_internal_read (port=0xb714d500, stxsrc=0x0, crc=1, cant_fail=0, honu_mode=0, recur=0, expose_comment=0, extra_char=-1, init_readtable=0x0, magic_sym=0x0, magic_val=0x0, delay_load_info=0xb7f25638) at xsrc/read.c:2118 #25 0xb7d5e258 in scheme_internal_read_k () at xsrc/read.c:2176 #26 0xb7cbab83 in scheme_top_level_do_worker (k=0xb7d5e170 <scheme_internal_read_k>, eb=0, new_thread=0, dyn_state=0x0) at xsrc/fun.c:1832 #27 0xb7cbb4a4 in scheme_top_level_do (k=0xb7d5e170 <scheme_internal_read_k>, eb=0) at xsrc/fun.c:1737 #28 0xb7d52bc3 in scheme_internal_read (port=0xb7217fa0, stxsrc=0x0, crc=1, cantfail=0, honu_mode=0, recur=0, expose_comment=0, pre_char=-1, init_readtable=0x0, magic_sym=0x0, magic_val=0x0, delay_load_info=0x0) at xsrc/read.c:2210 #29 0xb7d3ecb6 in do_read_f (who=0xb7deeba7 "read", argc=1, argv=0xb7f68fa8, honu_mode=0, recur=0) at xsrc/portfun.c:2897 #30 0x080d8cd4 in ?? () ---Type <return> to continue, or q <return> to quit--- #31 0x00000000 in ?? () Entry: how to make a diff Date: Tue Sep 23 07:35:06 CEST 2008 caveman technology.. there's a "standard way" of making a diff which doesn't use standard options.. something about including more lines around the areas so they can be found easier? apparently i had a 'diff-zwizwa' script: exec diff -Naur $1 $1-zwizwa | gzip >$1.patch.gz probably you don't want the -N : Treat absent files as empty. Entry: how to respect people's tabs Date: Tue Sep 23 07:45:53 CEST 2008 (setq indent-tabs-mode t) Entry: installing Brother HL2030 Date: Sat Sep 27 09:19:10 CEST 2008 mkdir /usr/share/cups/model dpkg -i brhl2030lpr-2.0.1-1.i386.deb cupswrapperHL2030-2.0.1-2.i386.deb non-free drivers: packages come from Brother website. Entry: xenomai Date: Fri Oct 3 12:00:08 CEST 2008 let's see.. in order to play with this it might be best to run it on actual hardware instead of a simulator. simplest app would be a read from the serial port + some communication of this data to user space. building it seems not problematic. next: install on the lex board. EDIT: installing starting with the latest xenomai 2.4.5 trying to run it on the dell pentium-m laptop. my kernel config has some features it don't like though: *** WARNING! You enabled APM, CPU Frequency scaling or ACPI 'processor' *** *** option. These options are known to cause troubles with Xenomai. *** *** NOTE: Xenomai needs either X86_LOCAL_APIC enabled or HPET_TIMER disabled. *** (menu Processor type and features) *** Entry: xenomai acronym zoo Date: Wed Oct 8 01:08:52 CEST 2008 Just went through the Xenomai API doc. Nothing out of the ordinary there. Timers, queues, shared resource management, task management, memory management and pipes to linux. http://www.xenomai.org/documentation/branches/v2.4.x/html/api/index.html Adeos: a nanokernel HAL intended to run several OS kernels together. It implements a queue of signals to be sent to each kernel in sequences. Used to run Xenomai's kernel + Linux together. RTDM: Real Time Driver Model. Works for Xenomai and RTAI. Entry: low latency audio Date: Sun Oct 12 11:33:42 CEST 2008 trying to follow the advice from here: http://lowlatency.linuxaudio.org/ building it on ed, PIII1000 with the rme + ice cards. 1. split root fs (hda3:ext2) / usr+home (hda2:reiserfs) Create the new ext2 root partition, copy all but user+home. Copy usr/home to another partition. Edit the new root partition's /etc/fstab to mount the partition with usr+home, setup appropriate symlinks and configure grub to boot from this disk. When this works, remove cruft from the old root dir, leaving only usr+home and edit fstab again. Delete the intermediate usr+home partition, now to become the recording partition (also ext2). 2. interrupts are APIC. Entry: zorro kamikaze Date: Sat Oct 18 08:56:45 CEST 2008 uses: http://downloads.openwrt.org/kamikaze/7.09/brcm-2.4/packages/ by default, but this has very little packages. manually downloaded and installed openvpn from 7.06 now i'm going crazy.. openvpn reports: Sat Oct 18 07:22:21 2008 /etc/openvpn/v/up tap0 1500 1592 192.168.14.53 255.255.255.0 init sh: /etc/openvpn/v/up: not found typing this manually gives the same! root@zorro:/etc/openvpn# /etc/openvpn/v/up tap0 1500 1592 192.168.14.53 255.255.255.0 init -ash: /etc/openvpn/v/up: not found the script really is there, and executable.. root@zorro:/etc/openvpn# cat /etc/openvpn/v/up #!/bin/bash ... weird.. Entry: Hoeher H018 DVD player Date: Sun Oct 26 09:48:21 CET 2008 4GB USB stick with FAT32 didn't work, so I copied a 1G SD card disk image with FAT16 onto the stick. I'd like to see what's in it.. Void warrantee? Yes.. Main IC: Is a Zoran DVD Multimedia Processor. Marked 0/8 in purple + black line on a circular label glued on the chip. Under the label: Zoran ZR36888HLCG A1 TS7DGP0743MBC Vaddis (R) 888 Dolby Digital There's a 64Mb/166MHz DRAM chip W9864G6GH-6, a NOR Flash chip S29AL016D70-TFIO02, and a CD5954CB dvd/cdrom controller chip. The bottom of the board has only passive components, and is marked "InnoVision". I found a service manual for Vaddis 9 on DTForum.. Also found this: http://jefferson-ryan.blogspot.com/2006/12/porta-serial-do-zoran-uma-luz-no-fim-do.html? showComment = 1172572380000 Entry: setting up network boot on del Date: Tue Oct 28 10:13:40 CET 2008 - apt-get install tftpd (for /usr/sbin/in.tftpd) - check /etc/inetd.conf: tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftp - make dnsmasq pass filename.. on the internal net, this is derived from IP address or name. from zzz:/tmp/i.conf: dhcp-boot=net:boot-azrael,azrael,0.0.0.0 dhcp-option=net:boot-azrael,17,/opt/diskless/azrael dhcp-host=net:boot-azrael,00:18:39:bf:be:6b,192.168.16.56 - building a netbootable image apt-get install mknbi * the old method (2002 version) ./mknbi-linux-2002 vmlinuz-2.6.22-3-vserver-686 \ netboot -x \ --append="root=/dev/nfs ip=dhcp ro" * the new version (Doesn't complain image is too big. If netboot loads the image but complains "Unable to load file." loadkernel() had an error). mkelf-linux --output=netboot vmlinuz-2.6.22-3-vserver-686 \ --ip dhcp --append="root=/dev/nfs ro" So, the main issue is to not make it "too big", whatever that means.. I guess this is mainly about compiling in filesystems. This is a show stopper: except for 2.6.22-vserver, nothing would boot. - Initrd: need to configure BOOT=nfs (or do this automatically) Apparently the 2.6.22-vserver images don't have this. - The filesystem. debootstrap lenny xenomai-root/ Entry: bootable usb stick Date: Wed Nov 5 16:58:19 CET 2008 # i keep doing this wrong.. the reason of confusion are 2 points: # * bios vs. linux devices * * boot time mapping vs. grub install time mapping mount /dev/sdb1 /stick mkdir -p /stick/boot/grub cp -av /usr/lib/grub/i386-pc/* /stick/boot/grub/ grub-install /dev/sdb # now, make sure the device.map on /dev/sdb reflects the setup at this # moment, not necessarily at boot time. grub > root (hd1,0) > setup (hd1) # still no cigar.. check this: # http://www.mayrhofer.eu.org/Default.aspx?pageindex=6&pageid=45 Using grub as a boot loader Although syslinux is small, simple to install, and comes with a very simple command line menu to select from different boot options, I definitely prefer grub. It is larger, but a lot more flexible and offers a complete boot menu and interactive command interface. With recent versions of grub (tested with 0.97), booting from USB is also possible without real issues. To install grub as a boot loader on the USB stick: 1. Mount the VFAT(32) file system with mount /dev/sda1 /mnt (or via KDE, in which case it will probably be mounted under /media/usb, then replace the /mnt occurances below accordingly) 2. Create a directoriy for grub with mkdir -p /mnt/boot/grub 3. Copy the grub files with cp /lib/grub/i386-pc/* /mnt/boot/grub 4. Set a correct device map with echo '(hd0) /dev/sda' > /mnt/boot/grub/device.map 5. Install grub into the master boot record with grub-install --root-directory=/mnt /dev/sda After that, grub should already be bootable from the USB stick, and booting a PC with the stick attached should show the grub boot menu. Entry: the move Date: Tue Dec 9 08:27:28 CET 2008 Time to move zzz to a different machine. It's probably really easiest to just move the drive in its entirety to the lex box. The things to change are: * only using one network interface * disabling kotnet stuff The alternative is to mimick only the used features: * Print server (cups) * DNS (dnsmasq + guile) * OpenVPN client (giebrok + zwizwa) * OpenVPN server for WIFI + general network security I'm a bit afraid about putting in a new HD, since the lex box is a bit flakey. In the end, the zzz HD is going to end up in a new box, but for now I need a simple fallthrough. Networks: * Fred is now 19. The original reason for this: it being wifi provider the zzz block (16-19). This needs to change to something "external". * Let's keep the zzz address space: 16-19. The entire network moves. 0- 7 not routable (local private networks) 8-11 fixed semi-trusted friend networks (sam = 10, fred = 11) 12-15 fixed zwizwa 16-19 fixed zzz 20-23 fixed dynamic routing nets (dell laptop = 22) Entry: new network? Date: Tue Dec 9 10:50:13 CET 2008 Let's make this a bit more virtual. A network server should: * Provide routing + dhcp + dns. * Local openvpn for wifi (mirror the v-net) * Print services * Email * Local media cache This means LEX's networks are: 24 reserved 25 local non-trusted (wifi) 26 local vpn trusted 27 local trusted LEX vpn to zwizwa is part of the .v network, called lex-zwizwa. Now, in order to be able to run lex on a host with only a single network card, I'm going to use a linksys router (drone) with vlans as a port expander. This is an extension of the already existing vlan2 = wifi. switch [WIFI AP]-----[eth1:DRONE:eth0]----[6] [5]----[eth0:LEX] | [4]----[local trusted net] | [3]----[net 3] untrusted isolated networks [2]----[net 2] [1]----[net 1] The LEX box is only doing external network routing, so could be replaced with something simple. All storage will be on the local trusted net, which could be a gigabit switch. Can zorro be used for this? Smurf as drone + access point, and zorro as router? Maybe zorro isn't necessary even: just use statically generated configuration files on smurf. But, I'd like to run a full debian on the main host at least.. Entry: XP image Date: Wed Dec 10 11:29:40 CET 2008 * install XP on an empty harddisk, let the XP installer create a NTFS partition of 3000MB * this amounts to x blocks of 512 bytes (x blocks for the partition table, and y blocks for the NTFS filesystem). * boot linux, and create a boot partition, say 100KB. install grub in the MBR making sure windows still boots. put misc utilities in this partition, and configure grub so it contains a "chainloader" for the 3rd partition, so a new bootable partition can be simply concatentated. * dump the head of the harddisk image to a dvd. there is room to add some other images too. this image can be dumped to an empty harddrive, as long as the original install contains the correct drivers. Numbers After installing XP + some software (ALzip + firefox), boot PLD Linux 2.94 and create a new linux partition (500MB) cfdisk /dev/sda mkfs.ext2 /dev/sda2 mount /dev/sda2 /target mkdir /target/boot cd /target/boot cp -av /boot/grub2 . Use fdisk, set units to sectors and print the partition table: start endi /dev/sda1 63 6136829 /dev/sda2 6136830 7116794 The total size of the first two partitions is thus 7116796 sectors or 3643799552 bytes. To dump the image over tcp: dd if=/dev/sda bs=512 count=7116796 | nc <host> <port> (PLD Linux uses "nc", debian uses "netcat". PLD Linux's nc doesn't support the "-q 0" option.) On the other side: netcat -l -p <port> | pv > <file> Entry: eepro100 Date: Wed Dec 10 20:25:10 CET 2008 apparently my old card doesn't like the new e100 driver.. despite blacklisting e100 in /etc/modules.d/blacklist it still gets loaded.. Now trying to add an alias: modprobe -c | grep e100$ I'm looking for this one: 00:0a.0 0200: 8086:1229 (rev 02) zzz:/etc/modprobe.d# modprobe -c |grep v00008086d00001229 alias pci:v00008086d00001229sv*sd*bc02sc00i* e100 alias pci:v00008086d00001229sv*sd*bc*sc*i* eepro100 So, will add the first line to the /etc/modprobe.conf That doesn't seem to help.. The eepro100 driver does gets loaded, but so does the e100. Trying "blacklist e100" in /etc/modprobe.conf That doesn't work either.. I'm fed up. Will just rename the module in /lib/modules This is non-permanent, but should fix it. cd /lib/modules/`uname -r`/kernel/drivers/net mv e100.ko disabled.e100.ko depmod -a Funny, renaming won't work.. Deleting maybe? This is rediculous.. rm /lib/modules/`uname -r`/kernel/drivers/net/e100.ko Ok, now I get it.. It's part of the initrd! I'm just going to add a workaround script: zzz:~# cat /etc/rc2.d/S10internet #!/bin/bash echo '******* workaround for incorrect detection of eepro100 drivers ******' ifdown eth2 rmmod e100 rmmod eepro100 modprobe eepro100 ifup eth2 Entry: put back zzz Date: Thu Dec 11 10:09:19 CET 2008 Too much hassle trying to build a new network server. If migration gives a problem (i.e. only one network port) it's always possible to use a WRT switch for that, since the server is coupled to an AP anyway. Entry: tuur as double client Date: Thu Dec 11 19:54:40 CET 2008 It's simpler also for future switching, to keep a single local wifi network, and let tuur connect to it as a client. This requires it to be on the same channel as the feeding net. 1. switch smurf channel 2. set tuur in double client mode That sounds great, but isn't possible with madwifi. Multiple AP no prob, but only one station per card. Too bad I have no usb card here.. Entry: tuur with AP+STA Date: Thu Dec 11 21:16:55 CET 2008 Can Tuur be main wireless provider? Yes.. I can disable password, disable most services accept for internet access, and install openvpn on all laptops requiring internal net services. Maybe that's the best solution: no more wireless routing on the main PC. Now, before destroying everything because of a couple of cables.. Is there a migration path? Entry: ethernet <-> usb Date: Wed Dec 17 15:28:49 CET 2008 I'm looking for a simple ethernet to usb converter. The sweex usb2.0 seems to have the necessary hardware. Openwrt? Sweex PR010 Entry: xrandr Date: Fri Dec 19 09:21:41 CET 2008 # With external VGA: Screen 0: minimum 320 x 200, current 1024 x 768, maximum 2048 x 2048 VGA connected 1024x768+0+0 (normal left inverted right x axis y axis) 300mm x 225mm 1024x768 75.0*+ 84.9 85.0 75.1 75.0 70.1 60.0 1600x1024 60.0 1280x1024 59.9 60.0 1440x900 60.2 1280x960 60.0 1280x800 60.0 1152x864 75.0 1280x768 60.0 1152x768 54.8 832x624 74.6 800x600 84.9 85.1 72.2 75.0 60.3 56.2 640x480 85.0 84.6 75.0 72.8 75.0 60.0 59.9 720x400 85.0 70.1 640x400 85.1 640x350 85.1 LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 286mm x 214mm 1024x768 60.0*+ 50.0 800x600 60.3 640x480 59.9 TMDS-1 disconnected (normal left inverted right x axis y axis) TV disconnected (normal left inverted right x axis y axis) tom@del:~$ # to enable VGA: xrandr --output VGA --auto Entry: vlan experiment Date: Mon Dec 22 12:36:31 CET 2008 vlan0: 0 1 2 3 5t # bring port 0-3 (lan ports) to eth0 as vlan0 vlan1: 4 5t # bring port 4 (internet) to eth0 as vlan1 vlan2: 4t 5t # transport vlan2 over port 4 vlan1 is the main secure ethernet connection (LAN) vlan2 is insecure wireless, transported tagged over LAN vlan0: 5t # disconnect port 0-3 from insecure net # bring out all ports tagged to lan and eth0 vlan11: 0 4t 5t # bring port 0 to LAN, tagged. robocfg vlan 11 ports "0 4t 5t" vconfig add eth0 11 Entry: qemu on zwizwa for skype phone Date: Thu Dec 25 10:45:04 CET 2008 goal: run a minimal windows XP image on qemu to host the skype phone. this should work since it's just usb. first need kernel update.. note: /etc/qemu-ifup is started when qemu is started.. we just add the interface to the local insecure network bridge: #!/bin/sh sudo ifconfig $1 up sudo brctl addif br0 $1 let's see.. i'm a bit afraid this is going to be too slow.. to plug through a usb device: -usbdevice host:<bus.addr> -usbdevice host:<vendor_id:product_id> Entry: setting up spamassasin and clamav Date: Thu Dec 25 12:55:23 CET 2008 I don't remember how this is setup.. What I find in my homedir is a ~/.spamassasin directory. Ok, it's using procmail. ~/.procmailrc : :0fw: spamassassin.lock | /usr/bin/spamassassin :0: * ^X-Spam-Status: Yes SPAM.mdir/ For clamav, to deny all messages containing malware. # Add this to the global configuration options: # the socket can be found in /etc/clam av_scanner = clamd:/var/run/clamav/clamd.ctl # Add this to the data ACL (acl_check_data:) deny message = This message contains malware ($malware_name) demime = * malware = */defer_ok Entry: freggle Date: Thu Dec 25 21:43:54 CET 2008 instead of running dhclient on the network, it's probably better to bridge the wifi to a vlan, an run dhclient on that, keeping the switch ports on the local lan. vlans are actually quite nice to solve the client/server problem for ip assignment. it's effectively an extra namespace that doesn't get in the way of standard dhcp. Entry: the digi cards Date: Fri Dec 26 15:38:36 CET 2008 02:04.0 Multimedia audio controller: VIA Technologies Inc. ICE1712 [Envy24] PCI Multi-Channel I/O Controller (rev 02) 02:09.0 Multimedia audio controller: Xilinx Corporation RME Digi96/8 Pad (rev 05) 02:0a.0 Multimedia audio controller: Xilinx Corporation RME Digi9652 (Hammerfall) (rev 08) 02:04.0 0401: 1412:1712 (rev 02) 02:09.0 0401: 10ee:3fc3 (rev 05) 02:0a.0 0401: 10ee:3fc4 (rev 08) Problems: - drivers - sync root@ed:~# cat /proc/asound/cards 0 [PST ]: Digi96 - RME Digi96/8 PST RME Digi96/8 PST at 0x40000000, irq 17 1 [R15 ]: RME9636 - RME Digi9636 (Rev 1.5) RME Digi9636 (Rev 1.5) at 0x41000000, irq 18 2 [M1010 ]: ICE1712 - M Audio Delta 1010 M Audio Delta 1010 at 0x1080, irq 20 That seems to be fine. Next: interrupt priorities. I put the cards on 10+11 root@ed:~# cat /proc/interrupts CPU0 0: 201350 XT-PIC-XT timer 1: 608 XT-PIC-XT i8042 2: 0 XT-PIC-XT cascade 3: 9 XT-PIC-XT serial 4: 9 XT-PIC-XT serial 5: 544 XT-PIC-XT uhci_hcd:usb1, eth0 6: 3 XT-PIC-XT floppy 7: 1 XT-PIC-XT parport0 8: 2 XT-PIC-XT rtc0 9: 0 XT-PIC-XT acpi 10: 2230 XT-PIC-XT RME96, rme9652 11: 0 XT-PIC-XT ICE1712 12: 4 XT-PIC-XT i8042 14: 6064 XT-PIC-XT ata_piix 15: 93 XT-PIC-XT ata_piix NMI: 0 Non-maskable interrupts ERR: 0 # for apt-get install linux-image-rt # deb http://nl.archive.ubuntu.com/ubuntu intrepid universe now, configuring the cards Apparently it's not recommended to use multiple cards with JACK. Since it's already tricky to get one card working, I'm not going to argue this time.. http://www.sound-man.co.uk/linuxaudio/ice1712multi.html So what am I going to do with them? Use the biggest card with Jack, then use the two others in separate processes with some alsa access. Ok.. So first, alsa configuration. root@ed:~# cat /proc/asound/cards 0 [PST ]: Digi96 - RME Digi96/8 PST RME Digi96/8 PST at 0x40000000, irq 10 1 [M1010 ]: ICE1712 - M Audio Delta 1010 M Audio Delta 1010 at 0x1080, irq 11 2 [R15 ]: RME9636 - RME Digi9636 (Rev 1.5) RME Digi9636 (Rev 1.5) at 0x41000000, irq 10 First, the connectors: M1010: 1 x breakout + RCA DIGI IN/OUT Digi9636: 2 x Optical I/O + D-sub ADAT sync-in with coaxal I/O Digi96/8: 1 x Optical I/O + ??? ADAD SYNC: http://pinouts.ru/DevicesCables/adat_sync_pinout.shtml Funny.. I don't know what to do with them.. Let's make the setup variable: start daemon with one of the cards, use the other ones for special purposes. Apparently, ~/.asoundrc is no longer required: http://alsa.opensrc.org/index.php/.asoundrc So, the M1010 and 9636 work properly. The 96/8 gives only 2 channels. Let's put the default to m1010. Ok. PD works with 64/2 bufsize, pretty neat. Entry: freggle Date: Fri Dec 26 21:22:58 CET 2008 The WRT54Gv2 apparently doesn't want to boot any more.. Sometimes boot light flashes very fast, other times it flashes normally but never stops.. No traffic on ethernet either. NEXT: Let's try the serial port. Entry: zzz site Date: Sat Dec 27 12:41:37 CET 2008 got 2 computers now, one old, reliable and slow, and one unreliable junk but fast. would like to merge them into one package. can be barebones, since old devices can be exported over gigalan, by turning old computers into hubs. this would reduce the number of computers to 2: one for the pro audio cards, and one for general network management and running apps. maybe i get something with two network cards: one for dedicated network links (i.e. RT audio/video data streaming), and one for normal data transfer. maybe jack.udp ? Entry: single server image Date: Sat Dec 27 14:56:01 CET 2008 At least for the x86 hosts: zwizwa, zzz and giebrok, i'd like to run them from the same (bit-for-bit) code and data image, to get rid of backup issues. The easiest way to do this is to use vserver. This does require a clear separation of services and network management (routing, firewall). The easiest way to get to this point is to start from giebrok + kurk + klimop vserver trees, and try to run them on zzz/zwizwa hosts. Entry: qemu on lex Date: Sat Dec 27 17:06:25 CET 2008 Running the xp.img (zzz site's windows computer) on lex. It's connected on lex's br0, together with vlan2, the local insecure network. Works well. Now, vnc on unix sockets. Maybe using socat and bridging it to TCP is the easiest solution. Entry: bootable usb stick Date: Tue Dec 30 21:04:55 CET 2008 following this with vfat works fine: http://www.mayrhofer.eu.org/Default.aspx?pageindex=6&pageid=45 However, with ext3 it doesn't work. Entry: vlan + vserver Date: Wed Dec 31 15:02:19 CET 2008 Hmm... Maybe I should keep zzz/zwizwa as real hosts, instead of running on a vserver. I would like to move zzz to the lex box: it's already configured for a single network interface. Do I move the whole disk, or just the image? I'm probably better off using an external disk for storage, which keeps things more modular. Let's resize some partitions. Wait.. It's probably easier to make the flash bootable, then move the directories around. Let's change disks. Entry: aspire one Date: Thu Jan 1 10:03:27 CET 2009 works nice except card driver and a minor problem with the wireless, probably after running a program that sets the fan: http://wiki.debian.org/DebianAcerOne#head-da0c224ec9760981f602f11c89f17c17cee4797c rebooting didn't fix this. popping out the batteries did. Entry: resizing ext3 on external hd Date: Thu Jan 1 17:39:04 CET 2009 got both a fat32 and ext3 partition on there, but i'd like to move the barrier around. should be no problem with parted, but apparently there are some incomatible features activated: zzz:/# parted /dev/sda check 2 Error: File system has an incompatible feature enabled. Compatible features are has_journal, dir_index, filetype, sparse_super and large_file. Use tune2fs or debugfs to remove features. zzz:/# parted /dev/sda check 1 zzz:/# debugfs /dev/sda2 -R "feature" debugfs 1.41.0 (10-Jul-2008) Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file zzz:/data/home/tom# debugfs -w /dev/sda2 debugfs 1.41.0 (10-Jul-2008) debugfs: feature -ext_attr -resize_inode fsck.ext3 -f /dev/sda2 -y # this turned up some errors.. # still: zzz:~# parted /dev/sda GNU Parted 1.8.8 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) resize 2 Start? [30.0GB]? End? [320GB]? 220GB Warning: A resize operation on this file system will use EXPERIMENTAL code that MAY CORRUPT it (although no one has reported any such damage yet). You should at least backup your data first, and run 'e2fsck -f' afterwards. OK/Cancel? OK Error: Found an inode with a incorrect link count. Better go run e2fsck first! (parted) # I'm trying without journal now zzz:~# tune2fs -O^has_journal /dev/sda2 # nope.. still the same.. # Now trying with resize2fs: zzz:/data/home/tom# resize2fs /dev/sda2 40000000 resize2fs 1.41.0 (10-Jul-2008) Resizing the filesystem on /dev/sda2 to 40000000 (4k) blocks. The filesystem on /dev/sda2 is now 40000000 blocks long. # ok, the manual says ext3 resizing doesn't work yet.. # switching to fdisk Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x5b6ac646 Device Boot Start End Blocks Id System /dev/sda1 63 58589054 29294496 c W95 FAT32 (LBA) /dev/sda2 58589055 625137344 283274145 83 Linux # The partition size in sectors: > (* 8 40000000) 320000000 # this worked fine, but parted didn't want to move it to the end of # the disk, so i gave up.. in the meanwhile i did something wrong and # lost the linux partition. (luckily, there are backups, except for # the xp+debian image) Entry: dvd images on the zoran player Date: Fri Jan 2 09:25:59 CET 2009 That doesn't work.. So how to easily burn a dvd from a disk image? Using just "bin/burn.image init" works fine on the Zoran player, but it's probably not standard. From what I gather this worked: (bin/vobs2iso) #!/bin/bash TMP=.dvd [ -z "$2" ] && "usage: $0 <iso> <vob> [<vob> ...]" [ -e $TMP ] && echo "$TMP already exists!" && exit 1 ISO=$1 shift [ -e $ISO ] && echo "$ISO already exists!" && exit 1 mkdir $TMP dvdauthor -o $TMP -t "$@" dvdauthor -o $TMP -T mkisofs -dvd-video -udf -o $ISO $TMP rm -rf $TMP Maybe passing "-dvd-video -udf" to growisofs would work? Apparently, growisofs has a -dvd-compat option. Entry: throttle Date: Sat Jan 3 09:42:14 CET 2009 With unlimited volume, i'd like to setup a proper low-priority bulk pipe to degamma. The easiest way to achieve this is to use ssh + tcp tunnels, and limit the ssh connection. Entry: fritz Date: Sat Jan 3 11:38:24 CET 2009 Integrating fritz better into the network. It's probably easiest to disable its dhcp, give it a static address, and plug some ports to zzz. What I want is the 4 lan ports to be on 192.168.16.0 1. Make sure ZZZ doesn't use dhcp to connect to fritz. 2. Try to bridge vlan11 and the trusted net, to see if the switch ports on the fritzbox give local net IPs. I tried this on zzz, but couldn't get it to work properly (interaction of of bridges, vlans and ip-aliases i don't inderstand..) Trying on smurf now. OK. got confused again.. Maybe it's easiest to just use a second trusted IP space and use routing instead of bridging. 192.168.17.0 is still available. Ok.. re-enabling fritzbox dhcp, but running an extra IP net over the same wire. Is this possible? I'm getting more confused now.. IP aliasing works fine, but I have masquerading defined per interface, so it wont work in current setup with 2 ip nets over the same wire. Let's make things static: change IP of fritz and turn 17 into a separate "DMZ" style topology. Ok, this works fine: fritz is again dhcp master of 17 + zorro connects to private net through vpn. However, I'm going to get rid of zorro there and replace it with the printer connected to the fritzbox. Entry: backup to basics Date: Sat Jan 3 17:27:10 CET 2009 http://www.gnu.org/software/tar/manual/html_node/Incremental-Dumps.html Entry: fritz print server Date: Sat Jan 3 17:36:54 CET 2009 socket://<ip> That was simple.. Well, I guess a printer port really is just a bidir pipe. Apparently there are 2 sockets: control + data at 9100 and 9101. Entry: backups Date: Sun Jan 4 09:08:02 CET 2009 I'd like to start automating this. Already have non-automated mirror backups that protect against complete loss of functionality, but i'd like to add snapshotting to protect against individual file deletions. Also, readonly mountable snapshots would be nice. NILFS? http://www.nilfs.org/en/pkg_debian.html Entry: aspireone r8101 Date: Sun Jan 4 13:05:44 CET 2009 There was a problem with the card not being properly reset after resume from hibernation. Fixed with bringing down the interface. Entry: netboot xenomai Date: Sat Jan 10 16:20:08 CET 2009 For more convenient dev, let's make a Xenomai+RTnet box that boots off the network. I forgot how most of this works, so let's document. 1. Use a boot disk with GRUB + netboot images. 2. Server side: setup DHCP. For my config this is dnsmasq with fixed address associated to the rtl card 00:20:18:8e:37:0b and an image name equal to the hostname served from /tftpboot [1] entry://20081028-101340 [2] entry://20090508-175739 Entry: lftp download manager Date: Thu Jan 15 13:11:03 CET 2009 socat EXEC:lftp - This takes commands from stdin, so it's possible to connect anything. It should be not so difficult to isolate or tag all traffic coming from this process, to make it lowest priority. http://en.wikipedia.org/wiki/IEEE_802.1Q apparently, these can be tagged with priorities: Priority Code Point (PCP): a 3-bit field which refers to the IEEE 802.1p priority. It indicates the frame priority level from 0 (lowest) to 7 (highest), which can be used to prioritize different classes of traffic (voice, video, data, etc). Entry: darcs SVN micromanagement Date: Wed Jan 21 10:12:54 CET 2009 The idea is this: master repo = SVN, but i'd like to use darcs for micro-managing my own changes. How to merge? First, make sure there's a directory managed both by SVN and darcs: - "darcs get" into empty dir - remove the tree that's also in SVN - checkout that tree - perform merge bye reverting darcs patches -> Concentrate on first taking in changes from SVN. Given the way I use emacs, it's probably best to take the "current" branch: that one with files loaded in emacs buffers as the merging branch. Note however: this requires the SVN to be checked out in the current branch! Entry: set-frame-font Date: Thu Jan 29 09:19:30 CET 2009 Of course it's possible to change this at run-time.. Just have to figure out how! Entry: .tar to .deb Date: Thu Jan 29 14:09:26 CET 2009 How to convert slackware .tgz style files to .deb? Suppose: I know what I'm doing, I just want to use the package management properties to provide "install" and "uninstall". The answer is to use alien. 1. Prepare a root fs tree (as normal user) with correct permissions. I.e. under "dist", create "dist/lib/modules/2.6.25.17/..." 2. cd $(TOPDIR) && fakeroot tar cf ../package.tgz * 3. fakeroot alien package.tgz This generates a .deb file that can be used to install/uninstall the files. The drawback is that there are no pre/post scripts and there is no dependency management. Entry: hda -> sda Date: Wed Feb 4 12:39:14 CET 2009 Somewhere in 2.6 some IDE disks are now called 'sd' instead of 'hd'. Not all IDE disks. I didn't find a real pattern yet. What is this all about? libata http://bbs.archlinux.org/viewtopic.php?pid=286979 "... some kernel releases ago IDE drives moved to a new "architecture" called libata, common with SATA ..." http://wiki.archlinux.org/index.php/Persistent_block_device_naming http://linux-ata.org/faq.html Entry: dsl + fritz Date: Mon Feb 2 19:48:25 CET 2009 2 things: - I saw the phoneline is terminated with a capacitor and some resistors.. Is this the reason for 3Mbit instead of 4Mbit? The DSL spectrum shown by the fritzbox is completely 1st order lowpass. Is this normal? Doesn't look like it is: http://commons.wikimedia.org/wiki/File:ADSL_spectrum_Fritz_Box_Fon_WLAN.png - With FRITZ!Box Fon 5124 Annex A, Firmware version 57.04.47 telnet can be enabled by dialing #96*7* http://wehavemorefun.de/fritzbox/index.php/Starten_von_telnetd So with shell access, I was wondering, what toolchain is necessary to build programs, and can the switch be made to support VLAN? Now, have a look at this one. It mentions debootstrap. http://www.heimpold.de/dsmod debootstrap --arch mipsel etch fritz http://debian.i/debian actually, this needs --foreign and even then doesn't work well.. i copied some the old zorro initial mipsel-lenny install on a usb stick, but now i'm having trouble chrooting into the tree.. it supports netcat+tar to transfer files netcat -l -p 12345 | tar xf it does look like the firmware is completely read-only.. only /var is writable (ramfs) i tried statically linked mipsel binary for busybox but failed "illegal instruction".. ok. this one works: busybox-static_1.1.3-4_mipsel.deb now i can chroot using: modprobe ext2 mkdir /var/tmp/disk mount /dev/sda1/ /var/tmp/disk ./busybox chroot /var/tmp/disk bash trying dist-upgrade to lenny (btw, the acer one works nice in keyboard-only operation, with a large terminus font) ok.. fritz.. maybe it's best to copy zorro install instead of trying to get it to work from scratch again.. otoh, it might be nice to see how exactly it worked. * chrooted sshd ok.. it's not lenny that's running on zorro, but etch. upgrade to lenny failed. some script caused illegal instruction, probably out of memory.. maybe enable swap? ok.. etch seems to work. for ssh, the trick is to mount /dev/pts. mount /proc # maybe not necessary /usr/sbin/sshd hmm.. looks like that image was already configured.. good the box has about 15 MB of free RAM, which is nice.. so.. how to boot it properly? maybe it's easiest to boot it externally using telnet, Entry: asterisk + fritz Date: Fri Feb 6 22:55:49 CET 2009 So.. I'd like to call the house phone from my laptop over the internet. How to proceed? Installing asterisk on giebrok (static IP). Installing ekiga on one. http://www.juerging.net/index.html?http://www.juerging.net/projekte/Fritzbox-Asterisk/ Entry: cstream Date: Thu Feb 5 11:29:28 CET 2009 http://www.cons.org/cracauer/cstream.html The stream limiter.. This might be the easier way to set up limited data rate pipes between programs. Easiest is probably to use it in conjunction with ssh and socat. Entry: running from one root image Date: Sat Feb 7 11:30:45 CET 2009 I was wondering if my current "farm" could be made to run off of the same debian image. This includes 3 hosts: - zwizwa - zzz - giebrok It would be nice if services and data could be duplicated too, but that's probably not so easy. The idea I had before is to run it as a vserver. To do this practically, an incremental path needs to be devised. The server will run off a read-only partition, and services will be moved into this one by one. Current services of interest are: - local net dns - vpn Let's try to get giebrok instance running on vserver in zzz and zwizwa. OK. This works after changing some config variables in /etc/vservers/ziebrok (copied from degamma:/etc/vservers/giebrok) Next: boot it with a different init script. I'd like to just boot ssh and nothing else. However, this does need a separate ssh config. It's probably best to not bind ssh on zzz to 0.0.0.0 to allow vshosts to work. Remember that vserver uses interfaces setup on the host side. OK.. You need a dummy0 interface: modprobe dummy ifconfig dummy0 up This enables the vhost to bind to 0.0.0.0 Now I can start ssh using the default config: vserver ziebrok start --rescue /usr/sbin/sshd # -D -e However, I needed to add this to make it work: PrivilegeSeparation = no To set dns: #!/bin/bash # Example for starting a vserver with SSHD running. DOMAIN=i NS=192.168.16.254 echo -ne "search $DOMAIN\nnameserver $NS\n" >/etc/resolv.conf /usr/sbin/sshd Entry: Alan Kay's "no reboot" Date: Sat Feb 7 13:58:53 CET 2009 I'd like to change this to "no reinstall". Let's use these analogies: reboot = waking up after a hangover reinstall = instantiating another person in the same hardware Reboot flushes your scratchpad. like Kay's idea, but it's not practical because evolution is messy, and most systems are evolved. Conceptually reboot and reinstall are really the same, but they act on different time scales. There is a whole bunch of analogies between operating system _instances_ and Smalltalk's image based programming. Entry: fritzbox internals Date: Sat Feb 7 17:39:59 CET 2009 This I find rather odd: # ls -al /var/flash drwxr-xr-x 2 root root 0 Feb 7 17:38 . drwxrwxr-x 9 root root 0 Feb 7 00:59 .. crw-r--r-- 1 root root 240, 113 Feb 7 17:38 ar7.cfg crw-r--r-- 1 root root 240, 160 Jan 1 2000 aura-usb crw-r--r-- 1 root root 240, 168 Jan 1 2000 browser-data crw-r--r-- 1 root root 240, 141 Jan 1 2000 calllog crw-r--r-- 1 root root 240, 98 Jan 1 2000 debug.cfg crw-r--r-- 1 root root 240, 132 Jan 1 2000 fx_cg crw-r--r-- 1 root root 240, 129 Jan 1 2000 fx_conf crw-r--r-- 1 root root 240, 130 Jan 1 2000 fx_lcr crw-r--r-- 1 root root 240, 131 Jan 1 2000 fx_moh crw-r--r-- 1 root root 240, 112 Jan 1 2000 multid.leases crw-r--r-- 1 root root 240, 117 Jan 1 2000 net.update crw-r--r-- 1 root root 240, 116 Feb 7 16:59 stat.cfg crw-r--r-- 1 root root 240, 133 Jan 1 2000 telefon_misc crw-r--r-- 1 root root 240, 119 Jan 1 2000 tr069.cfg crw-r--r-- 1 root root 240, 120 Jan 1 2000 user.cfg crw-r--r-- 1 root root 240, 121 Feb 7 15:44 userstat.cfg crw-r--r-- 1 root root 240, 114 Jan 1 2000 voip.cfg crw-r--r-- 1 root root 240, 122 Jan 1 2000 voipd_call_stat crw-r--r-- 1 root root 240, 118 Jan 1 2000 vpn.cfg They are character devices.. # cat /proc/devices Character devices: ... 240 tffs ... Here's some information about this filesystem: http://www.freetz.org/wiki/help/faq Note that to edit these files you need to use 'nvi' instead of 'vi', which will copy the file to ram for editing and copy it back to flash after. Entry: fritz nfs Date: Sun Feb 8 10:28:41 CET 2009 What I really want is to add nfs or any other remote filesystem support, so I can get rid of the flash drive. The USB is v1.1 so quite slow. Entry: Boot script Date: Sun Feb 8 11:04:54 CET 2009 Dirname and chroot are not available, so i had deviced a little trick to boot it by adding a directory with a ".d" suffix. It might be possible to use basename from the boot/busybox but this seems simpler. # Trampoline to boot the debian system in a chrooted environment. # This can be run with Fritz' busybox that doesn't have chroot nor dirname. # cd to root directory cd $0.d/../.. echo Starting debian in `pwd` # use a different busybox to execute the chroot command. exec `pwd`/boot/busybox chroot `pwd` /boot/rc.d/rcS Now what's needed is a plug into the flash filesystem. The complete sequence of commands is: modprobe ext2 mkdir /var/debian mount /dev/sda1 /var/debian /var/debian/boot/init To unload: /var/debian/boot/chroot /var/debian /boot/shutdown umount /var/debian So, let's add this to /var/flash/debug.cfg modprobe ext2 mkdir /var/debian mount /dev/sda1 /var/debian /var/debian/boot/init echo '/var/debian/boot/chroot /var/debian /boot/shutdown ; umount /var/debian' >>/var/post_install This doesn't seem to work on boot. My guess is that usb isn't active yet, and the drive is not recognized. There's no way to sync on this, so we need to wait a bit. In /etc/rc.S it can be seen the debug.cfg is the last script to run (/usr/bin/ethnator doesn't exist). modprobe ext2 mkdir /var/debian if ! mount /dev/sda1 /var/debian; then sleep 10; mount /dev/sda1 /var/debian; fi /var/debian/boot/init && \ echo '/var/debian/boot/chroot /var/debian /boot/shutdown ; umount /var/debian' >>/var/post_install Hm... Doesn't work either.. Maybe we should just spawn a daemon that waits modprobe ext2 sd_mod usb-storage mkdir /var/debian cat <<EOF >>/var/post_install /var/debian/boot/chroot /var/debian /boot/shutdown umount /var/debian EOF cat <<EOF >/var/mount-debian while ! mount /dev/sda1 /var/debian; do sleep 3; done exec /var/debian/boot/init EOF chmod +x /var/mount-debian /var/mount-debian & Hmmm.. Device is not recognized if it's left in the box. # lsmod Module Size Used by Tainted: P ext2 59392 0 mbcache 8080 1 ext2 usblp 11936 1 kdsldmod 630416 2 usbahcicore 26064 0 usbcore 113328 4 usblp,usbahcicore isdn_fbox_fon4 933840 0 ubik2 78608 1 isdn_fbox_fon4 tiatm 109008 1 ubik2 Piglet 10560 0 After plugging in these modules are loaded extra: vfat 11392 0 fat 49072 1 vfat nls_cp437 5248 0 nls_iso8859_1 3584 0 sd_mod 14864 0 usb_storage 33296 0 scsi_mod 92560 2 sd_mod,usb_storage modprobe usb-storage sd_mod I've added these to the startup script.. Then I run into more interesting problems: Warning: Reading the random source seems to have blocked. If you experience problems, you probably need to find a better entropy source. Will try with reboot now. I can't get it to work.. Something is not initialized correctly: the partion can be read (cat /dev/sda1) but it doesn't want to mount it: # mount /dev/sda1 /var/debian mount: Mounting /dev/sda1 on /var/debian failed: Invalid argument I'm thinking about giving up: one more try: wait 15 seconds after loading the modules.. Wtf now it mounts.. ext2 wasn't loaded. Maybe it gets unloaded somewhere? No, modprobe takes only one module argument. I don't know what's going wrong.. Will try now with a script that waits for 5 minutes to try to mount the stick. Entering complete dispair mood.. New script: cat <<EOF >>/var/post_install /var/debian/boot/chroot /var/debian /boot/shutdown umount /var/debian EOF cat <<EOF >/var/mount-debian sleep 300 modprobe usb-storage modprobe sd_mod modprobe ext2 mkdir /var/debian while ! mount /dev/sda1 /var/debian; do sleep 10; done exec /var/debian/boot/init EOF chmod +x /var/mount-debian /var/mount-debian & Nope... Doesn't work either. I'm going to give up, this is too much hassle. It works when you replug the device, and I currently don't know how to force that in software.. Anyway.. learned a couple of things though. Feb 8 16:23:29 eventadd[1352]: EVENT(131): USB device 005, class 'storage', plugged in Feb 8 16:23:38 eventadd[1546]: EVENT(142): The file sytem contained on the USB mass storage device 5 is not supported or the device has an invalid partition table. (device type: 0930:6545) So, to get things running on the fritzbox, it might be easiest to just prepare .tar archives and download them from a server. Entry: code generation and higher order functions Date: Sun Feb 8 14:03:55 CET 2009 codegen is hofs without closures. That's the whole idea behind "proper" FP codegen: cross-stage-persistance. Entry: modules for fritz kernel Date: Sun Feb 8 15:28:24 CET 2009 Is it possible to compile modules that will be accepted by the kernel? That way nfs could solve things. Linux version 2.6.13.1-ohio (1284) (gcc version 3.4.6) #4 Thu Nov 22 21:18:33 CET 2007 If I get this kernel + gcc, it really should work.. Look at this here: http://www.spblinux.de/fbox/26-ar7/ Modules don't load. This might be it: ftp://ftp.avm.de/develper/opensrc/fritzbox-source-files.04.67.tar.gz Upgraded too (was 04.47) and now I got 4Mbit instead of 3! Entry: youtube-dl Date: Mon Feb 9 10:35:04 CET 2009 This translates a youtube page url to a download link. Apparently this link can be used without cookies, but does expire. This means it can be used with lftp. Entry: degamma routing Date: Tue Feb 10 08:16:23 CET 2009 tired of nat.. route add -net 192.168.16.0/22 gateway 10.17.17.4 # zzz.g route add -net 192.168.12.0/22 gateway 10.17.17.8 # zwizwa.g Entry: colinux Date: Thu Feb 12 09:03:20 CET 2009 I'd like to setup a small as possible program that can run on a windows box to provide routing services and connect to a vpn. Basically, a small buildroot environment would be enough. I.e. colinux + buildroot image and openvpn? Entry: moving a database Date: Sat Feb 14 10:19:05 CET 2009 To backup, save the output of this to a file: mysqldump -u$USER -p$PASS --skip-lock-tables $DB_NAME > $FILE.SQL To restore, send that file to the input of this: mysql --verbose --user=$USER --password=$PASS 4DB_NAME < $FILE.SQL But, make sure the user exists! create database DB_NAME; GRANT ALL PRIVILEGES ON $DB_NAME TO 'my_user'@'localhost' IDENTIFIED BY 'my_password' WITH GRANT OPTION; # The @host is optional. Entry: timeouts with ssh and sudo Date: Sat Feb 14 10:27:26 CET 2009 Probably a dns issue.. It popped up a couple of days ago. Entry: cross gcc & GMP / MPFR Date: Tue Feb 17 12:32:52 CET 2009 Why are GMP and MPFR necessary for a cross-gcc? Anyways: I'm trying to build the cross-gcc 3.4.6 for the fritzbox, but this doesn't build with gcc (Debian 4.3.2-1) 4.3.2 Trying with gcc-3.4 (GCC) 3.4.6 (Debian 3.4.6-9) Ok, it builds but fails because of dejagnu. Let's try to build it in a different way.. But first, what is this gmp and mpfr about? Is it about making target computations? Or floating point emu? ../../$(SOURCE)/binutils-$(BINUTILS_VER)/configure --prefix=$(PREFIX) \ --with-sysroot=$(UCLIBC_INCLUDE) \ --with-gmp-include=$(PREFIX)/include/ \ --with-gmp-lib=$(PREFIX)/lib/ \ --with-gmp=$(PREFIX) \ --with-mpfr-include=$(PREFIX)/include/ \ --with-mpfr-lib=$(PREFIX)/lib/ \ --with-mpfr=$(PREFIX) \ --target=$(TARGET) \ Entry: instant mirroring over network Date: Wed Feb 18 11:09:10 CET 2009 I'd like to solve this problem: Both system A and B want to download a file, but only A has direct access to the outside resource, while B gets the file from A. At this moment, I do things serially and manually. I'd like to do it automatically. Basically, I'd like to keep an entire tree up-to date using A->B notification for fragments. This looks like a raid-array with network block devices, but I'd also like the ability to mount the remote data. Maybe streaming is the better solution: /usr/bin/vlc --rc-fake-tty --sout #transcode{vcodec=DIV3,vb=192,scale=1,acodec=mp3,ab=64,channels=2}:std{access=mmsh,mux=asfh,dst=10.64.4.16:8080} <.avi> vlc sucks ass isn't it possible to stream over a socket? i.e. let the client descide? Entry: xenomai + qemu Date: Tue Feb 24 11:56:16 CET 2009 Create a harddisk image: qemu-img create -f qcow2 xenumu.qcow2 1G Run qemu using this installation image: http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-businesscard.iso qemu xenomu.qcow2 -cdrom <ISO> -boot d Then configure it so it has ssh + access on console. Console access needs to be defined on 4 places: - qemu command line: "-serial stdio" or "-nographic" - /boot/grub/menu.lst the lines "serial" and "console serial" - kernel command line: "console=serial" - /etc/inittab: uncomment the T0 line It's also convenient to add autologin with /sbin/autologin: #!/bin/sh /bin/login -f root And inittab: T0:23:respawn:/sbin/getty -L ttyS0 -n -l /sbin/autologin 9600 vt100 Entry: nested vlans Date: Sun Mar 8 19:16:01 CET 2009 I don't know if this works, but from what I read it doesn't seem to be possible to infinitely embed vlans.. Shame, because i wanted to send a vlan over wifi, wich is in itself embedded as vlan2 on the local ethernet backbone. So.. this need to be solved by locally unpacking and bridging. The easiest is to just add vlan11-vlan14 also on the wireless backbone and bridge the two on the router. Got it to work now: del shared wireless access through its .22. network which is bridged to vlan12. To fix: make dns on zzz use the dns provided by the dhcp.. Had to make $INTERNET in zzz firewall take multiple interfaces, so it's easier to switch between different providers. Entry: rt2500usb Date: Mon Mar 9 11:17:34 CET 2009 It seems dhclient doesn't play nice. Setting up the wifi params with iwconfig and running dhclient kills the settings: need to run iwconfig again when dhclient is doing its thing.. It appears as if it brings down the interface by itself, but not always.. Something fishy going on here.. Could be bug in driver tho. Entry: network address allocation Date: Mon Mar 9 14:40:34 CET 2009 192.168.x.0 all /24 nets: 0- 7 not routable (local private networks) 8-11 fixed semi-trusted friend networks (gargamel = 8, sam = 10, fred = 11) 12-15 fixed zwizwa 16-19 fixed zzz 20-23 dynamic routing nets (del = 22) Entry: ethernet bridges Date: Mon Mar 9 16:00:18 CET 2009 Hmm.. apparently a bridge doesn't copy everything by default: it doesn't behave like a hub but like a switch. Entry: teefs Date: Thu Mar 12 19:32:12 CET 2009 Another stab at remote backup: (modeled after the unix "tee" command). 1. startup: make sure two filesystem trees M, S are mirrored using rsync. 2. every mutating operation on M is recorded in a journal and can be applied to S either live or after a delay. read operations always only access M. What I would like to have is a no-hassle synchronous backup: a program is updating M, but I'm actually interested in accessing files in S as if they were local, without having to "pull" or "poll" them (push only backups). This might be an interesting project to get to know FUSE. So, this is actually RAID1, but on filesystem level + there is never any traffice from S->M (except during initial sync or resync on error). Maybe recording the serialized write actions themselves is enough? Since the real data is there, the effect of all actions can be replayed. Entry: ibook power supply again Date: Sat Mar 28 09:59:10 CET 2009 Why do i keep buying cheap chineese crap? 24.5V 2.65A 65W AC 100-240V http://www.faqintosh.com/risorse/en/guides/hw/ibook/pjack/ Long live the junk box. Entry: slow sudo Date: Tue Mar 31 17:12:50 CEST 2009 got significant delays when running "sudo" on zzz. added this line to /etc/hosts: 192.168.16.254 zzz that fixes it Entry: xenomai PEAK PCI CANbus Date: Thu Apr 2 11:14:28 CEST 2009 After plugging the card in some different slots and setting the bios to allocate specified irq to PCI slots, it still didn't work. Seems this is the problem: https://mail.gna.org/public/xenomai-help/2008-03/msg00028.html There are two CAN controllers on the card, right? Therefore you need support for shared interrupts. Actually, requesting the IRQ 12 for the second CAN controller fails because it's already used by the first one. Entry: wordpress url change Date: Sat Apr 11 10:59:43 CEST 2009 There isn't any simple way to do this, so I will do a rpl on the data base dump and file store. The file store doesn't contain any references to the main page. The simples thing seems to be this: rpl -s 'http://deyofthephoenix.com' 'http://deyofthephoenix.com/blog' melissawp.mysqldump Now, how to restore the dump? mysql --verbose --host=$HOST -u$USER -p$PASS $DBNAME < $SQLFILE Entry: emacs and mutt Date: Mon Apr 27 12:54:55 CEST 2009 I like mutt as an email reader, but I didn't manage yet to make it work well with emacs. Moreover because I use mutt on a remote machine and run emacs locally. The problem with using emacs as a mutt editor is that the RPC mechanism just doesn't work well.. This is not a problem with mutt itself, but with the principle behind RPC.. In fact, mutt doesn't need to wait for a mail message to be done editing to send it: emacs is perfectly able to send off the message by itself. So let's do that: define a macro such that a file can be sent to emacs for handling. It's simplest to just use the pipe command. This then transfers the message as a whole to emacs, where some emacs function collects it and constructs a reply. I've used vm (view mail) before: http://www.wonderworks.com/vm/ Entry: mdadm Date: Wed May 6 12:28:04 CEST 2009 Setting up mdadm (2.6.7.2-1) ... Installing new version of config file /etc/logcheck/ignore.d.server/mdadm ... Installing new version of config file /etc/init.d/mdadm-raid ... Installing new version of config file /etc/init.d/mdadm ... Installing new version of config file /etc/cron.d/mdadm ... Generating array device nodes... done. update-initramfs: Generating /boot/initrd.img-2.6.18-6-vserver-686 W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. Added Linux Added LinuxVserver * Starting MD monitoring service: mdadm --monitor. Assembling MD arrays...done (no arrays found in config file or automatically). Entry: netbooting Date: Fri May 8 17:57:39 CEST 2009 It's been a while since I got this to work.. One note: apparently 2.6 kernels won't boot with mknbi. Might be the reason why I couldn't get it to work :) 0. I had to do this (tftpd broken)[1] sudo apt-get remove tftpd sudo apt-get install tftpd-hpa Do something like this to see if it's properly setup: tom@del:~$ cat /etc/inetd.conf |grep tftpd tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot 1. setup dhcp to include the "filename" attribute. For me I have this point to "boot". on del (laptop in the field) this is done by bridging the br0 to eth0 (while running off of eth1 wifi). the br0 has dhcpd configured. brctl addif br0 eth0 The previous for some reason doesn't work.. Packets don't make it to the bridge. Using plain dsnmasq: ./masq eth0 1.2.3 Same problem.. Packets come in but don't make it to the app. Cable or firewall settings? 2. get gPXE to work on the target system. Easiest is to put a .lkrn file and use grub from the local harddisk, or use a boot floppy or proper network ROM. (i never managed to get the ROM work though.. It did work with the old 3Com cards and built-in netboot support) 3. in /tftpboot make sure the boot image name obtained from dhcp links to pxelinux.0 (which is in the syslinux distribution) 4. create configuration files /tftpboot/pxelinux.cfg easiest is one per host like: LABEL linux KERNEL xenomai APPEND root=/dev/nfs ip=dhcp [1] http://www.minimyth.org/forum/viewtopic.php?p=10306&sid=76114d43358d0917f6b6591fb301a726 [2] http://zwizwa.be/darcs/pool/bin/masq Entry: modifying linux/net/ipv4/ipconfig.c for 3Com 3c905 Date: Sat May 9 00:05:57 CEST 2009 #define CONF_OPEN_RETRIES 10 #define CONF_SEND_RETRIES 2 #define CONF_BASE_TIMEOUT (HZ) This was necessary to get a flakey 3c905 card working. This makes it re-open the card on every DHCP failure, so now it boots after the first retry. Entry: flashing 3x905 with mba 4.0 -> 4.3 Date: Sat May 9 02:26:01 CEST 2009 Now they're both working - finally. http://etherboot.org/wiki/hardwareissues?s[]=3com ftp://ftp.3com.com/pub/nic/3c90x/util430.exe Entry: tx out matrox Date: Sat May 9 12:01:30 CEST 2009 http://www.bglug.ca/matrox_tvout/g450_tvout_howto.html http://attila.kinali.ch/mga/ Entry: disposable giebrok Date: Sat May 9 22:23:55 CEST 2009 I'd like to move to a "disposable server" model for giebrok: keep all configuration local on a private server. Edit changes locally and push them. This requires a better sync model and probably needs log servers. Rsync is too crude. Am I going to risk running giebrok under tfs? Actually, why not. The problem is bandwidth though.. A partially synced model would probably be better. Entry: things to build Date: Sun May 10 21:09:10 CEST 2009 - centralized bash history logger to get an idea of command line usage + optimize commands further Entry: more comfortable screen reading Date: Sun May 10 21:31:28 CEST 2009 computer modern is a crap font for reading on screen.. it really needs more body, so try this in gimp to simulate "paper blur" : - load page in gimp 300 dpi - gaussian blur 3x3 - contrast +100 brightness -100 now.. how to make kpdf do this? http://kpdf.kde.org/download.php KDE SVN /branches/KDE/3.5/kdegraphics/kpdf/ svn co https://svn.kde.org/home/kde/branches/KDE/3.5/kdegraphics/kpdf/ crap.. doesn't let me in. just using the tarball then.. let's use debian's to get the right deps apt-get source kpdf cd kdegraphics-3.5.9 apt-get build-dep kpdf dpkg-buildpackage apparently it's based on xpdf quite literally: it contains xpdf as a subtree. anyways.. might be simpler to just write some wrappers around pdftoppm. ok: conclusions for now: it seems that for low rez, small text, it's better to "let the ink run" a bit: blur followed by increase in contrast: the text remains ligible longer. the idea seems to be somthing like: text should _never_ become grey. it's easier to fish out letters from a black-on-white though bold blobby blur than a grey blur. EDIT: Filter->Generic->Erode does a good job too. The thing is: you don't want to change much in pictures.. just makes lines thicker. Entry: modifying xpdf Date: Mon May 11 14:52:18 CEST 2009 The point to start is the anti-aliased rendering that's already there. This needs to be modified to use a "spilling" filter instead of an averaging one. It complains about not finding freetype.. Funny, because I have it installed. Maybe a debian issue. Let's use the deb sources instead. All the image processing code is in splash/ Skimming the code it doesn't seem AA is handled by by simply oversampling and downsampling the whole at the end. It's woven all over the place. From this I conclude it's probably not a good idea to go poking in the Splash code.. The simplest approach seems to be to render to 300dpi and postprocess the image, then downsample. Entry: modifying pdf2djvu Date: Mon May 11 18:39:18 CEST 2009 Looks like [1] is a good canditate for extending with an erosion operation. This way a .djvu file can be created for viewing, which is also faster than pdf. pdf2djvu uses the poppler[2] rendering engine (which in turn is based on xpdf / splash). Now poppler uses Cairo[3] so I wonder if it's not possible to use its capabilities to do the filtering. This seems unlikely.. Looks like postprocessing is the only option. So.. A bit more inspection of the code shows that image data gets written out to disk (!) to pass data to the c44 wavelet compressor. This seems to be an interesting point to hook into. Apparently I have old code installed: tom@zzz:/usr/local/bin$ ls -al | grep 2003-08-28 -rwxr-xr-x 1 root staff 13176 2003-08-28 14:05 bzz -rwxr-xr-x 1 root staff 35504 2003-08-28 14:05 c44 -rwxr-xr-x 1 root staff 32888 2003-08-28 14:05 cjb2 -rwxr-xr-x 1 root staff 41384 2003-08-28 14:05 cpaldjvu -rwxr-xr-x 1 root staff 50408 2003-08-28 14:05 csepdjvu -rwxr-xr-x 1 root staff 28304 2003-08-28 14:05 ddjvu -rwxr-xr-x 1 root staff 19816 2003-08-28 14:05 djvm -rwxr-xr-x 1 root staff 12784 2003-08-28 14:05 djvmcvt -rwxr-xr-x 1 root staff 9368 2003-08-28 14:05 djvudump -rwxr-xr-x 1 root staff 17680 2003-08-28 14:05 djvuextract -rwxr-xr-x 1 root staff 47536 2003-08-28 14:05 djvumake -rwxr-xr-x 1 root staff 29968 2003-08-28 14:05 djvups -rwxr-xr-x 1 root staff 110544 2003-08-28 14:05 djvused -rwxr-xr-x 1 root staff 25264 2003-08-28 14:05 djvuserve -rwxr-xr-x 1 root staff 15192 2003-08-28 14:05 djvutxt Inspecting: pdf2djvu -vvv -o foo.djvu ~/library/pool/lazy_specialization.pdf - page #9 -> #9: - muted render - image size: 2479x3508 - verbose render - create sep_file - rle data >> sep_file - text layer >> sep_file - !csepdjvu - !djvuextract FGbz=/tmp/pdf2djvu.5Ha0nY --> "/tmp/pdf2djvu.5Ha0nY" (661 bytes) BG44=/tmp/pdf2djvu.QSKcx8 --> "/tmp/pdf2djvu.QSKcx8" (115 bytes) Sjbz=/tmp/pdf2djvu.1HENeO --> "/tmp/pdf2djvu.1HENeO" (1173 bytes) - annotations >> sed_file - !djvused >> sed_file - !djvumake - !djvused < sed_file - 2318 bytes out Aha! It's actually csepdjvu that's called with "R6 2479 3508 216" input data. /usr/bin/csepdjvu -d 300 /tmp/pdf2djvu.keGpt7 /tmp/pdf2djvu.0bEZjG/p0057.djvu So, replacing /usr/bin/csepdjvu with this: # echo $0 "$@" >>/tmp/`basename $0` [ -z "$CSEPDJVU_PREPROC" ] || $CSEPDJVU_PREPROC "$@" exec $0.real "$@" Now.. The input format is color RLE which is difficult to use. Color RLE format The Color RLE format is a simple run-length encoding scheme for color images with a limited number of dis‐tinct colors. The data always begin with a text header composed of the two characters "R6", the number of columns, the number of rows, and the number of color palette entries. All numbers are expressed in decimal ASCII. These four items are separated by blank characters (space, tab, carriage return, or linefeed) or by comment lines introduced by character "#". The last number is followed by exactly one character which usu‐ally is a linefeed character. The header is followed by the color palette containing three bytes per color entry. The bytes represent the red, green, and blue components of the color. The palette is followed by a collection of four bytes integers (most significant bit first) representing runs of pixels with an identical color. The twelve upper bits of this integer indicate the index of the run color in the palette entry. The twenty lower bits of the integer indicate the run length. Color indices greater than 0xff0 are reserved. Color index 0xfff is used for transparent runs. Each row is represented by a sequence of runs whose lengths add up to the image width. Rows are encoded starting with the top row and progressing toward the bottom row. csepdjvu does support PPM input, so how to convince pdf2djvu to produce this format? The format is generated in quantizer.cc Apparently debians netpbm package doesn't support this format, so I'm installing the one from here: [4]. Hmm.. netpbm doesn't support converting _from_ this format and csepdjvu needs either "Color RLE format" or the "Bitonal RLE format" as input for the foreground image. So it looks like the solution is to plug in a preprocessing step right before the rle conversion. So, not trivial. [1] http://code.google.com/p/pdf2djvu/ [2] http://poppler.freedesktop.org/ [3] http://en.wikipedia.org/wiki/Cairo_(graphics) [4] http://netpbm.sourceforge.net/ Entry: pdftoppm Date: Tue May 12 13:29:32 CEST 2009 It's probably the only way to get it going: pdftoppm -gray -r 300 ~/library/pool/lazy_specialization.pdf lazy Using this converter script pgm2djvu for all the .pgm images: cat $1 | erode | pgmtopbm | pbmtodjvurle | csepdjvu -d 300 - $2 The bundle them up: djvm -c lazy-peval.djvu *.pgm.djvu This is good enough.. I'll wrap it in a script later. Entry: stumpwm Date: Tue May 12 18:37:20 CEST 2009 commands: C-t C-t pull-hidden-other C-t C-n pull-hidden-next C-t C-h help C-t <num> window number C-t w windows First thing i'd like to do is to change the keys. Keep the old windows key for activating the window manager. Entry: setxkbdmap Date: Wed May 13 14:05:59 CEST 2009 use "setxkbdmap" to reset the keymap. This is the default (ouput of xmodmap -kpe) keycode 8 = keycode 9 = Escape NoSymbol Escape NoSymbol Escape keycode 10 = 1 exclam 1 exclam 1 exclam keycode 11 = 2 at 2 at 2 at keycode 12 = 3 numbersign 3 numbersign 3 numbersign keycode 13 = 4 dollar 4 dollar 4 dollar keycode 14 = 5 percent 5 percent 5 percent keycode 15 = 6 asciicircum 6 asciicircum 6 asciicircum keycode 16 = 7 ampersand 7 ampersand 7 ampersand keycode 17 = 8 asterisk 8 asterisk 8 asterisk keycode 18 = 9 parenleft 9 parenleft 9 parenleft keycode 19 = 0 parenright 0 parenright 0 parenright keycode 20 = minus underscore minus underscore minus underscore keycode 21 = equal plus equal plus equal plus keycode 22 = BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab keycode 24 = q Q q Q q Q keycode 25 = w W w W w W keycode 26 = e E e E e E keycode 27 = r R r R r R keycode 28 = t T t T t T keycode 29 = y Y y Y y Y keycode 30 = u U u U u U keycode 31 = i I i I i I keycode 32 = o O o O o O keycode 33 = p P p P p P keycode 34 = bracketleft braceleft bracketleft braceleft bracketleft braceleft keycode 35 = bracketright braceright bracketright braceright bracketright braceright keycode 36 = Return NoSymbol Return NoSymbol Return keycode 37 = Control_L NoSymbol Control_L NoSymbol Control_L keycode 38 = a A a A a A keycode 39 = s S s S s S keycode 40 = d D d D d D keycode 41 = f F f F f F keycode 42 = g G g G g G keycode 43 = h H h H h H keycode 44 = j J j J j J keycode 45 = k K k K k K keycode 46 = l L l L l L keycode 47 = semicolon colon semicolon colon semicolon colon keycode 48 = apostrophe quotedbl apostrophe quotedbl apostrophe quotedbl keycode 49 = grave asciitilde grave asciitilde grave asciitilde keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L keycode 51 = backslash bar backslash bar backslash bar keycode 52 = z Z z Z z Z keycode 53 = x X x X x X keycode 54 = c C c C c C keycode 55 = v V v V v V keycode 56 = b B b B b B keycode 57 = n N n N n N keycode 58 = m M m M m M keycode 59 = comma less comma less comma less keycode 60 = period greater period greater period greater keycode 61 = slash question slash question slash question keycode 62 = Shift_R NoSymbol Shift_R NoSymbol Shift_R keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L keycode 65 = space NoSymbol space NoSymbol space keycode 66 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4 keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5 keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6 keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7 keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8 keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9 keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10 keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys keycode 78 = Scroll_Lock NoSymbol Scroll_Lock NoSymbol Scroll_Lock keycode 79 = KP_Home KP_7 KP_Home KP_7 KP_Home KP_7 keycode 80 = KP_Up KP_8 KP_Up KP_8 KP_Up KP_8 keycode 81 = KP_Prior KP_9 KP_Prior KP_9 KP_Prior KP_9 keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode keycode 83 = KP_Left KP_4 KP_Left KP_4 KP_Left KP_4 keycode 84 = KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5 keycode 85 = KP_Right KP_6 KP_Right KP_6 KP_Right KP_6 keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode keycode 87 = KP_End KP_1 KP_End KP_1 KP_End KP_1 keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2 keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3 keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0 keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift keycode 93 = Zenkaku_Hankaku NoSymbol Zenkaku_Hankaku NoSymbol Zenkaku_Hankaku keycode 94 = less greater less greater bar brokenbar keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12 keycode 97 = keycode 98 = Katakana NoSymbol Katakana NoSymbol Katakana keycode 99 = Hiragana NoSymbol Hiragana NoSymbol Hiragana keycode 100 = Henkan_Mode NoSymbol Henkan_Mode NoSymbol Henkan_Mode keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana NoSymbol Hiragana_Katakana keycode 102 = Muhenkan NoSymbol Muhenkan NoSymbol Muhenkan keycode 103 = keycode 104 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter keycode 105 = Control_R NoSymbol Control_R NoSymbol Control_R keycode 106 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab keycode 107 = Print Sys_Req Print Sys_Req Print Sys_Req keycode 108 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R keycode 109 = Linefeed NoSymbol Linefeed NoSymbol Linefeed keycode 110 = Home NoSymbol Home NoSymbol Home keycode 111 = Up NoSymbol Up NoSymbol Up keycode 112 = Prior NoSymbol Prior NoSymbol Prior keycode 113 = Left NoSymbol Left NoSymbol Left keycode 114 = Right NoSymbol Right NoSymbol Right keycode 115 = End NoSymbol End NoSymbol End keycode 116 = Down NoSymbol Down NoSymbol Down keycode 117 = Next NoSymbol Next NoSymbol Next keycode 118 = Insert NoSymbol Insert NoSymbol Insert keycode 119 = Delete NoSymbol Delete NoSymbol Delete keycode 120 = keycode 121 = XF86AudioMute NoSymbol XF86AudioMute NoSymbol XF86AudioMute keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume keycode 124 = XF86PowerOff NoSymbol XF86PowerOff NoSymbol XF86PowerOff keycode 125 = KP_Equal NoSymbol KP_Equal NoSymbol KP_Equal keycode 126 = plusminus NoSymbol plusminus NoSymbol plusminus keycode 127 = Pause Break Pause Break Pause Break keycode 128 = keycode 129 = KP_Separator NoSymbol KP_Separator NoSymbol KP_Separator keycode 130 = Hangul NoSymbol Hangul NoSymbol Hangul keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja NoSymbol Hangul_Hanja keycode 132 = keycode 133 = Super_L NoSymbol Super_L NoSymbol Super_L keycode 134 = Super_R NoSymbol Super_R NoSymbol Super_R keycode 135 = Menu NoSymbol Menu NoSymbol Menu keycode 136 = Cancel NoSymbol Cancel NoSymbol Cancel keycode 137 = Redo NoSymbol Redo NoSymbol Redo keycode 138 = SunProps NoSymbol SunProps NoSymbol SunProps keycode 139 = Undo NoSymbol Undo NoSymbol Undo keycode 140 = SunFront NoSymbol SunFront NoSymbol SunFront keycode 141 = XF86Copy NoSymbol XF86Copy NoSymbol XF86Copy keycode 142 = SunOpen NoSymbol SunOpen NoSymbol SunOpen keycode 143 = XF86Paste NoSymbol XF86Paste NoSymbol XF86Paste keycode 144 = Find NoSymbol Find NoSymbol Find keycode 145 = XF86Cut NoSymbol XF86Cut NoSymbol XF86Cut keycode 146 = Help NoSymbol Help NoSymbol Help keycode 147 = XF86MenuKB NoSymbol XF86MenuKB NoSymbol XF86MenuKB keycode 148 = XF86Calculator NoSymbol XF86Calculator NoSymbol XF86Calculator keycode 149 = keycode 150 = XF86Sleep NoSymbol XF86Sleep NoSymbol XF86Sleep keycode 151 = XF86WakeUp NoSymbol XF86WakeUp NoSymbol XF86WakeUp keycode 152 = XF86Explorer NoSymbol XF86Explorer NoSymbol XF86Explorer keycode 153 = XF86Send NoSymbol XF86Send NoSymbol XF86Send keycode 154 = keycode 155 = XF86Xfer NoSymbol XF86Xfer NoSymbol XF86Xfer keycode 156 = XF86Launch1 NoSymbol XF86Launch1 NoSymbol XF86Launch1 keycode 157 = XF86Launch2 NoSymbol XF86Launch2 NoSymbol XF86Launch2 keycode 158 = XF86WWW NoSymbol XF86WWW NoSymbol XF86WWW keycode 159 = XF86DOS NoSymbol XF86DOS NoSymbol XF86DOS keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver NoSymbol XF86ScreenSaver keycode 161 = keycode 162 = XF86RotateWindows NoSymbol XF86RotateWindows NoSymbol XF86RotateWindows keycode 163 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail keycode 164 = XF86Favorites NoSymbol XF86Favorites NoSymbol XF86Favorites keycode 165 = XF86MyComputer NoSymbol XF86MyComputer NoSymbol XF86MyComputer keycode 166 = XF86Back NoSymbol XF86Back NoSymbol XF86Back keycode 167 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward keycode 168 = keycode 169 = XF86Eject NoSymbol XF86Eject NoSymbol XF86Eject keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject keycode 171 = XF86AudioNext NoSymbol XF86AudioNext NoSymbol XF86AudioNext keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev NoSymbol XF86AudioPrev keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject XF86AudioStop XF86Eject keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord NoSymbol XF86AudioRecord keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind NoSymbol XF86AudioRewind keycode 177 = XF86Phone NoSymbol XF86Phone NoSymbol XF86Phone keycode 178 = keycode 179 = XF86Tools NoSymbol XF86Tools NoSymbol XF86Tools keycode 180 = XF86HomePage NoSymbol XF86HomePage NoSymbol XF86HomePage keycode 181 = XF86Reload NoSymbol XF86Reload NoSymbol XF86Reload keycode 182 = XF86Close NoSymbol XF86Close NoSymbol XF86Close keycode 183 = keycode 184 = keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp NoSymbol XF86ScrollUp keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown NoSymbol XF86ScrollDown keycode 187 = parenleft NoSymbol parenleft NoSymbol parenleft keycode 188 = parenright NoSymbol parenright NoSymbol parenright keycode 189 = XF86New NoSymbol XF86New NoSymbol XF86New keycode 190 = Redo NoSymbol Redo NoSymbol Redo keycode 191 = keycode 192 = keycode 193 = keycode 194 = keycode 195 = keycode 196 = keycode 197 = keycode 198 = keycode 199 = keycode 200 = keycode 201 = keycode 202 = keycode 203 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch keycode 204 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L keycode 205 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L keycode 206 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay keycode 209 = XF86AudioPause NoSymbol XF86AudioPause NoSymbol XF86AudioPause keycode 210 = XF86Launch3 NoSymbol XF86Launch3 NoSymbol XF86Launch3 keycode 211 = XF86Launch4 NoSymbol XF86Launch4 NoSymbol XF86Launch4 keycode 212 = keycode 213 = XF86Standby NoSymbol XF86Standby NoSymbol XF86Standby keycode 214 = XF86Close NoSymbol XF86Close NoSymbol XF86Close keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay keycode 216 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward keycode 217 = keycode 218 = Print NoSymbol Print NoSymbol Print keycode 219 = keycode 220 = XF86WebCam NoSymbol XF86WebCam NoSymbol XF86WebCam keycode 221 = keycode 222 = keycode 223 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail keycode 224 = keycode 225 = XF86Search NoSymbol XF86Search NoSymbol XF86Search keycode 226 = keycode 227 = XF86Finance NoSymbol XF86Finance NoSymbol XF86Finance keycode 228 = keycode 229 = XF86Shop NoSymbol XF86Shop NoSymbol XF86Shop keycode 230 = keycode 231 = Cancel NoSymbol Cancel NoSymbol Cancel keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia NoSymbol XF86AudioMedia keycode 235 = XF86Display NoSymbol XF86Display NoSymbol XF86Display keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp keycode 239 = XF86Send NoSymbol XF86Send NoSymbol XF86Send keycode 240 = XF86Reply NoSymbol XF86Reply NoSymbol XF86Reply keycode 241 = XF86MailForward NoSymbol XF86MailForward NoSymbol XF86MailForward keycode 242 = XF86Save NoSymbol XF86Save NoSymbol XF86Save keycode 243 = XF86Documents NoSymbol XF86Documents NoSymbol XF86Documents keycode 244 = keycode 245 = keycode 246 = keycode 247 = keycode 248 = keycode 249 = keycode 250 = keycode 251 = keycode 252 = keycode 253 = keycode 254 = keycode 255 = This is the modified version keycode 8 = keycode 9 = Escape NoSymbol Escape NoSymbol Escape keycode 10 = 1 exclam 1 exclam 1 exclam keycode 11 = 2 at 2 at 2 at keycode 12 = 3 numbersign 3 numbersign 3 numbersign keycode 13 = 4 dollar 4 dollar 4 dollar keycode 14 = 5 percent 5 percent 5 percent keycode 15 = 6 asciicircum 6 asciicircum 6 asciicircum keycode 16 = 7 ampersand 7 ampersand 7 ampersand keycode 17 = 8 asterisk 8 asterisk 8 asterisk keycode 18 = 9 parenleft 9 parenleft 9 parenleft keycode 19 = 0 parenright 0 parenright 0 parenright keycode 20 = minus underscore minus underscore minus underscore keycode 21 = equal plus equal plus equal plus keycode 22 = BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab keycode 24 = q Q q Q q Q keycode 25 = w W w W w W keycode 26 = e E e E e E keycode 27 = r R r R r R keycode 28 = t T t T t T keycode 29 = y Y y Y y Y keycode 30 = u U u U u U keycode 31 = i I i I i I keycode 32 = o O o O o O keycode 33 = p P p P p P keycode 34 = bracketleft braceleft bracketleft braceleft bracketleft braceleft keycode 35 = bracketright braceright bracketright braceright bracketright braceright keycode 36 = Return NoSymbol Return NoSymbol Return keycode 37 = Super_L keycode 38 = a A a A a A keycode 39 = s S s S s S keycode 40 = d D d D d D keycode 41 = f F f F f F keycode 42 = g G g G g G keycode 43 = h H h H h H keycode 44 = j J j J j J keycode 45 = k K k K k K keycode 46 = l L l L l L keycode 47 = semicolon colon semicolon colon semicolon colon keycode 48 = apostrophe quotedbl apostrophe quotedbl apostrophe quotedbl keycode 49 = grave asciitilde grave asciitilde grave asciitilde keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L keycode 51 = backslash bar backslash bar backslash bar keycode 52 = z Z z Z z Z keycode 53 = x X x X x X keycode 54 = c C c C c C keycode 55 = v V v V v V keycode 56 = b B b B b B keycode 57 = n N n N n N keycode 58 = m M m M m M keycode 59 = comma less comma less comma less keycode 60 = period greater period greater period greater keycode 61 = slash question slash question slash question keycode 62 = Shift_R NoSymbol Shift_R NoSymbol Shift_R keycode 63 = KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab KP_Multiply XF86_ClearGrab keycode 64 = Alt_L keycode 65 = space NoSymbol space NoSymbol space keycode 66 = Control_L keycode 67 = F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 F1 XF86_Switch_VT_1 keycode 68 = F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 F2 XF86_Switch_VT_2 keycode 69 = F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 F3 XF86_Switch_VT_3 keycode 70 = F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4 F4 XF86_Switch_VT_4 keycode 71 = F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5 F5 XF86_Switch_VT_5 keycode 72 = F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6 F6 XF86_Switch_VT_6 keycode 73 = F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7 F7 XF86_Switch_VT_7 keycode 74 = F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8 F8 XF86_Switch_VT_8 keycode 75 = F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9 F9 XF86_Switch_VT_9 keycode 76 = F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10 F10 XF86_Switch_VT_10 keycode 77 = Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys Num_Lock Pointer_EnableKeys keycode 78 = Scroll_Lock NoSymbol Scroll_Lock NoSymbol Scroll_Lock keycode 79 = KP_Home KP_7 KP_Home KP_7 KP_Home KP_7 keycode 80 = KP_Up KP_8 KP_Up KP_8 KP_Up KP_8 keycode 81 = KP_Prior KP_9 KP_Prior KP_9 KP_Prior KP_9 keycode 82 = KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode KP_Subtract XF86_Prev_VMode keycode 83 = KP_Left KP_4 KP_Left KP_4 KP_Left KP_4 keycode 84 = KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5 keycode 85 = KP_Right KP_6 KP_Right KP_6 KP_Right KP_6 keycode 86 = KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode KP_Add XF86_Next_VMode keycode 87 = KP_End KP_1 KP_End KP_1 KP_End KP_1 keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2 keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3 keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0 keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift keycode 93 = Zenkaku_Hankaku NoSymbol Zenkaku_Hankaku NoSymbol Zenkaku_Hankaku keycode 94 = less greater less greater bar brokenbar keycode 95 = F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 F11 XF86_Switch_VT_11 keycode 96 = F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12 F12 XF86_Switch_VT_12 keycode 97 = keycode 98 = Katakana NoSymbol Katakana NoSymbol Katakana keycode 99 = Hiragana NoSymbol Hiragana NoSymbol Hiragana keycode 100 = Henkan_Mode NoSymbol Henkan_Mode NoSymbol Henkan_Mode keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana NoSymbol Hiragana_Katakana keycode 102 = Muhenkan NoSymbol Muhenkan NoSymbol Muhenkan keycode 103 = keycode 104 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter keycode 105 = Control_R NoSymbol Control_R NoSymbol Control_R keycode 106 = KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab KP_Divide XF86_Ungrab keycode 107 = Print Sys_Req Print Sys_Req Print Sys_Req keycode 108 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R keycode 109 = Linefeed NoSymbol Linefeed NoSymbol Linefeed keycode 110 = Home NoSymbol Home NoSymbol Home keycode 111 = Up NoSymbol Up NoSymbol Up keycode 112 = Prior NoSymbol Prior NoSymbol Prior keycode 113 = Alt_R keycode 114 = Right NoSymbol Right NoSymbol Right keycode 115 = End NoSymbol End NoSymbol End keycode 116 = Down NoSymbol Down NoSymbol Down keycode 117 = Menu keycode 118 = Insert NoSymbol Insert NoSymbol Insert keycode 119 = Delete NoSymbol Delete NoSymbol Delete keycode 120 = keycode 121 = XF86AudioMute NoSymbol XF86AudioMute NoSymbol XF86AudioMute keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume keycode 124 = XF86PowerOff NoSymbol XF86PowerOff NoSymbol XF86PowerOff keycode 125 = KP_Equal NoSymbol KP_Equal NoSymbol KP_Equal keycode 126 = plusminus NoSymbol plusminus NoSymbol plusminus keycode 127 = Pause Break Pause Break Pause Break keycode 128 = keycode 129 = KP_Separator NoSymbol KP_Separator NoSymbol KP_Separator keycode 130 = Hangul NoSymbol Hangul NoSymbol Hangul keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja NoSymbol Hangul_Hanja keycode 132 = keycode 133 = Super_L NoSymbol Super_L NoSymbol Super_L keycode 134 = Super_R NoSymbol Super_R NoSymbol Super_R keycode 135 = Menu NoSymbol Menu NoSymbol Menu keycode 136 = Cancel NoSymbol Cancel NoSymbol Cancel keycode 137 = Redo NoSymbol Redo NoSymbol Redo keycode 138 = SunProps NoSymbol SunProps NoSymbol SunProps keycode 139 = Undo NoSymbol Undo NoSymbol Undo keycode 140 = SunFront NoSymbol SunFront NoSymbol SunFront keycode 141 = XF86Copy NoSymbol XF86Copy NoSymbol XF86Copy keycode 142 = SunOpen NoSymbol SunOpen NoSymbol SunOpen keycode 143 = XF86Paste NoSymbol XF86Paste NoSymbol XF86Paste keycode 144 = Find NoSymbol Find NoSymbol Find keycode 145 = XF86Cut NoSymbol XF86Cut NoSymbol XF86Cut keycode 146 = Help NoSymbol Help NoSymbol Help keycode 147 = XF86MenuKB NoSymbol XF86MenuKB NoSymbol XF86MenuKB keycode 148 = XF86Calculator NoSymbol XF86Calculator NoSymbol XF86Calculator keycode 149 = keycode 150 = XF86Sleep NoSymbol XF86Sleep NoSymbol XF86Sleep keycode 151 = XF86WakeUp NoSymbol XF86WakeUp NoSymbol XF86WakeUp keycode 152 = XF86Explorer NoSymbol XF86Explorer NoSymbol XF86Explorer keycode 153 = XF86Send NoSymbol XF86Send NoSymbol XF86Send keycode 154 = keycode 155 = XF86Xfer NoSymbol XF86Xfer NoSymbol XF86Xfer keycode 156 = XF86Launch1 NoSymbol XF86Launch1 NoSymbol XF86Launch1 keycode 157 = XF86Launch2 NoSymbol XF86Launch2 NoSymbol XF86Launch2 keycode 158 = XF86WWW NoSymbol XF86WWW NoSymbol XF86WWW keycode 159 = XF86DOS NoSymbol XF86DOS NoSymbol XF86DOS keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver NoSymbol XF86ScreenSaver keycode 161 = keycode 162 = XF86RotateWindows NoSymbol XF86RotateWindows NoSymbol XF86RotateWindows keycode 163 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail keycode 164 = XF86Favorites NoSymbol XF86Favorites NoSymbol XF86Favorites keycode 165 = XF86MyComputer NoSymbol XF86MyComputer NoSymbol XF86MyComputer keycode 166 = XF86Back NoSymbol XF86Back NoSymbol XF86Back keycode 167 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward keycode 168 = keycode 169 = XF86Eject NoSymbol XF86Eject NoSymbol XF86Eject keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject keycode 171 = XF86AudioNext NoSymbol XF86AudioNext NoSymbol XF86AudioNext keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev NoSymbol XF86AudioPrev keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject XF86AudioStop XF86Eject keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord NoSymbol XF86AudioRecord keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind NoSymbol XF86AudioRewind keycode 177 = XF86Phone NoSymbol XF86Phone NoSymbol XF86Phone keycode 178 = keycode 179 = XF86Tools NoSymbol XF86Tools NoSymbol XF86Tools keycode 180 = XF86HomePage NoSymbol XF86HomePage NoSymbol XF86HomePage keycode 181 = XF86Reload NoSymbol XF86Reload NoSymbol XF86Reload keycode 182 = XF86Close NoSymbol XF86Close NoSymbol XF86Close keycode 183 = keycode 184 = keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp NoSymbol XF86ScrollUp keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown NoSymbol XF86ScrollDown keycode 187 = parenleft NoSymbol parenleft NoSymbol parenleft keycode 188 = parenright NoSymbol parenright NoSymbol parenright keycode 189 = XF86New NoSymbol XF86New NoSymbol XF86New keycode 190 = Redo NoSymbol Redo NoSymbol Redo keycode 191 = keycode 192 = keycode 193 = keycode 194 = keycode 195 = keycode 196 = keycode 197 = keycode 198 = keycode 199 = keycode 200 = keycode 201 = keycode 202 = keycode 203 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch keycode 204 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L keycode 205 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L keycode 206 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay keycode 209 = XF86AudioPause NoSymbol XF86AudioPause NoSymbol XF86AudioPause keycode 210 = XF86Launch3 NoSymbol XF86Launch3 NoSymbol XF86Launch3 keycode 211 = XF86Launch4 NoSymbol XF86Launch4 NoSymbol XF86Launch4 keycode 212 = keycode 213 = XF86Standby NoSymbol XF86Standby NoSymbol XF86Standby keycode 214 = XF86Close NoSymbol XF86Close NoSymbol XF86Close keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay keycode 216 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward keycode 217 = keycode 218 = Print NoSymbol Print NoSymbol Print keycode 219 = keycode 220 = XF86WebCam NoSymbol XF86WebCam NoSymbol XF86WebCam keycode 221 = keycode 222 = keycode 223 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail keycode 224 = keycode 225 = XF86Search NoSymbol XF86Search NoSymbol XF86Search keycode 226 = keycode 227 = XF86Finance NoSymbol XF86Finance NoSymbol XF86Finance keycode 228 = keycode 229 = XF86Shop NoSymbol XF86Shop NoSymbol XF86Shop keycode 230 = keycode 231 = Cancel NoSymbol Cancel NoSymbol Cancel keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia NoSymbol XF86AudioMedia keycode 235 = XF86Display NoSymbol XF86Display NoSymbol XF86Display keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp keycode 239 = XF86Send NoSymbol XF86Send NoSymbol XF86Send keycode 240 = XF86Reply NoSymbol XF86Reply NoSymbol XF86Reply keycode 241 = XF86MailForward NoSymbol XF86MailForward NoSymbol XF86MailForward keycode 242 = XF86Save NoSymbol XF86Save NoSymbol XF86Save keycode 243 = XF86Documents NoSymbol XF86Documents NoSymbol XF86Documents keycode 244 = keycode 245 = keycode 246 = keycode 247 = keycode 248 = keycode 249 = keycode 250 = keycode 251 = keycode 252 = keycode 253 = keycode 254 = keycode 255 = Entry: memtest Date: Thu May 14 13:08:20 CEST 2009 I believe recent kernels have memtest. Let's figure out how this works and test degamma. Let's compile 2.6.28.8 Entry: windows/cygwin firewall Date: Thu May 14 17:52:43 CEST 2009 netstat -an # list connections netsh firewall show config # guess allow vnc: netsh firewall add portopening TCP 5800 vnc netsh firewall add portopening TCP 5900 vnc Entry: todo system work Date: Thu May 14 18:13:06 CEST 2009 - degamma memory test - degamma backup / upload sync - plt servlets Entry: fluxus build deps Date: Thu May 14 22:11:00 CEST 2009 sudo apt-get install dpatch debhelper scons libode0-dev libfftw3-dev libjack-dev libsndfile1-dev liblo0-dev libglew1.5-dev libfreetype6-dev libpng12-dev libtiff4-dev libglut3-dev libjpeg62-dev libx11-dev libglu1-mesa-dev libglu1-xorg-dev libasound2-dev if i recall the problem with fluxus is that it needs mzscheme as a library.. is this still the case? looks like it.. Entry: plt for debian Date: Thu May 14 22:29:56 CEST 2009 time to bite the bullet and make a plt deb package for cvs which supports shared libraries. also it would be a good idea to wrap planet packages in .deb packages. planet is fine and all, but it does take quite a while to install.. i'd like to separate install/compile from use. let's get the plt-scheme debian source package and have a look at the diff. it should not be too hard to port it to the current cvs version and apt-get source plt-scheme compiling plt: From this directory (where the `README' and `configure' files are), run the following commands: mkdir build cd build ../configure make make install This will create an in-place installation of PLT Scheme and store the results of C/C++ compilation in a separate `build' subdirectory, which is useful if you need to update your sources, delete the build, and start from scratch. You can also run the typical `./configure && make && make install' if you don't anticipate updating/rebuilding, but it will be harder to restart from scratch should you need to. using config --enable-shared note that the "make install" step performs a significant amount of scheme compilation. this apparently also goes through the planet packages, so make sure they compile. so where does it end up? -> in the plt/bin and plt/lib directories. now copying the debian/ directory from the 4.0.1-2 debian package. it seems the source tree is not modified. oops apparently there are debian/patches -rw-r--r-- 1 tom users 1787 2009-05-14 22:35 00_debian-nonstandard-install.patch -rw-r--r-- 1 tom users 1046 2009-05-14 22:35 02_alpha-compile-fix.patch -rw-r--r-- 1 tom users 2618 2009-05-14 22:35 05_paths-fix.patch -rw-r--r-- 1 tom users 46 2009-05-14 22:35 series it seems to build with patches/series cleared now trying with last pkg-plt-scheme update (see next post) Entry: plt-scheme package Date: Fri May 15 11:04:14 CEST 2009 The debian package tree can be found here: svn co svn://svn.debian.org/svn/pkg-plt-scheme/plt-scheme/trunk The last entry is: plt-scheme (4.1.5-1) unstable; urgency=low * New upstream version -- Ari Pollak <ari@debian.org> Sun, 22 Mar 2009 21:55:44 -0400 Also see http://bugs.debian.org/cgi-bin/pkgreport.cgi?package=plt-scheme To build a SVN of plt scheme version, make sure the plt tree contains the debian/ dir from the debian package tree, and add something like the following to the top of the debian/changelog file: plt-scheme (svn-20090515) unstable; urgency=low * Updated from upstream svn. -- Tom Schouten <tom@zwizwa.be> Fri, 15 May 2009 10:14:31 +0200 Now run "dpkg-buildpage -b" in the plt source tree. Apparently the latest 4.1.5-1 debian package does not have shared libraries enabled which is necessary for fluxus. Two problems with debian source: - it doesn't build shared libraries - setup-plt needs to stay away from my ~/.plt-scheme collection From Eli: > Is there a way to compile PLT Scheme from source without setup-plt > looking in the compiling user's ~/.plt-scheme directory for > collections? Use `make plain-install' to avoid running setup-plt, and then run it manually with .../mzscheme -l- setup -U Using this information with a glance on the Makefile.in shows me this: SETUP_ARGS = -X "$(DESTDIR)$(collectsdir)" -l setup install-3m: $(MAKE) install-3m-common mzscheme/mzscheme@MMM@ $(SETUP_ARGS) $(MAKE) install-common-last Changing this should do it: SETUP_ARGS = -X "$(DESTDIR)$(collectsdir)" -l setup -U Entry: packages from multiple debian releases Date: Fri May 15 11:35:36 CEST 2009 /etc/apt/preferences: Package: * Pin: release a=lenny Pin-Priority: 600 Package: plt-scheme Pin: release a=unstable Pin-Priority: 800 now, apt-get has the -t option which allows you to pin a certain package at priority 990. Entry: fluxus Date: Fri May 15 12:03:07 CEST 2009 with plt installed as a debian package, fluxus needs ths: scons PLTPrefix=/usr this can be automated: http://docs.plt-scheme.org/setup-plt/dirs.html mzscheme --eval '(require setup/dirs)(printf "~a\n" (find-lib-dir))' it seems fluxus needs to be installed to be able to run. ok, it runs. Entry: giebrok as caching server? Date: Sun May 17 09:25:01 CEST 2009 Actually.. Instead of storing anything of importance on the rack server, why not turn it into a cache of locally stored data? Run a cache sync once a day but for the rest upload objects on demand. It's not that giebrok has a lot of user load.. I'm mostly concerned about bandwidth created by bots etc.. Entry: merging Date: Sun May 17 09:53:40 CEST 2009 the more i play with multiple computers, the more i see that merging is really not so trivial.. Entry: giebrok updates Date: Mon May 18 09:51:00 CEST 2009 * make a script that sends incremental updates using rsync.merge (for safety, so it won't delete anything if something goes wrong) * once in a while perform an automated rsync.clone to clean up target's garbage files. Entry: diff Date: Mon May 18 09:52:18 CEST 2009 I talked about this before in [1]. Apparently "svn diff" produces a diff that can be used with patch. [1] entry://20080923-073506 Entry: emacs comint shell vs term Date: Tue May 19 12:57:08 CEST 2009 I'm trying to run socat like this: TTY=/dev/ttyS0 BAUD=115200 TARGET_TTY=$TTY,b$BAUD,raw,echo=0 CONSOLE_TTY=`tty`,raw,echo=0 socat $TARGET_TTY $CONSOLE_TTY Here socat is quite literally a null modem connecting two bidirectional terminals. But in a comint shell buffer this does echo, just like it does when running with CONSOLE_TTY=- Running it in an x-terminal or emacs's term or ansi-term modes does give proper non-echoing behaviour. Have to set "export LINES=33" to make "dmesg|less" work properly. Ha! http://blog.orebokech.com/2008/07/emacs-snapshot-20080727-1.html M-x serial-term Not working in my 22 though.. Entry: shell scripting and garbage collection Date: Sun Jun 14 10:36:08 CEST 2009 One of the things that has allways annoyed me is that file systems do not have garbage collection. The problem is really that it is not straightforward to determine whether a process is using a file. Ok, if the file is opened this is simple, but often some comination of processes has a collection of intermediate files that are not referenced but still needed in the future. However, there are alternatives that are easier to use. Having something like "dynamic-wind" to provide a centralized cleanup point is maybe good enough. First, adding some dispatching to a shell script makes composition easier. Instead of seeing a script as a single command, simply adding more commands makes it possible to recursively invoke locally defined code in different contexts. A dispatcher takes the following form: #!/bin/bash receive () { if [ "$1" == send ]; then shift "$@" else main "$@" fi } Now, the other problem is temp storage: you'd really want to abstract this. One solution is to always open a temp dir which will be ruthlessly removed whenever a process finishes. What about this: 1. always run a "worker" script inside a "framework" script that provides resource management. whenever the worker terminates, resources get freed. (this is dynamic-wind). 2. use dispatching. Entry: ntfs-3g Date: Mon Jun 22 12:19:48 CEST 2009 This[1] is a life saver. Works very will with the new netbooting facility i have in place. Apparently NTFS in the kernel is very limited RW because of corruption issues with the previous driver. [1] http://www.ntfs-3g.org/ Entry: Windows user profiles Date: Sun Jun 21 12:26:22 CEST 2009 To store the "My Documents" folder on a network drive, change the entry "Personal" in the registry: (regedit.exe) HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/User Shell Folders This also works for "Desktop" Entry: Windows XP security center Date: Sun Jun 21 13:03:20 CEST 2009 It is a service and can be disabled. Control Panel -> System Administration -> Services Entry: Windows WP Automatic Login Date: Sun Jun 21 13:04:14 CEST 2009 In the registry: HKEY_CURRENT_USER/Software/Microsoft/Windows NT/CurrentVersion/Winlogon Set the following entries: DefaultUser DefaultPassword AutoAdminLogon 1 Entry: P4 Medion 3500 ver 1 Date: Sun Jun 21 14:10:47 CEST 2009 2 memory slots. DDR / DDR2 ? Ok. stupid, just look at the sticker: 256 PC2100 DDR Entry: Linux to Windows XP printing Date: Sun Jun 21 14:46:58 CEST 2009 Apparently it's possible to enable unix TCP/IP printing[1]. [1] http://en.opensuse.org/Print_to_Windows_printer [2] http://www.linuxprinting.org/show_printer.cgi?recnum=HP-PSC_1510 Entry: new toy Date: Mon Jun 22 18:38:37 CEST 2009 Got a phenom II - installing debian amd64. Time to reorganize zzz, since it looks like I need to install a new system. The idea is to start working on the redundant set of services for all 3 nodes to run (zwizwa, zzz, giebrok). First problem that we're going to run into: 32 bit binary applications. Is it possible to run this in a vserver? If so, old zzz could be migrated incrementally to 64 bit. Ok this seems to be no problem.. Let's work like that for a bit. What needs to be host, and what can be vserver? host: - firewall - quagga routing + openvpn guest (zzz): - squid + privoxy - apache + plt-web-server - exim - cups - tftp + nfs - samba Entry: host -> guest conversion Date: Tue Jun 23 10:16:20 CEST 2009 What startup scripts need to be removed? - firewall - network - anything old in /etc/rc.boot that loads modules directly - kernels, all module and hal stuff What packages are no longer neded (apt-get remove) - xserver-xorg wdm jackd - util-vserver - quagga openvpn - autofs nfs-kernel-server - klogd Fixes /etc/fstab needs to be removed. make sure the directories that are configured in /etc/vservers/zzz/fstab are available It pauses at: Starting kernel log daemon... Aha. What I'm looking for is vserver-debiantools: Description: Tools to manage debian virtual servers This package contain tools to manage debian based virtual servers. There are tools to create and duplicate a virtual server. There is also a tool to strip a copy of a normal debian installation from hardware dependent things. Hmm.. i guess i used it wrong, it messed up the /dev dir and didn't do much else.. Entry: migrating services Date: Tue Jun 23 11:39:16 CEST 2009 Looks like the simple services are already ok. Let's add one level of transparency to the DNS to re-route them. Runit is back up also. Time to start thinking about network topology. I kept it mostly the same, with lowlevel services now running on the host, and all the highlevel stuff on the guest. lowlevel: firewall, openvpn, dns, quagga, squid, tftp, nfsroot Entry: migrated Date: Tue Jun 23 16:18:53 CEST 2009 now the remaining problems are the non-trusted IP space (wireless) and the video drivers for Radeon HD 3300. for now I'm going to stick with lex as a terminal. i am a bit disappointed by the mzc performance though.. machine is quite nice for the rest, but for scheme compiling it doesnt seem to be much faster. Ok, @ 2.8GHz it's about 1.5 - 2.0 x faster than the pentium-M @ 1.8 GHz. Entry: debian unstable Date: Wed Jun 24 12:40:47 CEST 2009 Is indeed unstable.. There's currently a broken package somewhere in the dependencies of fglrx. Apparently everything is in lenny, but I didn't see it because i had the "non-free" section omitted. I only found out after switching to sid. The good thing however is that aptitude seems to be able to fix most of the problems this solves.. I'm still not sure on how to instruct it to downgrade a whole tree of packages, but at least it is able to figure out some things from downgrading independent packages. Entry: fglrx Date: Wed Jun 24 13:57:43 CEST 2009 So.. apparently there's a problem in lenny. The ati and radeonhd drivers both don't recognize the card. This works in sid though, but there seems to be no accell. The fglrx driver seems to compile in lenny (it doesn't in sid) but it doesn't work:. My guess is that it has something to do with the 32-bit emulation necessary to get the driver to load, and the fact that I'm running with 4G. I tried mem=3G as boot param, but no difference.. I'm not really in the mood right now to figure it out.. X.Org X Server 1.4.2 Release Date: 11 June 2008 X Protocol Version 11, Revision 0 Build Operating System: Linux Debian (xorg-server 2:1.4.2-10.lenny1) Current Operating System: Linux zni 2.6.26-2-vserver-amd64 #1 SMP Thu May 28 23:32:33 UTC 2009 x86_64 Build Date: 09 March 2009 09:53:09AM Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Wed Jun 24 13:59:53 2009 (==) Using config file: "/etc/X11/xorg.conf" (EE) Failed to load module "mouse" (module does not exist, 0) (EE) Failed to load module "kbd" (module does not exist, 0) WARNING: All config files need .conf: /etc/modprobe.d/oss-compat, it will be ignored in a future release. (EE) fglrx(0): [FB] Can not get FB MC address range. (II) Module "ddc" already built-in (II) Module "ramdac" already built-in (EE) fglrx(0): atiddxDriScreenInit failed, GPS not been initialized. Fatal server error: xf86MapVidMem: Could not mmap framebuffer (0x95600000,0x10000000) (Invalid argument) (EE) fglrx(0): PPLIB: PPLIB is not initialized!. (EE) fglrx(0): PPLIB: swlPPLibNotifyEventToPPLib() failed! (EE) fglrx(0): ulEventType = 0000000c, ulEventData = 00000001 (EE) fglrx(0): PPLIB: PPLIB is not initialized!. (EE) fglrx(0): PPLIB: swlPPLibNotifyEventToPPLib() failed! (EE) fglrx(0): ulEventType = 00000002, ulEventData = 00000000 (EE) fglrx(0): firegl_SetSuspendResumeState FAILED -9. Entry: mozilla flash player on lenny amd64 Date: Wed Jun 24 20:06:22 CEST 2009 # in /etc/apt/sources.list add deb http://www.debian-multimedia.org lenny main contrib non-free # then run apt-get install flashplayer-mozilla # after this i still had to download the flashplayer plugin and copy # it to ~/.mozilla/plugins/ but the dependencies were satisfied. Apparently there is now a 64bit version from Adobe. Entry: memory maps Date: Fri Jun 26 11:22:43 CEST 2009 Fatal server error: xf86MapVidMem: Could not mmap framebuffer (0x95600000,0x10000000) (Invalid argument) Maybe it's good to try to figure out what's going on here. I found some links[1][2]. MTRR memory type rage registers control of how accesses to memory ranges by the CPU are cached PAT improvement to MTRR (per page) zni:~# cat /proc/mtrr reg00: base=0x00000000 ( 0MB), size=2048MB: write-back, count=1 reg01: base=0x80000000 (2048MB), size=1024MB: write-back, count=1 reg02: base=0xc0000000 (3072MB), size= 256MB: write-back, count=1 [1] http://kerneltrap.org/mailarchive/linux-kernel/2008/5/5/1733824/thread [2] http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-05/msg04111.html [3] http://cateee.net/lkddb/web-lkddb/X86_PAT.html Entry: building a debian kernel Date: Fri Jun 26 11:33:00 CEST 2009 How to 1. build a debian kernel exactly as packaged 2. tweak it This will simply install the kernel in /usr/src, which is not really what we're looking for: apt-get install linux-source-2.6.18 tar jxf /usr/src/linux-source-2.6.18.tar.bz2 To build a new installable .deb apt-get source needs to be used: apt-get source linux-source-2.6.26 cd linux-2.6-2.6.26/ fakeroot make -f debian/rules.gen binary-arch-i386-vserver-686 # MAKE -j ? [1] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html Entry: ATI 3300 Date: Fri Jun 26 12:27:47 CEST 2009 With only 2G in the machine it seems to give an image, though the machine reboots when I kill the X server. So.. what to do next? I really don't feel like loosing time with this. Let's give up the ATI proprietary path and try to get 2D accell working with the open source drivers, switching back to debian unstable. Ok. The radeon kernel module apparently doesn't recognize the card. Let's build a fresh kernel. REV=1 # make one before calling make-kpkg CONCURRENCY_LEVEL=6 make-kpkg \ --rootcmd fakeroot \ --initrd \ --revision=$REV \ kernel_image Works: 2.6.30 + 1.6.1.902 (1.6.1 RC 1) Now let's try with vserver.. radeon doesn't work in 2.6.29.5 Entry: workstation != server Date: Fri Jun 26 14:40:34 CEST 2009 Ah crap this version doesn't have a vserver patch... Trying 2.6.29.5 now. Maybe I should just give up on the vserver stuff on the desktop? It leads to too many kernel patch dependencies.. Let's move everything from zzz to zni. Alternatively I can just keep the old zzz setup but run it on a different box. This stuff gets quite complicated.. No, aim should really be to have it all on one box. I could prepare the duron box/1G to run the zzz vserver, then later maybe solve it using xen or so. No, it's better to move the old zzz disk that's in the lex box to the duron box for backup, and see if I can use some other way of virtualization.. Or maybe the patch works with 2.6.30 ? So, yes, because I'm not going to stop experimenting with the phenom box it's probably best to pre-empt things and reinstate zzz as the duron box. Entry: lvm raid Date: Sat Jun 27 20:37:07 CEST 2009 got 2x 1G disks. what i want is 300 meg raid for root and important data, and the rest (2x700) as a single non-raid volume. ok.. looks like i need to shrink my 900MB root partition first. this can't be done online, so first step is to create a new VG and a smaller LV on it. This is _not_ what i'm looking for: lvconvert -i 1 -m 1 --corelog /dev/vg1/root /dev/sda2 converting it back using: lvconvert -i 1 -m 0 /dev/vg1/root Apparently[1] you need 3 pvs for mirror, one to save the log. Luckily I have another partition ready. The proper way is: lvconvert -i 1 -m 1 --mirrorlog disk /dev/vg1/root /dev/sda2 /dev/sdb2 /dev/sdb1 I'm chaining up the remaining space on the two harddrives to use as scratch space. The current allocation is: zni:/home/tom# lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices root vg1 mwi-ao 300.00G root_mlog 18.00 root_mimage_0(0),root_mimage_1(0) [root_mimage_0] vg1 Iwi-ao 300.00G /dev/sdb2(0) [root_mimage_1] vg1 Iwi-ao 300.00G /dev/sda2(0) [root_mlog] vg1 lwi-ao 4.00M /dev/sdb1(0) scratch vg1 -wi-ao 1.22T /dev/sda2(76800) scratch vg1 -wi-ao 1.22T /dev/sdb2(79360) swap_1 vg1 -wi-ao 10.00G /dev/sdb2(76800) [1] https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/121527 Entry: new filesystem org Date: Sun Jun 28 12:45:02 CEST 2009 /usr/local/src all local system software /opt special stuff (cross dev, nfsroot, ...) /home/tom other data + active dev projects nfsroot will remain on zzz, with zni carrying a backup in case it needs to take over. i would like to move back to having zzz as a vhost on zni.. maybe using qemu this time? anyways.. incremental stuff. Entry: kvm Date: Sun Jun 28 13:26:39 CEST 2009 Looks like kvm works quite well. Tried with the XP image and it's indeed a lot faster than qemu + kqemu. Maybe try to get a linux image going that boots from the network. [1] http://azerthoth.blogspot.com/2007/07/qemukvmand-trick.html Entry: netboot Date: Sun Jun 28 15:00:33 CEST 2009 next to the xenomai netboot foor athlon I'm going to build a generic boot image supporting all architectures from a vanilla 2.6.30 apparently it is not so easy to compile a 32bit kernel on a 64bit machine. Entry: schroot Date: Tue Jun 30 16:24:54 CEST 2009 It's necessary to use "schroot" for building 32bit apps on 64bit: the point being that "uname -m" needs to return the proper architecture, which is done by using the persionality syscall. This is apparently necessary for making gcc work. Making a lenny chroot in /opt/src to simplify building .deb packages. Entry: md5-ify Date: Wed Jul 1 11:57:20 CEST 2009 Problem: rotating logs for apache are a _working_ storage mechanism. I'm keeping 52 weeks worth of logs: # cat /etc/logrotate.d/apache2 /var/log/apache2/*.log { ... rotate 52 ... } The problem however is that with incremental rsync clone based backups, these get re-transferred. A simple way to fix this is to hash them, and store the hashed files in a subdirectory. This way only links get rotated. Ok. Got 2 scripts: md5-dir-encode md5-dir-decode Entry: apache logs Date: Wed Jul 1 13:47:21 CEST 2009 Now, how to keep track of the apache logs.. If I fish them out of the md5 pool before they get deleted, it is possible to keep the filesystem cloned, not merged. Can the logs be recovered merely from content? This would make it easier as it's not necessary to keep track of names. Yes. Let's keep it simple and assume it's all a single data pool. Entry: file stores (databases) as objects Date: Wed Jul 1 14:06:58 CEST 2009 It's probably simplest to start looking at large collections of data as objects. Currently I have a blind md5 store. Adding an index to this might make postprocessing simpler. Each object would have a "bin" directory which contains methods that operate on its store. Entry: giebrok backups Date: Wed Jul 1 14:12:31 CEST 2009 (this needs to be automated later) before running a backup, make sure that apache2 and exim4 log directories are md5 pooled and clear /var/lib/apt/cache Also: check giebrok:/var/log/ls-al later to see if rotating works with links!! Entry: handbrake-gtk Date: Fri Jul 3 17:12:01 CEST 2009 From debian-multimedia. It uses: * liba52 (AC3 decoding) * libavcodec (decoding, picture cropping, scaling and deinterlacing, MPEG-4 encoding) * libdvdread (DVD navigation) * libfaac (AAC encoding) * libmp3lame (MP3 encoding) * libmp4v2 (MP4 muxing) * libmpeg2 (MPEG-2 decoding) * libogg (OGM muxing) * libsamplerate (audio resampling) * libvorbis (Vorbis encoding) * libx264 (H264 encoding) * libxvidcore (MPEG-4 encoding) The default is 1-pass 1000bps H.264 + AAC in a MP4 container. The two-pass version of this is: HandBrakeCLI -T2 -i <dvd> -o video.mp4 [1] http://trac.handbrake.fr/wiki/CLIGuide Entry: ecos Date: Fri Jul 3 20:36:38 CEST 2009 tom@zni:~$ wget --passive-ftp ftp://ecos.sourceware.org/pub/ecos/ecos-install.tcl tom@zni:~$ sudo ecos-install.tcl sudo: ecos-install.tcl: command not found tom@zni:~$ sudo sh ecos-install.tcl eCos installer v2.0.1 starting... Written and maintained by Jonathan Larmour <jifl@eCosCentric.com> Retrieving installer metadata information... Connected... Downloading ecos-install.db... File size 6807 bytes [**************************************************] --------------------------------------------------------- Available distribution sites: [1] ftp://mirrors.kernel.org/sources.redhat.com/ecos [2] http://mirrors.kernel.org/sources.redhat.com/ecos [3] ftp://mirror.aarnet.edu.au/pub/sourceware/ecos [4] http://mirror.aarnet.edu.au/pub/sourceware/ecos [5] ftp://ftp.mirrorservice.org/sites/sources.redhat.com/pub/ecos [6] http://www.mirrorservice.org/sites/sources.redhat.com/pub/ecos [7] ftp://gd.tuwien.ac.at/opsys/ecos [8] http://gd.tuwien.ac.at/opsys/ecos [9] ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/ecos [10] ftp://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos [11] http://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos [12] ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.redhat.com/ecos [13] http://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.redhat.com/ecos [14] ftp://bo.mirror.garr.it/mirrors/sourceware.org/ecos [15] http://bo.mirror.garr.it/mirrors/sourceware.org/ecos [16] ftp://ftp.u-aizu.ac.jp/pub/gnu/cygnus/ecos [17] ftp://ftp.chg.ru/pub/sourceware/ecos [18] ftp://ftp.sun.ac.za/pub/mirrorsites/sourceware.org/pub/ecos [19] http://ftp.sun.ac.za/ftp/pub/mirrorsites/sourceware.org/pub/ecos [20] ftp://ftp.twaren.net/Unix/Sourceware/ecos [21] http://ftp.twaren.net/Unix/Sourceware/ecos [22] ftp://mirror.facebook.com/sourceware/ecos [23] http://mirror.facebook.com/sourceware/ecos [24] http://sources-redhat.mirrors.airband.net/ecos [25] ftp://ecos.sourceware.org/pub/ecos Please select a distribution site: 10 --------------------------------------------------------- Please select a directory for installation [Default /opt/ecos]: --------------------------------------------------------- Available prebuilt GNU tools: [1] arm-eabi [2] arm-elf (old) [3] i386-elf [4] m68k-elf [5] mipsisa32-elf [6] powerpc-eabi [7] sh-elf [q] Finish selecting GNU tools ("*" indicates tools already selected) Please select GNU tools to download and install: 3 <snip> Please select GNU tools to download and install: q Directory /opt/ecos does not exist... creating. Entering /opt/ecos Retrieving GNU tools for i386-elf Connected... Downloading ecoscentric-gnutools-i386-elf-20081107-sw.i386linux.tar.bz2... File size 15414738 bytes [**************************************************] Retrieving eCos version 3.0 Connected... Downloading ecos-3.0.i386linux.tar.bz2... File size 17854418 bytes [**************************************************] Downloads complete. If you wish to disconnect from the internet you may do so now. Unpacking ecoscentric-gnutools-i386-elf-20081107-sw.i386linux.tar.bz2... Unpacking ecos-3.0.i386linux.tar.bz2... Generating /opt/ecos/ecosenv.sh Generating /opt/ecos/ecosenv.csh --------------------------------------------------------- In future, to establish the correct environment for eCos, run one of the following commands: . /opt/ecos/ecosenv.sh (for sh/bash users); or source /opt/ecos/ecosenv.csh (for csh/tcsh users) It is recommended you append these commands to the end of your shell startup files such as $HOME/.profile or $HOME/.login --------------------------------------------------------- Installation complete! Entry: git Date: Sat Jul 4 10:48:08 CEST 2009 clone: make a local copy of a repo checkout: convert local copy to branch Entry: lvm mirror Date: Sun Jul 5 12:45:33 CEST 2009 /dev/hda1 /dev/hda2 root mirror 1 /dev/hdb1 meta /dev/hdb2 rood mirror 2 checked using hexdump to see taht the data is indeed physically present on both disks. now check if a mirror can be recovered if the meta data partition is corrupted. starting with just hdb the disk won't mount. same for just hda. so how to recover? hmm... from what i can understand it's maybe not such a good idea to use lvm for raid1. a very nice feature of md is that the drives by themselves work normally without md. and everything just works when you remove one of the drives with md running. Entry: mac Date: Sun Jul 5 13:56:26 CEST 2009 put the old 30G ubuntu disk back in the G4. took out 80G disk. it seems to contain bad blocks, so i'm wiping it to trigger a remap.. apart from a couple of localized sectors it seems to be ok. Entry: conventional -> md Date: Mon Jul 6 09:34:30 CEST 2009 What I'm trying to figure out is how to convert a conventional disk into an md one. Starting with one partition hdb1 and trying to turn this into /dev/md0 together with hda1. This complains that hdb1 already contains a fs: mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda1 /dev/hdb1 So, make sure the _live_ partition is added as missing. mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda1 missing The debian guide[1] talks about copying the data. So it looks like it is not possible to to copy the filesystem as a whole.. Maybe it is.. How to find out the size of a block device? It can be done using cfdisk /dev/md0... Apparently it uses 173 sectors. So.. this probably rules out copying lvm partitions in the raw format.. Means I need to do some repartitioning again, or figure out how to use the lvm raid. [1] http://www.google.com/search?q=rootraiddoc.97.html&hl=en&start=10&sa=N Entry: LVM2 mirror recovery Date: Mon Jul 6 11:13:50 CEST 2009 Shut down and unplug one of the mirrored drives (i removed the one which also contained the mirrorlog). When restarted there will be a bunch of warnings ("Couldn't find device..."). Convert the logical volume(s) back to linear using: vgreduce --removemissing vg1 This leaves you with an inactive volume. To enable all logical volumes do: vgchange -a y At this point the volume shows up in /dev/mapper and can be mounted. Rebooting and re-enabling the drive gives some warnings about inconsistency. I then tried this: pvcreate /dev/hdb[12] vgextend vg1 /dev/hdb[12] lvconvert -i 1 -m 1 --mirrorlog disk /dev/vg1/root /dev/hda2 /dev/hdb2 /dev/hdb1 Then it tells me "Conversion starts after activation", so I activate again: vgchange -a y Entry: converting plain to lvm root fs in debian Date: Mon Jul 6 12:05:47 CEST 2009 The lenny installer did it for me on the new box. Trying to convert zzz to do the same.. Old initrd won't boot. Do this to fix it: update-initramfs -k all -u Entry: LVM leaky abstraction Date: Mon Jul 6 16:12:37 CEST 2009 So.. LVM is supposed to rid you of all partion problems. However, when creating a mirror you do need an extra PV for the log. This means you need to thing _ahead_ about how many mirrored LVs you are going to create. The simplest way is to reserve a part of a disk with a couple of small logical partitions to store these logs. It seems possible to initialize LVs as PVs, but I did get a warning that I tried to do this within the same group. So it looks like they can probably be stacked, as long as it's not done circularly. Entry: Ubuntu 8.04 Date: Wed Jul 8 15:08:50 CEST 2009 I'm a bit sick of playing with libtool. Trying to start with ubuntu 8.04 which is known to work. Installing in kvm/qemu didn't seem to work, so I'm extracting the .squashfs manually by mounting the iso and running unsquashfs. Strip it from unnecessary cruft: apt-get remove xserver-xorg-core libgtk2.0-0 libasound2 ... Entry: The monitor keeps turning off every couple of minutes Date: Thu Jul 9 16:37:41 CEST 2009 she says.. And I keep forgetting how to do disable screen blank. xset s off Entry: giebrok + kurk Date: Thu Jul 9 20:58:07 CEST 2009 It's too difficult right now to run things on two different webservers. Maybe I should move dotp to giebrok, or zwizwa.be to kurk. Moved the apache + data part of dotp to giebrok. Doesn't look like php is working properly. Anyways, I need to move dotp to sweb to make things simpler. Entry: bootstrapping and cross-compiling with qemu Date: Fri Jul 10 11:01:26 CEST 2009 Trying to cross-compile scsh for mipsel. The problem is that the build process executes compiled code. It's perfectly possible to use qemu to run that code, but convincing autotools it can do so is not so simple apparently.. I.e. for the openwrt build I use: qemu-mipsel -L /opt/xsrc/openwrt/8.09/build_dir/mipsel/root-brcm-2.4/ <program> The -L parameter is necessary for shared libraries. Static programs don't need it. Now this seems to be automated with scratchbox[1][2] apt-get install scratchbox2 $ cd /opt/xc/openwrt/8.09/build_dir/mipsel/root-brcm-2.4 $ sb2-init -c qemu-mipsel openwrt mipsel-linux-gcc hmm... errors.. it doesn't work on amd64 (the tools are built on a 32bit machine) and when running in a 32bit schroot i get: 2009-07-11 15:59:11.766 (ERROR) sh[31476] Unidentified executable detected (/opt/xc/openwrt/8.09//staging_dir/toolchain-mipsel_gcc3.4.6/bin/mipsel-linux-gcc) Like this[4]. Maybe I'm misunderstanding. Does it use cross tools or not? I.e. does gcc itself run in the simulator, or on the host[3]? No it does use cross tools... Hmm, I don't get it.. Let's leave this for another time when I find more docs.. It does look like an interesting project though. [1] http://felipec.wordpress.com/2009/06/07/installing-scratchbox-1-and-2-for-arm-cross-compilation/ [2] http://www.freedesktop.org/wiki/Software/sbox2 [3] http://scratchbox.org/wiki/ForeignToolchains [4] http://lists.openmoko.org/nabble.html#nabble-td2457004 Entry: bootstrapping scsh with qemu-mipsel Date: Sat Jul 11 18:10:36 CEST 2009 So, let's try it manually. Is there a way to bypass the following: checking link with -rdynamic... configure: error: cannot run test program while cross compiling Simply bypassing the check in ./configure makes it finish. Let's run make. In build/build-usual-image I prefix the vm invocation: - ./$vm -o ./$vm -i $initial batch <<EOF + ../mipsel ./$vm -o ./$vm -i $initial batch <<EOF Hmm... This gets pretty hairy: tom@zni:/opt/xc/openwrt/scsh-0.6.7$ make ./build/build-usual-image . "./scheme" 'scsh.image' './scshvm' \ './build/initial.image' ./scheme/env/init-defpackage.scm #{Unspecific} ./scheme/more-interfaces.scm Exception: 3 unimplemented-instruction make: *** [scsh.image] Error 1 Ok, it doesn't even build on amd64 nor in the 32bit chroot... Probably needs some old gcc.. Well, forget it then. Entry: fglrx problem Date: Sat Jul 11 18:54:51 CEST 2009 I ran into an X problem, where this message appeared on the console: X: symbol lookup error: /usr/lib/xorg/modules/extensions//libdri.so: undefined symbol: atiddxAbiDixSetPrivate That lib came from a broken fglrx-driver : zni:~# dpkg -S libdri.so diversion by fglrx-driver from: /usr/lib/xorg/modules/extensions/libdri.so diversion by fglrx-driver to: /usr/lib/fglrx/diversions/libdri.so xserver-xorg-core, fglrx-driver: /usr/lib/xorg/modules/extensions/libdri.so diversion by fglrx-driver from: /usr/lib/xorg/modules/extensions/libdri.so diversion by fglrx-driver to: /usr/lib/fglrx/diversions/libdri.so Removing it and rebooting to recover the bad display state solved the problem zni:~# apt-get --purge remove fglrx-driver Entry: Fritz print server Date: Wed Jul 15 07:22:55 CEST 2009 /sbin/printserv -d /dev/usblp0 -p 9100 -c /dev/ttyS0 For some reason it was not coming up. Ok after reboot. But now cups doesn't want to do anything "... broken pipe" Maybe it's really the printer? Ok, silly: you need press "start printer" in localhost:631 cups interface after such an error. Entry: mplayer -cache Date: Wed Jul 15 20:37:31 CEST 2009 For read-ahead on network links use the -cache option in mplayer. Entry: pf-list broken Date: Fri Jul 17 12:19:08 CEST 2009 apparently there are 0 subscribers.. what went wrong? if i'm correct i did save the list of subscribers somewhere.. cd /var/lib/mailman bin/add_members -w n -r <addresses> <listname> this worked, but it looks like the web interface is broken.. i can't seem to make any updates. anyways: here[1] are some instructions on how to clean up the held messages manually using a hack. [1] http://wiki.list.org/pages/viewpage.action?pageId=4030568 Entry: xdmcp Date: Fri Jul 24 13:42:40 CEST 2009 From a fresh debian xdm install: files in /etc/X11/xdm - add a "*" to Xaccess so any host can get a login window - comment out "! DisplayManager.requestPort: 0" in xdm-cofnig - in Xservers I disabled the entry for :0 since I'm not running it on my local display. It work, then it doesnt! Crap software.. Apparently xdm.pid doesn't get created. And now it works again. Hmm.. Entry: Courier IMAP Date: Mon Aug 3 17:21:59 CEST 2009 Ok, I'm getting a bit frustrated. I did this all before but forgot how it worked. Courier imap doesn't want to let me in. So stupid: cd ~ maildirmake Maildir Entry: panic=1 Date: Fri Aug 28 09:58:19 CEST 2009 Linux command line option to reboot the system on panic. I'm convinced the current problems with degamma are hardware related, so let's see if we can at least have auto-reboot. Entry: Poor Man's Desktop Publishing Date: Wed Sep 30 10:40:44 CEST 2009 html: edit .html to remove cruft, then print to .pdf in browser alternatively, paste html in openoffice and fix layout jpg: for i in *.JPG; do jpegtopnm $i | pnmtops -dpi 300 -equalpixels >$i.ps; done This produces huge files.. Let's try the djvu route first. Djvu apparently has trouble with greyscale files. Trying to convert to black & white first. That's it. Proper thresholding (no dithering) does wonders. integrating pages from images and other sources (other pdf), it's simplest to just dump everything to image: pdftoppm -gray -r 300 FGOH.pdf FGOH for i in *.pgm; do pnmtojpeg $i >`basename $i .pgm`.jpeg; done Entry: mapreduce and shell scripting Date: Wed Sep 30 13:02:18 CEST 2009 1. map is easy to implement using makefiles and the "-j" option. a simple driver script can then provide the right arguments (Makefile is target driven) 2. reduce can be done on a *.<ext> after map has finished. Implemented for jpeg->ps map and ps->ps->pdf reduce. Works quite well (see pool/mk/* and pool/bin/mk) Entry: Apache log mining Date: Thu Oct 1 13:10:36 CEST 2009 I'd like to get this stuff under control. 1. automatically gather logs Currently I use an MD5-index archive to make rsync-based mirror from server->local a bit easier. This needs to be fine-tuned such that the ``big pool of data'' will only grow. 2. write indexing in PLT scheme I have a parser that's relatively fast. However, since the data is constant, index files could be cached. 3. make a query language Some preprocessing steps are necessary to remove junk. Bots comprise the bulk of the requests. Entry: Emacs standard bindings Date: Sat Oct 3 10:38:43 CEST 2009 I'm thinking about switching back to standard emacs keybindings. I don't have so many modifications except for the function keys. Making them easier to type doesn't weigh up to being not able to remember most changes. The original bindings do have some mnemonic value. Let's also follow some standards: C-c <x>, where <x> is any _letter_ is the user map. Other characters, or C-c C-<x> are for major modes. Entry: Stumpwm Date: Sat Oct 3 11:30:29 CEST 2009 Updated to latest cvs in debian experimental. Changed the meta key to C-z. I really would like to like this.. It's an opportunity to do something in CL, and I like the whole idea, but the way it is structured makes little sense to me. The standard behaviour is not intuitive, and not very ergonomic. I do understand that that's mostly about being accustomed though.. Maybe I don't the central idea enough yet. One of the things I don't understand is why `other' doesn't go to the other window in a split frame. Let's try to go over the main organization again: window frame windowlist Entry: packets don't make it from eth0 -> br0 Date: Tue Oct 6 09:35:43 CEST 2009 I have DHCP packets arriving on eth0, but the br0 interface doesn't receive them. Embedded software, multitasking, real-time. DSP: good theoretical, some practical. (C4x, now looking into DaVinci) Entry: Crash course Java / Eclipse Date: Wed Oct 14 08:01:19 CEST 2009 PRACTICAL * Installing in debian It's probably safest to use sun's implementation, also for Fortress. apt-get install sun-java6-jdk How to run the hello world program "hello.java" import java.io.*; public class hello { public static void main(String[] args) { System.out.println("Hello..."); } } * To compile: javac hello.java * To run, don't pass the extension (.class) java hello The name of public classes should correspond to the file name (filesystem -> class mapping). * Getting class documentation. Sun Java docs[1]. * Spartan build system, a Makefile: .PHONY: clean all all: hello.test %.class: %.java javac $< clean: rm -f *.class *~ %.test: %.class java `basename $< .class` $(TEST_ARGS) * Eclipse workaround: MOZILLA_FIVE_HOME=/usr/bin/firefox eclipse I'm giving up on the debian versions, they're full of bugs. 3.2 (lenny) and 3.4 (sid). [1] http://java.sun.com/javase/reference/api.jsp Entry: Android Date: Wed Oct 14 14:15:56 CEST 2009 Getting started: wget ... tar xf ... export PATH=/opt/src/android-sdk-linux_x86-1.6_r1/tools/:$PATH android create avd --target 2 --name my_avd Entry: libkrb53 / libkrb5-3 problems Date: Thu Oct 29 11:44:36 CET 2009 downgrade procedure here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517483#27 * Downgrading from this version to a previous version can be difficult because of library name changes. Please follow these instructions: - Get the libkrb53 and libkadm55 debs you want to downgrade to -dpkg --force-depends--remove libkrb5-3 libkrb5support0 libdes425-3 libgssapi-krb5-2 libgssrpc4 libkadm5clnt5 libkadm5srv5 libkdb5-4 libkrb5crypto3 - At this point your system has broken Kerberos libraries - dpkg -i libkrb53*deb libkadm55*deb (using the debs you got above) - aptitude -f install to fix any other packages that may be broken dpkg --force-depends --remove libkrb5-3 libkrb5support0 libdes425-3 libgssapi-krb5-2 libgssrpc4 libkadm5clnt5 libkadm5srv5 libkdb5-4 libkrb5crypto3 Entry: FFmpeg / mplayer + deps from source Date: Tue Nov 3 11:55:21 CET 2009 svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer Entry: changing wordpress admin password Date: Tue Nov 17 07:49:58 CET 2009 mysql --host <host> -u<user> -p<pass> <db> UPDATE `wp_users` SET `user_pass` = MD5( 'new_password_here' ) WHERE `wp_users`.`user_login` = "admin"; Entry: privoxy as user Date: Fri Nov 6 10:45:26 CET 2009 Compile and install, then run with: privoxy <configfile> The default then listens on localhost:8118 Entry: compiling socat: fipsld Date: Tue Nov 24 13:31:26 CET 2009 On CentOS release 5.4 (Final) I'm having trouble compiling socat: beschout@vixen:~/sw/src/socat-2.0.0-b3$ make FIPSLD_CC=gcc fipsld -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -I. -c -o socat.o socat.c /bin/sh: fipsld: command not found This has something to do with ssl.. Compiling without ssl: Entry: buildroot - nonstandard location Date: Thu Nov 26 10:22:58 CET 2009 I've constructed a root file system, and stored it under /data/root on an Android filesystem. Everything works fine with chroot (from a separate statically compiled busybox in /data/bin/busybox), but I can't seem to run /data/root/usr/bin/socat outside of the chroot. The /data/root/bin/busybox binary works fine as long as the following is set: export PATH=/data/root/bin:/data/root/sbin:/data/root/usr/bin:/data/root/usr/sbin:/data/bin:/bin:/sbin:/usr/bin:/usr/sbin:$PATH export LD_LIBRARY_PATH=/data/root/lib:/data/root/usr/lib What's missing? A hint is maybe that ssl doesn't want to use LD_LIBRARY_PATH? In some cases this is disabled. The proper fix seems to be to add a linker option: -R '$ORIGIN/../lib:/lib:/usr/lib' This allows myapp and mylib.so to be installed anywhere, as long as they are kept in the same positions relative to each other. Now, this comes from [1], solaris. Does it work on linux too? The GNU ld manpage says: For compatibility with other ELF linkers, if the -R option is followed by a directory name, rather than a file name, it is treated as the -rpath option. From here[2] I find this flag: -Wl,--rpath=\$ORIGIN/../lib In buildroot this is the variable BR2_EXTRA_GCC_CONFIG_OPTIONS which can be set in: Buildroot Configuration -> Toolchain -> Additional gcc options However, figuring out how the different levels of quoting work is not simple. Wrong: these are GCC build options (for building the compiler). Wait... Maybe an appropriately defined /etc/ld.so.conf should do it? [1] http://blogs.sun.com/ali/entry/avoiding_ld_library_path_the [2] http://www.scons.org/wiki/UsingOrigin Entry: on-target ldd / INTERP and --dynamic-linker= Date: Thu Nov 26 17:52:13 CET 2009 Busybox simply returns a "not found" error whenever an application doesn't load due to dynamic linker errors. It would be handy to have "ldd" on the target device. Solution: with /data/uclibc as the root of the uclibc tree, set the INTERP program header using the linker flag: --dynamic-linker=/data/uclibc/lib/ld-uClibc.so.0 This means gcc at link time needs the following flag -Wl,--dynamic-linker=/data/uclibc/lib/ld-uClibc.so.0 Questions: - can this be done as a post-processing step (i.e. adding an elf section?) - how to build an entire buildroot setup with this flag added -- without postprocessing? Grepping the buildroot tree gives the follwing: toolchain_build_arm/uClibc-0.9.30.1/test/Rules.mak: LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_LDSO_ABSPATH)/$(UCLIBC_LDSO) Grepping for UCLIBC_LDSO_ABSPATH gives: toolchain_build_arm/uClibc-0.9.30.1/test/Rules.mak:UCLIBC_LDSO_ABSPATH=$(shell pwd) toolchain_build_arm/uClibc-0.9.30.1/test/Rules.mak:UCLIBC_LDSO_ABSPATH=$(SHARED_LIB_LOADER_PREFIX) toolchain_build_arm/uClibc-0.9.30.1/test/Rules.mak: LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_LDSO_ABSPATH)/$(UCLIBC_LDSO) Looks like the var of interest is SHARED_LIB_LOADER_PREFIX, which is a configuration variable in toolchain_build_arm/uClibc-0.9.30.1/.config SHARED_LIB_LOADER_PREFIX="/lib" uClibc Configuration -> Library Installation Options -> Shared library loader path Could also be the next one: RUNTIME_PREFIX Where to change this? Probably not in the .config file itself... Apparently buildroot patches the .oldconfig file and resets the SHARED_LIB_LOADER_PREFIX variable, so no use in changing it manually... cp -f uClibc-android.config /usr/people/beschout.nba/src/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.oldconfig /usr/people/beschout.nba/src/buildroot-2009.08/toolchain_build_arm/bin/sed -i -e 's,^CROSS_COMPILER_PREFIX=.*,CROSS_COMPILER_PREFIX="/usr/people/beschout.nba/src/buildroot-2009.08/build_arm/staging_dir/usr/bin/arm-linux-uclibcandroid-",g' \ -e 's,# TARGET_arm is not set,TARGET_arm=y,g' \ -e 's,^TARGET_ARCH=".*",TARGET_ARCH=\"arm\",g' \ -e 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"/usr/people/beschout.nba/src/buildroot-2009.08/toolchain_build_arm/linux\",g' \ -e 's,^KERNEL_HEADERS=.*,KERNEL_HEADERS=\"/usr/people/beschout.nba/src/buildroot-2009.08/toolchain_build_arm/linux/include\",g' \ -e 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \ -e 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \ -e 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \ /usr/people/beschout.nba/src/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.oldconfig (/bin/echo "# CONFIG_GENERIC_ARM is not set"; \ /bin/echo "# CONFIG_ARM610 is not set"; \ /bin/echo "# CONFIG_ARM710 is not set"; \ /bin/echo "# CONFIG_ARM7TDMI is not set"; \ /bin/echo "# CONFIG_ARM720T is not set"; \ /bin/echo "# CONFIG_ARM920T is not set"; \ /bin/echo "# CONFIG_ARM922T is not set"; \ /bin/echo "# CONFIG_ARM926T is not set"; \ /bin/echo "# CONFIG_ARM10T is not set"; \ /bin/echo "# CONFIG_ARM1136JF_S is not set"; \ /bin/echo "# CONFIG_ARM1176JZ_S is not set"; \ /bin/echo "# CONFIG_ARM1176JZF_S is not set"; \ /bin/echo "# CONFIG_ARM_SA110 is not set"; \ /bin/echo "# CONFIG_ARM_SA1100 is not set"; \ /bin/echo "# CONFIG_ARM_XSCALE is not set"; \ /bin/echo "# CONFIG_ARM_IWMMXT is not set"; \ ) >> /usr/people/beschout.nba/src/buildroot-2009.08/toolchain_build_arm/uClibc-0.9.30.1/.oldconfig The template for this is: # Reset the installation paths: sed -e "s@.*SHARED_LIB_LOADER_P.*@SHARED_LIB_LOADER_PREFIX=\"${prefix}/lib\"@g" \ -i .config && sed -e "s@.*RUNTIME_PREFIX.*@RUNTIME_PREFIX=\"${prefix}\"@g" \ -i .config && sed -e "s@.*DEVEL_PREFIX.*@DEVEL_PREFIX=\"${prefix}/\"@g" \ -i .config && sed -e "s@.*KERNEL_SOURCE.*@KERNEL_SOURCE=\"${prefix}\"@g" -i .config beschout@vixen:~/sony/android-uclibc/buildroot-2009.08/toolchain$ grep -re 'SHARED_LIB_LOADER_PREFIX' * uClibc/uClibc-0.9.30.config:SHARED_LIB_LOADER_PREFIX="/lib" uClibc/uClibc-0.9.30.1.config:SHARED_LIB_LOADER_PREFIX="/data/uclibc/lib" uClibc/uClibc-snapshot.config:SHARED_LIB_LOADER_PREFIX="/lib" uClibc/uclibc.mk: -e 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \ uClibc/uClibc-0.9.28.config:SHARED_LIB_LOADER_PREFIX="/lib" uClibc/uClibc-0.9.29.config:SHARED_LIB_LOADER_PREFIX="/lib" What about patching toolchain/uClibc/uclibc.mk directly? Entry: Android debug bridge: stdout and stderr Date: Fri Dec 11 10:12:00 CET 2009 From[1]: Viewing stdout and stderr By default, the Android system sends stdout and stderr (System.out and System.err) output to /dev/null. In processes that run the Dalvik VM, you can have the system write a copy of the output to the log file. In this case, the system writes the messages to the log using the log tags stdout and stderr, both with priority I. To route the output in this way, you stop a running emulator/device instance and then use the shell command setprop to enable the redirection of output. Here's how you do it: $ adb shell stop $ adb shell setprop log.redirect-stdio true $ adb shell start The system retains this setting until you terminate the emulator/device instance. To use the setting as a default on the emulator/device instance, you can add an entry to /data/local.prop on the device. The 'stop' command will stop the entire framework (rooted at zygote). The 'start' command starts. The 'setprop' survives reboots?? No.. [1] http://developer.android.com/guide/developing/tools/adb.html Entry: Compiling Haskell Date: Thu Dec 24 13:09:14 CET 2009 Since I need 6.10 which is not in Debian, it might be a good idea to try to figure out how to compile from source. Nope.. 6.10 is in unstable. Next: cabal -> it's in debian as `cabal-install' Anyways, for non-root access, a binary install is possible using: http://www.haskell.org/ghc/dist/6.12.1/ghc-6.12.1-i386-unknown-linux-n.tar.bz2 Haskell platform requires 6.10.4 however: http://www.haskell.org/ghc/dist/6.10.4/ghc-6.10.4-i386-unknown-linux-n.tar.bz2 Anyways, it fails on glut (-lglut32 ??). I'm not going to bother with that now. Next attempt: follow the installation guide of Xmonad, after installing ghc 6.10.4 from the binary package. This installs cabal-install first. Entry: Acer One upgrade 2.6.28.8 -> 2.6.32 Date: Fri Dec 25 12:02:44 CET 2009 Reason: webcam problems: can only open once, after that it crashes. The 28.8 had extra drivers for the wifi In the 32 the webcam driver doesn't seem to load automatically. 28.8 lsmod - ath_pci AR2445 (MAC 14.2, PHY SChip 7.0, Radio 10.2) - uvcvideo (0c45:62c0) kernel/drivers/media/video/uvc/uvcvideo.ko kernel/drivers/net/ath_pci.ko I have a madwifi.tar.bz2 somewhere.. # Using debian module-assistant: m-a a-i madwifi Doesn't compile # Using latest svn: svn checkout http://madwifi-project.org/svn/madwifi/trunk madwifi-svn That seems to work, but only after a device power-off. uvcvideo also seems to work. now checking after hybernate. - wifi comes back up - camera too. Entry: rsync backups Date: Sat Dec 26 09:54:35 CET 2009 Idea: use push backups. On the backup host, allow a separate non-passphrase key to dial into rsync using only a very specific command line. 1. Make a key using ssh-keygen 2. cat key >> authorized_keys 3. edit the line to contain a command=/path/to/validation-script When telling ssh to use a particular key, you need to also disable attempting to do otherwise. I fixed it with the following config script: HashKnownHosts no Host * ForwardAgent no ForwardX11 no IdentityFile /root/backup/key IdentitiesOnly yes Entry: xslt Date: Tue Dec 29 17:00:26 CET 2009 Start here [1] and grab howto.xsl and howto.xml Then use xsltproc to generate the html: [1] http://www.rgagnon.com/javadetails/java-0407.html Entry: Apache suexec Date: Thu Jan 14 08:06:23 CET 2010 Why doesn't this work properly? I want to run a wordpress instance as a separate user, but I get this error message: Warning: SuexecUserGroup directive requires SUEXEC wrapper. Running php scripts through suexec requires them to be handled as CGI scripts. See here[1] for howto. apt-get install apache2-suexec-custom Otoh, it might be simpler to use suphp. Also [1] explains. apt-get install libapache2-mod-suphp The default debian install enables suphp for all directories, but turns it off for /usr/share. Let's see if it works. In /etc/suphp/suphp.con set docroot=/home In /etc/apache2/mods-available/suphp.con enable the /home dir. [1] http://alain.knaff.lu/howto/PhpSuexec/ Entry: wordpress again Date: Thu Jan 14 12:57:27 CET 2010 Every fucking time i need to look this up. # vserver gyplat enter # mysql # create database xxxwp # GRANT ALL PRIVILEGES ON xxxwp.* TO xxxuser IDENTIFIED BY xxxpass WITH GRANT OPTION; And don't be discouraged about the '0 rows' message. It should just work. After that go to: http://.../blog/wp-admin/login.php Entry: gconftool-2 url handling Date: Sat Jan 16 19:28:50 CET 2010 gconftool-2 --set --type=string /desktop/gnome/url-handlers/md5/command 'md5 "%s"' gconftool-2 --set --type=bool /desktop/gnome/url-handlers/md5/enabled true gconftool-2 --set --type=bool /desktop/gnome/url-handlers/md5/need-terminal false debian: xdg-utils http://portland.freedesktop.org/wiki/ tom@del:/var/lib/dpkg/info$ cat xdg-utils.list /. /usr /usr/share /usr/share/man /usr/share/man/man1 /usr/share/man/man1/xdg-desktop-icon.1.gz /usr/share/man/man1/xdg-email.1.gz /usr/share/man/man1/xdg-open.1.gz /usr/share/man/man1/xdg-screensaver.1.gz /usr/share/man/man1/xdg-mime.1.gz /usr/share/man/man1/xdg-desktop-menu.1.gz /usr/share/man/man1/xdg-icon-resource.1.gz /usr/share/doc /usr/share/doc/xdg-utils /usr/share/doc/xdg-utils/changelog.Debian.gz /usr/share/doc/xdg-utils/README /usr/share/doc/xdg-utils/RELEASE_NOTES /usr/share/doc/xdg-utils/TODO /usr/share/doc/xdg-utils/copyright /usr/share/doc/xdg-utils/changelog.gz /usr/bin /usr/bin/xdg-email /usr/bin/xdg-icon-resource /usr/bin/xdg-desktop-menu /usr/bin/xdg-mime /usr/bin/xdg-desktop-icon /usr/bin/xdg-screensaver /usr/bin/xdg-open Entry: vserver on zni Date: Mon Jan 18 08:40:02 CET 2010 Linux zni 2.6.30 #4 SMP Thu Jul 9 18:32:17 CEST 2009 x86_64 GNU/Linux This needs to be > 2.6.30 for a bugfix related to memory/video. The problem was that there was no vserver patch for this version. In the mean time these version reached experimental: 2.6.32.2 vs2.3.0.36.28 http://vserver.13thfloor.at/Experimental/patch-2.6.32.2-vs2.3.0.36.28.diff http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.2.tar.bz2 newvserver --hostname build32 --domain i --ip 192.168.16.250/24 --interface dummy0 --dist lenny I've got an old vserver-ified zzz image still in the directory. Maybe it's best to try that first. It looks like the /etc/init.d/rc script is executed directly in the default start method. Modifying this seems to be simplest. TODO: disable services by modifying /etc/init.d/rc FIXED: use sysv-rc-conf. to restore, set runlevel=3 to mimick runlevel=2 I had to comment-out the /tmp directory in /etc/vservers/zzz/fstab Entry: Mail server blocked?? Date: Thu Jan 21 09:20:40 CET 2010 2010-01-19 21:12:16 H=n76.bullet.mail.sp1.yahoo.com [98.136.44.48] sender verify fail for <...@sbcglobal.net>: response to "MAIL FROM:<>" from sbcmx8.prodigy.net [207.115.36.22] was: 553 5.3.0 nlpi141 - o0JKCGjj027576, DNSBL:ATTRBL 521< 78.47.83.9 >_is_blocked.__For_information_see_http://att.net/blocks 2010-01-19 21:12:16 H=n76.bullet.mail.sp1.yahoo.com [98.136.44.48] F=<...@sbcglobal.net> rejected RCPT <mdh@deyofthephoenix.com>: Sender verify failed I tried with [2] and there is no mention of 78.47.83.9 on a blacklist. Neither at spamhous[3]. AT&T info page[3] also mentions symantec[5], but not listed there either. As suggested in AT&T info page [3] I'm submitting a report at [6]. It is suggested to add an SPF[8] record in the DNS. For tinydns[7]: :example.com:16:\016v=spf1\040mx\040-all:86400 However, does this mean it's no longer allowed to send this email using a different SMTP? Maybe not such a good idea. [1] http://forums.whirlpool.net.au/forum-replies-archive.cfm/1147314.html [2] http://www.mxtoolbox.com/blacklists.aspx [3] http://worldnet.att.net/general-info/521.html [4] http://www.spamhaus.org/ [5] http://ipremoval.sms.symantec.com/lookup/ [6] http://worldnet.att.net/general-info/block_admin.html [7] http://www.anders.com/projects/sysadmin/djbdnsRecordBuilder/ [8] http://en.wikipedia.org/wiki/Sender_Policy_Framework Entry: OpenEmbedded toolchain Date: Thu Jan 28 12:59:01 CET 2010 The toolchain is in: /opt/xc/oe/tmp/cross/arm/bin/arm-linux-uclibcgnueabi-gcc Where /opt/xc/oe is the toplevel OpenEmbedded dir. Entry: ELF files Date: Thu Jan 28 14:31:02 CET 2010 Section ".dynstr" contains dynamic symbol names. See "objdump -s" Entry: magic number Date: Tue Feb 2 21:16:48 CET 2010 orig netgear: 00:09:5B:DC:F3:12 orig linksys: 00:1D:7E:FB:90:D7 add to /etc/config/network in the wan section: option 'macaddr' '00:09:5B:DC:F3:12' then do /etc/init.d/network restart Entry: dicing djvu documents Date: Sat Feb 27 21:33:28 CET 2010 I have this relic from the last time I tried plumbing to make djvu files. tom@del:~/bin$ cat pgm2djvu cat $1 | erode | pgmtopbm | pbmtodjvurle | csepdjvu -d 300 - $2 Now I want to slice a djvu file into four quadrants, and put each quadrant in a separate file. 1. How to unpack a djvu document into separate png/pam files? ddjvu 2. How to ... pdf * generate pgms: pdftoppm -gray doc.pdf pageprefix * pipe them through: | pnmcrop | pgmtopbm | pbmtodjvurle | csepdjvu -d 150 - | * pack djvus: djvm -c lazy-peval.djvu *.pgm.djvu 3. djvu again: pdftoppm -r 300 -gray doc.pdf pageprefix cjb2 is the encoder from djvu-libre Entry: The 64-bit problem Date: Sun Mar 7 11:26:08 CET 2010 To be honest, it's quite a mess still. Especially if you want to use binary packages. I'm thinking about switching back to 32 bit for day to day work. You need a 64-bit kernel if you want to use all your _physical_ memory at or above 4 gig. A 64-bit userland is only useful for applications that need a _virtual_ address space that's more than 4 gig. I don't have such applications, so there should be no problem sticking to 32bit. ( There are other advantages to 64-bit intel which are due to it having twice as much registers so in theory it should be faster.. ) 1. Root filesystem The main idea is to use a chroot to host a 32-bit base filesystem. To make the original root accessible it's simplest to mount it twice. Make sure that the 2nd time doesn't perform an fsck at boot time. /dev/mapper/vg1-root / ext3 errors=remount-ro 0 1 # check in pass 1 /dev/mapper/vg1-root /i686/x86_64 ext3 errors=remount-ro 0 0 # don't check 2. Kernel The kernel should run as 64-bit to give full access to the memory range for services that can use it. The problem is then: how to give the 32-bit system access to the hardware? The most important parts are display and audio. Let's investigate. Playback mp3 file from schroot. This seems to work, but it's using OSS instead of Alsa. Mounting udev twice doesn't seem to work: it's a tmpfs. Workaround: create device nodes manually: zni:/i686/dev# cp -av /dev/snd . `/dev/snd' -> `./snd' `/dev/snd/controlC1' -> `./snd/controlC1' `/dev/snd/pcmC1D3p' -> `./snd/pcmC1D3p' `/dev/snd/pcmC0D0c' -> `./snd/pcmC0D0c' `/dev/snd/pcmC0D0p' -> `./snd/pcmC0D0p' `/dev/snd/controlC0' -> `./snd/controlC0' `/dev/snd/pcmC0D1p' -> `./snd/pcmC0D1p' `/dev/snd/pcmC0D2c' -> `./snd/pcmC0D2c' `/dev/snd/seq' -> `./snd/seq' `/dev/snd/timer' -> `./snd/timer' Need to set DISPLAY variable using localhost TCP instead of unix sockets. (i686)tom@zni:~$ export DISPLAY=:0 XV seems to work: (i686)root@zni:/# xvinfo X-Video Extension version 2.2 screen #0 Adaptor #0: "Radeon Textured Video" number of ports: 16 port base: 57 ... Making /tmp/.X11-unix available on the chroot also solves the X DISPLAY=:0 issue. Then, direct rendering. (i686)tom@zni:~$ glxinfo Error: unable to open display :0 This is because the unix socket is not available. Changing to UDP solves it though. Then let's see if direct rendering works: (i686)tom@zni:~$ glxinfo |grep why direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose) (i686)tom@zni:~$ LIBGL_DEBUG=verbose glxinfo |less libGL: XF86DRIGetClientDriverName: 4.3.0 r600 (screen 0) libGL: OpenDriver: trying /usr/lib/dri/r600_dri.so libGL error: dlopen /usr/lib/dri/r600_dri.so failed (/usr/lib/dri/r600_dri.so: cannot open shared object file: No such file or directory) libGL error: unable to load driver: r600_dri.so Trying update: (i686)root@zni:/x86_64/home/tom# apt-get install libdrm-intel1 libdrm-radeon1 libdrm2 libgimp2.0 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev mesa-common-dev mesa-utils After that it starts to go seriously wrong: hard lockups. I don't feel like working around driver bugs so mission aborted. Current conclusion: video bugs prevent this to work. Entry: Mips boards tx4927le Date: Fri Mar 12 18:09:15 CET 2010 tom@zni:~$ cu -l ttyUSB1 -s 9600 VxWorks System Boot Copyright 1984-2002 Wind River Systems, Inc. CPU: Toshiba RBTX4927 Version: VxWorks5.5 BSP version: 1.2/0 Creation date: Mar 06 2003, 12:53:57 Press any key to stop auto-boot... 0 auto-booting... boot device : ene unit number : 0 processor number : 0 host name : gibbon file name : /home/ftp/pub/vxworks/tx4927le/vxWorksChrisb inet on ethernet (e) : 192.168.54.5:ffffff00 host inet (h) : 192.168.54.253 gateway inet (g) : 192.168.54.254 user (u) : vxworks ftp password (pw) : vxworks flags (f) : 0x0 target name (tn) : idt-5 Attached TCP/IP interface to ene0. Attaching network interface lo0... done. Loading... Error loading file: errno = 0xd0003. Entry: Setting up jackd with RME9634 Date: Wed Mar 31 14:48:17 CEST 2010 I recently killed my recording PC, now I have no clue as to how to get it back to work. ed:~# cat /proc/asound/cards cat /proc/asound/cards 1 [R15 ]: RME9636 - RME Digi9636 (Rev 1.5) RME Digi9636 (Rev 1.5) at 0x40000000, irq 21 2 [M1010 ]: ICE1712 - M Audio Delta 1010 M Audio Delta 1010 at 0x1080, irq 16 ed:~# jackd -d alsa jackd -d alsa jackd 0.118.0 Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others. jackd comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details no message buffer overruns JACK compiled with System V SHM support. loading driver .. creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit control device hw:0 control open "hw:0" (No such file or directory) ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode cannot load driver module alsa ed:/proc/asound/R15# cat rme9652 cat rme9652 RME Digi9636 (Rev 1.5) (Card #2) Buffers: capture ce400000 playback cf600000 IRQ: 21 Registers bus: 0x40000000 VM: 0xd0bfe000 Control register: 4404e Latency: 8192 samples (2 periods of 32768 bytes) Hardware pointer (frames): 0 Passthru: no Clock mode: autosync Pref. sync source: ADAT1 ADAT1 Input source: ADAT1 optical IEC958 input: Coaxial IEC958 output: Coaxial only IEC958 quality: Consumer IEC958 emphasis: off IEC958 Dolby: off IEC958 sample rate: error flag set ADAT Sample rate: 48000Hz ADAT1: Sync ADAT2: No Lock ADAT3: No Lock Timecode signal: no Punch Status: 1: off 2: off 3: off 4: off 5: off 6: off 7: off 8: off 9: off 10: off 11: off 12: off 13: off 14: off 15: off 16: off 17: off 18: off ----- So what does "hw:0" actually mean in alsa? I found this .asoundrc lingering around: tom@zni:~$ cat .asoundrc pcm.ice1712 { type hw card 0 } ctl.ice1712 { type hw card 0 } What about this: /usr/share/alsa There seem to be a bunch of files with card configurations. Dead end. Entry: jackd hammerfall Date: Wed Mar 31 15:09:01 CEST 2010 ed:~# cat /proc/asound/cards cat /proc/asound/cards 1 [R15 ]: RME9636 - RME Digi9636 (Rev 1.5) RME Digi9636 (Rev 1.5) at 0x40000000, irq 21 2 [M1010 ]: ICE1712 - M Audio Delta 1010 M Audio Delta 1010 at 0x1080, irq 16 This means hw:1 is the RME, and hw:2 is the M-Audio. There is no hw:0, which is probably why the default doesn't work. This seems to work: jackd -d alsa -Phw:1 I used this for recording: ecasound -f 16,4,48000 -i jack -o test.wav (EDIT: this didn't work for the RME audio. I ended up using a Roland usb audio card to do the recording off the mixer board's digi out. Coming back to it, I managed to get it to work with the following setup on a 2.6.33 RT kernel; the RME is card0.) tom@ed:~/bin$ cat jackd.ed exec jackd -d alsa -i 18 -o 18 tom@ed:~/bin$ cat pd.ed exec /usr/bin/pd -jack -inchannels 8 -outchannels 8 "$@" Entry: openwrt shfs Date: Mon Apr 5 19:37:55 CEST 2010 # opkg-install shfs-utils # shfsmount user@host:/ /mnt useful for carrying around a full root fs. Entry: netgear router Date: Mon Apr 5 16:02:02 CEST 2010 dnsmasq-dhcp: DHCPDISCOVER(eth0) 00:09:5b:dc:f3:13 dnsmasq-dhcp: DHCPOFFER(eth0) 10.0.0.126 00:09:5b:dc:f3:13 dnsmasq-dhcp: DHCPREQUEST(eth0) 10.0.0.126 00:09:5b:dc:f3:13 dnsmasq-dhcp: DHCPACK(eth0) 10.0.0.126 00:09:5b:dc:f3:13 WGR614v4 Entry: How much memory is a process using? Date: Mon Apr 5 20:02:52 CEST 2010 RSS: resident set size All resident pages. VSS: virtual set size All mapped memory. Also includes mmapped files. One thing I never understood is how shared memory fits in this picture. Also, when a process forks and memory doesn't get copied if it's not modified, how do we know that? The `pmap' utility gives memory usage per shared library. Entry: Single image Date: Tue Apr 6 19:12:08 CEST 2010 I'd like to complete the idea of having a single image with all software and data I'm likely to ever need, and duplicate it on several machines. What does this need? - standard home directory structure - standard debian install - a way to manage services (installed, but not running) - shared optional packages /usr/local or /opt/whatever - hardware independence. hardware-specific configurations cannot be shared. This suggests some kind of vhost/chroot setup. Entry: Printing to windows Date: Tue Apr 6 21:37:46 CEST 2010 The simplest solution seems to be to install a CUPS printer driver on a linux machine, and have it translate from PostScript to the printer's binary format. On windows, a raw pipe can be opened using the procedure described in [1]. EDIT: Apparently that article has been removed. ( Why do ppl keep breaking links? Progress? ) The old wiki is here[2], and a new page is supposed to be here[3], but that's currently broken. See full text copied below: ----------------------------------------------------------------------- Windows - only one option: Set up the Windows print server. Share the printer: In this example I have a Canon BJ200 printer shared as BJ200. To share a printer do this: Start --> Printers & Faxes --> R-click printer icon --> Sharing --> Share this printer --> Type in your choice for share name. I chose BJ200 for this example. Note there are NO SPACES. Record your NBT server address: You also want the Windows NBT address which you can get from a dos prompt available at Start --> All Programs --> Accessories --> Command Prompt. In the command prompt enter "ipconfig/all". You'll see the IP address for the ethernet adapter, e..g. 192.168.2.4, and the NBT name , e.g. DragaXP in this example. You'll need IP if using fixed addressing or NBT name if using dynamic addressing. Enable Windows support for Unix printing: Open Control Panel --> Add or remove programs --> Add/remove windows components. Scroll down to "Other Network File & Print Services". Highlight that and select "details". Put a check mark in "Print Services for Unix" and OK/Next or whatever. Activate TCPIP print services: Open Control Panel --> Administrative Tools --> Services (Local) and find TCP/IP print server. It should be set to "Status= started" and "Start type=Automatic". To change settings you double Lclick the line "TCP/IP print server" and adjust appropriately. OK, now you have a windows workstation sharing a Windows printer to Linux clients. The next segments show HowTo set up the Linux client to print to this Windows print server, using two alternative network protocols. Linux Option 1:Setting up a Linux client to print using LPD protocol Note in this option the client does NOT use or need Samba The first thing is to set the root uid and password for cups. This is different from the Linux "root user". Open a terminal as superuser and enter the chosen uid/pwd as lppasswd -a username. You then supply a password which must satisfy certain criteria, as you might discover. Finally start cups by entering: /etc/init.d/cups start [or restart]. Here's the terminal session for Suse 10.0, 10.1 which used CUPS V1.1x: ethel@linux:~> su Password: linux:/home/ethel # lppasswd -a ethel Enter password: Enter password again: linux:/home/ethel # /etc/init.d/cups start Starting cupsd done linux:/home/ethel # For Suse 10.2 which uses Cups 1.2 its the same thing EXCEPT some 10.2 users cannot get it to work properly (I'm one) and they have to work as root: enter the root password for cups using this line: linux:/home/ethel # lppasswd -g sys -a root Now you ensure that it starts at boot: In Suse do Yast --> system --> system services --> expert mode --> cups --> checkmark runlevels 2, 3 & 5. Now that you can access cups administration you set up communications with the Windows printer. Open Cups Admin's GUI by entering http:localhost:631/ in your Browser. Then you can perform the following series of steps: * Select Printers and enter password when asked * Add printer * Fill in a Name for the printer (NO SPACES) and optionally a Description and a Location * From the options in the drop-down list of Devices, select LPD/LPR Host or Printer * Fixed IP addressing: Fill in the URI as lpd:Server_IPaddress/Server_queue_name [for example lpd:192.168.2.4/BJ200] * Dynamic IP addressing: Fill in the URI as lpd:Server_NetBIOSname/Server_queue_name [for example lpd:DragaXP/BJ200] * Printer drivers: Select the Maker and the Model from drop-down lists * Select Printers and Print Test Page to check your connectivity to windows You should now be printing from Linux_To_Windows via LPD That's all for the cups/lpd network client on Linux folks. It's really very easy but ONLY if you know how first. Linux Option 2: Setting up a Linux client using Samba's SMB/CIFS Protocol (alternative to LPD) This option is an alternative to the one above which used the LPD protocol via cups network printing. This option uses the SMB protocol via Samba. Check that Samba has been configured for cups printing. The [global] entry will contain at least these lines if it has been configured for cups printing. [global] printing = cups printcap name = cups Open cups admin on http:localhost:631/ and execute these steps: * Open Printers and Add Printer * Enter the printer Name BJ200. This becomes the queuename. You can fill in the optional Location and Description to suit. * In Device type choose Windows Printer via SAMBA from the drop-down list * Fixed IP addressing: In Device URI enter smb:workgroup/username:password@192.168.2.4/BJ200, where "username", "password" and "workgroup" pertain to the server. * Dynamic IP addressing: In Device URI enter smb:workgroup/username:password@DragaXP/BJ200, where "username", "password" and "workgroup" pertain to the server. * Choose the printer driver from the cups database on the final screens * Execute a Print Test Page and you should be printing from Linux_To_Windows via Samba [1] http://en.opensuse.org/Print_to_Windows_printer [2] http://old-en.opensuse.org/Print_to_Windows_printer [3] http://opensuse.swerdna.org/susesambaprint.html Entry: Encoding DVD with mencoder Date: Fri Apr 9 10:37:13 EDT 2010 I did this before a long time ago. See [1][2][3], transcode[4] and vobs2iso[5]. [1] entry://20090102-092559 [2] entry://20080423-113923 [3] entry://20080420-204146 [4] http://zwizwa.be/darcs/pool/bin/transcode [5] http://zwizwa.be/darcs/pool/bin/vobs2iso Entry: Linux Audio Video Editor Date: Sun Apr 11 09:44:26 EDT 2010 I'm going to have another look at cinelerra. It seems at some time in the past it forked into the HWV (herionewarrior) version and the CV (community version). I'm using cinelerra-cv and dependencies from debian-multimedia.org cinelerra-cv_2.1.0~svn20091213-0.5_i386.deb Hmm.. It's too heavy. I need something simpler. Entry: wav + jpeg -> dvd Date: Tue Apr 13 15:12:09 EDT 2010 Creating a movie files with a single image and an audio track. There are several ways to do that; all of them a bit messy. The ffmpeg/mencoder tool combo is quite powerful, put a pain to figure out. * Using mencoder (info from [1]): Use two copies of the same picture. Name them pic1.jpg and pic2.jpg. Then enter the following: mencoder "mf://pic*.jpg" -mf fps=0.1 -ovc x264 -o movie.avi The reason why we are using two frames here is because movie players will treat 1-frame movies different. A 1-frame movie in mplayer will have zero duration, i.e. the player window will close immediately. Since we don't know how Youtube will treat them while transcoding to Flash video format, it's better to use at least 2 frames just to be on the safe side. Adapted from [3], with 2 image files, this also worked: mencoder -ovc lavc -mf fps=.1:type=jpg 'mf://*.jpg' -o test.avi The problem however seems to be to "duplicate" the frames, which I think is necessary for DVD. * Using ImageMagick: convert -delay 10 *.jpg m2v:time_lapse-test.mpg * Using KIPI. The KDE Image Plugin Interface[2] contains command line scrips to create videos from images + allows to add sound tracks. images2mpg -f SVCD -S 420mpeg2 -d 2 -t 2 -w ~/Music/mytune.wav -o car.mpg -i *.jpg * Using ffmpeg: From one of the comments on [3]: use "-loop_input". This worked: ffmpeg -loop_input -f image2 -i img_0156.jpg test.mpg However, when combined with an audio file it doesn't stop. I'm thinking that the easiest way to do this is to just generate a directory full of links to a single jpeg file, based on the length of the wav and the frame rate. [1] http://ubuntuforums.org/archive/index.php/t-573006.html [2] http://www.linux.com/archive/feature/136606 [3] http://www.munz.li/?p=48 Entry: One image + wave Date: Wed Apr 14 10:50:55 EDT 2010 Tools in previous post don't seem to do what I want, so let's hack it. Goal: given a .jpeg and a .wav file, create a DVD with a track that plays the audio, displaying the picture. 1. Prepare the image file such that its aspect ratio is 4:3. The `transcode' script below performs scaling to the correct resolution that incorporates standard DVD aspect rates (non-square pixels). 2. Get the time of the wave file using mplayer: mplayer ../hatc/clock_finished.wav A: 0.9 (00.8) of 179.0 (02:59.0) 1.0% Here it's 179 seconds. Or use `wavinfo' (apt-get install wavbreaker) 3. Create a list of links to a single jpeg file: for i in `seq -w 0 178`; do ln -s ../hatc/img_0156.jpg img$i.jpg; done 4. Use mencoder to bundle the images and the wave file into a single MJPEG avi with raw wave. mencoder -ovc copy -oac copy -mf fps=1:type=jpg 'mf://img*.jpg' \ -audiofile ../hatc/clock_finished.wav -o bundled.avi 5. Transcode that avi using mencoder (see the recode[1] script). Note that the intermediate file has an fps=1, which will be changed in the transcoded step, using the "harddup" option. recode dvd_ntsc bundled.avi out.vob 6. Use dvdauthor to convert the .avi to an image. See the vobs2iso[2] script. vobs2iso out.iso 1.vob 2.vob 7. Use the `burn.dvd' script[3] burn.dvd video out.iso Some remarks. Tracks without audio don't seem to be such a good idea. To create a silent wav: dd if=/dev/zero bs=44100 count=`echo "4 $SECONDS * p" | dc` | lame -r -s 44.1 $IDS - - [1] http://zwizwa.be/darcs/pool/bin/recode [2] http://zwizwa.be/darcs/pool/bin/vobs2iso [3] http://zwizwa.be/darcs/pool/bin/burn.dvd Entry: Writable DVD standards Date: Wed Apr 14 14:08:49 EDT 2010 Apparently the DVD player in the living room doesn't take DVD-R. I've tried DVD+R before. What is the difference? Entry: The Snd sound editor mindset Date: Mon Apr 12 15:21:46 EDT 2010 Some random remarks wrt. to the manual[1] to understand Snd as how it differs to what I expect from other sound editors. It's been a while since I used it. MARKS Snd uses marks. Place a mark at the cursor (the red cross-hairs) using C-m. To play from the mark, click on the triangle corresponding to the mark's red line. To delete a mark: REGIONS Regions are different from the current selection. They are _copies_ of a part of a sound file, and do not change when the underlying sound changes. The selection by default creates a region. The selection can be set using the mouse, or by pressing C-space to set one end, and move the cursor to set the other end. I.e. C-space C-> will select from the current point to the end. EDITING C-w deletes current selection. [1] https://ccrma.stanford.edu/software/snd/snd/snd.html Entry: Ripping and encoding on command line: abcde Date: Sun May 9 13:38:30 EDT 2010 apt-get install abcde id3v2 lame ( lame comes from "deb http://www.debian-multimedia.org stable main" ) abcde -d /dev/hdc -o mp3 Entry: Emacs terminal colors Date: Tue May 11 18:38:20 EDT 2010 I can't get it to work properly with rxvt, but xterm works with TERM=xterm-256color set. The meta key isn't set properly in xterm though. It does seem to work properly for urxvt. To pick a theme use: M-x color-theme-select I like color-theme-charcoal-black color-theme-late-night xrdb -merge <<EOF XTerm*eightBitInput: false XTerm*metaSendsEscape: true EOF Entry: zwizwa debian upgrade problems Date: Fri Jun 18 11:31:39 CEST 2010 Init: wanted emacs23, added squeeze to sources.list Problems: - kernel 2.6.32-5-vserver-686 hangs at boot (agp?) - 26-2 works, but eth1 -> eth0? - problem with window manager scripts Solutions: - booting 26-2 as grub default : udev seems to work - changed eth1 -> eth0 in all configs (bridge, firewall, ppp, network) There are problems with: rxvt: ../../src/xcb_lock.c:33: _XCBUnlockDisplay: Assertion `xcb_get_request_sent(dpy->xcb->connection) == dpy->request' failed. Aborted I'm trying dist-upgrade to squeeze Entry: A unified server Date: Tue Jun 22 18:06:39 CEST 2010 I'd like to concentrate all the services I have running atm into a single image, or a collection of vservers, such that migration, backup and duplication become easier. Custom servers require too much maintenance. Problems: - some things do not run in vserver (i.e. quagga, openvpn, ...) - 32 vs 64 bit with binary software (also intel vs. other arch) - monoculture problems: i.e. do something wrong, take out all servers Services: - low-level network: firewall, routing, dns, dhcp, tftp - squid web cache - email (smtp in/out, pop+imap) - filtering web proxy - file server ftp/www/samba - printer (local + remote forward) I'm a bit worried about the monoculture issues though. Entry: Minidisc optical SPDIF to RME Digi9632 ADAT1 Date: Tue Sep 14 21:20:38 CEST 2010 Using alsamixer it's possible to set SPDIF source to ADAT1. The card has 18 channels: 8 + 8 + 2. The SPDIF is the last 2: 17,18. So, I'm configuring like this: ADAT on ADAT2 Entry: resizing raw disk images Date: Thu Sep 23 16:36:32 CEST 2010 dd if=/dev/zero of=hdd.img seek=N obs=1MB count=0 Where hdd.img is the raw format image that you want to resize and N is the new size that you want the image to be, in megabytes. [1] http://www.gooduser.info/tag/resize-qemu-disk-image Entry: Backing up hosts Date: Thu Sep 23 17:57:46 CEST 2010 Convention: every host has a script /push that can be used to push a backup to a different server. Entry: qemu: bootable linux image from scratch Date: Tue Sep 28 10:12:54 CEST 2010 The key elements are dd, parted and grub. 1. Create the image. We use a 4GB raw disk image, fits on a DVD. zni:/qemu# dd if=/dev/zero of=linux.img seek=4000 obs=1MB count=0 2. Format and mount the partiton Use parted: (parted) mklabel msdos (parted) mkpart primary ext2 0 4000 (parted) mkfs 1 ext2 3. Populate filesystem I use plosetup[1] to create loop devices at the proper offset in the hd image so they can be mounted. Then you can use debootstrap or any old filesystem to populate the partition. zni:/qemu# plosetup linux.img I: plosetup: partition 1 of linux.img will become /dev/loop0... zni:/qemu# losetup /dev/loop0 /dev/loop0: [fe03]:12756230 (/qemu/linux.img), offset 32256 4. Install grub The only remaining part is to install grub in the MBR. Assume there is a /boot/grub dir in the filesystem installed in step 3. See also [2]. Be careful with this as to not mess up your host system! zni:/qemu# grub --device-map=/dev/null grub> device (hd0) linux.img grub> root (hd0,0) grub> setup (hd0) grub> quit ( It's also possible to use the loop devices instead of disk image, but you need to make sure that the loop device mentioned on the first line has an associated partition device i.e. postfixed with "1". ) [1] http://zwizwa.be/darcs/pool/bin/plosetup [2] http://blog.quinthar.com/2008/07/building-1gb-bootable-qemu-image-using.html Entry: bind mount Date: Thu Sep 30 11:31:21 CEST 2010 mount -obind Entry: Scanner won't work as user on debian Date: Sun Oct 24 15:54:57 CEST 2010 I've added my normal user account to the "scanner" and "saned" groups, but xsane doesn't find the scanner. Everything works fine as root. An "strace xsane" revealed this: ioctl(9, USBDEVFS_CONNECTINFO, 0x7fff73649200) = -1 EPERM (Operation not permitted) ioctl(8, USBDEVFS_IOCTL, 0x7fff73649200) = -1 EPERM (Operation not permitted) ... So it seems to be accessing some device that doesn't have its group changed properly by udev. All the devices I in /dev/bus/usb have root:root perms. Improperly setup udev? http://steffenpingel.de/news/archive/2006/mar/04/fixing-permission-for-my-usb-scanner-on-debian/ Reinstalling udev solved the problem. Entry: HL-2030 lpr driver + cupswrapper Date: Sun Oct 24 17:24:51 CEST 2010 [1] http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#HL-2030 Entry: Cups access problem Date: Sun Oct 24 18:20:18 CEST 2010 Access by ip works, but not by hostname. FIX: cups.conf needs "ServerAlias *" [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525910 Entry: Printing to CUPS from Windows 7 Starter Date: Mon Oct 25 19:53:03 CEST 2010 Need to enable internet printing. If this is not on, trying to add the printer URL will give a non-descriptive error message. Option [1] didn't work. From [2] it says that "IPC (Internet Printing Client) isn't available at all on Windows 7 Starter". Also see [3]. Pff.. Should have stayed with XP. Seems the only way around is to install a samba wrapper. [1] http://support.microsoft.com/kb/969708 [2] http://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/f5e69f33-29ff-4c86-a7ed-3b066f0b642d [3] http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/233bb347-43ad-4cf5-82a7-f7d503fe56ae Entry: Don't trust 'cp -u' ! Date: Tue Oct 26 11:02:10 CEST 2010 Since it will write the name and time stamp before the full file is transferred, the destination will be corrupted (truncated) if the cp operation is interrupted. It seems it's better to use rsync, i.e. : rsync --archive --one-file-system /home/ . It will at least not keep the file that was being transferred if it's interrupted. Rsync uses a temporary destination file renames the file after a successful transfer. Entry: udev renames eth0 to eth1 Date: Fri Oct 29 21:47:32 CEST 2010 [1] https://bugs.launchpad.net/ubuntu/+source/udev/+bug/329106 Entry: RME SPDIF from minidisc Date: Sat Oct 30 10:12:16 CEST 2010 1. configure the card with alsamixer: alsamixer -c 1 Input Connector -> Optical Sample Clock Source -> AutoSync 2. verify operation cat /proc/asound/card1/rme96 RME Digi96/8 PST at 0xfd000000, irq 20 (index #2) General settings period size: 8192 bytes Input settings input: optical (2 channels) sample rate: 44100 Hz sample format: 16 bit Output settings output signal: normal playback sample rate: 44100 Hz sample format: 24 bit sample clock source: autosync format: IEC958 (consumer) emphasis: off non-audio (dolby): off Analog output settings monitored ADAT tracks: 1+2 attenuation: 0 dB volume left: 16383 volume right: 16383 3. start ecasound: ecasound -i alsa,hw:1 -o rec.wav 4. using FLAC compression and large bufsize: ecasound -t:4440 -R -b:81960 -B:nonrt -i alsa,hw:1 -o rec.flac # 4440 = 60 * 74 Entry: OOM Date: Sat Oct 30 10:57:04 CEST 2010 Oct 26 20:22:31 zwizwa kernel: [5635920.336725] __ratelimit: 7 messages suppressed Oct 26 20:22:31 zwizwa kernel: [5635920.336735] openvpn invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0 Oct 26 20:22:40 zwizwa kernel: [5635920.336743] Pid: 15316, comm: openvpn Not tainted 2.6.26-2-vserver-686 #1 Oct 26 20:22:46 zwizwa kernel: [5635920.336789] [<c01615b4>] oom_kill_process+0x4f/0x19e Oct 26 20:22:56 zwizwa kernel: [5635920.336845] [<c01619f2>] out_of_memory+0x14e/0x17f Oct 26 20:23:03 zwizwa kernel: [5635920.336896] [<c016395c>] __alloc_pages_internal+0x2b8/0x34e Oct 26 20:23:08 zwizwa kernel: [5635920.336952] [<c01639fe>] __alloc_pages+0x7/0x9 Oct 26 20:23:10 zwizwa kernel: [5635920.336961] [<c01653a0>] __do_page_cache_readahead+0x86/0x163 Oct 26 20:23:10 zwizwa kernel: [5635920.337002] [<c01657b7>] do_page_cache_readahead+0x3d/0x4a Oct 26 20:23:10 zwizwa kernel: [5635920.337027] [<c0160e4d>] filemap_fault+0x164/0x35b Oct 26 20:23:10 zwizwa kernel: [5635920.337062] [<c01327ad>] __wake_up_bit+0x29/0x2e Oct 26 20:23:10 zwizwa kernel: [5635920.337085] [<c016a2fe>] __do_fault+0x42/0x35e Oct 26 20:23:10 zwizwa kernel: [5635920.337179] [<c016c6b7>] handle_mm_fault+0x37d/0x864 Oct 26 20:23:10 zwizwa kernel: [5635920.337279] [<c01809e3>] sys_stat64+0x1e/0x23 Oct 26 20:23:10 zwizwa kernel: [5635920.337312] [<c0115bab>] do_page_fault+0x2a3/0x5c0 Oct 26 20:23:10 zwizwa kernel: [5635920.337343] [<c017e3dd>] sys_write+0x3c/0x63 Oct 26 20:23:10 zwizwa kernel: [5635920.337363] [<c0115908>] do_page_fault+0x0/0x5c0 Oct 26 20:23:10 zwizwa kernel: [5635920.337372] [<c02ee582>] error_code+0x72/0x78 Oct 26 20:23:10 zwizwa kernel: [5635920.337412] [<c02e0000>] packet_notifier+0x18/0x133 Oct 26 20:23:10 zwizwa kernel: [5635920.337451] ======================= Oct 26 20:23:10 zwizwa kernel: [5635920.337454] Mem-info: Oct 26 20:23:10 zwizwa kernel: [5635920.337457] DMA per-cpu: Oct 26 20:23:10 zwizwa kernel: [5635920.337460] CPU 0: hi: 0, btch: 1 usd: 0 Oct 26 20:23:10 zwizwa kernel: [5635920.337463] Normal per-cpu: Oct 26 20:23:10 zwizwa kernel: [5635920.337467] CPU 0: hi: 90, btch: 15 usd: 71 Oct 26 20:23:10 zwizwa kernel: [5635920.337473] Active:28017 inactive:27993 dirty:0 writeback:0 unstable:0 Oct 26 20:23:10 zwizwa kernel: [5635920.337475] free:736 slab:3740 mapped:212 pagetables:791 bounce:0 Oct 26 20:23:10 zwizwa kernel: [5635920.337480] DMA free:1076kB min:124kB low:152kB high:184kB active:5528kB inactive:4920kB present:16256kB pages_scanned:87293 all_unreclaimable? no Oct 26 20:23:10 zwizwa kernel: [5635920.337484] lowmem_reserve[]: 0 238 238 238 Oct 26 20:23:10 zwizwa kernel: [5635920.337493] Normal free:1868kB min:1908kB low:2384kB high:2860kB active:106540kB inactive:107052kB present:243776kB pages_scanned:349219 all_unreclaimable? yes Oct 26 20:23:10 zwizwa kernel: [5635920.337497] lowmem_reserve[]: 0 0 0 0 Oct 26 20:23:10 zwizwa kernel: [5635920.337503] DMA: 3*4kB 2*8kB 2*16kB 0*32kB 2*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 1084kB Oct 26 20:23:10 zwizwa kernel: [5635920.337517] Normal: 25*4kB 1*8kB 0*16kB 7*32kB 2*64kB 1*128kB 1*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB = 1868kB Oct 26 20:23:10 zwizwa kernel: [5635920.337531] 10051 total pagecache pages Oct 26 20:23:10 zwizwa kernel: [5635920.337535] Swap cache: add 18236050, delete 18235999, find 13765784/16103390 Oct 26 20:23:10 zwizwa kernel: [5635920.337538] Free swap = 0kB Oct 26 20:23:10 zwizwa kernel: [5635920.337540] Total swap = 248996kB Oct 26 20:23:10 zwizwa kernel: [5635920.339062] 65520 pages of RAM Oct 26 20:23:10 zwizwa kernel: [5635920.339067] 0 pages of HIGHMEM Oct 26 20:23:10 zwizwa kernel: [5635920.339070] 1516 reserved pages Oct 26 20:23:10 zwizwa kernel: [5635920.339072] 9571 pages shared Oct 26 20:23:10 zwizwa kernel: [5635920.339075] 51 pages swap cached Oct 26 20:23:10 zwizwa kernel: [5635920.339077] 0 pages dirty Oct 26 20:23:10 zwizwa kernel: [5635920.339080] 0 pages writeback Oct 26 20:23:10 zwizwa kernel: [5635920.339082] 212 pages mapped Oct 26 20:23:10 zwizwa kernel: [5635920.339084] 3740 pages slab Oct 26 20:23:10 zwizwa kernel: [5635920.339087] 791 pages pagetables Oct 26 20:33:19 zwizwa -- MARK -- Entry: samba printer driver Date: Sat Oct 30 11:22:55 CEST 2010 Automatic install [1]. I didn't do this: too involved. Use manual driver install: Algemeen (Generic) -> MS Publisher ImageSetter [1] http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/classicalprinting.html#id2626941 Entry: flv2mp3 Date: Mon Nov 1 18:17:21 CET 2010 make -j3 -f ~/mk/flv2mp3.mk [1] http://zwizwa.be/darcs/pool/bin/flv2wav [2] http://zwizwa.be/darcs/pool/mk/flv2mp3.mk Entry: dnsmasq on OpenWRT Date: Sun Nov 14 15:35:01 EST 2010 running KAMIKAZE (8.09, r14511) To get the /etc/i to work with out-of-the-box dnsmasq on OpenWRT I'm using a file /etc/dnsmasq.conf for generated config entries, and a line: addn-hosts=/etc/dnsmasq.hosts That refers to a file containing <IP> <HOSTNAME> [<HOSTNAME> ...] maps. Entry: magnolia netboot Date: Mon Nov 15 08:23:41 EST 2010 - TFTP is really slow (gpxe or the network card maybe?) - PIII -> xeno image doesn't run 3dnow Entry: Pd + jack midi Date: Sat Nov 20 17:23:12 EST 2010 Doesn't seem to be supported. ( Pd bit-rot ? ) Entry: Real-time kernel Date: Sat Nov 20 23:26:08 EST 2010 The last one is 2.6.33.7 This as usual gives trouble with the other non-free drivers. However, it might be necessary to keep those out of the kernel anyway since they are not rt-ified. So I need to start jack without the midi. 2.6.33.7 FGLRX trouble sudo m-a -l 2.6.33.7-rt29 -k /usr/src/linux-headers-2.6.33.7-rt29 a-i fglrx also vmnet trouble Possible solutions: * Get rid of the HD5xxx card and use the HD4xxx card only with the free driver until the HD5xxx is fully supported. * Vmware should be fixable. still getting xruns: alsa_driver_xrun_recovery JackAudioDriver::ProcessAsync: read error, skip cycle Trying now with patch-2.6.31.12-rt21 Works + vmware drivers work. But still that strange jack error. Pd + ALSA works, but some digital distortion on the outputs. http://www.rncbc.org/jack/rtirq-20090920.tar.gz Entry: Digital noise on Delta 1010 outputs Date: Sun Nov 21 00:58:02 EST 2010 Keeping the CPUs busy seems to get rid of this: cat /dev/zero >/dev/null So it's something with the power management. Maybe switch acpi off at boot? This also fixes the jack problem. Got latency down to 96000 kHz, 64 samples, 2 buffers = 0.7 mS That's pretty decent. TODO: - acpi off at boot (EDIT: doesn't make a difference) - remove HD54xx card (use built-in HD4xxx) (EDIT: works) sudo m-a -l 2.6.31.12-rt21 -k /usr/src/linux-headers-2.6.31.12-rt21 a-i fglrx Entry: 01:05.0 VGA compatible controller: ATI Technologies Inc RS880 [Radeon HD 4250] Date: Sun Nov 21 10:40:32 EST 2010 Something wrong with firmware: [ 8.708783] platform radeon_cp.0: firmware: requesting radeon/RS780_pfp.bin [ 8.708783] platform radeon_cp.0: firmware: requesting radeon/RS780_pfp.bin [ 8.760655] platform radeon_cp.0: firmware: requesting radeon/RS780_me.bin [ 8.764327] platform radeon_cp.0: firmware: requesting radeon/R600_rlc.bin [ 8.780239] r600_cp: Failed to load firmware "radeon/R600_rlc.bin" [ 8.780277] [drm:r600_startup] *ERROR* Failed to load firmware! [ 8.780308] radeon 0000:01:05.0: disabling GPU acceleration [ 8.780362] radeon 0000:01:05.0: ffff88019ce1cc00 unpin not necessary [ 8.780364] radeon 0000:01:05.0: ffff88019ce1cc00 unpin not necessary [ 8.780369] [drm] Enabling audio support I can't find this file in the kernel sources, so I wonder how do these blobs get in the kernel in the first place. Are they in the source tree? Runinng "apt-get install firmware-linux-nonfree" fixed the problem. So i'm at 33 with a running GL/XV setup. How does the audio fare here? Works perfectly at 48kHz, 64 frames, 2 blocks (1.3 ms). Neat! Entry: Patching vmware kernel modules for 2.6.33.7-rt21 Date: Sun Nov 21 14:12:02 EST 2010 Untar the vmnet.tar vsock.tar and vmci.tar files in /usr/lib/vmware/modules/source/ then apply the patch below to the following files (they are the same) and re-tar the archives. /usr/lib/vmware/modules/source/vmnet-only/compat_semaphore.h /usr/lib/vmware/modules/source/vsock-only/shared/compat_semaphore.h /usr/lib/vmware/modules/source/vmci-only/include/compat_semaphore.h --- a/shared/compat_semaphore.h +++ b/shared/compat_semaphore.h @@ -38,10 +38,12 @@ * The -rt patchset added the rename between 2.6.29-rt and 2.6.31-rt. */ #ifndef DECLARE_MUTEX - #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) + #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m, 1) #endif #ifndef init_MUTEX - #define init_MUTEX(_m) semaphore_init(_m) + #define init_MUTEX(_m) sema_init(_m, 1) #endif #endif Then recompile the modules using: # vmware-modconfig --console --install-all Entry: Samba trouble Date: Fri Nov 26 10:28:28 EST 2010 Where are the damn logs!! Solution was: smbpasswd -a <username> Entry: cdrecord trouble Date: Fri Nov 26 18:27:39 EST 2010 tom@zoo:/pub$ cat ~/bin/burn.cd.image #!/bin/bash [ -z "$1" ] && echo "usage: `basename $0` <image.iso>" && exit 1 # this uses the scsi system directly DEV=/dev/sr0:1,0,0 #DEV=/dev/dvd exec cdrecord dev=$DEV speed=1 driveropts=burnfree "$@" tom@zoo:/pub$ burn.cd.image debian-506-i386-netinst.iso wodim: No write mode specified. wodim: Asuming -tao mode. wodim: Future versions of wodim may have different drive dependent defaults. Device type : Removable CD-ROM Version : 5 Response Format: 2 Capabilities : Vendor_info : 'ATAPI ' Identification : 'DVD A DH16AASH ' Revision : 'SA15' Device seems to be: Generic mmc2 DVD-R/DVD-RW. Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr). Driver flags : MMC-3 SWABAUDIO BURNFREE FORCESPEED Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R Speed set to 2823 KB/s Starting to write CD/DVD at speed 16.0 in real TAO mode for single session. Last chance to quit, starting real write in 0 seconds. Operation starts. Track 01: Total bytes read/written: 157630464/157630464 (76968 sectors). tom@zoo:/pub$ Then the disk is not readable. Update: it works fine in another drive.. Entry: Trouble with CUPS Generic Postscript from OSX 10.6 Date: Sat Nov 27 14:26:40 EST 2010 Tried with ipp, but the printer would output raw ps code. Printer works fine locally and from other linux/cups. Solution: print using LPD from OSX. This required the following line in /etc/inetd.conf: printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd Entry: Naming USB devices Date: Fri Dec 31 15:00:26 EST 2010 Problem: I have several USB devices that have an identity: hard drives, usb serial cables, USB sticks, ... How to map them to the right device name? For drives it's easy: in /etc/fstab just add the by-id name, like: /dev/disk/by-id/scsi-1Seagate_Portable_2GH3XQRH-part1 Now for tty usb devices. I just plugged in a FTDI TTL cable: [2049983.757824] usb 2-1.3: new full speed USB device using ehci_hcd and address 9 [2049983.857000] usb 2-1.3: New USB device found, idVendor=0403, idProduct=6001 [2049983.857003] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [2049983.857006] usb 2-1.3: Product: TTL232R [2049983.857007] usb 2-1.3: Manufacturer: FTDI [2049983.857009] usb 2-1.3: SerialNumber: FTDCIX5Z [2049983.879508] usbcore: registered new interface driver usbserial [2049983.879520] USB Serial support registered for generic [2049983.879578] usbcore: registered new interface driver usbserial_generic [2049983.879580] usbserial: USB Serial Driver core [2049983.888013] USB Serial support registered for FTDI USB Serial Device [2049983.888095] ftdi_sio 2-1.3:1.0: FTDI USB Serial Device converter detected [2049983.888168] usb 2-1.3: Detected FT232RL [2049983.888170] usb 2-1.3: Number of endpoints 2 [2049983.888172] usb 2-1.3: Endpoint 1 MaxPacketSize 64 [2049983.888173] usb 2-1.3: Endpoint 2 MaxPacketSize 64 [2049983.888175] usb 2-1.3: Setting MaxPacketSize 64 [2049983.888935] usb 2-1.3: FTDI USB Serial Device converter now attached to ttyUSB0 [2049983.888947] usbcore: registered new interface driver ftdi_sio [2049983.888948] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver It connects to /dev/ttyUSB0. However, I want this to be something like /dev/ttyPIC0. How to? See [1] but replace "udevinfo" with "udevadm info" on Debian. # udevadm info -q path -n ttyUSB0 /class/tty/ttyUSB0 # udevadm info -a -p /class/tty/ttyUSB0 Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/class/tty/ttyUSB0': KERNEL=="ttyUSB0" SUBSYSTEM=="tty" DRIVER=="" looking at parent device '/class/tty': KERNELS=="tty" SUBSYSTEMS=="subsystem" DRIVERS=="" Starting from that, this should be what I need: BUS=="usb", SYSFS{idProduct}=="6001", SYSFS{idVendor}=="0403", SYSFS{serial}=="FTDCIX5Z", NAME="ftdi" But the "serial" doesn't match the "SerialNumber" tag. So let's try that. Nothing.. Going with this[2]. It takes a wholly different approach, using ATTRS instaed of SYSFS. Let's try again: SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTDCIX5Z", SYMLINK+="ftdi" Nothing. I'm shooting in the dark. - Do you need to restart udev when config files change? - Where are the udev defaults? (A: /lib/udev) - How to get debug information? - Who assigns the device to "dialout" ? - how does the override work? 00_* vs 99_* - different udev versions, ATTRS or SYSFS ? RTFM? The -a / --attribute-walk option prints all attribs. What I get (see above) doesn't really say much. Removing that I don't get a match either. It simply doesn't work as advertised. Debugger? [3] # udevadm monitor --env UDEV - the event which udev sends out after rule processing KERNEL - the kernel uevent KERNEL[1293833567.771646] add /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 (usb) UDEV_LOG=3 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 SUBSYSTEM=usb DEVNAME=bus/usb/002/030 DEVTYPE=usb_device PHYSDEVBUS=usb DEVICE=/proc/bus/usb/002/030 PRODUCT=403/6001/600 TYPE=0/0/0 BUSNUM=002 DEVNUM=030 SEQNUM=1926 MAJOR=189 MINOR=157 KERNEL[1293833567.773003] add /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0 (usb) UDEV_LOG=3 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0 SUBSYSTEM=usb DEVTYPE=usb_interface PHYSDEVBUS=usb DEVICE=/proc/bus/usb/002/030 PRODUCT=403/6001/600 TYPE=0/0/0 INTERFACE=255/255/255 MODALIAS=usb:v0403p6001d0600dc00dsc00dp00icFFiscFFipFF SEQNUM=1927 KERNEL[1293833567.773181] add /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0 (usb-serial) UDEV_LOG=3 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0 SUBSYSTEM=usb-serial PHYSDEVBUS=usb-serial SEQNUM=1928 KERNEL[1293833567.773353] add /class/tty/ttyUSB0 (tty) UDEV_LOG=3 ACTION=add DEVPATH=/class/tty/ttyUSB0 SUBSYSTEM=tty DEVNAME=ttyUSB0 PHYSDEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0 PHYSDEVBUS=usb-serial PHYSDEVDRIVER=ftdi_sio SEQNUM=1929 MAJOR=188 MINOR=0 KERNEL[1293833567.773397] add /class/usb_device/usbdev2.30 (usb_device) UDEV_LOG=3 ACTION=add DEVPATH=/class/usb_device/usbdev2.30 SUBSYSTEM=usb_device DEVNAME=usbdev2.30 PHYSDEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 PHYSDEVBUS=usb PHYSDEVDRIVER=usb SEQNUM=1930 MAJOR=189 MINOR=157 UDEV [1293833567.775358] add /class/tty/ttyUSB0 (tty) UDEV_LOG=3 ACTION=add DEVPATH=/class/tty/ttyUSB0 SUBSYSTEM=tty DEVNAME=/dev/ttyUSB0 PHYSDEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0 PHYSDEVBUS=usb-serial PHYSDEVDRIVER=ftdi_sio SEQNUM=1929 MAJOR=188 MINOR=0 DEVLINKS=/dev/char/188:0 UDEV [1293833567.778071] add /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 (usb) UDEV_LOG=3 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 SUBSYSTEM=usb DEVNAME=/dev/bus/usb/002/030 DEVTYPE=usb_device PHYSDEVBUS=usb DEVICE=/proc/bus/usb/002/030 PRODUCT=403/6001/600 TYPE=0/0/0 BUSNUM=002 DEVNUM=030 SEQNUM=1926 ID_VENDOR=FTDI ID_VENDOR_ENC=FTDI ID_VENDOR_ID=0403 ID_MODEL=TTL232R ID_MODEL_ENC=TTL232R ID_MODEL_ID=6001 ID_REVISION=0600 ID_SERIAL=FTDI_TTL232R_FTDCIX5Z ID_SERIAL_SHORT=FTDCIX5Z ID_BUS=usb ID_USB_INTERFACES=:ffffff: MAJOR=189 MINOR=157 DEVLINKS=/dev/char/189:157 UDEV [1293833567.780128] add /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0 (usb) UDEV_LOG=3 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0 SUBSYSTEM=usb DEVTYPE=usb_interface PHYSDEVBUS=usb DEVICE=/proc/bus/usb/002/030 PRODUCT=403/6001/600 TYPE=0/0/0 INTERFACE=255/255/255 MODALIAS=usb:v0403p6001d0600dc00dsc00dp00icFFiscFFipFF SEQNUM=1927 UDEV [1293833567.781816] add /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0 (usb-serial) UDEV_LOG=3 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0 SUBSYSTEM=usb-serial PHYSDEVBUS=usb-serial SEQNUM=1928 UDEV [1293833567.782010] add /class/usb_device/usbdev2.30 (usb_device) UDEV_LOG=3 ACTION=add DEVPATH=/class/usb_device/usbdev2.30 SUBSYSTEM=usb_device DEVNAME=/dev/usbdev2.30 PHYSDEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 PHYSDEVBUS=usb PHYSDEVDRIVER=usb SEQNUM=1930 MAJOR=189 MINOR=157 DEVLINKS=/dev/char/189:157 The add call has the ENV variable: ID_SERIAL_SHORT=FTDCIX5Z So it's definitely available. Why don't my rules match? Next: kill udevd and run # udevd --debug What do we learn from this? - it seems to parse the files on startup, so it looks like restart (or HUP?) is necessary to reload the config. - SYSFS{}= will be removed in a future udev version, please use ATTR{}= to match the event device, or ATTRS{}= to match a parent device - it doesn't seem to read the rules file in the first place. Problem was extension is not ".rules" - Got it to match with: SUBSYSTEM=="tty", SYMLINK+="foofoo" But not with: ENV{ID_SERIAL}=="FTDI_TTL232R_FTDCIX5Z" - The program /lib/udev/usb_id is used to set the environment variables, but apparently it doesn't do so for the rules I'm adding. Trying to add something like this gives errors: IMPORT{program}="usb_id --export %p", [1] http://www.cl.cam.ac.uk/research/dtg/research/wiki/Udev [2] http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/ [3] http://www.disa.nu/pub/doc/sles10/usr/share/doc/manual/sles-admin_en/sec.udev.debug.html Entry: udev woes Date: Fri Dec 31 18:31:32 EST 2010 udev is a pain, or is just how it works on Debian? Maybe I just don't understand and this is just a case of not RTFM. Conceptually it's simple: there are events and rules, and when a rule matches an event then it is applied. However, one physical USB plug-in action triggers a multitude of events. And it seems the environment variables that are generated by the /lib/udev/usb_id program are not available on each trigger. Frankly I don't care about the complexity under the hood, I just want to solve this: PROBLEM: associate a specific name or symlink to a specific FTDI usb serial cable. After several tries (see previous post) I finally found something that works: just run the /lib/udev/usb_id program explicitly and match on an environment variable. This is what I have in 99-tty.rules: IMPORT{program}="usb_id --export %p", ENV{ID_SERIAL}=="FTDI_TTL232R_FTDCIX5Z", SYMLINK+="ftdi" Apparently this is still not correct. What this does is to give an alias to the raw USB device. What you want is a driver to handle this, and link the device the driver presents. At the time the event for this serial device is executed, the ID is gone! So, let's see what really happens. It seems that not knowing how the whole thing works is not an option.. See the output of "udevd --debug" below as a response to plugging in the FTDI cable. 1293839146.211444 [14300] event_queue_insert: seq 2176 queued, 'add' 'usb' 1293839146.211471 [14300] udev_monitor_send_device: passed 305 bytes to netlink monitor 0x7f6e3fa9f770 1293839146.211518 [14302] worker_new: seq 2176 running 1293839146.211587 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf490 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' 1293839146.211648 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf840 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1' 1293839146.211673 [14302] udev_device_new_from_syspath: device 0x7f6e3faafb50 has devpath '/devices/pci0000:00/0000:00:13.2/usb2' 1293839146.211703 [14302] udev_device_new_from_syspath: device 0x7f6e3faafe20 has devpath '/devices/pci0000:00/0000:00:13.2' 1293839146.211719 [14302] udev_device_new_from_syspath: device 0x7f6e3fab00f0 has devpath '/devices/pci0000:00' 1293839146.212018 [14302] udev_rules_apply_to_event: PROGRAM 'check-ptp-camera 06/01/01' /etc/udev/rules.d/025_libgphoto2.rules:967 1293839146.212026 [14302] util_run_program: 'check-ptp-camera 06/01/01' started 1293839146.212874 [14300] event_queue_insert: seq 2177 queued, 'add' 'usb' 1293839146.212897 [14300] event_queue_insert: seq 2178 queued, 'add' 'usb-serial' 1293839146.213105 [14300] event_queue_insert: seq 2179 queued, 'add' 'tty' 1293839146.213221 [14300] udev_monitor_send_device: passed 272 bytes to netlink monitor 0x7f6e3fa9f770 1293839146.213245 [14300] event_queue_insert: seq 2180 queued, 'add' 'usb_device' 1293839146.213255 [14303] worker_new: seq 2179 running 1293839146.213286 [14303] udev_device_new_from_syspath: device 0x7f6e3faae1f0 has devpath '/class/tty/ttyUSB0' 1293839146.213323 [14303] udev_device_new_from_syspath: device 0x7f6e3fab04a0 has devpath '/class/tty' 1293839146.213341 [14303] udev_rules_apply_to_event: LINK 'char/188:0' /lib/udev/rules.d/50-udev-default.rules:2 1293839146.213373 [14303] udev_rules_apply_to_event: IMPORT 'path_id /class/tty/ttyUSB0' /lib/udev/rules.d/60-persistent-serial.rules:9 1293839146.213387 [14303] util_run_program: 'path_id /class/tty/ttyUSB0' started 1293839146.214708 [14303] util_run_program: 'path_id /class/tty/ttyUSB0' returned with exitcode 1 1293839146.214723 [14303] udev_rules_apply_to_event: IMPORT 'usb_id --export /class/tty/ttyUSB0' /lib/udev/rules.d/60-persistent-serial.rules:13 1293839146.214730 [14303] util_run_program: 'usb_id --export /class/tty/ttyUSB0' started 1293839146.215547 [14303] util_run_program: 'usb_id --export /class/tty/ttyUSB0' returned with exitcode 1 1293839146.215588 [14303] udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /lib/udev/rules.d/90-hal.rules:2 1293839146.215602 [14303] udev_rules_apply_to_event: GROUP 20 /lib/udev/rules.d/91-permissions.rules:39 1293839146.215614 [14303] udev_event_execute_rules: no node name set, will use kernel supplied name 'ttyUSB0' 1293839146.215644 [14303] udev_device_update_db: created db link (ttyUSB0 char/188:0) 1293839146.215653 [14303] udev_node_add: creating device node '/dev/ttyUSB0', devnum=188:0, mode=0660, uid=0, gid=20 1293839146.215673 [14302] util_run_program: 'check-ptp-camera 06/01/01' returned with exitcode 1 1293839146.215679 [14303] udev_node_mknod: mknod '/dev/ttyUSB0' 188:0 020660 1293839146.215697 [14303] udev_node_mknod: set permissions '/dev/ttyUSB0' 020660 uid=0 gid=20 1293839146.215697 [14302] udev_rules_apply_to_event: LINK 'char/189:184' /lib/udev/rules.d/50-udev-default.rules:2 1293839146.215715 [14303] node_symlink: creating symlink '/dev/char/188:0' to '../ttyUSB0' 1293839146.215737 [14302] wait_for_file: file '/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/descriptors' appeared after 0 loops 1293839146.215745 [14303] udev_monitor_send_device: passed 285 bytes to socket monitor 0x7f6e3faae1f0 1293839146.215755 [14302] udev_rules_apply_to_event: NAME 'bus/usb/002/057' /lib/udev/rules.d/50-udev-default.rules:29 1293839146.215807 [14303] udev_monitor_send_device: passed -1 bytes to netlink monitor 0x7f6e3fab0310 1293839146.215818 [14303] worker_new: seq 2179 processed with 0 1293839146.215842 [14300] event_queue_delete: seq 2179 done with 0 1293839146.215957 [14302] udev_rules_apply_to_event: IMPORT 'usb_id --export /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' /lib/udev/rules.d/70-acl.rules:10 1293839146.215968 [14302] util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' started 1293839146.216754 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=FTDI' 1293839146.216762 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ENC=FTDI' 1293839146.216766 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ID=0403' 1293839146.216769 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=TTL232R' 1293839146.216773 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ENC=TTL232R' 1293839146.216776 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ID=6001' 1293839146.216780 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION=0600' 1293839146.216783 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL=FTDI_TTL232R_FTDCIX5Z' 1293839146.216787 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL_SHORT=FTDCIX5Z' 1293839146.216790 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb' 1293839146.216793 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_USB_INTERFACES=:ffffff:' 1293839146.216812 [14302] util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' returned with exitcode 0 1293839146.216866 [14302] udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /lib/udev/rules.d/90-hal.rules:2 1293839146.216876 [14302] udev_rules_apply_to_event: MODE 0664 /lib/udev/rules.d/91-permissions.rules:36 1293839146.216884 [14302] udev_rules_apply_to_event: IMPORT 'usb_id --export /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' /etc/udev/rules.d/99-tty.rules:2 1293839146.216892 [14302] util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' started 1293839146.217603 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=FTDI' 1293839146.217614 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ENC=FTDI' 1293839146.217623 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ID=0403' 1293839146.217627 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=TTL232R' 1293839146.217631 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ENC=TTL232R' 1293839146.217634 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ID=6001' 1293839146.217638 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION=0600' 1293839146.217641 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL=FTDI_TTL232R_FTDCIX5Z' 1293839146.217644 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL_SHORT=FTDCIX5Z' 1293839146.217648 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb' 1293839146.217652 [14302] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_USB_INTERFACES=:ffffff:' 1293839146.217683 [14302] util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' returned with exitcode 0 1293839146.217700 [14302] udev_rules_apply_to_event: LINK 'pic0' /etc/udev/rules.d/99-tty.rules:2 1293839146.217773 [14302] udev_device_update_db: created db file for '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' in '/dev/.udev/db/usb:2-1.2' 1293839146.217788 [14302] udev_node_add: creating device node '/dev/bus/usb/002/057', devnum=189:184, mode=0664, uid=0, gid=0 1293839146.217798 [14302] udev_node_mknod: mknod '/dev/bus/usb/002/057' 189:184 020664 1293839146.217810 [14302] udev_node_mknod: set permissions '/dev/bus/usb/002/057' 020664 uid=0 gid=0 1293839146.217828 [14302] node_symlink: creating symlink '/dev/char/189:184' to '../bus/usb/002/057' 1293839146.217849 [14302] link_update: creating link '/dev/pic0' to '/dev/bus/usb/002/057' 1293839146.217861 [14302] node_symlink: creating symlink '/dev/pic0' to 'bus/usb/002/057' 1293839146.217906 [14302] udev_monitor_send_device: passed 578 bytes to socket monitor 0x7f6e3faaf490 1293839146.217927 [14302] udev_monitor_send_device: passed -1 bytes to netlink monitor 0x7f6e3faaf1b0 1293839146.217939 [14302] worker_new: seq 2176 processed with 0 1293839146.217962 [14300] event_queue_delete: seq 2176 done with 0 1293839146.217984 [14300] udev_monitor_send_device: passed 329 bytes to netlink monitor 0x7f6e3fa9f770 1293839146.218050 [14300] udev_monitor_send_device: passed 264 bytes to netlink monitor 0x7f6e3fa9f770 1293839146.218073 [14303] worker_new: seq 2180 running 1293839146.218077 [14302] worker_new: seq 2177 running 1293839146.218136 [14303] udev_device_new_from_syspath: device 0x7f6e3faafb60 has devpath '/class/usb_device/usbdev2.57' 1293839146.218184 [14302] udev_device_new_from_syspath: device 0x7f6e3faafb50 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0' 1293839146.218237 [14303] udev_device_new_from_syspath: device 0x7f6e3faae1f0 has devpath '/class/usb_device' 1293839146.218280 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf840 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' 1293839146.218321 [14302] udev_device_new_from_syspath: device 0x7f6e3faaec50 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1' 1293839146.218340 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf490 has devpath '/devices/pci0000:00/0000:00:13.2/usb2' 1293839146.218353 [14303] udev_rules_apply_to_event: PROGRAM 'check-ptp-camera 06/01/01' /etc/udev/rules.d/025_libgphoto2.rules:967 1293839146.218361 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf5a0 has devpath '/devices/pci0000:00/0000:00:13.2' 1293839146.218364 [14303] util_run_program: 'check-ptp-camera 06/01/01' started 1293839146.218520 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf6b0 has devpath '/devices/pci0000:00' 1293839146.218560 [14302] udev_rules_apply_to_event: RUN '/sbin/modprobe -b $env{MODALIAS}' /lib/udev/rules.d/80-drivers.rules:7 1293839146.218572 [14302] udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /lib/udev/rules.d/90-hal.rules:2 1293839146.218586 [14302] util_run_program: '/sbin/modprobe -b usb:v0403p6001d0600dc00dsc00dp00icFFiscFFipFF' started 1293839146.219875 [14302] util_run_program: '/sbin/modprobe -b usb:v0403p6001d0600dc00dsc00dp00icFFiscFFipFF' returned with exitcode 0 1293839146.219906 [14302] udev_monitor_send_device: passed 351 bytes to socket monitor 0x7f6e3faa0a30 1293839146.219924 [14302] udev_monitor_send_device: passed -1 bytes to netlink monitor 0x7f6e3faaf1b0 1293839146.219933 [14302] worker_new: seq 2177 processed with 0 1293839146.219949 [14300] event_queue_delete: seq 2177 done with 0 1293839146.220014 [14300] udev_monitor_send_device: passed 191 bytes to netlink monitor 0x7f6e3fa9f770 1293839146.220028 [14302] worker_new: seq 2178 running 1293839146.220093 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf840 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0' 1293839146.220141 [14302] udev_device_new_from_syspath: device 0x7f6e3faafe70 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0' 1293839146.220162 [14302] udev_device_new_from_syspath: device 0x7f6e3faafb50 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2' 1293839146.220223 [14302] udev_device_new_from_syspath: device 0x7f6e3faafc60 has devpath '/devices/pci0000:00/0000:00:13.2/usb2/2-1' 1293839146.220266 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf490 has devpath '/devices/pci0000:00/0000:00:13.2/usb2' 1293839146.220283 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf5a0 has devpath '/devices/pci0000:00/0000:00:13.2' 1293839146.220461 [14302] udev_device_new_from_syspath: device 0x7f6e3faaf6b0 has devpath '/devices/pci0000:00' 1293839146.220479 [14302] udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /lib/udev/rules.d/90-hal.rules:2 1293839146.220499 [14302] udev_monitor_send_device: passed 221 bytes to socket monitor 0x7f6e3faaf840 1293839146.220557 [14302] udev_monitor_send_device: passed -1 bytes to netlink monitor 0x7f6e3faaf1b0 1293839146.220566 [14302] worker_new: seq 2178 processed with 0 1293839146.220577 [14300] event_queue_delete: seq 2178 done with 0 1293839146.221144 [14303] util_run_program: 'check-ptp-camera 06/01/01' returned with exitcode 1 1293839146.221160 [14303] udev_rules_apply_to_event: LINK 'char/189:184' /lib/udev/rules.d/50-udev-default.rules:2 1293839146.221249 [14303] udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /lib/udev/rules.d/90-hal.rules:2 1293839146.221261 [14303] udev_event_execute_rules: no node name set, will use kernel supplied name 'usbdev2.57' 1293839146.221282 [14303] udev_device_update_db: created db link (usbdev2.57 char/189:184) 1293839146.221288 [14303] udev_node_add: creating device node '/dev/usbdev2.57', devnum=189:184, mode=0600, uid=0, gid=0 1293839146.221295 [14303] udev_node_mknod: mknod '/dev/usbdev2.57' 189:184 020600 1293839146.221304 [14303] udev_node_mknod: set permissions '/dev/usbdev2.57' 020600 uid=0 gid=0 1293839146.221317 [14303] node_symlink: atomically replace '/dev/char/189:184' 1293839146.221343 [14303] udev_monitor_send_device: passed 289 bytes to socket monitor 0x7f6e3faafb60 1293839146.221401 [14303] udev_monitor_send_device: passed -1 bytes to netlink monitor 0x7f6e3fab0310 1293839146.221410 [14303] worker_new: seq 2180 processed with 0 1293839146.221418 [14300] event_queue_delete: seq 2180 done with 0 I can't find a way to do that. Don't want to read tons of manuals and get nowhere.. So, how to hack around this? This is what works, but it's the wrong device. zoo:~# /lib/udev/usb_id --export /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 ID_VENDOR=FTDI ID_VENDOR_ENC=FTDI ID_VENDOR_ID=0403 ID_MODEL=TTL232R ID_MODEL_ENC=TTL232R ID_MODEL_ID=6001 ID_REVISION=0600 ID_SERIAL=FTDI_TTL232R_FTDCIX5Z ID_SERIAL_SHORT=FTDCIX5Z ID_BUS=usb ID_USB_INTERFACES=:ffffff: However, when you do this: zoo:/sys/class/tty/ttyUSB0/device# pwd -P /sys/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0 You get almost what's necessary to pass to usb_id. In the correct directory, you get: zoo:/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2# echo `pwd|sed s/\\\\/sys//` /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 So also: zoo:/sys/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2# /lib/udev/usb_id --export `pwd|sed s/\\\\/sys//` The full magic then goes like this[1] However, that doesn't seem to work as expected. The script doesn't get called for the /class/tty/ttyUSB device. Hmm.. I don't understand. Back to the original question: - why do these environment variables get lost from usb -> usbserial? - why is tha ATTR(serial) not working? - why doesn't "udevadm info -a" show attribs? - what's with the DB? zoo:/dev/.udev/db# udevadm info --query=all -p /class/tty/ttyUSB0 P: /class/tty/ttyUSB0 N: ttyUSB0 S: char/188:0 E: UDEV_LOG=3 E: DEVPATH=/class/tty/ttyUSB0 E: MAJOR=188 E: MINOR=0 E: DEVNAME=/dev/ttyUSB0 E: PHYSDEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2/2-1.2:1.0/ttyUSB0 E: PHYSDEVBUS=usb-serial E: PHYSDEVDRIVER=ftdi_sio E: SUBSYSTEM=tty E: DEVLINKS=/dev/char/188:0 zoo:/dev/.udev/db# udevadm info --query=all -p /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 P: /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 N: bus/usb/002/067 S: char/189:194 E: UDEV_LOG=3 E: DEVPATH=/devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1.2 E: MAJOR=189 E: MINOR=194 E: DEVNAME=/dev/bus/usb/002/067 E: DEVTYPE=usb_device E: DRIVER=usb E: PHYSDEVBUS=usb E: PHYSDEVDRIVER=usb E: DEVICE=/proc/bus/usb/002/067 E: PRODUCT=403/6001/600 E: TYPE=0/0/0 E: BUSNUM=002 E: DEVNUM=067 E: SUBSYSTEM=usb E: ID_VENDOR=FTDI E: ID_VENDOR_ENC=FTDI E: ID_VENDOR_ID=0403 E: ID_MODEL=TTL232R E: ID_MODEL_ENC=TTL232R E: ID_MODEL_ID=6001 E: ID_REVISION=0600 E: ID_SERIAL=FTDI_TTL232R_FTDCIX5Z E: ID_SERIAL_SHORT=FTDCIX5Z E: ID_BUS=usb E: ID_USB_INTERFACES=:ffffff: E: DEVLINKS=/dev/char/189:194 Pfff.. Tried some more. The hack in [1] doen't work. [1] http://zwizwa.be/darcs/pool/bin/ttyUSB_id Entry: udev ttyUSB hack Date: Fri Dec 31 23:09:04 EST 2010 Ok, I got it working. Problem: somehow (on Debian?) the ID_SERIAL environment variable that's available on the raw device doesn't get set for the /class/tty/ttyUSB0 device that needs the symlink. The following script will take a ttyUSB device path and traverse the /sys tree to get at the serial number. The rule: KERNEL=="ttyUSB*", PROGRAM="ttyUSB_id %p", SYMLINK+="tty-%c" EDIT: changes see [2]. Original script was: ---------------------------------------------------------------------------- #!/bin/bash # This script is a helper for the following udev rule: # # KERNEL=="ttyUSB*", PROGRAM="ttyUSB_id %p", SYMLINK+="tty-%c" # # It obtains the serial number associated to the raw USB device, which # is not available from the ttyUSB device. ( Original behaviour might # be a bug, I don't know much about udev. ) # The device name is as it is passed to udev. [ -z "$1" ] \ && echo -e "usage: $0 <device-name>\nexample: $0 /class/tty/ttyUSB0" \ && exit 1 TTYDEV=$1 DIR1=/sys/$TTYDEV/device DIR2=/sys/class/tty/$TTYDEV/device if [ -x $DIR1 ]; then cd $DIR1; elif [ -x $DIR2 ]; then cd $DIR2; else echo "Can't find $DIR1 nor $DIR2" >&2 exit 1 fi cd `pwd -P` ID=`cat ../../serial` echo $ID exit 0 ---------------------------------------------------------------------------- [1] http://zwizwa.be/darcs/pool/bin/ttyUSB_id [2] entry://20110202-124334 Entry: Creating wordpress database Date: Tue Jan 18 10:43:23 EST 2011 http://codex.wordpress.org/Installing_WordPress >> Using the MySQL Client $ mysql -u adminusername -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5340 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE databasename; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" -> IDENTIFIED BY "password"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> EXIT Bye $ Entry: Skype doesn't record Date: Sat Jan 29 11:33:41 EST 2011 Somehow skype doesn't attach properly to the right input port. I'm not sure what's going on. Let's test with ecasound if it actually works: ecasound -i alsa,hw:0 -o test.wav Ecasound doesn't record anything either. This seems related[1]. # Suggested: amixer sset Capture cap "Front Mic" amixer get "Front Mic" amixer sset Capture noplayback amixer sset "Front Mic" noplayback arecord foo.wav arecord -vv foo.wav aplay foo.wav # This works for me: amixer sset Capture cap "Front Mic" amixer get "Front Mic" amixer sset "Front Mic" noplayback ## Front Mic: 0 ## Mic Boost: 0 ## Capture: 77 ## Capture 1: 77 [1] http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/alsa-microphone-works-but-i-cant-record-694726/ Entry: voip Date: Sat Jan 29 17:23:23 EST 2011 iptel.org In twinkle, also set registrar to iptel.org It doesn't need STUN. I was able to call the echo service sip:500@ekiga.net but sound didn't work. Also the callback service didn't seem to work. ekiga.net This seems to work fine. ekiga toll-free hub: sip:*0131800xxxxxxx@ekiga.net sip:*01318007425877@ekiga.net Entry: openvpn keepalive Date: Sun Jan 30 08:08:42 EST 2011 Some experiments. ubi <-> zoo. The problem seems to be ping packets in the direction ubi->zoo. If I set my ping interval higher, I still get disconnects. Sniffing it seems that the OpenVPN ping is one-directional. So it is my guess that the ubi->zoo keeps some stateful firewall open, something with a very low timeout. Entry: usb serial cont Date: Wed Feb 2 12:43:34 EST 2011 Continuation of [1], changes to script [2]. [1] entry://20101231-230904 [2] http://zwizwa.be/darcs/pool/bin/ttyUSB_id Entry: Wacom CTL-460 Date: Wed Feb 2 20:04:47 EST 2011 In my running linux the new tabled isn't recognized yet: /opt/src/linux-2.6.33.7-rt29/drivers/input/tablet/wacom_wac.c : missing: USB_DEVICE(USB_VENDOR_ID_WACOM, 0xD4) [1] http://ubuntuforums.org/showthread.php?t=1290251 Entry: FV6020 sip phone Date: Thu Feb 3 17:05:21 EST 2011 The first thing to do is to log into the web interface and enable the syslog server. Set it to loglevel 7. On debian with rsyslog, enable listening to port 514 in /etc/rsyslog.conf Seems that "Save Config" is necessary after updating any (some?) items. I also enabled SNTP to pool.ntp.org which seems to work. This is what it sends to syslog: Feb 3 17:07:26 192.168.6.245 [MGR] | NOTICE |<D:/voip/platform/app/dhcpClient.c: 580>DHCP client start OK Feb 3 17:07:26 192.168.6.245 [MGR] | INFO |<D:/voip/platform/lan/dhcpsConfig.c: 637>DHCP Server Start Success Feb 3 17:07:26 192.168.6.245 [MGR] | NOTICE |<D:/voip/platform/lan/natConfig.c: 858>NAT module Start Successfully#012 Feb 3 17:07:26 192.168.6.245 [SIP] | WARNING|<D:/voip/platform/sip/sipcode/osipua/src/osipua.c: 59>info: Starting osip stack and osipua layer. Feb 3 17:07:26 192.168.6.245 [SIP] | ERROR |<D:/voip/platform/sip/sipcode/osipua/src/osipmanager.c: 151>info: port already listened Feb 3 17:07:26 192.168.6.245 [MGR] | WARNING|<D:/voip/platform/sip/sipcode/sipApp/sipApp.c: 4446>No phone number , can not start register Feb 3 17:07:26 192.168.6.245 [SIP] | WARNING|<D:/voip/platform/sip/sipcode/osipua/src/udp.c: 362>info: Entering osipua thread. No mather what I try, this doesn't seem to work. It doesn't send any traffic either.. The fragment "osipmanager.c: 151>info: port already listened" gives google hits on linphone. It seems to be registered to a particular domain: ___________________________________________________________________________ localSipPort....................:5060 localDomain.....................:202.172.229.49 PrivatelocalDomain..............:203.117.217.131 enableregister..................:Yes Registrar Ip....................:202.172.229.49 Registrar Port..................:5060 Registrar User Name.............: Registrar User Pwd..............:****** Registrar Expires...............:60(second) Proxy Ip........................:202.172.229.49 Proxy Port......................:5060 Proxy User Name.................: Proxy User Pwd..................:****** Private Registrar Ip............:203.117.217.131 Private Registrar Port..........:5060 Private Registrar User Name.....: Private Registrar User Pwd......:****** Private Registrar Expires.......:60(second) Private Proxy Ip................:203.117.217.131 Private Proxy Port..............:5060 Private Proxy User Name.........: Private Proxy User Pwd..........:****** Public Outbound Proxy Enable....:Yes Private Outbound proxy Enable...:No DtmfSendMode....................:DTMF_RELAY StunEnable......................:No NAT Transverse..................:No StunKeepAlive...................:50(seconds) StunServer Ip...................: StunServer Port.................:3478 RFCver..........................:rfc3261 Alter Registrar Ip..............: Alter Registrar Port............:5060 Alter Registrar User Name.......: Alter Registrar Pwd.............:****** Alter Proxy Ip..................: Alter Proxy Port................:5060 Alter Proxy User Name...........: Alter Proxy Pwd.................:****** Auto Server Detect..............:No Server Detect Time..............:60(second) Auto server Alter...............:No We haven't registered on public server. We haven't registered on private server. ___________________________________________________________________________ So it sends SIP packets to 202.172.229.49 if you set a user+password+phonenumber in the web interface. So, I added an alias for the interface the phone is connected to, which is br0 on zoo: sudo ifconfig br0:1 202.172.229.49 netmask 255.255.255.0 Then I let the phone auto-configure with DHCP, and change its IP address to static 202.172.229.1 with other info (gateway, DNS, ...) left out. http://202.172.229.1/ Another way to fake it is to add an if on the router in the same subnet such that DNS and external routing also work. Summary: - zoo (asterisk): sudo ifconfig br0:1 202.172.229.49 netmask 255.255.255.0 - fred (router): sudo ifconfig br0:1 202.172.229.254 netmask 255.255.255.0 - phone: ip 202.172.229.1 gw,dns 202.172.229.254 registrar (hardcoded) 202.172.229.49 EDIT: got reply from seller: admin password was 0!qaZ++@wsX0 which could be recovered from the web interface by inspecting the source code on the account manage page for admin. Entry: Wacom Bamboo Pen Date: Fri Feb 4 17:06:59 EST 2011 Good news is that it seems to be supported [1]. sudo apt-get install dkms download and install [2]. There's a problem with the kernel API though: DKMS make.log for wacom-0.8.8 for kernel 2.6.33.7-rt29 (amd64) Fri Feb 4 17:04:59 EST 2011 Building linuxwacom drivers for 2.6 kernel. ***Note: Drivers not enabled as modules in your kernel config but requested through configure are NOT built make -C /lib/modules/2.6.33.7-rt29/build M=/var/lib/dkms/wacom/0.8.8/build/src/2.6.30 make[1]: Entering directory `/opt/src/linux-2.6.33.7-rt29' LD /var/lib/dkms/wacom/0.8.8/build/src/2.6.30/built-in.o CC [M] /var/lib/dkms/wacom/0.8.8/build/src/2.6.30/wacom_wac.o CC [M] /var/lib/dkms/wacom/0.8.8/build/src/2.6.30/wacom_sys.o /var/lib/dkms/wacom/0.8.8/build/src/2.6.30/wacom_sys.c: In function ‘wacom_probe’: /var/lib/dkms/wacom/0.8.8/build/src/2.6.30/wacom_sys.c:490: error: implicit declaration of function ‘usb_alloc_coherent’ /var/lib/dkms/wacom/0.8.8/build/src/2.6.30/wacom_sys.c:491: warning: assignment makes pointer from integer without a cast /var/lib/dkms/wacom/0.8.8/build/src/2.6.30/wacom_sys.c:561: error: implicit declaration of function ‘usb_free_coherent’ make[2]: *** [/var/lib/dkms/wacom/0.8.8/build/src/2.6.30/wacom_sys.o] Error 1 make[1]: *** [_module_/var/lib/dkms/wacom/0.8.8/build/src/2.6.30] Error 2 make[1]: Leaving directory `/opt/src/linux-2.6.33.7-rt29' make: *** [all] Error 2 [1] http://frankgroeneveld.nl/2010/04/11/get-wacom-bamboo-fun-pen-working-in-ubuntu-lucid/ [2] http://ppa.launchpad.net/doctormo/wacom-plus/ubuntu/pool/main/w/wacom-source/wacom-dkms_0.8.8-1ubuntu5_all.deb Entry: Briding Asterisk and Skype Date: Sun Feb 6 10:46:46 EST 2011 There seem to be quite some options, see list at [5]. I'm following up on skypopen[1] which gives me the best subjective impression. It says to use the Skype static linux build 2.0.72, but I can only find the 2.1.0.81 version on the Skype website. Skype itself seems to be not cooperating in providing old versions[3]. Looking a bit further I found this [2] but no link. Some checksums found here[4]. [http://download.skype.com/linux/skype_static-2.0.0.72.tar.bz2] md5=cfaa796ef55e3f858a09bbe096eded5a sha256=2f37963e8f19c0ec5efd8631abe9633b6551f09dee024460c40fad10728bc580 Looking further on the MD5 I finally found this[6], which unfortunately is not the same MD5: ff41dd31906484863884ee0a7da441c1 skype_static-2.0.0.72-oss.tar.bz2 Giving up.. Seems to much trouble. I wonder if there is a way to do this externally. Is there a free or cheap skype to SIP bridge that avoids local software hacks? [1] http://wiki.freeswitch.org/wiki/Skypiax [2] http://www.mail-archive.com/pld-cvs-commit@lists.pld-linux.org/msg164742.html [3] http://forum.skype.com/index.php?showtopic=90977&st=20&s=d748e42f40f8a0f49f8f5d4d71b5e666 [4] http://terkos.googlecode.com/svn-history/r1232/trunk/oe/openembedded/conf/checksums.ini [5] http://www.voip-info.org/wiki/view/Skype+Gateways [6] http://www.mediafire.com/?2ydhmj4yo3i Entry: zoo network todo Date: Sun Feb 6 11:48:16 EST 2011 - split wired/wireless - ad a tap on outgoing if - setup zaagske proxy Entry: tcpdump on fred Date: Sun Feb 6 12:17:24 EST 2011 I'm using shfsmount and tcpdump on the networks share since there is no room left with openvpn installed. See handy opkg_get[1] script. /opt/usr/sbin/tcpdump -i br-lan \ "not arp \ and port not 4500 \ and port not 53 \ and port not 1194 \ and port not 22 \ and host not 192.168.6.224 \ and host not 192.168.6.254" /opt/usr/sbin/tcpdump -i eth0.1 \ "not arp \ and port not 53" [1] http://zwizwa.be/darcs/pool/bin/opkg_get Entry: Asterisk behind firewall Date: Sun Feb 6 16:08:18 EST 2011 Asterisk doesn't support STUN, so if the SIP registrar doesn't implement transparent firewall piercing tricks it seems calls don't get through. I.e. I was able to get my @ekiga.net account to register, but the voice channel isn't setup properly. Looks like I have several options: - Figure out how to configure the firewall to forward all ports to main host. - Remove firewal, use zzz-like configuration with firewall on zoo. - Run asterisk on vserver on giebrok. By far the simplest solution seems to be to figure out (once and for all) how to forward all ports on the router to zoo. Entry: FoxyProxy Date: Sun Feb 6 21:23:06 EST 2011 The Standard version allows URL pattern selection for accessing certain sites through certain proxies. It also can defer DNS lookups to the proxy. [1] http://getfoxyproxy.org/ Entry: Forwarding ports using iptables Date: Mon Feb 7 08:34:13 EST 2011 # The following if from a config file on the OpenWRT router. Explain # the difference: why does the 2nd rule select on -s while the first # one selects on -d ? WAN=eth0.1 plug () { iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport $1 -j DNAT --to $2:$3 iptables -A forwarding_rule -i $WAN -p tcp --dport $3 -d $2 -j ACCEPT } # ASTERISK # RTP=10000:20000 # iptables -t nat -A prerouting_rule -i $WAN -p udp --dport $RTP -j DNAT --to-destination $ZOO # iptables -A forwarding_rule -i $WAN -s $ZOO -p udp --dport $RTP -j ACCEPT Entry: OpenOCD RPC Date: Sun Feb 13 12:10:23 EST 2011 Problem: how to upload a file from the unix command line, using a running OpenOCD instance? I tried something like this: telnet localhost 4444 <<EOF flash write_image erase $FILE $BASE elf EOF but that doesn't seem to work well as the pipe is closed before the op finishes. The op does execute though, but there's no way to wait for its completion. Looks like this needs "expect". Entry: Racket in debian Date: Tue Feb 15 14:13:54 EST 2011 I'm not going to wait for it any longer. 5.1 is just out and I'm simply going to compile it from git source. 1. get the git 2. cd src ; ./configure ; make ; make install This creates an in-place build. Entry: Xmonad and Java (swig?) apps Date: Thu Feb 17 10:36:49 EST 2011 verified: export _JAVA_AWT_WM_NONREPARENTING=1 [1] http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Problems_with_Java_applications.2C_Applet_java_console Entry: ttyACM vs ttyUSB Date: Thu Feb 17 10:57:10 EST 2011 The Openbench logic sniffer identifies as a CDC modem device, not a serial port. What's the difference? Entry: pbxes.org Date: Thu Feb 17 12:51:03 EST 2011 Is this actually useful? Entry: Git rebase and backups Date: Fri Feb 18 12:34:49 EST 2011 It seems to be a better idea to use rsync to back up a repository that is has rebase operations going on, instead of using push/pull. Entry: Asterisk & IPTABLES Date: Sat Feb 19 07:38:28 EST 2011 These are the issues: - Port forwarding for SIP ports (both TCP & UDP) - Port forwarding for RTP ports (UDP) - Pass public IP address to asterisk For other purposes, it seems best to do a whole range port forwarding on the router. So what is necessary first is an understanding of how snat works. Entry: Full NAT Date: Sat Feb 19 08:04:38 EST 2011 # fullnat <public IP> <private IP> # rule 1. internal IP to external IP after routing. # rule 2. external IP to internal IP before routing. # rule 3. rewrites outgoing packaets originating on FW to internal addresses fullnat () { $IPTABLES -t nat -A POSTROUTING -o eth+ -s $2 -j SNAT --to-source $1 $IPTABLES -t nat -A PREROUTING -d $1 -j DNAT --to-destination $2 # necessary for connections from internal IPs to exernal IPs $IPTABLES -t nat -A OUTPUT -d $1 -j DNAT --to-destination $2 } For openwrt this becomes: fullnat () { $IPTABLES -t nat -A POSTROUTING -o eth+ -s $2 -j SNAT --to-source $1 $IPTABLES -t nat -A PREROUTING -d $1 -j DNAT --to-destination $2 # necessary for connections from internal IPs to exernal IPs $IPTABLES -t nat -A OUTPUT -d $1 -j DNAT --to-destination $2 } Doesn't work on openwrt... Entry: Openwrt port forwarding Date: Sat Feb 19 09:42:59 EST 2011 Let's just use the highlevel interface instead of working with iptables directly. This is how to forward a TCP/UDP port range: config redirect option src wan option src_dport 12000-13000 option dest lan option dest_ip 192.168.6.254 Entry: Asterisk behind firewall Date: Sat Feb 19 12:24:23 EST 2011 So, config: externip=<EXTERN-IP> localnet=192.168.6.0/255.255.255.0 nat=yes The problem is that I'm trying to perform a call from within my network. To any host this looks like the router's IP address. However, if asterisk is trying to send to this address from the _inside_ of the firewall it won't work! Entry: Up 1 hour and already got SIP scanned Date: Sat Feb 19 12:36:05 EST 2011 The host below is scanning all extensions up to 9999. Looks like the ACL is configured correctly so this is not allowed. zoo:/var/log/asterisk# cat messages |grep '"11"' [Feb 19 12:24:26] NOTICE[21123] chan_sip.c: Registration from '"11"<sip:11@98.243.194.73>' failed for '77.242.169.94' - Device does not match ACL Entry: SIPbroker Date: Sat Feb 19 14:22:22 EST 2011 To test an inbound call, use SIPbroker. After registration (user = ext@domain) you can use the following to setup a call: http://www.sipbroker.com/sipbroker/action/callOut I.e. *850301 is echotest from http://www.ideasip.com/support/numbers.php For more numbers see http://faq.sipbroker.com/tiki-index.php?page=Phone%20Numbers Entry: Router public IP (i.e. for asterisk) Date: Sat Feb 19 14:48:32 EST 2011 Place this script in /www/cgi-bin/public_ip: ps #!/bin/sh ifconfig eth0.1 | grep 'inet addr' | sed 's/:/ /' | awk '{print $3}' Then the contents is accessable as wget http://fred/cgi-bin/public_ip -q -O - Entry: z.sh Date: Sat Feb 19 20:27:06 EST 2011 This[1] is just great. [1] https://github.com/rupa/z Entry: Wacom Date: Sun Feb 20 23:14:27 EST 2011 tom@zoo:/opt/src/linuxwacom-0.8.8-10$ ./configure --enable-wacom tom@zoo:/opt/src/linuxwacom-0.8.8-10$ file /opt/src/linuxwacom-0.8.8-10/src/2.6.30/wacom.ko /opt/src/linuxwacom-0.8.8-10/src/2.6.30/wacom.ko: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped Why does it build a 32-bit ko? Ah, because my source dir /opt/src/linux-2.6.33.7-rt29 contains a 32bit build. Probably a remnant of an old .deb build. tom@zoo:/opt/src/linux-2.6.33.7-rt29$ file ./debian/linux-image-2.6.33.7-rt29/lib/modules/2.6.33.7-rt29/kernel/lib/crc-t10dif.ko ./debian/linux-image-2.6.33.7-rt29/lib/modules/2.6.33.7-rt29/kernel/lib/crc-t10dif.ko: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), from 'd', not stripped tom@zoo:/opt/src/linux-2.6.33.7-rt29$ ls -l ./debian/linux-image-2.6.33.7-rt29/lib/modules/2.6.33.7-rt29/kernel/lib/crc-t10dif.ko -rw-r--r-- 1 tom tom 3024 2010-11-21 17:21 ./debian/linux-image-2.6.33.7-rt29/lib/modules/2.6.33.7-rt29/kernel/lib/crc-t10dif.ko Indeed: tom@zoo:/opt/src$ ls -l linux*386.deb -rw-r--r-- 1 tom tom 6527530 2010-11-21 17:22 linux-headers-2.6.33.7-rt29_1_i386.deb -rw-r--r-- 1 tom tom 19326440 2010-11-21 17:21 linux-image-2.6.33.7-rt29_1_i386.deb Rebuilding it for amd64 should solve it. Yep it did. Tablet works fine now. Entry: Git and rebase Date: Tue Feb 22 10:09:16 EST 2011 I want to change the order of patches. remotes/origin/master - A - B - C - master -> remotes/origin/master - C - A - B - master How to go about that? The simplest way I see is to: - rename the current master branch to 'dev' - set master to remotes/origin/master - cherry pick on top This[1] says that: "When it comes to a range of commits, cherry-picking is not practical." I'm going to try the cherry pick first. git branch tom # tag current branch git checkout master # switch to master (already on) git reset remotes/origin/master # reset master to remote git reset --hard HEAD # discard local changes (git reset leaves uncommitted patch on top of new base) After this you can switch between branches "git checkout tom" and "git checkout master". To pull in changes from the other branch, simply do: git cherry-pick <id1> <id2> ... A simple way to do this is to open up gitk on the other dev branch, then switch to master branch on the command line and copy-paste the hash IDs. To flatten patches into a single patch, do this: git rebase --interactive <id1> with <id1> the base revision to squash. Hmm.. That didn't really do anything. I get the following reply which lets me edit a commit message in emacs, but my master branch still looks the same: tom@zoo:~/priv/git-private/ecos_trailer$ git rebase --interactive 9e5bf0e6a0dc6a08e20fcf2250244fc07de57191 Waiting for Emacs... Successfully rebased and updated refs/heads/master. Maybe the commit message has some commands in it? That might be the case. Anyways, I think I also found how to just change commit messages[3]: Let's use the following: Change-Id: Ib25d489261e530183ba60a14bb05cc296b59dbef [1] http://stackoverflow.com/questions/1994463/how-to-cherry-pick-a-range-of-commits-and-merge-into-another-branch [2] http://stackoverflow.com/questions/4506758/flatten-old-history-in-git [3] http://stackoverflow.com/questions/179123/how-do-i-edit-an-incorrect-commit-message-in-git Entry: Full VPN out Date: Thu Feb 24 12:51:35 EST 2011 I need a host that doesn't use my default gw for traffic. I need it for testing VOIP. How to proceed? I'd say vserver but the restrictions on direct machine access are a real pain. Better go with a kvm based solution. Entry: Backing up .git repositories in the face of rebases Date: Fri Feb 25 12:44:32 EST 2011 The simplest seems to be just to rsync the .git directory and leave all the rest alone, as it can be recreated. Otherwise you're pulling a lot of code and possibly build results through every time, since the working tree might be in any state. Entry: Brother MFC-240C CUPS error: No pages found! Date: Mon Feb 28 13:37:46 EST 2011 Setting the loglevel to warn exposed this error message: D [28/Feb/2011:08:35:55 -0500] [Job 8] /usr/local/Brother/Printer/mfc240c/lpd/filtermfc240c: 60: a2ps: not found apt-get install a2ps That didn't fix it though it made the error message above disappear. Entry: Crap CUPS Date: Mon Feb 28 15:30:25 EST 2011 # Went back to stable, then did apt-get uninstall <cups> <brother drivers> ... apt-get autoremove aptitude purge '~c' Got it back to work now, but still get the 'No pages found!' error. Again, installing a2ps doesn't help. moms:/var/log/cups# apt-get install a2ps Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: lpr psutils wdiff Suggested packages: emacsen-common groff gv html2ps graphicsmagick-imagemagick-compat imagemagick texlive-base-bin t1-cyrillic magicfilter apsfilter gs The following NEW packages will be installed: a2ps lpr psutils wdiff 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 1,291 kB of archives. After this operation, 6,078 kB of additional disk space will be used. Do you want to continue [Y/n]? So I re-purged. Maybe the error message "a2ps" and "No pages found!" messages are not related? Using cups-lpd from inetd works, but then the margins are not ok! What a pile of crap!! printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd Anyways.. Let's dig a bit further. It looks like /usr/local/Brother/Printer/mfc240c/lpd/filtermfc240c receives an empty file on stdin. I checked with wireshark, and the PS file is transferred over the ipp socket. In the printers.conf the following filter is defined: Filter application/vnd.cups-postscript 0 brlpdwrappermfc240c How does the chain of command work? The first executed filter is: /usr/lib/cups/filter/brlpdwrappermfc240c Which is the one that calls filtermfc240c. Enabling the debug vars in that file gives also an empty ps file. Now, this file looks totally messed up! What's with this: nup="cat" if [ "" != '' ] && [ $NUPENABLE != 0 ]; then if [ "" != '' ]; then nup="psnup -64" elif [ "" != '' ]; then nup="psnup -32" elif [ "" != '' ]; then nup="psnup -25" elif [ "" != '' ]; then nup="psnup -16" elif [ "" != '' ]; then nup="psnup -8" elif [ "" != '' ]; then nup="psnup -6" elif [ "" != '' ]; then nup="psnup -4" elif [ "" != '' ]; then nup="psnup -2" elif [ "" != '' ]; then nup="cat" fi echo "NUP=$nup" >>$LOGFILE if [ -e /usr/bin/psnup ]; then if [ $# -ge 7 ]; then cat $6 | $nup > $INPUT_TEMP_PS else cat | $nup > $INPUT_TEMP_PS fi else if [ $# -ge 7 ]; then cp $6 $INPUT_TEMP_PS else cat > $INPUT_TEMP_PS fi fi else if [ $# -ge 7 ]; then cp $6 $INPUT_TEMP_PS else cat > $INPUT_TEMP_PS fi fi My guess is it's the line "if [ $# -ge 7 ]; then", that should be 6. The other guess is then that for normal printing the input comes on the stdin instead of being supplied by a file like for remote? Let's try. Yes, print comes through, but the margins are likewise messed up. But! The margins are off by the difference of A5 and letter format, so that's probably just openoffice config. Where can I send this fix? Entry: Brother MFC-240C CUPS Linux driver bug Date: Mon Feb 28 17:37:38 EST 2011 Long story short: The error is: "No pages found!" when printing remotely. Everything works fine locally. The bug is a classic off-by-one error. The fix is at the end of /usr/lib/cups/filter/brlpdwrappermfc240c - if [ $# -ge 7 ]; then + if [ $# -ge 6 ]; then When the 6th argument is zero, the input is expected on stdin. When it is not, the input is stored in a file. Apparently for local printing (and cups-lpr) the input is on stdin, and for remote it is in a file. Looks like this was simply not tested during driver debugging. The error message in /var/log/cups/error_log: D [28/Feb/2011:08:35:55 -0500] [Job 8] /usr/local/Brother/Printer/mfc240c/lpd/filtermfc240c: 60: a2ps: not found is simply a consequence of the input being an empty file which itself is a consequence of the "-ge 7" bug.. This empty file is then not recognized and its contents is passed over to a2ps. Context: this is on debian squeeze with the following Brother drivers: # dpkg -l |grep 240 ii mfc240ccupswrapper 1.0.1-1 Brother CUPS Inkjet Printer Definitions ii mfc240clpr 1.0.1-1 Brother lpr Inkjet Printer Definitions And this cups version: # dpkg -l |grep cups ii cups 1.4.4-7 Common UNIX Printing System(tm) - server ii cups-client 1.4.6-1 Common UNIX Printing System(tm) - client programs (SysV) ii cups-common 1.4.6-1 Common UNIX Printing System(tm) - common files ii cups-driver-gutenprint 5.2.6-1 printer drivers for CUPS ii cups-ppdc 1.4.4-7 Common UNIX Printing System(tm) - PPD manipulation utilities ii ghostscript-cups 8.71~dfsg2-9 The GPL Ghostscript PostScript/PDF interpreter - CUPS filters ii libcups2 1.4.4-7 Common UNIX Printing System(tm) - Core library ii libcupscgi1 1.4.4-7 Common UNIX Printing System(tm) - CGI library ii libcupsdriver1 1.4.4-7 Common UNIX Printing System(tm) - Driver library ii libcupsimage2 1.4.4-7 Common UNIX Printing System(tm) - Raster image library ii libcupsmime1 1.4.4-7 Common UNIX Printing System(tm) - MIME library ii libcupsppdc1 1.4.4-7 Common UNIX Printing System(tm) - PPD manipulation library ii mfc240ccupswrapper 1.0.1-1 Brother CUPS Inkjet Printer Definitions Entry: Brother HL-2240 toner info Date: Tue Mar 1 22:59:12 EST 2011 I found a very interesting document about the HK-2240 toner cardriges TN-420 and TN-450. [1] http://www.uninetimaging.com/downloads/technical/TecArtWebAdded/Brother_HL2270_TN450_Reman_eng.pdf Entry: eth0.1 vs eth0:1 Date: Wed Mar 2 00:06:19 EST 2011 802.1Q VLAN (eth0.1) vs alias (eth0:1). An alias can be used to attach a second IP address to a single interface, while a VLAN is an encapsulated ethernet connection based on packets tagged with an extra identifier[1]. To enable VLAN support, issue: # modprobe 8021q To create a new interface for VLAN ID 11, issue: # vconfig add eth0 11 # ifconfig eth0.11 up # tcpdump -i eth0.11 [1] http://en.wikipedia.org/wiki/IEEE_802.1Q Entry: VLAN on OpenWRT routers Date: Wed Mar 2 00:24:31 EST 2011 The linksys WRT54g routers have an ethernet port connected to a switch that supports vlans. In order to have vlans actually go to the local net, tagging needs to be disabled. root@fred:~# robocfg show Switch: enabled Port 0(W): DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 1(4): DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 2(3): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 3(2): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 4(1): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00 Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 VLANs: BCM5325/535x enabled mac_check mac_hash vlan0: 0 1 2 3 5t vlan1: 4 5t So, if I want to have vlan 11 tags to appear both on the router's internal interface (port 5) and the cable connected to the gigabit switch (port 3), this should do that: # vconfig add eth0 11 # robocfg vlan 11 ports "3t 5t" Indeed, that works. Entry: Firewall and bridge Date: Wed Mar 2 00:48:09 EST 2011 I would like to firewall a bridge connection. On a host inside my network I have a bridge that contains VLAN 11, and on the router the wireless is bridged to VLAN11. The router does not connect the wireless interface directly to the local net. The idea is that it is filtered and monitored on the internal host. So, how to limit traffic that goes "through" the bridge? Is this at all possible? I want a bridge because I want a single IP space that is not tied to location. This is to keep the failsafe situation simple and because generally it seems like a lot less work to manage. On the router, create the VLAN 11 and make sure the port 3 (internal server) carries the vlan tags. # vconfig add eth0 11 # ifconfig eth0.11 up # robocfg vlan 11 ports "3t 5t" Then create the wifi bridge, and move the wifi interface from br-lan on the router to br-wifi, tying it to VLAN 11. # brctl addbr br-wifi # ifconfig br-wifi up # brctl addif br-wifi eth0.11 # brctl delif br-lan wl0 # brctl addif br-wifi wl0 On the host just do the same: # vconfig add eth0 11 # ifconfig eth0.11 up # brctl addif br0 eth0.11 Hmm.. This doesn't seem to be stable.. I'm loosing packets somewhere. [1] http://tldp.org/HOWTO/Ethernet-Bridge-netfilter-HOWTO.html Entry: Debian update to squeeze Date: Wed Mar 2 10:20:35 EST 2011 0;261;0c grub-update-from-legacy dpkg-reconfigure sysv-rc Entry: IPTABLES amateur Date: Wed Mar 2 18:57:56 EST 2011 I need to find out how logging works.. I've wasted enough time half understanding iptables. Time for some clear debugging pictures.. Entry: GUD (gdb in emacs) Date: Sat Mar 5 15:37:11 EST 2011 Two problems I'd like to solve: 1. Send a command to a gdb session inside emacs. 2. Wait for this command to finish The first one doesn't seem to be directly supported (odd?) but the second one is reallyu not trivial. Since all commands are a-synchronous, this requires some kind of callback. First one can use 'gud-call which is undocumented, but seems to do what I want. Entry: Racket Date: Sun Mar 6 12:25:48 EST 2011 To build the racket debian package, first get the git repo[1], create the source package with gitpkg, create the binary package with dpkg-buildpackage and install it: git config gitpkg.pre-export-hook /usr/share/gitpkg/hooks/pristine-tar-pre-export-hook gitpkg master cd ../deb-packages/plt-scheme/plt-scheme-5.0/ dpkg-buildpackage -b cd .. dpkg -i plt-scheme_5.0-1_all.deb plt-scheme-doc_5.0-1_all.deb racket_5.0-1_amd64.deb racket-common_5.0-1_all.deb racket-doc_5.0-1_all.deb For the last step I had to use --force-overwrite because of common files in racket-common and racket-doc. However, racket 5 breaks my stuff. I didn't take a careful look, but it seems to be some planet libraries are still missing.. Not ready yet.. Back to 4.2 EDIT: breaks sweb: facade.ss: make-make-response/ful -> response/full [1] http://git.debian.org/?p=collab-maint/racket.git Entry: iptables and bridges Date: Wed Mar 9 15:04:22 EST 2011 Looks like traffic between 2 interfaces in a bridge goes through the FORWARD chain. The good news is that you can bridge a bunch of VMs together on the same bridge interface, keeping them in the same subnet for easy management, and use a FORWARD rule to prevent them to see each other. Entry: zoo site setup Date: Fri Mar 11 19:33:10 EST 2011 I'd like to go back to the old zzz-style setup, where the WRT54G routers are dumb, and just bridge their interfaces onto vlans, where a more powerful server takes care of all networking stuff. However, I want to combine it with a default setup that makes the router take over in case the bigger server is down, so there is at least internet functionality. The main question is: when you run dhcp-client on the bridge, can you set the mac address? It's not necessary to use a bridge, simply configure the WRT54G switch to bring tagged frames from the WAN port to the server port, and possibly disconnect the router from the WAN port. # Detach router (5) from the WAN port (4), and send tagged frames over # LAN-1 (3) which has the server. robocfg vlan 1 ports "4 3t" # Kill local daemons killall udhcpc killall dnsmasq killall openvpn echo "nameserver 192.168.6.254">/etc/resolv.conf # It might be a good idea to add a watchdog that resets the router # when the connectivity to the routing server goes away. Entry: racket debian Date: Fri Mar 18 11:52:29 EDT 2011 Trying the debian packageagain. Had to foefelare the version of the top entry from 5.1+dfsg1 -> 5.1 in debian/changelog because of: tom@zoo:/opt/src/racket-debian$ gitpkg master pristine-tar checkout ../deb-packages/racket/racket_5.1+dfsg1.orig.tar.gz fatal: Path 'racket_5.1+dfsg1.orig.tar.gz.delta' does not exist in 'refs/heads/pristine-tar' /usr/bin/pristine-tar: git show refs/heads/pristine-tar:racket_5.1+dfsg1.orig.tar.gz.delta failed ERROR: pre-export-hook '/usr/share/gitpkg/hooks/pristine-tar-pre-export-hook' failed I don't know what it's building buit it's building ;) I found out from building the upstream current git that the previous problem I had with racket is in zwizwa/plt: am API change in the web server: make-response/full -> response/full After installing, I get the following problem: tom@zoo:~$ mzscheme read failed to read all 23 bytes from file /usr/bin/mzscheme Aborted From [1]: "According to the Racket developers, this is because mzscheme has been stripped." [1] https://bugs.archlinux.org/task/19962 Entry: Proper colors for emacs in terminal Date: Tue Mar 22 10:35:18 EDT 2011 This used to work just fine for me, but now I get very inconsistent results. On zoo it works, and it has TERM=xrvt-unicode. Ok, it works in the ubit VM too after "apt-get install rxvt-unicode". It doesn't seem to work well inside of screen though.. Can we use just emacsclient? Another option is to use dtach. Entry: KVM network issue Date: Tue Mar 22 10:53:36 EDT 2011 Under high load the ethernet emulation seems to give up. Entry: Event and monitor system Date: Tue Mar 22 10:54:27 EDT 2011 I need some standard way to monitor generic events and conditions on my linux hosts. Anything really. Entry: emacs + dtach Date: Tue Mar 22 13:00:41 EDT 2011 Got it working with xterm (for the 256 colors). Hoever, resize won't work with xterm while it works well with rxvt. Seems to be due to this: /usr/share/X11/app-defaults/XTerm has *allowWindowOps: false On Debian that's /etc/X11/app-defaults/XTerm Add these to ~/.Xdefaults: xterm*allowWindowOps: true xterm*allowTitleOps: true xterm*allowFontOps: true And then load them with xrdb ~/.Xdefaults Entry: Weird bridge tcpdump problem Date: Tue Mar 22 19:35:32 EDT 2011 Packets come through when I have "tcpdump -i br1" running. As soon as I quit that, the packets don't come through. Has something to do with it entering promiscuous mode? From here [1]: "In order to act a a bridge, the network device must be placed into promiscuous mode which means it receives all traffic on a network." Looks like tcpdump disabled promiscuous mode on a bridge! To fix: ifconfig br1 promisc Can't reproduce with tcpdump after doing the above. [1] http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge Entry: Merging serial console Date: Tue Mar 22 20:08:29 EDT 2011 How to merge a serial console to a network socket? If it's unidirectional, the simplest way might be to use udp broadcast. Maybe it's simplest to just use dtach. Entry: Things to fix Date: Tue Mar 22 22:23:47 EDT 2011 - copy & paste in xterm/dtach emacs - kvm boot gpxe -> seems to work after running gpxe from grub to insert extra delay. the qemu tap bridge takes a while to setup and fails the gpxe timout. - dtach cu -> works fine together with i.e. picocom. however, dtach needs a terminal so won't just dump it's output Entry: echo -> clear screen / home position Date: Wed Mar 23 14:27:13 EDT 2011 Use this for clear screen: echo -ne '\033[2J' and this for return to home position: echo -ne '\033[2H' The latter is useful for running a command many times per second, and observe the output: while sleep .05; do echo -ne '\033[2H' ; ./MY_COMMAND ; done Entry: Apache mod_rewrite sucks Date: Thu Mar 24 11:08:31 EDT 2011 Actiually it's probably just that I don't read the manual properly. I guess it's quirky to avoid infinite loops? Anyways, got some very simple, literal redirects to do, but I can't seem to get them to work. More later. Entry: Cups again (boy I hate printers) Date: Wed Mar 30 13:55:32 EDT 2011 Suddenly I get problems with landscape/portrait orientation. This happens with locally printing from openoffice (need to pick "portrait" when printing a landscape document). I also get different behaviour printing remotely. Some portrait documents are printed landscape, and some landscape are portrait. There seems to be a difference between lpd and remote cups. What a horrible mess.. Entry: Saturation Date: Wed Mar 30 15:25:56 EDT 2011 Copying data from zoo to moms saturates at 12MB/sec, completely plugging the pipe. No other traffic gets through. Why does it saturate? And why does it saturate at 12MB/sec (100Mbit?) for a disk copy with dst and src disks faster than that? VLAN issue? tom@zoo:~$ ssh moms 'cat /dev/zero' | pv >/dev/null This gives 11-12 MB/sec. These are 100M speeds. Topology is as follows. zoo -- gig1 -- gig2 -- moms | | fast1 fast2 -- internet | wifi Both gigabit ethernet switches have a fast ehternet (100M) switch attached which connects some slower gear. fast2 is a WRT54G which has its switch configured to tag the internet port as VLAN1, and bridges its wifi port to VLAN11 on the shared segment. Entry: VMWare interfaces: vmnet0 vmnet1 vmnet8 Date: Thu Mar 31 11:27:38 EDT 2011 vmnet0 Bridge vmnet1 Host Only vmnet8 NAT [1] http://www.extremetech.com/article2/0,1697,1156371,00.asp Entry: Saturation cont. Date: Fri Apr 1 20:02:24 EDT 2011 The problem went away. The following now gives 22MB/sec and other traffic passes through just fine. Weird.. tom@zoo:~$ ssh moms "cat /dev/zero" |pv>/dev/null Entry: Linux printing again.. Date: Tue Apr 5 19:27:32 EDT 2011 Why can't this just work? It worked better 10 years ago with just lpd and ghostscript! Debian squeeze. Okular + Openoffice don't get orientation right on lanscape documents. I'm guessing it's cups since it happens for 2 programs. Need to test on the command line, i.e. the simplest path from file to what is sent to the driver. Take half a day for that. Entry: Apache rewrite rules : Matching on CGI inputs? Date: Sun Apr 10 10:55:35 EDT 2011 I want to redirect a wordpress URL like: /blog/?page_id=1520 This doesn't seem to work. My guess is that it's because the script parameter page_id=1520 is handled differently than the base url blog/ This can be solved by using RewriteCond on the QUERY_STRING environment variable. By default the query is passed through. To kill it or otheriwise change it add a question mark. RewriteCond %{QUERY_STRING} ^page_id=1520$ RewriteRule ^/blog/$ http://deyofthephoenix.com/herstories/? From [1]: Modifying the Query String By default, the query string is passed through unchanged. You can, however, create URLs in the substitution string containing a query string part. Simply use a question mark inside the substitution string to indicate that the following text should be re-injected into the query string. When you want to erase an existing query string, end the substitution string with just a question mark. To combine new and old query strings, use the [QSA] flag. [1] http://httpd.apache.org/docs/current/mod/mod_rewrite.html Entry: Landscape printing problem Date: Fri Apr 29 12:15:47 EDT 2011 System info: ------------------- ZOO ------------------------------- tom@zoo:~$ okular --version Qt: 4.6.3 KDE Development Platform: 4.4.5 (KDE 4.4.5) Okular: 0.10.5 cups: 1.4.4-7 ------------------- MOMS ------------------------------- tom@moms:~$ okular --version Qt: 4.6.3 KDE Development Platform: 4.4.5 (KDE 4.4.5) Okular: 0.10.5 cups:Version: 1.4.4-7 -------------------------------------------------------- I have one PDF that prints incorrectly: zoo -> moms: prints as landscape printing the same file directly from moms does it correctly. The problem seems to be a difference between local and remote printing, for which i already found a bug in the MFC240C brother driver. CUPS behaves differently: print job provided on stdin of the driver, or as a file. SOLUTION: Using LPD fixes it. Over-generalizing conclusion: don't trust vendor-supplied CUPS drivers for remote printing! Entry: Converting TWF .html -> .ebook Date: Thu May 5 15:30:06 EDT 2011 Using ebook-convert from calibre on the archive from [1] directly doesn't seem to create individual files properly.. I'm doing something wrong. However, the following ugly hack seems to work: move the week*.html files to the html/ dir and then do this: [1] http://math.ucr.edu/home/baez/twf_html.tar.gz Entry: Starting a second X server in query mode Date: Sun May 8 10:37:08 EDT 2011 $ sudo X -query <host> :1 Entry: Laptop mode: always on, even if on battery Date: Sun May 8 10:57:34 EDT 2011 # /etc/laptop-mode/laptop-mode.conf : ENABLE_LAPTOP_MODE_ON_AC=1 Entry: emacs + xterm Date: Sun May 8 11:01:07 EDT 2011 I recently switched from rxvt to xterm, basically to make the colors in emacs work properly (rxvt doesn't support 256 colors, and some or other configuration on some of my machines doesn't seem to set the colors right, while on other machines it works.) Now it seems that some mouse commands do not work properly, i.e. cut & paste from another window into the xterm: it seems to do a yank instead. mouse-2 is bound to 'mouse-yank-at-click. I'd like it to be a smart merge between yank and pasting an X selection. Entry: Dovecot: time just moved backwards Date: Sun May 15 12:23:39 CEST 2011 /var/log/mail.err: May 15 09:18:21 giebrok dovecot: dovecot: Fatal: Time just moved backwards by 2502 seconds. This might cause a lot of problems, so I'll just kill myself now. http://wiki.dovecot.org/TimeMovedBackwards Entry: Debugging vlan Date: Sun May 15 13:35:47 CEST 2011 Weird stuff. I'm jet-lagged so it could just be PEBKAC. Following setup: I have qemu/kvm VM with interface called ubit, bridged to br1 together with eth0.2 which is eth0's VLAN2. The VM's dhcp requests do not seem to pass through. The weird thing is that I see the dhcp requests on eth0.2 and the replies on eth0, tagged with vlan2. WTF? ## eth0.2 (or the bridge br1) sees the client bootpc > server bootps .. zni:/home/tom# tcpdump -i eth0.2 tcpdump: WARNING: eth0.2: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0.2, link-type EN10MB (Ethernet), capture size 96 bytes 13:38:56.200120 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 52:54:00:12:34:05 (oui Unknown), length 300 13:38:59.717661 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 52:54:00:12:34:05 (oui Unknown), length 300 ## eth0 has the server bootps > client bootpc reply packets, tagged as "vlan 2" zni:/etc/network# tcpdump -i eth0 vlan tcpdump: WARNING: eth0: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 13:38:56.201403 vlan 2, p 0, IP gate-13.i.bootps > ubit-13.i.bootpc: BOOTP/DHCP, Reply, length 300 13:38:59.718744 vlan 2, p 0, IP gate-13.i.bootps > ubit-13.i.bootpc: BOOTP/DHCP, Reply, length 300 13:39:04.717947 vlan 2, p 0, ARP, Request who-has ubit-13.i tell gate-13.i, length 42 13:39:05.718014 vlan 2, p 0, ARP, Request who-has ubit-13.i tell gate-13.i, length 42 13:39:06.718085 vlan 2, p 0, ARP, Request who-has ubit-13.i tell gate-13.i, length 42 Q: These should really be the same, since eth0.2 is VLAN2. Or is it not? zni:/etc/network# cat /proc/net/vlan/config VLAN Dev name | VLAN ID Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD eth0.2 | 2 | eth0 Performing an eth0 dump to file and analyzing with wireshark, and I do see both discover (request) and offer (reply) packets. I don't know why "tcpdump -i eth0 vlan" doesn't show them on the console. Doing the same for the eth0.2 dump, the reply packets do not show up. Q: Why do the packets show up properly as VLAN-tagged on the eth0 dump, but only one direction in the eth0.2 dump? Packet size? Hmm.. Unlikely. DHCP packets are around 300 bytes. I tried to add ubit to br0 and that works flawlessly. Maybe it has something to do with eth0 being part of br0. Maybe I should use br0 as the interface for untagging? I'm using the same setup on zoo and there it seems to work fine.. Q: What is this? Then another problem pops up. Still works fine on zoo, but on zwizwa I don't see any UDP reply packets for the vpn. After shutdown and a run on zoo it seems that it's working now on zni. I don't know why.. Maybe it's time to move away from bridges. Is it the MAC learning that gets in the way? I tried to take VLAN 2 from br0 instead of eth0 directly, but that doesn't make any difference, except that I can't even see the reply packets on the br0 any more. Maybe it's just the "bridge id"? On zni the two bridges have the same id. zoo:~# brctl show bridge name bridge id STP enabled interfaces br0 8000.90fba6e47b21 no eth0 br1 8000.425d46586bb6 no eth0.11 zni:~# brctl show bridge name bridge id STP enabled interfaces br0 8000.002421230e4b no eth0 br1 8000.002421230e4b no eth0.2 Why is this? I found another thing that works: disabling br0, using eth0 directly. Then on br1 everything works as expected. Entry: Bridges and STP (spanning tree protocol) Date: Sun May 15 16:54:17 CEST 2011 It looks like some of the trouble I have with enabling bridges is due to redundant routes. The manual says that in this case, you need to enable STP. Q: Is my setup redundant? I think so if some of the segments can be routing segments, meaning if some "bridges" can be routes too. Have to look at this later. Entry: virtio-net Date: Mon May 16 13:47:03 CEST 2011 client side: virtio-net kvm: -net nic,model=virtio Entry: KSM : kernel samepage merging Date: Tue May 17 12:19:25 CEST 2011 Sharing pages. [1] http://www.linux-kvm.com/content/using-ksm-kernel-samepage-merging-kvm Entry: VirtualSquare Date: Tue May 17 12:22:11 CEST 2011 [1] http://www.virtualsquare.org/ Entry: icedove doesnt open links after upgrade Date: Thu May 19 14:31:53 CEST 2011 # Problem: the following point to firefox. Should point to x-www-browser gconftool -g /desktop/gnome/url-handlers/http/command gconftool -g /desktop/gnome/url-handlers/http/enabled gconftool -g /desktop/gnome/url-handlers/https/command gconftool -g /desktop/gnome/url-handlers/https/enabled # Solution: gconftool -s -t string /desktop/gnome/url-handlers/http/command '/usr/bin/x-www-browser "%s"' gconftool -s -t string /desktop/gnome/url-handlers/https/command '/usr/bin/x-www-browser "%s"' ## THIS DID NOT SOLVE THE PROBLEM FOR ME ## I deleted my profile and started over - no time to fuss with it. ## Then it worked, meaning icedove does _seem to_ use x-www-browser. ## Recent upgrade: also delete the "http" option in "attachments". [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566819 [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569662 Entry: Debian install from USB stick Date: Thu May 19 20:30:09 CEST 2011 4.3. Preparing Files for USB Memory Stick Booting 4.3.1. Preparing a USB stick using a hybrid CD or DVD image Debian CD and DVD images can now be written directly a USB stick, which is a very easy way to make a bootable USB stick. Simply choose a CD or DVD image that will fit on your USB stick. See Section 4.1, “Official Debian GNU/Linux CD-ROM Sets” to get a CD or DVD image. [1] http://www.debian.org/releases/stable/i386/ch04s03.html.en Entry: alsa card order Date: Sun May 22 14:32:34 CEST 2011 Installed RME9652 on zni, but it wants to come up as first card. Added the following line to /etc/modprobe.d/alsa-base.conf : options snd-rme9652 index=-2 To reload the modules, do this: alsa force-reload I can't test now if this works properly at reboot. The other solution is to do this: # Remove all drivers. rmmod snd_hda_intel rmmod snd_rme9652 # Load drivers in the desired order. modprobe snd_hda_intel modprobe snd_rme9652 Or probably to define proper snd-card-0, snd-card-1 aliases. The HDA has 2 cards though. Entry: privoxy, chrome and SDHC Date: Sun Jun 5 19:16:32 CEST 2011 --enable-sdch="nothing" From [1]: The cause of the problem is that privoxy is reaching into content that is compressed, and removing data, resulting in a very corrupt stream. Privoxy should instead honor the content encoding, and if it does not understand the encoding (in this case, content-encoding=gzip,sdch) then it should NOT alter the stream. That is the current bug in privoxy. [1] http://code.google.com/p/chromium/issues/detail?id=24365 Entry: zwizwa trouble Date: Sat May 28 20:57:50 CEST 2011 [10479065.715018] tcpdump: page allocation failure. order:5, mode:0xc0d0 [10479065.715041] Pid: 19342, comm: tcpdump Not tainted 2.6.26-2-vserver-686 #1 [10479065.715094] [<c01639de>] __alloc_pages_internal+0x33a/0x34e [10479065.715177] [<c01639fe>] __alloc_pages+0x7/0x9 [10479065.715198] [<c0163a0f>] __get_free_pages+0xf/0x1b [10479065.715262] [<c02debde>] packet_set_ring+0xcb/0x2db [10479065.715323] [<c02dfe27>] packet_setsockopt+0x242/0x300 [10479065.715375] [<c02dff04>] packet_getsockopt+0x1f/0x103 [10479065.715415] [<c025bcd8>] sys_setsockopt+0x6f/0x8e [10479065.715462] [<c025d4b9>] sys_socketcall+0x15c/0x19e [10479065.715526] [<c0103857>] sysenter_past_esp+0x78/0xb1 [10479065.715605] ======================= [10479065.715616] Mem-info: [10479065.715627] DMA per-cpu: [10479065.715638] CPU 0: hi: 0, btch: 1 usd: 0 [10479065.715651] Normal per-cpu: [10479065.715661] CPU 0: hi: 90, btch: 15 usd: 0 [10479065.715674] Active:29210 inactive:16556 dirty:91 writeback:20 unstable:0 [10479065.715676] free:11260 slab:3226 mapped:2932 pagetables:529 bounce:0 [10479065.715699] DMA free:9320kB min:124kB low:152kB high:184kB active:748kB inactive:680kB present:16256kB pages_scanned:0 all_unreclaimable? no [10479065.715718] lowmem_reserve[]: 0 238 238 238 [10479065.715787] Normal free:35720kB min:1908kB low:2384kB high:2860kB active:116092kB inactive:65544kB present:243776kB pages_scanned:0 all_unreclaimable? no [10479065.715807] lowmem_reserve[]: 0 0 0 0 [10479065.715830] DMA: 484*4kB 321*8kB 165*16kB 50*32kB 9*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 9320kB [10479065.715918] Normal: 1403*4kB 1002*8kB 577*16kB 268*32kB 65*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 35724kB [10479065.716040] 22515 total pagecache pages [10479065.716053] Swap cache: add 21748823, delete 21739952, find 26225400/28917567 [10479065.716067] Free swap = 704320kB [10479065.716115] Total swap = 979892kB [10479065.717998] 65520 pages of RAM [10479065.718015] 0 pages of HIGHMEM [10479065.718025] 1516 reserved pages [10479065.718034] 18241 pages shared [10479065.718045] 8871 pages swap cached [10479065.718054] 91 pages dirty [10479065.718064] 0 pages writeback [10479065.718073] 2932 pages mapped [10479065.718083] 3226 pages slab [10479065.718094] 529 pages pagetables Memory usage is large for a couple of programs: 103372 /usr/bin/mzscheme 202228 /usr/sbin/clamd 230612 /usr/sbin/apache2 230612 /usr/sbin/apache2 Maybe it's best to kick all these out since they aren't really used much. some small http can probably be used instead of of apache, but FTP is probably enough. tom@zwizwa:~$ ps aux|grep clamd clamav 13154 0.0 29.2 202228 75048 ? Ssl Jan30 120:09 /usr/sbin/clamd tom@zwizwa:~$ free total used free shared buffers cached Mem: 256144 252088 4056 0 71068 35548 -/+ buffers/cache: 145472 110672 Swap: 979892 310840 669052 tom@zwizwa:~$ ps aux|grep apache root 2602 0.0 0.1 9200 356 ? Ss Jan25 6:46 /usr/sbin/apache2 -k start root 2606 0.0 0.0 8816 164 ? Ss Jan25 1:46 /usr/sbin/htcacheclean -n -d120 -i -p/var/cache/apache2/mod_disk_cache -l300M www-data 20208 0.0 0.0 8832 156 ? S May22 0:00 /usr/sbin/apache2 -k start www-data 20254 0.0 0.0 230612 168 ? Sl May22 0:00 /usr/sbin/apache2 -k start www-data 20257 0.0 0.0 230612 172 ? Sl May22 0:00 /usr/sbin/apache2 -k start Entry: clamav exim: removed Date: Sat May 28 21:15:32 CEST 2011 Commented out + no longer running clam daemon. I'd like to do this on the command line. Doesn't matter if it takes a long time, the memory usage seems to be problematic otherwise. # virus scanner # av_scanner = clamd:/var/run/clamav/clamd.ctl Also spamassasin? No, leaving it like it is. Too much breakage, no time to tinker. I removed PLT webserver + apache since they're not used. Entry: OpenVPN trouble Date: Mon Jun 6 15:03:17 CEST 2011 Something went wrong on Jun 1, only detected on Jun 5 22:56:10 when I restarted the service. Wed Jun 1 20:08:38 2011 zoo/1.1.1.1.73:37588 [zoo] Inactivity timeout (--ping-restart), restarting Wed Jun 1 20:08:38 2011 zoo/1.1.1.1.73:37588 SIGUSR1[soft,ping-restart] received, client-instance restarting Wed Jun 1 20:08:45 2011 one/2.2.2.2:41532 [one] Inactivity timeout (--ping-restart), restarting Wed Jun 1 20:08:45 2011 one/2.2.2.2:41532 SIGUSR1[soft,ping-restart] received, client-instance restarting Sun Jun 5 22:56:10 2011 event_wait : Interrupted system call (code=4) Sun Jun 5 22:56:10 2011 TCP/UDP: Closing socket Sun Jun 5 22:56:10 2011 Closing TUN/TAP interface Sun Jun 5 22:56:10 2011 /sbin/ifconfig vpn1 0.0.0.0 SIOCSIFADDR: Permission denied SIOCSIFFLAGS: Permission denied Sun Jun 5 22:56:11 2011 Linux ip addr del failed: external program exited with error status: 255 Sun Jun 5 22:56:11 2011 SIGTERM[hard,] received, process exiting tom@zwizwa:~$ sudo openvpn --version OpenVPN 2.1.0 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Apr 10 2010 Originally developed by James Yonan Copyright (C) 2002-2009 OpenVPN Technologies, Inc. <sales@openvpn.net> What does it look like on the other side? Ping timeouts. Let's just upgrade: zwizwa:/var/log/openvpn# openvpn --version OpenVPN 2.1.3 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Oct 21 2010 Originally developed by James Yonan Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net> Entry: boot error Date: Wed Jun 8 20:07:06 CEST 2011 Begin: Running /scripts/local-premount ... resume: libgcrypt version: 1.4.5 resume: cCould not stat the resume device file '/dev/disk/by-uuid/....' Please type in the full path name to try again or press ENTER to boot the system: -> comes from an out-of-date initrd update-initramfs -u -k all Entry: IPv6 firewall Date: Sun Jun 12 01:05:30 CEST 2011 Starting Nmap 4.62 ( http://nmap.org ) at 2011-06-12 01:03 CEST Interesting ports on cl-1386.bru-01.be.sixxs.net (2001:6f8:202:569::2): Not shown: 1710 closed ports PORT STATE SERVICE 25/tcp open smtp 139/tcp open netbios-ssn 143/tcp open imap 445/tcp open microsoft-ds 6667/tcp open irc So everything is wide open. For now, let's only allow ping. Entry: IPv6 and /64 subnets Date: Sun Jun 12 02:03:26 CEST 2011 What's with that damn large number? Somewhere on the web: ... if you aren't concerned about SLAAC and anycast you can subnet however you want. I know of many ISPs that are using /127 on their point to point links. Entry: emacs and xterm Date: Sun Jun 12 14:14:02 CEST 2011 I'm moving to the theory that XTerm is actually "more correct" than any of the other terminal emulators, and will use it as my default. Before I ran into trouble with setting 256 color mode. Recently I ran into trouble with X selection, but it seems to have been a relic of the following, which simply didn't work in RXVT. ;; From the `xterm-mouse-mode' help page: ;; When turned on, the normal xterm mouse functionality for such ;; clicks is still available by holding down the SHIFT key while ;; pressing the mouse button. ;; For xterm it seems best to have both worlds, even if that means to ;; have to use shift-middle to do paste from another X window. In ;; rxvt the xterm-mouse-mode doesn't work. (xterm-mouse-mode 1) Entry: debian squeeze upgrade Date: Sun Jun 12 16:48:36 CEST 2011 Hmm.. looks like some earlier happy hacking is causing problems. ┌──────────────────────────────┤ Configuring sysv-rc ├───────────────────────────────┐ │ │ │ Unable to migrate to dependency-based boot system │ │ │ │ Tests have determined that problems in the boot system exist which prevent │ │ migration to dependency-based boot sequencing: │ │ │ │ insserv: warning: script 'rc.modified' missing LSB tags and overrides, insserv: │ │ warning: script 'rc.zzz' missing LSB tags and overrides, insserv: There is a loop │ │ between service rmnologin and mountnfs if started, insserv: loop involving │ │ service mountnfs at depth 8, insserv: loop involving service nfs-common at depth │ │ 7, insserv: There is a loop between service rmnologin and networking if started, │ │ insserv: loop involving service networking at depth 5, insserv: loop involving │ │ service mountall at depth 4, insserv: loop involving service portmap at depth 8, │ │ insserv: loop involving service mountoverflowtmp at depth 6, insserv: There is a │ │ loop between service stop-bootlogd and mountall if started, insserv: loop │ │ involving service rsyslog at depth 5, insserv: There is a loop between service │ │ rmnologin and checkroot if started, insserv: loop involving service checkroot at │ │ depth 3, insserv: loop involving service keyboard-setup at depth 2, insserv: loop │ │ involving service alsa-utils at depth 12, insserv: loop involving service │ │ mountall-bootclean at depth 6, insserv: loop involving service checkfs at depth │ │ 4, insserv: There is a loop between service rmnologin and checkroot if started, │ │ insserv: loop involving service hwclockfirst at depth 3, insserv: loop involving │ │ service mtab at depth 6, insserv: There is a loop between service rmnologin and │ │ ifupdown-clean if started, insserv: loop involving service ifupdown-clean at │ │ depth 6, insserv: loop involving service console-screen at depth 13, insserv: │ │ There is a loop between service rmnologin and mountdevsubfs if started, insserv: │ │ loop involving service mountdevsubfs at depth 3, insserv: loop involving service │ │ udev at depth 2, , package apache2.2-common removed but not purged, package │ │ console-setup removed but not purged, package dkms removed but not purged, │ │ package fam removed but not purged, package fglrx-atieventsd removed but not │ │ purged, package icecc removed but not purged, package kdm removed but not purged, │ │ package privoxy removed but not purged, package quagga removed but not purged, │ │ package squid removed but not purged, package virtualbox-ose removed but not │ │ purged │ │ │ │ If the reported problem is a local modification, it needs to be fixed manually. │ │ If it's a bug in the package, it should be reported to the BTS and fixed in the │ │ package. See http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for more │ │ information about how to fix the problems preventing migration. │ │ │ │ To reattempt the migration process after the problems have been fixed, run │ │ "dpkg-reconfigure sysv-rc". │ │ │ │ <Ok ?> │ │ │ └────────────────────────────────────────────────────────────────────────────────────┘ ┌────────────────────────────────┤ Configuring ure ├─────────────────────────────────┐ │ │ │ Component registries might be corrupted │ │ │ │ You are upgrading from a version which might have corrupted service/component │ │ registry files (*.rdb), especially │ │ /var/lib/openoffice/basis3.1/program/services.rdb and the rdb files in │ │ /var/spool/openoffice/uno_packages/cache for installed extensions. │ │ │ │ If you experience problems with the component manager or segmentation faults │ │ involving libstore in either unopkg or OpenOffice.org, please check these files. │ │ Try cleanly reinstalling the packages and/or using a clean user profile. │ │ │ │ <Ok�?> │ │ │ └────────────────────────────────────────────────────────────────────────────────────┘ ## original config was modified by me, probably BLANK_DPMS=off # tom@zni:/etc/console-tools$ cat config | nocomment BLANK_TIME=30 BLANK_DPMS=off POWERDOWN_TIME=30 SCREEN_FONT=lat0-sun16 SCREEN_FONT_vc2=lat0-sun16 SCREEN_FONT_vc3=lat0-sun16 SCREEN_FONT_vc4=lat0-sun16 SCREEN_FONT_vc5=lat0-sun16 SCREEN_FONT_vc6=lat0-sun16 ## for cups I keep my own config ## also alsa-base.conf ## dnsmaq ## initramfs-tools Entry: debian-archive-keyring Date: Mon Jun 13 12:22:02 CEST 2011 apt-get install debian-archive-keyring Entry: mail-transport-agent Date: Tue Jun 14 17:50:36 CEST 2011 Simple mail forwarding for debian, without heavy daemon: ssmtp esmtp-run [1] http://blog.philippklaus.de/2011/03/set-up-sending-emails-on-a-local-system-by-transfering-it-to-a-smtp-relay-server-smarthost/ Entry: emasc mail-mode vs. message mode Date: Tue Jun 14 19:16:04 CEST 2011 This warning showed up: Warning (mail): The default mail mode is now Message mode. You have the following Mail mode variable customized: mail-self-blind To use Mail mode, set `mail-user-agent' to sendmail-user-agent. To disable this warning, set `compose-mail-user-agent-warnings' to nil. What's the difference between mail-mode and message-mode? From[1]: Message mode handles MIME attachments. This is the main benefit over the default mail mode. [1] http://www.emacswiki.org/emacs/MessageMode Entry: hdparm drive spindown time Date: Thu Jul 7 10:08:42 CEST 2011 # hdparm -S 100 /dev/sdg1 /dev/sdg1: setting standby to 100 (8 minutes + 20 seconds) man hdparm: -S Put the drive into idle (low-power) mode, and also set the standby (spindown) timeout for the drive. This timeout value is used by the drive to determine how long to wait (with no disk activity) before turn‐ ing off the spindle motor to save power. Under such circumstances, the drive may take as long as 30 seconds to respond to a subsequent disk access, though most drives are much quicker. The encoding of the time‐ out value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not automatically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that some older drives may have very different interpretations of these values. Entry: apt-get without confirm Date: Thu Jul 7 10:16:09 CEST 2011 Is there a way to make apt-get install answer "yes" to "Do you want to continue [y/N]?" [1] http://superuser.com/questions/164553/automatically-answer-yes-when-using-apt-get-install Entry: checkinstall easy_install Date: Thu Jul 7 10:22:56 CEST 2011 # To install RBTools (reviewboard utilities), the website[1] # recommends to use the following command: easy_install -U RBTools # However, Olivier suggested to use checkinstall[2]: checkinstall easy_install -U RBTools # Which wraps the install in a debian package. [1] http://www.reviewboard.org/news/2009/03/29/announcing-rbtools-02-beta-1/ [2] http://www.debian-administration.org/articles/147 Entry: maintenance day Date: Tue Aug 9 10:25:17 CEST 2011 - Remove DISPLAY guessing. I have this in .bashrc: if [ -z "$DISPLAY" ]; then GUESSED=`who -m --ips | awk '{print $5 }'` if [ -n "$GUESSED" ]; then export DISPLAY_GUESSED="$GUESSED:0.0" fi fi It used to set DISPLAY directly but this interferes with some port-knocking firewall config. Maybe it should be replaced with a notice that DISPLAY isn't set correctly in ssh config. - Enable proper X11 forwarding. /etc/ssh/sshd_config on zwizwa had "X11Forwarding no". - Another problem on giebrok, found with "ssh -v": debug1: Remote: No xauth program; cannot forward with spoofing. Warning goes away after installing xauth, but forwarding still doesn't work. In auth.log I found this: error: Failed to allocate internet-domain X11 display socket. See [1], it seems to be an ipv6 config error. workaround: add "AddressFamily inet" Real problem is probably ipv6 config op vhosts. - ipv6. important? not really. let's first look at sixxs account to see if i'm missing out on something. I have 1 ISK. Tunnel is down due to server reboot 34 days ago. /etc/init.d/aiccu wasn't started. hmm.. it is linked in /etc/rc2.d trouble with ppp restart? it's up and being pinged, so ISK should rise. let's see if it survives ppp restart. - crashes on zwizwa [2590389.756459] tcpdump: page allocation failure. order:5, mode:0xc0d0 Is this the same problem again with clamd memory leak? Currently: clamav 2068 0.0 13.7 140024 35112 ? Ssl Jul05 5:05 /usr/sbin/clamd Hmm, upgraded it still has around 117988 size. - oom stuff. I swear I saw a message about oom in auth.log, just like i did with the internet-domain error mentioned above. I can't find neither now. Was it something about /proc/self/oom_adj ? Doesn't seem to be a big deal. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=422327 Entry: automate scanning Date: Tue Aug 9 11:56:44 CEST 2011 Problem: I need a quick, no-brainer command to scan a single document as PDF at 150 DPI, possibly with some contrast enhancement. Currently I'm using gimp and jpeg2pdf which is a hassle. scanimage -L list devices -x,-y scan area mm Result, see [1] [1] http://zwizwa.be/darcs/pool/bin/scan-pdf Entry: zoo is a mess! Date: Wed Sep 7 19:28:04 EDT 2011 This was problematic for debugging: - autologin worked, but screen was on tty6 ? However, this was quite a mess: - eth0.1 not auto? - /proc/sys/net/ipv4/ip_forward -> 0 ! - br1 doesn't come up properly - if all these things fail, /etc/fw/firewall fails too - asterisk doesn't come up properly - ubit route not automatic Need to test it again to make sure it comes up properly. Fixes: - eth0.1 auto - /etc/fw/firewall: echo 1 >/proc/sys/net/ipv4/ip_forward - added || echo to br1 script to make sure it comes up in case of errors: bridge creation not idempotent - cleaned up network/interfaces to have pre-up a ; b ; c instead of multiple pre-up - /etc/fw/firewall now runs on post-up - ubit routing in qemu ifup Entry: debian dist-upgrade problem Date: Thu Sep 8 15:13:17 EDT 2011 [1] https://bugs.launchpad.net/ubuntu/+source/debconf/+bug/377211 Entry: Openoffice Date: Fri Sep 9 06:43:57 EDT 2011 Time to get to know Calc How to? - Insert a number of rows, keeping formula? That doesn't work, but it's possible to insert multiple rows by selecting the number of rows to insert, then use insert row. To copy the formula, just select one box which has a formula, and drag its corner black square down. - Keyboard shortcut for row insert? Don't know, but it's possible to add an insert/delete rows button to the toolbar. - Quickly enter product of two rows? Looks like it needs to be done manually: =PRODUCT(<start>:<end>) Entry: Printing broke again.. Date: Fri Sep 9 20:21:05 EDT 2011 I passionately hate printers. After upgrade to Debin testing.. I don't know... WTF. Spits out blank pages, or part of a page. Have to press the GO button for it to start. Ok.. Green light blinking. Manual says this is either warm up / cool down / data rx / data process. Manual says to press button if it takes too long. When I did it came out with 20% of page printed. Then it started to spit blanks. Turned it on, booted in windows. Removed all installs (every time it turns on a new intances was installed!) Didn't do anything but mentioning paper jam. Removed jammed paper (from turning it off during blank paper spewing). All printing after that disappeared in the void on windows. Switched back to linux. First time same blinking light problem. Waited for a bit then it came out. Think it was complete - not sure. After that everything was fine. Weird.. Entry: zni upgrade Date: Sun Sep 11 09:50:17 EDT 2011 1. dist-upgrade to squeeze 2. install ghc 7 from wheezy Entry: Internal network flood? Date: Sun Sep 11 10:39:12 EDT 2011 Copying from zni -> moms with full-rate tcp (SSH) causes external traffic to drop. Setting a 4Mbyte/sec bw cap on rsync solves the problem. External traffic is carried internally on a VLAN. Maybe this needs priorities set? Entry: Linux bandwidth limit / traffic control. Date: Sun Sep 11 12:40:41 EDT 2011 First trying cut & paste tc[1] without much success. Then found this[2] which mentions the wondershaper[3] script which uses tc. Also mentioned is trickle[4], which is a per-application socket call overload. [1] http://atmail.com/kb/2009/throttling-bandwidth/ [2] http://superuser.com/questions/66574/how-to-throttle-bandwidth-on-a-linux-network-interface [3] http://lartc.org/wondershaper/ [4] http://monkey.org/~marius/pages/?page=trickle Entry: Haskell install Date: Sun Sep 11 15:28:54 EDT 2011 Ha.. I installed ghc 7 from wheezy because of this: /home/tom/meta/dspm/SysM.hs:22:8: Could not find module `Data.Functor.Identity': Use -v to see a list of the files searched for. but it looks like that's doesn't solve anything. Needs haskell-platform. Entry: Setting up ppp server Date: Tue Sep 13 01:46:16 CEST 2011 I need to run a ppp server on a virtual terminal (pty) for some embedded software testing. How to proceed? Found this[1]. The following seems to do something: pppd auth +pap -chap login -detach /dev/pts/13 [1] http://stilius.net/callback_en.php Entry: Cups again Date: Thu Sep 15 11:24:49 EDT 2011 I spend so much time mucking about with this and it keeps breaking. I'm using a Brother HL-2240 and the latest drivers from Brother, together with cups from Debian Wheezy. Sometimes it works / sometimes it hangs. I didn't see a real pattern yet, but in top I see it's the "usb" process that's doing something. From pstree: ├─cupsd─┬─brlpdwrapperHL2───filterHL2240───rawtobr3 │ └─usb The green light on the printer is flashing, which means either that there is data transfer in progress (for several minutes) or that there is data left in memory. If I press the button, it prints part of the page. It's a page with a lot of graphics. From here[1] it's mentioned that the PCL drivers also work. Anyways, I'm first going to try the purged install, and will document here what steps I took to change the network printing. cupswrapperHL2240-2.0.4-2.i386.deb hl2240lpr-2.1.0-1.i386.deb See [2]. After purge it worked. [1] http://ubuntuforums.org/showthread.php?t=1627516 [2] entry://20110915-114706 Entry: Installing CUPS + HL2240 + MFC240C on Debian Wheezy Date: Thu Sep 15 11:47:06 EDT 2011 Scanner driver brscan-0.2.4-0.i386.deb is done separately. # Install cups 1.5.0-5 apt-get install cups cups-bsd dpkg -i hl2240lpr-2.1.0-1.i386.deb dpkg -i cupswrapperHL2240-2.0.4-2.i386.deb # Enable remote access in cupsd.conf -Listen localhost:631 +Listen 0.0.0.0:631 DefaultAuthType Basic +ServerAlias * <Location /> Order allow,deny + Allow from 192.168.* </Location> # Same for the MFC240C drivers. dpkg -i mfc240clpr-1.0.1-1.i386.deb dpkg -i mfc240ccupswrapper-1.0.1-1.i386.deb # For remote printing, use lpd/raw, which will go through a path that # looks like a local print job on the server. At least the MFC-240C # doesn't support remote printing properly out of the box [1]. # EDIT: problem reappeared. This time I get /var/log/cups/error_log: E [17/Sep/2011:08:30:08 -0400] [Job 8] Unable to send data to printer. I plugged it into a different USB port and it seemed to work again. [1] entry://20110228-173738 Entry: Networking TODO Date: Fri Sep 16 13:00:57 EDT 2011 - merge zwizwa & zoo openvpn config - fix routing zwizwa -> zoo network (quagga?) Entry: OpenVPN on droid2 / verizon running 2.2 (Froyo) Date: Fri Sep 16 13:24:55 EDT 2011 The tun.ko module for 2.2 is missing on the phone. Get it here[1]. Needs root access on the phone. I used Z4 root. Using "adb shell" with root permissions it's possible to remount the /system share as rw, so the tun.ko can be copied to /system/lib # mount get list of mount points => find the one corresponding to /system # mount -o remount,rw /dev/block/mmcblk1p21 /system Then copy the tun.ko module to /system/lib/modules, either directly, or through the sd card, then copying to /system if it doesn't allow direct copy. I had this problem trying to insert the module: <3>[89176.615234] tun: version magic '2.6.32.9-27220-g328f560 preempt mod_unload ARMv7 ' should be '2.6.32.9 preempt mod_unload ARMv7 Apparently insmod can't stript this magic, but it's possible to remove it by editing the object file. Using objdump I find this: $ objdump -j .modinfo tun.ko -s tun.ko: file format elf32-little Contents of section .modinfo: 0000 616c6961 733d6368 61722d6d 616a6f72 alias=char-major 0010 2d31302d 32303000 6c696365 6e73653d -10-200.license= 0020 47504c00 61757468 6f723d28 43292031 GPL.author=(C) 1 0030 3939392d 32303034 204d6178 204b7261 999-2004 Max Kra 0040 736e7961 6e736b79 203c6d61 786b4071 snyansky <maxk@q 0050 75616c63 6f6d6d2e 636f6d3e 00000000 ualcomm.com>.... 0060 64657363 72697074 696f6e3d 556e6976 description=Univ 0070 65727361 6c205455 4e2f5441 50206465 ersal TUN/TAP de 0080 76696365 20647269 76657200 64657065 vice driver.depe 0090 6e64733d 00000000 7665726d 61676963 nds=....vermagic 00a0 3d322e36 2e33322e 392d3237 3232302d =2.6.32.9-27220- 00b0 67333238 66353630 20707265 656d7074 g328f560 preempt 00c0 206d6f64 5f756e6c 6f616420 41524d76 mod_unload ARMv 00d0 37200000 I tried to edit this out in the binary. It loaded properly, but crashed the phone when actually used. # cat /proc/version Linux version 2.6.32.9-g9e2c63d (xrpk47@il93lnxdroid25) (gcc version 4.4.0 (GCC) ) #1 PREEMPT Mon Nov 15 22:44:13 CST 2010 Maybe need to compile from Motorola source [2]? Ok, this one[4] from this thread[3] works on the version above. It sets up the tunnel connection. Still a problem: the "ifconfig" on android doesn't work as expected. Fri Sep 16 15:08:24 2011 PUSH: Received control message: 'PUSH_REPLY,route-gateway 192.168.14.254,ifconfig 192.168.14.44 255.255.255.0' Fri Sep 16 15:08:24 2011 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:2: ifconfig (2.1.1) See here [5][6]. If I set it manually it works: ifconfig tap0 192.168.14.44 netmask 255.255.255.0 up TODO: - fix vpn on zni - auto load tun.ko ? - fix ifconfig stuff | use external script workaround [1] http://code.google.com/p/get-a-robot-vpnc/downloads/detail?name=tun.ko [2] http://sourceforge.net/motorola/wiki/Android/ [3] http://code.google.com/p/get-a-robot-vpnc/issues/detail?id=116 [4] http://www.saturnwiki.net/droid_tun_driver/2.6.32.9/tun_alt.ko [5] http://code.google.com/p/android-openvpn-settings/issues/detail?id=26 [6] http://code.google.com/p/android-openvpn-installer/issues/detail?id=2 Entry: jackd as user Date: Fri Sep 16 18:04:28 EDT 2011 Why does this keep breaking? Every time I start using pd again I have to spend half a day figuring out how to get sound and video to work.. I'd like to get pd back up an running for the Haskell DSP tests. It was working around october last year, but then I lost track of configs. Don't remember what happened. First problem, starting jackd: Cannot use real-time scheduling (RR/10)(1: Operation not permitted) I don't remember. Should I run pd setuid root, should I run pd and jack as root, or was there some other permission thing to set? chmod +s /usr/bin/pd chmod +s /usr/bin/jackd Looking a bit, I find this post[1] mentioning rlimits. Let's remove the setuid bits and try again. However, [2] doesn't recommend rlimits, but mentions PAM instead. My /etc/security/limits.conf already has this: @audio - rtprio 100 @audio - nice -10 I've added this line also: @audio - memlock unlimited And yes, I'm member of the audio group. Maybe I just need to login again after recent upgrade? Let's try. Yep that was the problem. [1] http://www.linuxquestions.org/questions/linux-kernel-70/realtime-scheduling-permission-for-user-783434/ [2] http://www.esaracco.fr/documentation/linuxaudio/linuxaudio/obtaining-realtime-privileges.html Entry: old PWC cam doesn't work in pdp / mplayer Date: Fri Sep 16 18:49:51 EDT 2011 I remember that it wont work behind a USB hub, so maybe that's the problem? Or wait... did it need a USB 1.1 port? Maybe that's why it works on the old box? It's probably just drivers. It doesn't work on the .32 kernel on the acer one either.. Let's try a new kernel. Entry: PREEMPT_RT in Debian Date: Sun Sep 18 09:25:57 EDT 2011 I found this: linux-image-3.0.0-1-rt-amd64 in wheezy[1]. Does this mean the end of special-purpose kernel compilation for the linux audio user? Let's give it a try. Other than standard features, I need: - vmware - fglrx (??) [1] http://packages.debian.org/wheezy/linux-image-3.0.0-1-rt-amd64 Entry: Persistent networking crap Date: Sun Sep 18 11:12:12 EDT 2011 This has been biting me for a long time already. Time to figure out how it works, and what problem it actually tries to solve. Ha, it's actually straightforward. Problem was I had lingering old config, and on 2.6.33 the renaming seemed to not be invoked, while on 3.0 it was. Entry: VLAN trouble 3.0.0 Date: Sun Sep 18 11:34:49 EDT 2011 Switching to 3.0.0 the VLAN config no longer works. Related to [1]? [1] https://bbs.archlinux.org/viewtopic.php?id=125875 Entry: Verizon data Date: Sun Sep 18 17:20:15 EDT 2011 Seems to use internal addresses: # ifconfig ppp0 ppp0: ip 10.235.12.191 mask 255.255.255.255 flags [up point-to-point running multicast] Outgoing seems to be 174.252.242.8 Entry: Firewall crap Date: Sun Sep 18 19:14:08 EDT 2011 Instead of DROP, let's just use log for troubleshooting. Setup is confusing p atm.. Entry: kvm issue : memory leak? Date: Tue Sep 20 19:29:18 EDT 2011 [111174.576709] 682 pages shared [111174.577069] 254775 pages non-shared [111174.577522] Out of memory: kill process 28682 (autologin) score 28 or a child [111174.578365] Killed process 28682 (autologin) INIT: Id "T0" respawning too fast: disabled for 5 minutes INIT: no more processes left in this runlevel [111175.709272] Kernel panic - not syncing: Out of memory and no killable processes... [111175.709275] [111175.710355] Pid: 2951, comm: emacs Tainted: G S W 2.6.32-5-686 #1 [111175.711126] Call Trace: [111175.711431] [<c126c7aa>] ? panic+0x38/0xe6 [111175.711929] [<c108998c>] ? __out_of_memory+0xdf/0x107 [111175.712618] [<c1089a0e>] ? out_of_memory+0x5a/0x7c [111175.713255] [<c108c2b9>] ? __alloc_pages_nodemask+0x3ef/0x4d9 [111175.714067] [<c108d695>] ? __do_page_cache_readahead+0x98/0x16b [111175.715780] [<c108d77c>] ? ra_submit+0x14/0x18 [111175.717949] [<c1087d3c>] ? filemap_fault+0x16d/0x2e6 [111175.718564] [<c101f50d>] ? kunmap_atomic+0x5d/0x6d [111175.719166] [<c1099a52>] ? __do_fault+0x47/0x3b1 [111175.722105] [<c106f15d>] ? __rcu_process_callbacks+0x6c/0x227 [111175.722793] [<c109b9df>] ? handle_mm_fault+0x48f/0x959 [111175.723406] [<c101afd7>] ? pvclock_clocksource_read+0xf9/0x10f [111175.724137] [<c104b034>] ? ktime_get_ts+0xcd/0xd5 [111175.724729] [<c126ff48>] ? do_page_fault+0x2f1/0x307 [111175.725340] [<c126fc57>] ? do_page_fault+0x0/0x307 [111175.725937] [<c126e4ab>] ? error_code+0x73/0x78 Entry: Pd in Debian Date: Wed Sep 21 20:58:59 EDT 2011 I switched back to the one in stable: 0.42.6-1+b1 The one in testing: 0.43.0-4 gives trouble. [1] http://packages.debian.org/search?keywords=puredata Entry: PDP Debian Date: Thu Sep 22 19:53:58 EDT 2011 one: PWC doesn't seem to work. V4L2 ?? Also: problem with pdp_xv. Entry: PATH and sudo Date: Fri Sep 23 09:14:25 EDT 2011 Tried to help Ben at GLLUG meeting yesterday. Problem was that sudo by itself does not set a PATH variable which contains the sbin directories. Why is this, and how to fix it? We quick hacked it by adding the sbin dirs to his normal user's PATH. I have a similar problem on Debian testing. Looking around I found that Debian's / Ubuntu's sudo is compiled with a secure-path set[1]. [1] http://stackoverflow.com/questions/257616/sudo-changes-path-why Entry: Rsync / scp double quoting Date: Sat Oct 1 09:46:00 EDT 2011 rsync.merge --rsh='ssh -p2222' rib6.net:/tmp/upload/Trouw\\\ A\\\&A\\\ PART\\\ II . Entry: zni todo Date: Sat Oct 1 21:46:40 EDT 2011 LVM phenom-16: where is this reference? Entry: Process group Date: Mon Oct 3 10:40:58 EDT 2011 Basic question: how to put a number of processes in a process group such that a single KILL or HUP signal will reach all of them? [1] http://en.wikipedia.org/wiki/Process_group Entry: Sipdroid over VPN Date: Thu Oct 6 11:53:03 EDT 2011 Sipdroid uses IP from ppp0. How to fix? This thread[1] has an .apk with a patched 2.0.1 that allows you to pick the interface, i.e. "tap0" in my case for OpenVPN. REGISTER sip:zoo SIP/2.0 Via: SIP/2.0/UDP 10.241.229.6:59737;rport;branch=z9hG4bK17601 Max-Forwards: 70 To: <sip:13@zoo> From: <sip:13@zoo>;tag=z9hG4bK23862409 Call-ID: 138760461580@10.241.229.6 CSeq: 1 REGISTER Contact: <sip:13@10.241.229.6:59737;transport=udp> Expires: 3600 User-Agent: Sipdroid/2.3 beta/DROID2 GLOBAL Content-Length: 0 Receiving calls still doesn't work. Will have to try later... Routing calls over the asterisk box seems to work, though gives dropouts. Might be connection speed also. [1] http://code.google.com/p/sipdroid/issues/detail?id=368 Entry: Got OpenVPN to work on the Droid2 Date: Thu Oct 6 14:42:04 EDT 2011 I had to use a workaround "up" script to call ifconfig because for some reason there's something wrong with the ifconfig push. #!/system/bin/sh /system/bin/ifconfig tap0 192.168.8.44 netmask 255.255.255.0 up exit 0 It seems that the Android wrapper app runs openvpn with incorrect script security level. This worked: #!/system/bin/sh # Load tun/tap module. insmod /system/lib/modules/tun.ko # Add --script-security after args provided by the OpenVPN android app. exec /system/xbin/openvpn "$@" --script-security 2 Entry: backscatter Date: Thu Oct 6 18:26:42 EDT 2011 Apparently not to worry about it: many ppl don't use it because of extortion stuff. I.e. backscatter.org: 113 speedy delist. Entry: rygel (WDTV media server) Date: Tue Oct 18 23:53:38 EDT 2011 apg-get install rygel ~/.config/rygel.conf : [MediaExport] enabled=true title=Stuff # List of URIs to export; if list is empty, the XDG media directries are # exported. uris=/pub/tv rygel -n br0 Seems quite flexible. For hacking it seems best to focus on GStreamer pipelines, there are probably already a couple of those to reuse.. [1] http://live.gnome.org/Rygel Entry: XBMC on debian Date: Wed Oct 19 22:56:24 EDT 2011 # /etc/apt/sources.list deb http://www.debian-multimedia.org squeeze main This seems to work quite well. Media library sharing for WDTV is straightforward. I wonder if it's possible to save some of those plugin videos so they can be shared also. Entry: Good color laser, duplex, network, linux drivers Date: Thu Oct 27 10:53:44 EDT 2011 Hi, Anyone have any recommendations for a laser printer with the following features: - good linux drivers - ethernet - color - duplex - large tray Entry: I hate printers - Printing from Google Chrome fails Date: Fri Oct 28 10:51:56 EDT 2011 Printing a web page from Google Chrome fails: nothing happens. Exporting to .pdf and printing from okular works fine. The logs give this: localhost - - [28/Oct/2011:10:36:04 -0400] "POST /printers/HL2240 HTTP/1.1" 200 460654 Print-Job successful-ok localhost - - [28/Oct/2011:10:39:12 -0400] "POST /printers/HL2240 HTTP/1.1" 200 460693 Print-Job successful-ok localhost - - [28/Oct/2011:10:47:13 -0400] "POST /printers/HL2240 HTTP/1.1" 200 460671 Print-Job successful-ok localhost - - [28/Oct/2011:10:48:50 -0400] "POST /printers/HL2240 HTTP/1.1" 200 456 Create-Job successful-ok localhost - - [28/Oct/2011:10:48:50 -0400] "POST /printers/HL2240 HTTP/1.1" 200 760023 Send-Document successful-ok My assumption is that the first 3 attempts are the failures. To check: try to recreate this condition by printing from Chrome and see if that's actually what happens. Then find out what the fuck is going on again. Is this the Brother drivers or is CUPS just a piece of steaming crap? The jobs are indeed there and indicate no error, but nothing happened. They just disappear into the void. The web interface knows about the jobs, but this doesn't seem to be in the log files. Where is that state stored? /var/spool/cups/c00092 # nothing happened /var/spool/cups/c00093 # ok The job-k-octets are not empty so it seems that everything was passed on to the driver, and it did not signal any error. That's where to look next. This reminds me of a problem with the MFC-240C driver[1]. Maybe Chrome passes stuff into pipe and not as a file? Then today, after a fresh system reboot, it worked again. This is a print from Chrome: localhost - - [29/Oct/2011:13:34:32 -0400] "POST /printers/HL2240 HTTP/1.1" 200 308280 Print-Job successful-ok /var/spool/cups/c00094 [1] entry://20110228-173738 Entry: Apache log parser Date: Tue Nov 1 15:40:06 EDT 2011 I still have my pool of logs, but I lost the parser. I find this[1][2] but no code. Ok, got it[3]. Tried to run it and it gives parse errors. Probably log format config changed at some point. It seems best though to not do this in Scheme. What I want to do can be done in a DB without trouble. Let's fit it into MySQL or SQLite and use some standard queries; might be a good way to learn. 1. Frontend regexp that generates INSERT 2. SQL queries Apparently something changed: the vhost is appended too. I tried to fix it but I can't get anything decent out of it. Looks like I need to play a bit with regexps to get this to work. [1] entry://20091001-131036 [2] entry://../plt/20090712-111931 [3] http://zwizwa.be/-/darcs/plt/lib/x Entry: Xilinx ISE Date: Sun Nov 13 08:41:25 EST 2011 wget -c 'http://xilinx-ax-dl.entitlenow.com/akdlm/dl/2011/284/21/R18911/Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0.tar/ad1ee9d23ed3eb2990e97d11d4097455/4EC1196C/Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0.tar?akdm=1&filename=Xilinx_ISE_DS_Lin_13.3_O.76xd.1.0.tar&fileExt=.tar' ^Clinx_ISE_DS_Lin_13.3_O.76xd.1.0.tar I'm only installing the Webpack. So how to run it? This is such a bloat.. Entry: Bad usb mouse? Date: Tue Nov 15 11:13:22 EST 2011 Today it happened again, 3rd time. A bunch of messages like this: [447148.796228] usb 7-4: new low speed USB device using ohci_hcd and address 18 [447148.975254] usb 7-4: New USB device found, idVendor=045e, idProduct=0040 [447148.975257] usb 7-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [447148.975259] usb 7-4: Product: Microsoft Wheel Mouse Optical® [447148.975261] usb 7-4: Manufacturer: Microsoft [447148.986330] input: Microsoft Microsoft Wheel Mouse Optical® as /class/input/input87 [447148.986430] generic-usb 0003:045E:0040.005C: input,hidraw2: USB HID v1.00 Mouse [Microsoft Microsoft Wheel Mouse Optical®] on usb-0000:00:16.0-4/input0 [447285.281594] hub 7-0:1.0: port 4 disabled by hub (EMI?), re-enabling... [447285.281599] usb 7-4: USB disconnect, address 18 Then finally a bunch of messages like this: [492961.136499] INFO: task khubd:266 blocked for more than 120 seconds. [492961.136502] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [492961.136504] khubd D 0000000000000000 0 266 2 0x00000000 [492961.136508] ffffffff8142d020 0000000000000046 0000000000000000 0000000000000246 [492961.136511] ffff88019f14ec70 00000000ffffffff 000000010756b8e9 000000000000b188 [492961.136514] 0000000000000000 0000000000000000 ffffffff81460c50 ffff88019f15dfd8 [492961.136517] Call Trace: [492961.136523] [<ffffffff812ecb15>] ? schedule+0x16/0x2a [492961.136526] [<ffffffff8120d3b5>] ? usb_kill_urb+0xa1/0xbd [492961.136530] [<ffffffff810574a0>] ? autoremove_wake_function+0x0/0x2a [492961.136533] [<ffffffff8120e7a8>] ? usb_start_wait_urb+0x80/0xbf [492961.136537] [<ffffffff8120ea6f>] ? usb_control_msg+0x14b/0x172 [492961.136540] [<ffffffff8117d519>] ? kref_put+0x41/0x4a [492961.136543] [<ffffffff810d633f>] ? _slab_irq_disable+0x37/0x58 [492961.136546] [<ffffffff8120fc38>] ? usb_get_descriptor+0x6d/0x9e [492961.136549] [<ffffffff812116ca>] ? usb_get_configuration+0x22e/0x15f4 [492961.136552] [<ffffffff812ee201>] ? rt_spin_lock+0x29/0x6d [492961.136555] [<ffffffff8120fd54>] ? usb_get_device_descriptor+0xeb/0xfb [492961.136557] [<ffffffff810d73d0>] ? kfree+0x122/0x16e [492961.136560] [<ffffffff8120fd54>] ? usb_get_device_descriptor+0xeb/0xfb [492961.136563] [<ffffffff812087eb>] ? hub_port_init+0x6df/0x702 [492961.136565] [<ffffffff81208fff>] ? usb_enumerate_device+0x16/0xe5 [492961.136567] [<ffffffff8120934a>] ? usb_new_device+0x2b/0x193 [492961.136570] [<ffffffff8120ab45>] ? hub_thread+0xa65/0xfa8 [492961.136573] [<ffffffff810574a0>] ? autoremove_wake_function+0x0/0x2a [492961.136575] [<ffffffff8120a0e0>] ? hub_thread+0x0/0xfa8 [492961.136578] [<ffffffff8105711c>] ? kthread+0x75/0x7d [492961.136581] [<ffffffff810321c4>] ? finish_task_switch+0x49/0xe0 [492961.136584] [<ffffffff81003924>] ? kernel_thread_helper+0x4/0x10 [492961.136586] [<ffffffff810570a7>] ? kthread+0x0/0x7d [492961.136589] [<ffffffff81003920>] ? kernel_thread_helper+0x0/0x10 [493081.136512] INFO: task khubd:266 blocked for more than 120 seconds. lsusb also hangs. Rebooting solves it for a while. Maybe the mouse fell on the floor one time too many? Though that shouldn't really cause system to lock up like this.. Something wrong with my USB hub on the motherboard? Entry: Router fred: move printer to untrusted port Date: Fri Nov 18 09:07:33 EST 2011 I currently have 2 VLANS, one is wireless and other untrusted, the other is wired (trusted). I want to put the printer on the untrusted segment, so I need to tag one of router ports. Current setup is: @fred:/etc/rc.d# robocfg show Switch: enabled Port 0(W): DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 1(4): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 2(3): DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 3(2): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 4(1): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00 Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 VLANs: BCM5325/535x enabled mac_check mac_hash vlan0: 0 1 2 3 5t vlan1: 3t 4 vlan11: 3t 5t vlan11: untrusted + bridged to wireless wl0 vlan0: trusted vlan1: internet 3: zoo, has vlan1 and vlan11 tagged, vlan0 untagged 5: broadcom CPU, has vlan0 and vlan11 tagged What needs to change is untagging of vlan11 on one of the router ports. I plugged the printer into port 2 (Marked as "2" on the back, note that numbering on the back is not the same!) robocfg vlan 11 ports "2 3t 5t" # untag 11 on port 2 robocfg vlan 0 ports "0 1 3 5t" # don't untag 0 on port 2 This gives: @fred:/etc/rc.d# robocfg show Switch: enabled Port 0(W): DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 1(4): DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 2(3): 100FD enabled stp: none vlan: 11 mac: 00:00:00:00:00:00 Port 3(2): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 Port 4(1): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00 Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00 VLANs: BCM5325/535x enabled mac_check mac_hash vlan0: 0 1 3 5t vlan1: 3t 4 vlan11: 2 3t 5t Entry: Recovering deleted files. Date: Mon Nov 21 22:34:51 EST 2011 Suppose you have a file called '/tmp/foo' that is deleted from the directory, but still opened by a process. You can still get at it by issuing: lsof | grep /tmp/foo To find the process that owns it. Then issuing ls -l /proc/1234/fd to find the fd of the deleted file. Using cp /proc/1234/fd/4 /tmp/foo.saved the file can be restored. Entry: Port forwarding Date: Wed Nov 23 10:18:25 EST 2011 I keep forgetting how this works in raw iptables. From [1]: /sbin/iptables \ -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx \ --dport 8888 -j DNAT --to 192.168.0.2:80 /sbin/iptables \ -A FORWARD -p tcp -i eth0 -d 192.168.0.2 --dport 80 -j ACCEPT So this gives something like this: # tcp_forward <from-port> <to-host> <to-port> tcp_forward () { $IPTABLES -t nat -A PREROUTING -p tcp -i $INTERNET --dport $1 -j DNAT --to $2:$3 $IPTABLES -A FORWARD -p tcp -i $INTERNET -d $2 --dport $3 -j ACCEPT } [1] http://www.hackorama.com/network/portfwd.shtml Entry: Minolta magicolor 1650EN Date: Thu Nov 24 12:14:23 EST 2011 Works well as long as I don't use CUPS :) Anwyays, it seems to work from CUPS on one machine: tom@moms:~$ dpkg -l cups Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii cups 1.5.0-5 Common UNIX Printing System(tm) - server but not on mine: tom@zoo:~/$ dpkg -l cups Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii cups 1.4.4-7 Common UNIX Printing System(tm) - server I'm a bit reluctant to upgrade because of other trouble with that new version.. CUPS sucks.. Time I get to know it a bit better so I can fix it myself. Entry: ppp & chat Date: Sun Nov 27 14:39:37 EST 2011 APN=..... /usr/sbin/chat -v -f /etc/chatscripts/gprs -T $APN </dev/tty101 >/dev/tty101 pppd -detach debug /dev/tty101 noipdefault noauth The first one works, the second one doesn't. It seems both use different serial settings. Line discipline. tom@zoo:~$ sudo stty -F /dev/tty101 speed 115200 baud; line = 0; erase = <undef>; kill = <undef>; min = 1; time = 0; -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke tom@zoo:~$ sudo stty -F /dev/tty101 speed 115200 baud; line = 3; erase = <undef>; kill = <undef>; min = 1; time = 0; ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke Yeah now it's totally messed up. I can't get it to work any more. For another time: learn about line disciplines. Entry: Logging from pty Date: Mon Nov 28 12:47:19 EST 2011 I need to attach a logfile to a pty, with proper \r\n -> \n conversion. How to do that? Will socat do this properly? Maybe it's not necessary. In the end, it's just DOS text so dos2unix might do it. Entry: abcde Date: Tue Nov 29 13:13:42 EST 2011 This keeps changing.. Currently DVD is at /dev/sr0 but permissions are root:600. sudo chmod a+r /dev/sr0 abcde -d /dev/sr0 Then just follow interactive stuff. Oops, that defauts to ogg! See old post[1]. This does mp3: abcde -d /dev/sr0 -o mp3 [1] entry://20100509-133830 Entry: Upgrading V4L Date: Tue Nov 29 13:19:49 EST 2011 xawtv -nodga It works for a bit, then I plug the cam in a hub and it stops working, even after plugging it back and reloading modules.. Sucks. Time for a new cam. Entry: Discovering at Date: Wed Nov 30 21:00:38 EST 2011 echo ring | at 21:03 Where "ring" is the command to run. To display all queued events use atq I use this to ring my phone using asterisk call files[1] placed in /var/spool/asterisk/outgoing [1] http://zwizwa.be/darcs/pool/bin/dial_hello Entry: Running sequential batch jobs Date: Thu Dec 1 16:33:56 EST 2011 What's the simplest way to run jobs in the background, one after the other? I.e. I drop a command file in a directory and it runs whenever the currently executing job is done. Maybe this is too trivial to need a separate program? [1] http://zwizwa.be/darcs/pool/bin/jobs.run Entry: PPP chat flush Date: Fri Dec 2 18:31:50 EST 2011 Strange problem. I have /dev/tty101 connected to an (embedded) GPRS modem, but it seems that the characters that are sent by chat called by "pon gprs" are not flushed to the output. They are flushed when ppp closes the serial port, or when I connect it with picocom. Entry: GSM modem Date: Sat Dec 3 16:03:57 EST 2011 Finding a GSM laptop stick that works with linux.. This time I'm going to look for something that actually has a driver in the latest kernel. I.e. in usbserial (I want a modem that acts as a modem). I just got a Huawei E220 on Amazon for about $40. It doesn't have the 850 band but it should be alright on the 2100 3G band.. Entry: Installing 32bit .deb on 64bit Date: Mon Dec 5 10:52:41 EST 2011 Setting myself up for failure: installing MFC-240C drivers (sane + cups) on a 64bit system. Yes indeed failure.. scanimage -L doesn't list it, while sane-find-scanner does. Looks like those 32bit driver libraries are not loaded by the 64bit sane. Entry: MFC-240C print heads Date: Mon Dec 5 12:04:28 EST 2011 Cleaned it at least 5 times, black still has clogged nozzles. What to do now? Entry: Cheapo uvcvideo camera Date: Mon Dec 5 13:28:25 EST 2011 Got a "New 30 Mega Pixel USB2.0 PC/Laptop Webcam Camera With Mic" from ebay for $7 including shipping[1]. It seems to work with the uvcvideo driver. [1739275.100557] usb 1-4.1.2: new high speed USB device using ehci_hcd and address 67 [1739275.248748] usb 1-4.1.2: New USB device found, idVendor=0c45, idProduct=6340 [1739275.248751] usb 1-4.1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=0 [1739275.248754] usb 1-4.1.2: Product: USB 2.0 Camera [1739275.248755] usb 1-4.1.2: Manufacturer: Sonix Technology Co., Ltd. [1739275.260333] 67:3:1: cannot get freq at ep 0x84 [1739275.605206] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6340) [1739275.618673] input: USB 2.0 Camera as /class/input/input13 [1739275.618724] usbcore: registered new interface driver uvcvideo [1739275.618725] USB Video Class driver (v0.1.0) idVendor= 0c45 Microdia idProduct= 6340 <???> It works with mplayer, but not with xawtv, nor with PDP. tom@zoo:~$ mplayer tv:// MPlayer SVN-r31918 (C) 2000-2010 MPlayer Team Can't open joystick device /dev/input/js0: No such file or directory Can't init input joystick mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing tv://. TV file format detected. Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski <olschewski@zpr.uni-koeln.de> comment: first try, more to come ;-) v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used inste ad. Selected device: USB 2.0 Camera Capabilities: video capture streaming supported norms: inputs: 0 = Camera 1; Current input: 0 Current format: YUYV v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument v4l2: ioctl set format failed: Invalid argument tv.c: norm_from_string(pal): Bogus norm parameter, setting default. v4l2: ioctl enum norm failed: Invalid argument Error: Cannot set norm! Selected input hasn't got a tuner! v4l2: ioctl set mute failed: Invalid argument open: No such file or directory [MGA] Couldn't open: /dev/mga_vid open: No such file or directory [MGA] Couldn't open: /dev/mga_vid [VO_TDFXFB] This driver only supports the 3Dfx Banshee, Voodoo3 and Voodoo 5. s3fb: Couldn't map S3 registers: Operation not permitted Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such f ile or directory [vdpau] Error when calling vdp_device_create_x11: 1 ========================================================================== Opening video decoder: [raw] RAW Uncompressed Video Movie-Aspect is undefined - no prescaling applied. VO: [xv] 640x480 => 640x480 Packed YUY2 Selected video codec: [rawyuy2] vfm: raw (RAW YUY2) ========================================================================== Audio: no sound Starting playback... v4l2: select timeout [1] http://www.ebay.com/itm/New-30-Mega-Pixel-USB2-0-PC-Laptop-Webcam-Camera-Mic-/290639099695 Entry: Huawei E220 tests Date: Wed Dec 7 13:28:13 EST 2011 speedtest.net ping: 732 ms down: 130 kbps up: 60k bps It doesn't seem to come up cleanly though. During boot it blinks twice every couple of seconds, when it's registerd it blinks once every couple of seconds. Data connection is full on. RSSI goes from 12 to 20 at my window. It seems best to wait for ^RSSI: messages before starting PPP. Entry: Printer drama postmortem Date: Wed Dec 7 18:57:02 EST 2011 I kinda lost it this time. Multiple problems again having to print something last minute. This printer madness is getting quite absurd. I didn't find a reason for the first two, for the rest I have a explanation/fix. - cups seems to send empty jobs. restarting cups helps. - i found a big black toner-spilling paper coming out of the MAGICOLOR - the HL2240 was printing landscape orientation - feeder problem with the MAGICOLOR: probably tray 2 not closed properly after move - there's a routing problem om br1 - MAGICOLOR doesn't seem to like to be switched off The HL2240 landscape problem seems to be only happening with okular 0.10.5 (debian 4:4.4.5-2) while evince 2.32.0-1 is fine. Maybe I should stick to evince and not use okular? The new version okular 4:4.6.5-3 still has the same problem. It could also be a problem in openoffice though, which is where the pdf came from. I found the black square pdf in /var/spool/cups/tmp. I have no idea how that came to be. It says it's generated by pdf2pdf. I find no reference That feeder problem I don't know. It should be ok now. Let's just keep the MAGICOLOR on. It has power save mode. Entry: Libreoffice pdf bug Date: Wed Dec 7 19:27:10 EST 2011 People complain that .pdf generated by libreoffice 1:3.3.3-4+b1 are corrupt. Sending them through pdf2ps | ps2pdf fixes that. Entry: For firewall, a bridge acts as a router! Date: Wed Dec 7 19:49:58 EST 2011 I.e. if you have 2 interfaces on a bridge, the routing in iptables needs to be set up properly between the interfaces for this to work well. Entry: Debugging CUPS Date: Wed Dec 7 19:58:08 EST 2011 It would be nice to see if debugging can be enabled. Simply keeping all the print files in the spool would already be quite a help. Entry: Debian install from USB stick Date: Fri Dec 9 21:55:49 EST 2011 Get netinst.iso Get the usb loader. zcat boot.img.gz >/dev/sda This formats the drive with a bootloader. Then copy the image to the disk. [1] http://www.debian-administration.org/articles/446 [2] ftp://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/20110106+squeeze3+b1/images/hd-media/boot.img.gz Entry: Acer Aspire TimelineX AS3830T-6870 Date: Sat Dec 10 17:09:59 EST 2011 ( Bought some new gear. Ususally I don't, know that it's an adventure to get it to a stable driver state in linux. Anyways, here it goes, practicing patience.. ) Won't boot from USB with all bootable sticks I can find and the netboot doesn't seem to accept DHCP packets.. Current BIOS 1.05. There's 1.07 available. I'm reluctant to upgrade, more room for nasty failure.. Not upgrading. I did find an old Redhat bootfloppy that had syslinux 2.00 on it, which booted using an USB floppy drive. I stripped that image and add3ed grub4dos[1][2] to get a grub console. Made a FAT32 partition in windows. Copied the debian install files to that partition. Used the grub console to start linux+initr from the install image. This got the installation going: Devices: * Squeeze installer didn't recognize the atheros ethernet 1969:1083. I managed to get through the debian installer using an usb<->ethernet adapter. Ethernet is supported by atl1c in linux-image-3.1.0-1-amd64 which is currently in wheezy. (supposedly since 2.6.38-2-amd64). All well. * Wireless works after installing firmware-iwlwifi from non-free. However, it drops out after a while, disassociate reason 7. Bringing it up again seems to work. * Soundcard driver snd_hda_intel PCI 8086:1c20 seems to load, but I get no sound. Yes I tried mixer settings. After loading snd_pcm_oss, "cat /dev/dsp | hd" doesn't give anything. I did get a serious beep unplugging the power cord. A vanilla 3.1.5 doesn't seem to fix it, so the problem is probably something else.. HDMI "mplayer -alsa:device=hw=0.3" works as long as "xrandr --output HDMI1 --auto" is enabled. How to find this.. Would be nice to find someone with exactly the same hardware. Problem is known: [3]. Nope that's a different PCI ID. I found something on the gentoo wiki [4] so maybe I just use a more recent kernel? The patch that's mentioned there is the same as in [3]. Confusing.. (NEXT: check after reboot + check alsa diff). So, this morning I powered it up and it worked. Yesterday after just reboot it didn't work. So it's probably the power cycling that reset the chip. Because of that I'm not sure if it's actually the last alsa snapshot or the one in 3.1.5 that fixed it. * Video is an Intel Sandy Bridge Integrated Graphics Controller PCI 8086:0116. Running glxinfo gives an error. (bad resource something) I tried mplayer (xv) and this leads to an X hang. ../../intel/intel_bufmgr_gem.c:1069: Error setting domain 3: Input/output error After that keyboard seems to be locked I'm at xserver-xorg-core 2:1.7.7-13 (squeeze), upgrading to 2:1.11.2.901-1 (wheezy) Upgrade seems to have fixed the glxinfo problem, and xvideo now also works in mplayer. * Webcam seems to work. uvcvideo internal USB device for Alcor Micro Corp USB 058f:b002 * Battery life seems to be about 5 hours mostly idling (8+ advertised), and 1.5 hours compiling a kernel with 5 jobs, producing quite some heat. [1] http://www.icpug.org.uk/national/linnwin/step1-9x.htm [2] http://aronzak.wordpress.com/2008/09/16/howto-syslinux-and-grub-on-one-usb-drive/ [3] http://mailman.alsa-project.org/pipermail/alsa-devel/2011-June/041379.html [4] http://en.gentoo-wiki.com/wiki/Acer_Aspire_TimelineX_3830 Entry: Custom kernel building Date: Sun Dec 11 18:49:01 EST 2011 I've been out of the loop for a while. How to build a custom kernel that actually works without iterating too many times? I don't want to build a Debian kernel, it's simply too big. How to get to a working set of modules? Probably best to work incrementally: build the basic kernel, then add modules one by one without building a .deb (make modules_install), then when it's done pack up the .config in a kernel.deb package. Let's see, after running make-kpkg the modules should still be there. I just run "make menuconfig" to enable a new driver, then run make modules ; sudo make modules_install ; sudo modprobe <module> and it will load it in the kernel. Then, when everything is done the .deb can be rebuilt and reinstalled. Ok, to get all the drivers I did this. I have a lsmod.txt file with the output of lsmod on the debian (working) kernel. Running this output and lsmod on the non-working system through the following pipe to produce 1.txt and 2.txt. The diff of the two give the diff of the modules installed. On the non-working system I trided to modprobe each of the missing ones: some loaded. Those that did not load are missing. cat lsmod.txt | awk '{print $1}' | sort > 1.txt lsmod | awk '{print $1}' | sort > 2.txt diff 1.txt 2.txt Entry: Wheezy Date: Sun Dec 11 18:53:41 EST 2011 Upgrading Acer TX to Wheezy. I'm having trouble running "make menuconfig" for a new kernel: tom@tx:/opt/src/linux-3.1.5$ make menuconfig *** Unable to find the ncurses libraries or the *** required header files. *** 'make menuconfig' requires the ncurses libraries. *** *** Install ncurses (ncurses-devel) and try again. *** make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1 make: *** [menuconfig] Error 2 And yes, I do have libncurses5-dev installed: Actually, I don't.. Funny. What is that about? Now after installing it works. I did install some build stuff for building a debian kernel, maybe that fixed it? Now it works. Brain fart? So, aborted upgrade. Let's leave it at mixed squeeze/wheezy for now. Entry: Cisco 831 VLAN Date: Thu Dec 15 09:24:13 EST 2011 (sent to superuser.com [1]) Cisco 831 VLAN config. I'm looking for a simple, fast way to configure a Cisco 831 router to do VLAN untagging. I'd like to do something like this: PORT 1 (E0) VLAN 1,2,3,4 tagged PORT 2-4 (E0) VLAN 2,3,4 untagged PORT (E1) VLAN 1 untagged All other features should be off. Just plain and simple untagging. RTFM pointers also welcome. I'm a total Cisco newbie. EDIT: It turns out that the IOS firmware it's running doesn't support VLAN tagging. It's apparently possible to upgrade this (the place where I got it from did that) though it requires an additional licence. Makes the box useless for what I need it now.. Switching back to OpenWRT and a good old WRT-54G. [1] http://superuser.com/questions/368305/cisco-831-vlan-config Entry: Cisco 831 console log Date: Thu Dec 15 13:01:00 EST 2011 System Bootstrap, Version 12.2(8r)YN, RELEASE SOFTWARE (fc1) TAC Support: http://www.cisco.com/tac Copyright (c) 2002 by cisco Systems, Inc. C800/SOHO series (Board ID: 29-129) platform with 49152 Kbytes of main memory program load complete, entry point: 0x80013000, size: 0x4e93f8 Self decompressing the image : ######################################################################################################## [OK] Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted Rights clause at FAR sec. 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134-1706 Cisco Internetwork Operating System Software IOS (tm) C831 Software (C831-K9O3Y6-M), Version 12.2(13)ZH4, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1) Synched to technology version 12.2(14.5)T Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2004 by cisco Systems, Inc. Compiled Wed 24-Mar-04 18:04 by ealyon Image text-base: 0x800131E8, data-base: 0x80A00FC4 Compliance with U.S. Export Laws and Regulations - Encryption This product performs encryption and is regulated for export by the U.S. Government. This product is not authorized for use by persons located outside the United States and Canada that do not have prior approval from Cisco Systems, Inc. or the U.S. Government. This product may not be exported outside the U.S. and Canada either by physical or electronic means without PRIOR approval of Cisco Systems, Inc. or the U.S. Government. Persons outside the U.S. and Canada may not re-export, resell, or transfer this product by either physical or electronic means without prior approval of Cisco Systems, Inc. or the U.S. Government. CISCO C831 (MPC857DSL) processor (revision 0x400) with 44237K/4915K bytes of memory. Processor board ID AMB0824039N (2371804892), with hardware revision 0000 CPU rev number 7 Bridging software. 2 Ethernet/IEEE 802.3 interface(s) 128K bytes of non-volatile configuration memory. 12288K bytes of processor board System flash (Read/Write) 2048K bytes of processor board Web flash (Read/Write) � � Press RETURN to get started! *Mar 1 00:00:06.171: %LINK-3-UPDOWN: Interface Ethernet1, changed state to up *Mar 1 00:00:07.279: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1, changed state to up *Mar 1 00:00:16.927: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up 00:00:17: %SYS-5-CONFIG_I: Configured from memory by console 00:00:18: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up 00:00:18: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1, changed state to down 00:00:21: %SYS-5-RESTART: System restarted -- Cisco Internetwork Operating System Software IOS (tm) C831 Software (C831-K9O3Y6-M), Version 12.2(13)ZH4, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1) Synched to technology version 12.2(14.5)T Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2004 by cisco Systems, Inc. Compiled Wed 24-Mar-04 18:04 by ealyon 00:00:21: %SNMP-5-COLDSTART: SNMP agent on host Router is undergoing a cold start Entry: Lab VLAN setup Date: Thu Dec 15 14:31:26 EST 2011 # port 1-4 (external number markings) -> VLAN 11-14 # external internal # 1 3 # 2 2 # 3 1 # 4 0 # INTERNET 4 # (CPU) 5 # New config: INTERNET and CPU see the tagged frames, other ports are # untagged robocfg vlan 11 ports "3 4t 5t" robocfg vlan 12 ports "2 4t 5t" robocfg vlan 13 ports "1 4t 5t" robocfg vlan 14 ports "0 4t 5t" # Remove old config: VLAN0 (LAN) is unused, disable wifi on eth1. # VLAN1 is the local net connection which is untagged on 4 (INTERNET) # to be able to log into the box. robocfg vlan 0 ports 5t ifconfig eth1 down # On host do this: # for i in 11 12 13 14; do vconfig add eth0 $i; done Entry: Non -fPIC libstdc++.a Date: Sun Dec 18 09:19:11 EST 2011 This version gives linking trouble when building C++ shared libraries due to it not being compiled with -fPIC: /usr/lib/gcc/x86_64-linux-gnu/4.4.5/libstdc++.a However, it seems I do have a higher version installed (dpkg -l libstdc++6) libstdc++6 4.6.2-5 What's up here? This is the machine where the compilation fails: libstdc++6-4.4-dev 4.4.5-10 A machine with working compilation has this: libstdc++6-4.4-dev 4.4.6-11 I'm going this to see what it gives: sudo apt-get install libstdc++6-4.4-de Entry: emacs + debugging build Date: Sun Jan 1 09:38:54 EST 2012 I'd like to solve a recurring problem with emacs where it gets stuck waiting on a frame that is not reached, either a remote X frame or a tty frame no longer reachable i.e. after the machine it was running on is disconnected from the network / powered off. Need: emacs with debugging symbols, possibly non-optimized build. gdb + attach, or always run emacs in gdb. Entry: burn.dvd Date: Sat Jan 28 09:52:25 EST 2012 I'm burning a 720x400 16x9 aspect ISO, but on the dvd player it comes out as a 4x3 aspect. What's up? [1] http://zwizwa.be/darcs/pool/bin/burn.dvd Entry: 1650EN toner Date: Tue Jan 31 14:57:28 EST 2012 $80 Konica Minolta A0V30GF Cyan Toner Cartridge for Magicolor 1600W / 1650EN / 1680MF / 1690MF Printers $90 Konica Minolta A0V30CF High Capacity Magenta Toner Cartridge for Magicolor 1600W/1650EN/1680MF/169 $100 Konica Minolta A0V306F Yellow High-Capacity Toner Cartridge for Magicolor 1600W/1650EN/1680MF/1690MF Printers http://www.jr.com/konica-minolta/pe/MIN_A0V306F/ http://www.adorama.com/KCYHCT.html Entry: Printing again Date: Sat Feb 4 19:49:04 EST 2012 Can you believe it? Problem was triggered by a pdf generated from TurboTax online version. Magicolor 1650EN choked on the pdf, or should I say the PS generated from the pdf by foomatic. After using pdf2ps -> ps2pdf (a trick that sometimes works with bad pdfs, i.e. those made by openoffice) I could print 1 or 2 pages at a time, but more seems to take a lot of time. I'm loosing patience after 1.5 hours for 9 pages. pdf2djvu also complains about it, but I thought to try to first convert it to raster and then print it again. That also gave trouble. Things went a lot better after installing the proper PPD file from [1]. Tss... if that was it then I really deserved loosing a couple of hours. [1] http://onyxftp.mykonicaminolta.com/download/SearchResults.aspx?productid=1165 Entry: TV standards evolve backwards Date: Thu Feb 9 09:07:19 EST 2012 Ubunto on an Acer Revo started out pixel perfect in the installer, but once running it's not aligned well. Maybe this has to do with switching drivers to the proprietary ones? See here[1] for why this is such a mess. [1] http://mjg59.dreamwidth.org/8705.html [2] http://www.avsforum.com/avs-vb/archive/index.php/t-693702.html Entry: Ubuntu X config Date: Thu Feb 9 13:01:23 EST 2012 From [1]: Your login script, .xinitrc, works with startx, but graphical login managers like GDM do not look for .xinitrc. Instead, they look for a file named .xsession in your home directory. To make GDM run your .xinitrc script, you have to link it to .xsession [...] Actually that doesn't work any more under lightdm. See here[2]. [1] https://help.ubuntu.com/community/CustomXSession [2] http://askubuntu.com/questions/77191/how-can-i-use-lightdm-for-user-defined-sessions Entry: XBMC on Ubuntu 11.10 on Acer Revo Date: Thu Feb 9 21:18:08 EST 2012 What works best is to install XBCM[1] and run it as an X session. Under unity I got tearing. [1] http://www.ubuntugeek.com/how-to-install-xbmc-on-ubuntu-11-04-using-ppa.html Entry: TimelineX upgrade 3.2.5 Date: Sat Feb 11 10:30:07 EST 2012 Wireless driver is now iwlwifi (was iwlagn). Entry: zwizwa crash Date: Tue Feb 14 13:32:05 EST 2012 Nothing in the logs apart from a 2 hour gaping hole. The kernel was still running (nmap from outside showed normal port profile). Console had a "Clocksource tsc unstable", about 4 seconds. Keyboard didn't respond. It happened just after the cron.daily time.. Hardware showing its age? Entry: Revo VGA Date: Fri Feb 17 18:43:24 EST 2012 * How to switch acer revo between VGA and HDMI? Currently I need to reboot with VGA monitor attached. * iSymphony TV: disable overscan / pixel-accurate mode? Using nvidia-settings it's possible to enabl overscan compensation. Entry: Cups is a FUCKING PIECE OF SHIT Date: Sun Feb 26 21:16:52 EST 2012 Today trying to print on 6x6 inch invitation paper. Tried everyting.. Apparently this is the way to do it: lp -d HL2240 -o PageSize=Custom.6x6in -o fitplot 2012weddinginvite2.pdf But still that messes things up. It worked fine on windows though, so I'm wondering where the problem really is. Is it the printer driver (all 3 printers?) or is this just CUPS being a FUCKING SHIT. The way to find out apparently is to use lp -o raw <file> and let cups stay out of the way. Maybe this would work on the minolta? Entry: Cups, how's it work? Date: Sun Feb 26 22:14:40 EST 2012 Basically, it uses PPD which is a PostScript extension for describing printer features, and a filter system that converts (postscript?) to something that can be sent to a raw printer port (lpr). Then 'lp' is a frontend that calls 'lpr'. So.. In theory, if I do the conversion of PS -> BR3 manually, I should be able to send the BR3 file to the printer. Entry: Acer TimelineX 3830-6870 fixes Date: Mon Feb 27 00:11:18 EST 2012 Power fixes[1]. Ubuntu font smoothing[2]. [1] http://askubuntu.com/questions/80266/acer-timeline-x-3830tg-battery-life [2] http://noz3001.wordpress.com/2011/07/01/ubuntu-font-rendering-on-debian-wheezy/ Entry: openvpn Date: Sun Mar 11 15:15:35 EDT 2012 Sun Mar 11 19:30:31 2012 192.168.13.49:43490 Re-using SSL/TLS context Sun Mar 11 19:30:31 2012 192.168.13.49:43490 LZO compression initialized Sun Mar 11 19:30:31 2012 192.168.13.49:43490 Control Channel MTU parms [ L:1590 D:138 EF:38 EB:0 ET:0 EL:0 ] Sun Mar 11 19:30:31 2012 192.168.13.49:43490 Data Channel MTU parms [ L:1590 D:1450 EF:58 EB:135 ET:32 EL:0 AF:3/1 ] Sun Mar 11 19:30:31 2012 192.168.13.49:43490 Local Options hash (VER=V4): '1a6d5c5d' Sun Mar 11 19:30:31 2012 192.168.13.49:43490 Expected Remote Options hash (VER=V4): 'c6c7c21a' Sun Mar 11 19:30:31 2012 192.168.13.49:43490 TLS: Initial packet from [AF_INET]192.168.13.49:43490, sid=480d5a93 a9f11c9f Sun Mar 11 19:31:31 2012 192.168.13.49:43490 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity) Sun Mar 11 19:31:31 2012 192.168.13.49:43490 TLS Error: TLS handshake failed Sun Mar 11 19:31:31 2012 192.168.13.49:43490 SIGUSR1[soft,tls-error] received, client-instance restarting Sun Mar 11 19:31:31 2012 MULTI: multi_create_instance called Restarting the server side openvpnd worked. This is the second time this happened.. I've added a workaround restart in cron.daily Entry: BeBox Date: Mon Mar 12 10:42:06 CET 2012 Belgacom BeBox2: Looks like this is rather a complicated setup. * 2 ethernet TV outputs, one connected to the ethernet over power lines that go to the 2 digibox TV adapters. * 2 PC outputs. Seem to handle both ppp and plain ethernet/dhcp. The latter is good as a fallback, so I can use DNS to redirect services. * Wifi * 2 VLANS: looks like one for PC (global IP), one for TV+VOIP (local IP). * Both DHCP and PPPoE work at the same time on a single port. * It has SIP too. How does it relate to the telephone # on the analog line? Probably has nothing to do with it.. It seems to have two FXS ports for connecting analog phones. Entry: Fritz!Box FON & FXO Date: Mon Mar 12 22:24:42 CET 2012 Is it possible to use the Fritz!Box FON 5124 FXO as a trunk line for asterisk? It doesn't look like this is supported. Found something about a different Fritz device 7270[1][2] that has a SIP server built in, but can't seem to find this on mine[3]. Bummer.. FXS works fine though. [1] http://www.3cx.com/forums/fritzbox-fon-wlan-7270-as-outbound-gateway-15151.html [2] ftp://ftp.avm.de/fritz.box/fritzbox.fon_wlan_7270/firmware/english/info.txt [3] ftp://ftp.avm.de/fritz.box/fritzbox.fon_5124/firmware/english/annex_a/info.txt Entry: Moving zwizwa Date: Tue Mar 13 01:36:37 CET 2012 Done? Looks like it. Working: - samba - squid - printer - smtp - openvpn - imap - spamassassin - clamav - privoxy - server backups - asterisk (new) - quagga TODO: Entry: monit Date: Tue Mar 13 11:06:54 CET 2012 Samba was down this morning. Thngs don't seem to run very smoothly... Let's try out some system monitoring. Entry: Asterisk & RTP ports Date: Tue Mar 13 16:11:04 CET 2012 in asterisk/rtp.conf: [general] rtpstart=8000 rtpend=9000 however, asterisk still sends invite for port 12726. Questions: - where does 12726 come from? - how does the remote party pick its ports? do we have anything to do with that? I've upped the window in the firewall, second try uses port 15628 which now works. STUPID! rtf.conf did not have the right permissions (and asterisk did not complain about it!) Entry: apt-get install network-manager Date: Sun Mar 18 22:49:59 CET 2012 Sees useful.. Didn't use it yet since I still have trouble with the wireless card.. Entry: ioctl[SIOCSIWENCODEEXT]: Invalid argument Date: Wed Mar 21 16:38:29 CET 2012 Something goes wrong when wpa_supplicant tries to configure the network. # wpa_supplicant -iwlan0 -c/tmp/wpa_supplicant.conf ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument I can see other things go wrong with iwconfig/iwlist, so there is definitely something not right. This is on an Acer Aspire TimelineX 3830T-6807, model P3MJ0, MFG Date 2011/08. Using "-dd" I find that these 2 errors correspond to this, which gives me the impression that that is not the problem: wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=4 set_tx=0 seq_len=0 key_len=0 ioctl[SIOCSIWENCODEEXT]: Invalid argument Driver did not support SIOCSIWENCODEEXT wpa_driver_wext_set_key: alg=0 key_idx=5 set_tx=0 seq_len=0 key_len=0 ioctl[SIOCSIWENCODEEXT]: Invalid argument Driver did not support SIOCSIWENCODEEXT i.e. it succeeds for ids 0-3 but fails for 4 and 5. It proceeds to scan, which times out once but seems to continue properly. I see I had a wrong essid.. Fixing that it still seems to kick me off here and there.. However, now my usual scripts work. Conclusion: stupid typo! ARGH! Entry: Delays Date: Sun Mar 25 13:45:56 CEST 2012 Looks like my IPv6 config is causing some delays: # strace ssh localhost ... connect(3, {sa_family=AF_INET6, sin6_port=htons(22), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28 Another thing: I accedentally chmod 775 my homedir, which made ssh refuse to use pubkey auth. Switching back to 755 fixed that. Entry: How to secure PPTP Date: Mon Mar 26 14:17:52 CEST 2012 Android supports PPTP and IPsec. The latter is too much hassle to set up so I use PPTP. There are 2 big problems: - PPTP uses plaintext password authentication. - It can't use a fixed ppp<x> naming scheme; it simply uses the first one available. This complicates firewall scripts. First, let's sniff the traffic to see if it's indeed plaintext password. I did not see the password in clear text. Indeed, it uses CHAP[1]. I'm leaving the firewall rules hardcoded for ppp1. Hope this won't interfere with the ppp0 DSL line, that would suck. [1] http://en.wikipedia.org/wiki/Challenge-Handshake_Authentication_Protocol Entry: PPTP and SIP routing troubles Date: Wed Mar 28 18:00:41 CEST 2012 [ ramblings ] Adding some creative routing for SIP server seems to work, but this also needs to do the RTP servers, which seem to be different. There are several issues: - routing setup on both sides. one side is complex since it has multiple hosts. - does sip have multiple hosts? a bit provider-dependent.. depending on how the load balancing works, there is no real reason to keep RTP server stable. - PPTP DNS: it helps to override some hosts on the local net / VPN to patch directly to a local IP. Entry: Routing Date: Wed Mar 28 18:12:34 CEST 2012 TODO: fix routing daemon. I changed something in quagga and now it's totally broken.. Entry: Upgrading to zni to linux-image-3.2.0-2-rt-amd64 Date: Thu Apr 5 17:40:00 CEST 2012 tom@zni:~$ cat /etc/kernel/postinst.d/initramfs-tools #!/bin/sh # passing the kernel version is required [ -z "$1" ] && exit 0 # kernel-package passes an extra arg; hack to not run under kernel-package # http://www.mail-archive.com/debian-kernel@lists.debian.org/msg45846.html # [ -z "$2" ] || exit 0 # we're good - create initramfs. update runs do_bootloader update-initramfs -c -t -k "$1" firmware: r8169: rtl_nic/rtl8168f-2.fw, rtl_nic/rtl8168f-1.fw, rtl_nic/rtl8105e-1.fw, │ │ rtl_nic/rtl8168e-3.fw, rtl_nic/rtl8168e-2.fw, rtl_nic/rtl8168e-1.fw, │ │ rtl_nic/rtl8168d-2.fw, rtl_nic/rtl8168d-1.fw Doesn't want to boot /dev/mapper/vg1-root Looks like symlinks are not there.. for me that's /dev/mapper/dm-3 I tried to boot it with /dev/dm-3 but that didn't work.. Looks like it's time to re-learn the new linux infrastructure. Too many things have changed recently. [1] http://unix.stackexchange.com/questions/11125/lvm-devices-under-dev-mapper-missing Entry: Email notifications for missed calls in Asterisk Date: Wed Apr 18 15:29:28 EDT 2012 Cached from [1]. Author: Matt Schmandt A feature I have wanted for a long time is to get emails about missed calls. I have a Blackberry and knowing that people are calling and hanging up before leaving a vm is very useful when I am out in the field. I wrote a small shell script to add this functionality to Asterisk. I place the script in the h extension of the stdexten marco. The h extension triggers once a call is hung up from that context. The first and only priority for the h extension is a System() call. It calls this shell script and passes many parameters to it. The first parameter is the email address to send the email to. To make this work for the marco, I adjust the macro to have a third parameter which is email address. I would like to pull the email address from that extensions vm but that function does not exist and I could not figure out how to add that function in the C source code. If anyone knows a better way, please let me know. The script requires you have the mailx package installed. Download the script[2] Rename the file processCallEmail.sh. mv processCallEmail.txt processCallEmail.sh Put it in the /var/lib/asterisk/agi-bin directory. mv processCallEmail.sh /var/lib/asterisk/agi-bin/" Make sure the asterisk user has execute permissions on the script. chmod 755 /var/lib/asterisk/agi-bin/processCallEmail.sh Add one line of documentation to macro-stdexten context on the line after ${ARG2}. ; ${ARG3} - email address to send emails about missed calls to Add the h extension line to the macro-stdexten context. exten => h,1,System(processCallEmail.sh "${ARG3}" "${CALLERID(num)}" "${CALLERID(name) }" "${DIALSTATUS}" "${VMSTATUS}") Alter the line that calls the macro to include an email address. exten => 500,1,Macro(stdexten,500,SIP/${EXTEN},abc@test.com) Here is an example of an updated stdexten macro. [macro-stdexten]; ; ; Standard extension macro: ; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well ; ${ARG2} - Device(s) to ring ; ${ARG3} - email address to send emails about missed calls to ; exten => s,1,AGI(ldaplookupphone2.agi) exten => s,n,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum exten => s,n,Goto(s-${DIALSTATUS},1) ; Jump based on status NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain exten => h,1,System(processCallEmail.sh "${ARG3}" "${CALLERID(num)}" "${CALLERID(name) }" "${DIALSTATUS}" "${VMSTATUS}") Script: #!/bin/sh #Used for email alerting of incoming calls #Written by Matt Schmandt #version .1 #License: GPL #$1 email address #$2 callerid num #$3 callerid name #$4 dial status #$5 vm status #Store command line args in nice variables EMAIL=$1 CALLERIDNUM=$2 CALLERIDNAME=$3 DIALSTATUS=$4 VMSTATUS=$5 LOGFILE="/var/log/processCallEmail.log" MAILCMD="mailx -s" SUBJECT="call" SENDMAIL=1 #Set to 1 if you want it to email the alert. 0 is useful for debugging. DEBUG=0 #Set to 0 for standard operation. 1 will log inputs and mail commands for debugging. #log mail command if [ $DEBUG -eq 1 ]; then echo $1 $2 \"${3}\" $4 $5 >> $LOGFILE fi #Check we have an email address if not quit if [ "$EMAIL" == "" ]; then exit 0 fi #check for call canceled. ex. 1 ring then hangup if [ $DIALSTATUS == "CANCEL" ]; then BODY="${CALLERIDNAME} (${CALLERIDNUM}) hung up quickly." fi #check for answered call. ex. someone picks up if [ $DIALSTATUS == "ANSWER" ]; then # BODY="$CALLERIDNAME ($CALLERIDNUM) was answered by $PEERNAME." # Use the above line if you want alerts about answered calls. # At work this is not useful but at home it is. :) exit 0 fi #check for unanswered call. ex. phone rang and no one picked up if [ $DIALSTATUS == "NOANSWER" ]; then BODY="${CALLERIDNAME} (${CALLERIDNUM}) hung up." #check for hangup in vm menu. ex call went to vm and user hung up if [ $VMSTATUS == "USEREXIT" ]; then BODY="$CALLERIDNAME ($CALLERIDNUM) hung up on vm." fi #check for hangup in vm menu. ex call went to vm and user hung up if [ $VMSTATUS == "FAILED" ]; then BODY="$CALLERIDNAME ($CALLERIDNUM) hung up on vm." fi #if they left a vm we already would get an email. Don't need a 2nd if [ $VMSTATUS == "SUCCESS" ]; then exit 0 fi fi #log mail command if [ $DEBUG -eq 1 ]; then echo $BODY $MAILCMD $SUBJECT $EMAIL >> $LOGFILE fi #send email if [ $SENDMAIL -eq 1 ]; then `echo $BODY | $MAILCMD $SUBJECT $EMAIL` fi exit 0 [1] http://www.theschmandts.org/blog/email-notifications-for-missed-calls-in-asterisk [2] http://www.theschmandts.org/blog/wp-content/uploads/2007/05/processcallemail.txt