nyfiken blog

Johan Adlers sporadiska skriverier
RSS icon Home icon
  • En dålig tidpunkt att jobba som hyrläkare i Gävle!

    Posted on March 21st, 2012 Johan Adler 1 comment

    Sta­tusupp­da­te­ring: Jag valde en dålig tid­punkt att jobba extra som hyr­lä­kare i Gävle!

    Jag vak­nade pre­cis ur en dröm som jag vill beskriva hellre än att somna om.

    Jag skulle jobba extra som distriktsläkare/allmänläkare i Gävle (sta­den var namn­gi­ven i dröm­men, det var inte att jag kände igen mig från sjuk­hu­set), med tjänst­gö­ring på sjuk­hu­sets akut­mott­tag­ning. I rea­li­te­ten hand­lade det om ett myc­ket mindre sjuk­hus i en betyd­ligt mindre, lant­li­gare och mer lugn stad.

    Vi var 6–10 hyr­lä­kare som delade boende (tänk: jour­rum) på ett par sam­man­slagna rum på en oan­vänd inten­siv­vårds­av­del­ning. Jag hade hål­lits vaken halva nat­ten av mina till­fäl­liga kol­le­gor och rums­kam­ra­ter och för­sov mig till första tjänst­gö­rings­pas­set, som nu var på invär­tes­me­di­cin, inte som DL på aku­ten, Jag tog det vik­ti­gaste av mina saker och stres­sade iväg genom okända kor­ri­do­rer i jakt efter rätt ställe att befinna mig på. Föga anade jag att Gävle sjuk­hus som hel­het nu bok­stav­li­gen var värl­dens minst “rätta ställe” att befinna sig på.

    Utan för­var­ning hade sta­den drab­bats av en vålds­dådsvåg på ult­rabru­tal splat­ter­films­nivå. Tänk “The hills have eyes”, “Reeker”, “Vacancy”, “[REC]” och fler i den sti­len, mul­ti­pli­cera med sur­re­a­lis­men från “Den anda­lu­siska hun­den” och ult­ra­vål­det från “A clockwork orange” (boken, inte fil­men, som inte kla­rar av att för­medla hemsk­he­terna på samma sätt), och krydda med de otrev­li­gaste delarna från “Apoca­lypse now”. Jag befann mig plöts­ligt i något som skulle få nyss nämnda fil­mer att se ut som ett barn­pro­gram för förskolebarnen.

    Innan jag insett vid­den av kata­stro­fen bör­jade jag för­söka fråga mig fram, för att hitta rätt ställe att vara på, rätt per­son att ta kon­takt med. Nyva­ken som jag var, och jät­testres­sad över att ha för­so­vit mig, tog det ett tag innan jag tog in det som utspe­la­des omkring mig.

    Jag stod för­mod­li­gen någon­stans mel­lan akut­mot­tag­ning och rönt­gen, på ett mini­malt lands­orts­sjuk­hus i en liten söm­nig håla någon­stans långt från jäkt och stress. Något var fel. Överallt omkring mig fanns det bårar, stres­sad skri­kande per­so­nal som för­sökte hjälpa skri­kande ska­dade pati­en­ter, inte helt få av dessa var i sin tur skri­kande ska­dad per­so­nal. Alla var unge­fär lika blod­ned­stänkta, alla med en skvätt av någons kropps­de­lar stänkt över sig. Det var lite som att vakna upp inne på sjuk­hu­set i en kom­bi­na­tion av “Day of the trif­fids”, “28 dagar senare” och hela “Resi­dent evil”-serien sam­man­ta­get, men jag var där innan kor­ri­do­rerna blev tomma och tysta.

    Anhö­riga och de mindre svårt ska­dade pati­en­terna fort­satte med ult­ra­vål­det inne i sjuk­hu­sets kor­ri­do­rer, någons tar­mar flög åt mitt håll, personal/patient-kvoten mins­kade sta­digt. Fast beslu­ten om att göra mitt jobb insåg jag plöts­ligt att jag hade glömt vik­tiga delar av mina per­son­liga under­sök­nings­in­stru­ment på rum­met. Jag tog mig till­baka till det IVA som legat i malpåse några år, fann rum­met jag läm­nade en liten stund tidi­gare, men det var nu helt urblåst. Jag för­står nu (vaken, vet inte hur jag fick denna kun­skap i dröm­men) att man hade pla­ce­rat svårt ska­dade pati­en­ter där, och att halv­döda pati­en­ter och deras anhö­riga hade gått bär­sär­ka­gång. Det som var något i stil med en hyf­sad ung­karlslya innan jag vände ryg­gen till var nu väg­gar, golv och tak, med för­hål­lan­de­vis små inslag av kros­sat glas och ett lager av myc­ket små (tänk: val­nöt och mindre) delar av döda människor.

    På något sätt fick jag ändå tag på min lilla kasse med ste­to­skop och Crocs-tofflor. Jag lånade ett pas­ser­kort av en stres­sad men trev­lig sjuk­skö­terska, vi hann med en skämt­samt iro­nisk ord­väx­ling om läget omkring oss, när jag sekun­den senare skulle lämna till­baka pas­ser­kor­tet fick jag ge det till hen­nes betyd­ligt mer tyst­låtna kol­le­gor som var täckta av delar av den trev­liga skö­ters­kan vars kort jag hade i handen.

    Några meter senare på min väg mot en högst san­no­lik död satte jag mig ned i ett undan­skymt hörn, tog fram tele­fo­nen och bör­jade skriva en kort sto­isk sta­tusupp­da­te­ring om att jag job­bade extra som hyr­lä­kare i Gävle, men att jag ver­kade ha valt fel tid­punkt för upp­dra­get. Jag för­stod att det inte fanns någon anled­ning att beskriva läget omkring mig. Jag insåg att ingen i Sve­rige eller någon­stans i värl­den kunde undgå att känna till de bru­tala hemsk­he­terna i vars epi­cen­ter jag satt hop­kru­pen med ryg­gen mot hör­nets två väg­gars möte.

    Jag valde en dålig tid­punkt att jobba extra som hyr­lä­kare i Gävle!

  • USB sound on Alix running Voyage

    Posted on May 18th, 2011 Johan Adler 1 comment

    I thought that using a USB sound card with Linux would be easy, just plug and play, but I was wrong, it seems. Plug­ging in the Ter­ra­tec Aureon Dual USB (ID: 0ccd:0077) that I bought ren­de­red a pro­mi­sing out­put from dmesg and lsusb, and lsmod sho­wed that even rele­vant modu­les were loa­ded. The pro­blem was that mpd and other pro­grams did not find any way to actu­ally out­put sound to any device. They had the firm belief that my system was lac­king any sound card. Maybe I would need some sound rela­ted pac­ka­ges?

    aptitude install alsa-base alsaplayer alsaplayer-text alsa-utils


    No luck… The mpd con­fi­gu­ra­tion file /etc/mpd.conf see­med mostly con­fu­sing when it came to out­put devices, and the wiki page it refer­red to did not help eit­her. A search with Google on the USB ID was hel­p­ful though, as usual. Some­one with the alias BigRon also had pro­blems with Debian and this Ter­ra­tec USB sound card. The results from his attempts, docu­men­ted with ver­bose out­put, was simi­lar to mine. User bandan’s reply was the begin­ning of the end of my trouble! I had to edit /etc/modprobe.d/alsa-base.conf to com­ment out a line pre­ven­ting USB devices from becoming the first (default) device, sub­sti­tu­ting it for a line with the oppo­site effect.

    ## Keep snd-usb-audio from beeing loaded as first soundcard<br/> #options snd-usb-audio index=-2


    # Fix from http://forum.doozan.com/read.php?2,4119,4166<br/>

    1. Allow snd-usb-audio to be loaded as first soundcard options snd-usb-audio index=0


      Now I was at least able to get alsa­mixer to ack­now­ledge the mere existence of a sound rela­ted device, but alas it chose an input only device (most likely my Logi­tech webcam with microp­hone) as the default device even though it cal­led the Ter­ra­tec one default by name. Luc­kily for me the just men­tio­ned forum thread linked to a more sub­stan­tial thread descri­bing the pro­blem in more depth. I added myself and the mpd user to the audio group, to make sure that there would not be any pro­blems with per­mis­sions regar­ding the devices

      addgroup jadler audio addgroup mpd audio


      I was still unable to play anyt­hing (wit­hout expli­citly cho­sing what Alsa refers to as sound card 1). So I kept try­ing the stuff that had worked for the per­son repor­ting in the forum, cre­a­ting an /etc/asound.conf file with basi­cally the same con­tent as sug­ges­ted in the last thread refer­red to above, but chan­ging all refe­rences to hw:0 to hw:1, and from card 0 to card 1. Now mplayer works, but I still can’t get mpd to do its thing.

    2. Alix2d13 — Voyage Linux or Debian Live?

      Posted on May 12th, 2011 Johan Adler No comments

      I am not sure whet­her it is cau­sed by the Ubuntu 10.10 amd64 run­ning on my work­sta­tion or on some bug in the Emde­bian pac­kage, but I do have a hard time to get Emde­bian instal­led. I have tried Mul­tistrap, Debootstrap, and Debian Instal­ler, and I have done it on the Alix com­pu­ter using PXE boot, on my work­sta­tion (follo­wed by chroot etc), and on vir­tual machi­nes using qemu/kvm or Vir­tu­al­box, but so far no luck.

      All of this makes it less and less attemp­ting to actu­ally install any Emde­bian based Debian, and so I gradu­ally tur­ned back to Voyage Linux. When I was brow­sing the Voyage site I lear­ned about Debian Live, the system that “punkytse” uses to cre­ate the Voyage ima­ges, and also offers for down­load under tha name “Voyage SDK”. So now I am tes­ting Debian Live and try­ing to learn more about it.

      The wiki and the manual seems to be a good place to start when lear­ning about Debian Live.

      For those inte­res­ted in PC Engi­nes Alix the Alix forum may also be a good source of information.

      (I should really find a bet­ter Word­Press theme, I know…)

    3. Installing Linux on PC Engines Alix2d13 (part 2.5)

      Posted on May 10th, 2011 Johan Adler No comments

      After publishing I rea­li­zed that I could have sup­plied more infor­ma­tion, and more down­lo­ads, than I did in my pre­vious post.

      Here are links to pat­ched ver­sions of Debian netboot.tar.gz (stable/Squeeze, testing/Wheezy and daily build), all down­lo­a­ded and pat­ched today, 2011-05-10:


      I have also made a diff file for the stable mod.

      What my script does, basi­cally, is this:


      1. Untar the tar­ball and cd to debian-installer/i386/boot-screens/ where all changes are made.

      2. In the file syslinux.cfg (which is actu­ally a file with PXELINUX con­fi­gu­ra­tions) two lines are added:

        1. serial 0 38400—tel­ling PXELINUX to use ttyS0 for I/O (i.e. as console).

        2. con­sole 0—do not try to use any video console



      3. In the files adtxt.cfgrqtxt.cfg and txt.cfg sub­sti­tute any occu­rence of vga=788 for ttyS0,38400n8. This is done in order to tell the ker­nel that:

        1. There is no graphic/video console

        2. The con­sole that should be used is the first serial port, and with the spe­ci­fied settings.




      This is a simp­li­fi­ca­tion, since my script also inclu­des a vari­able for the num­ber of the serial port, in case your con­sole is not on ttyS0. I have not inclu­ded any such con­ve­ni­ence regar­ding speed and other set­tings for the serial port chosen.

    4. Installing Linux on PC Engines Alix2d13 (part 2)

      Posted on May 8th, 2011 Johan Adler No comments

      I have found it to be quite nice to be able to boot the Alix board over the network using PXE. Using the Debian netboot.tar.gz tar­ball and TFTP I can boot the Debian Instal­ler or a rescue system, and the for­mer lets me install Debian Linux wit­hout phy­si­cally touching the CF.

      In order to make net­boot use the serial port as con­sole I have pat­ched the Debian net­boot tar­ball, and I made a script that does all the patching, just for you… :-)

      patch-netboot.sh

      I have tested it with the Debian stable and tes­ting netboot.tar.gz down­lo­a­ded today and it works, and also with the daily snap­shot from Debian installer.

      The script will modify the file syslinux.cfg in order to make PXE­Li­nux use the serial port, and the files adtxt.cfg, rqtxt.cfg and txt.cfg to make sure that the Linux ker­nel (actu­ally the Debian instal­ler in this case) also uses the serial port as con­sole. (Look at the script to see the actual changes. You should of course have a look at it before run­ning it, anyway.)

      Making my anci­ent Net­gear WGT634U run­ning OpenWRT serve PXE ima­ges was really a no-brainer. In the Services/Dnsmasq page I ente­red the three cho­i­ces shown below, with  the pat­ched net­boot untar­red on a USB stick mounted on /mnt/sda2.

      Refe­rences (other that links above):


      Some more patching lets me use pre­see­ding too, but more on that anot­her time.

Corporate