Sunday, April 29, 2012

Online board games

Getting hurd up & running

It seems (?) to be easier using qemu than virtualbox. 

Thursday, April 05, 2012

Re-installing Gelato (take 2)

Well, it seems that, in addition to extra hoops for installing onto RAID, the nouveau kernel module crashes when trying to boot.  Since (unlike Ubuntu or Mint), the debian installer works with RAID, I downgraded to debian stable ("squeeze").

  1. Install debian without the desktop.  Reboot.
  2. Read up on nvidia drivers.  Decide to try the "debian way".  (http://wiki.debian.org/NvidiaGraphicsDrivers)
  3. Nvidia proprietary drivers are updated in backports repository.  Add it to /etc/apt/sources.list
    deb http://backports.debian.org/debian-backports squeeze-backports main
  4. Install desktop after the fact (http://wiki.debian.org/Gnome)
    apt-get install aptitude tasksel
    tasksel install gnome-desktop --new-install
  5. Remove nouveau (http://forums.debian.net/viewtopic.php?f=6&t=69888 | http://forums.debian.net/viewtopic.php?f=30&t=54330)
    echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
    apt-get purge --remove xserver-xorg-video-nouveau
  6. Use aptitude, and remove every package with the word "nouveau" in it.  However, nouveau.ko is in the linux kernel package, so I can't actually remove it.
  7. Continue, re-install nvidia drivers
    apt-get install --reinstall nvidia-glx
  8. This is a key step (see http://linux.koolsolutions.com/2009/10/11/howto-blacklisting-kernel-module-from-auto-loading-in-debian/)
    depmod -a
    update-initramfs -u -k `uname -r` -v
  9. Reboot.  Success!

Monday, April 02, 2012

Re-installing gelato

  1. Backup home directory.  Backup etc.  Unplug scratch drives
  2. Boot live cd
  3. Install mdadm and lvm2
  4. Re-assemble the raid partitions
    mdadm --assemble --scan
  5. Run linux mint installer.  The /dev/mdXX partitions are recognised and usable for install.  Re-format existing partitions (except /home). Choose /dev/md1 (/boot partition) as the partition for the boot loader.
  6. I got an error in the install.  Maybe benign?  It says:
    An error occurred while migrating data.  More details may be found in /var/log/syslog.  The installation will continue, but some or all of the documents and settings you requested may not have been transferred to the installed system.
    The error is that it couldn't mount /dev/sdb5 (which belongs to /dev/md5), because it doesn't know the file system "linux raid member".  Click OK to continue.
  7. Choose "continue testing" at the end of the install.
  8. Now we have to set up the newly installed system to recognise the raid.  This is exactly as described in part 5 of this document:
    http://www.howtoforge.com/install-ubuntu-with-software-raid-10
    With the modificaiton of additional required partitions (/usr, /var, etc.), and installing lvm2 as well as mdadm.
  9. Reboot.
  10. Well, the reboot didn't work, because I neglected to update grub.  Here is the error that I got:
    GRUB Loading stage1.5
    GRUB loading, please wait...
    Error 15
  11. Boot off of the live CD again, re-install mdadm & lvm2, re-scan raid, re-mount volumes, enter chroot.
    apt-get install mdadm lvm2
    mdadm --assemble --scan
    mkdir /myraid

    mount /dev/md5 /myraid
    mount /dev/md1 /myraid/boot
    mount /dev/md6 /myraid/usr
    mount /dev/md7 /myraid/var
    mount /dev/md8 /myraid/tmp
    mount --bind /dev /myraid/dev
    mount -t devpts devpts /myraid/dev/pts
    mount -t proc proc /myraid/proc
    mount -t sysfs sysfs /myraid/sys
    chroot /myraid
  12. Follow instructions on this page:
    http://iiordanov.blogspot.com/2011/07/how-to-install-linux-ubuntu-debian-etc.html
    Start at step (10). It goes smoothly.  However, I notice that my swap is not RAID.  I wonder if this is on purpose?  So I left as two swap partitions in the fstab, to be resolved later.
  13. Do step (11), note that I did not have to modify /etc/mdadm/mdadm.conf, since it already had the correct entries.
  14. Do step (12).  This failed.  Note 1: the file /boot/grub/grub.cfg did not exist.  Note 2: grub-install was done to the raw disk, not the raid disk, such as:
    grub-install --recheck --modules="raid" /dev/sda
  15. Reboot.
  16. Now I got a grub menu, which listed a few options including "/dev/md1", "/dev/sda1", and "/dev/sdb1".  Choosting the first option causes a black screen of death.  Choosing "/dev/sda1" yields similar results.  It turns out that something is happening, but nothing is displayed.  Hitting e.g. arrow keys or ESC causes the messages to display.  The boot seems to hang on the following message:
    ** Starting CUPS printer/spooler server **    [ OK ]
  17. Boot off of the live CD again, re-install mdadm & lvm2, re-scan raid, re-mount volumes, enter chroot.
  18. Nothing interesting to see.  Here is boot.log:
    fsck from util-linux 2.19.1^M
    fsck from util-linux 2.19.1^M
    fsck from util-linux 2.19.1^M
    fsck from util-linux 2.19.1^M
    fsck from util-linux 2.19.1^M
    fsck from util-linux 2.19.1^M
    /dev/md5: clean, 9326/305824 files, 123307/1222912 blocks^M
    /dev/md8: clean, 12/305824 files, 54365/1222912 blocks^M
    /dev/md7: clean, 8815/305824 files, 130828/1222912 blocks^M
    /dev/md6: clean, 163285/1221600 files, 772988/4885744 blocks^M
    Reiserfs super block in block 16 on 0x90a of format 3.6 with standard journal^M
    Blocks (total/free): 110268128/33138842 by 4096 bytes^M
    Filesystem is clean^M
    /dev/md1: clean, 246/124928 files, 56798/497856 blocks^M
     * Starting mDNS/DNS-SD daemon^[[154G[ OK ]^M
     * Starting network connection manager^[[154G[ OK ]^M
     * Starting CUPS printing spooler/server^[[154G[ OK ]^M
     * Starting emergency keypress handling^[[154G[ OK ]^M
     * Stopping emergency keypress handling^[[154G[ OK ]^M
     * Starting System V runlevel compatibility^[[154G[ OK ]^M
     * Starting save system clock to hardware clock^[[154G[ OK ]^M
     * Starting save sound card(s') mixer state(s)^[[154G[ OK ]^M
     * Starting eCryptfs^[[154G[ OK ]^M
    Here is the end of kern.log:
    Apr  2 20:28:54 gelato kernel: [   18.535691] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
    Apr  2 20:28:54 gelato kernel: [   18.536853] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    Apr  2 20:29:04 gelato kernel: [   28.840999] eth0: no IPv6 routers present
    Apr  2 20:31:14 gelato kernel: Kernel logging (proc) stopped.
    Here is the end of syslog:
    Apr  2 20:29:04 gelato avahi: contact your administrator and convince him to use a different DNS domain,
    Apr  2 20:29:04 gelato avahi: since .local should be used exclusively for Zeroconf technology.
    Apr  2 20:29:04 gelato avahi: For more information, see http://avahi.org/wiki/AvahiAndUnicastDotLocal
    Apr  2 20:29:04 gelato kernel: [   28.840999] eth0: no IPv6 routers present
    Apr  2 20:29:12 gelato ntpdate[1303]: adjust time server 91.189.94.4 offset 0.213605 sec
    Apr  2 20:31:14 gelato kernel: Kernel logging (proc) stopped.
    Apr  2 20:31:14 gelato rsyslogd: [origin software="rsyslogd" swVersion="5.8.1" x-pid="1172" x-info="http://www.rsyslog.com"] exiting on signal 15.

Wednesday, March 14, 2012

Reproducing Kernel Hilbert Spaces

From Zero to Reproducing Kernel Hilbert Spaces in Twelve Pages or Less" by Hal Daumé III (Unpublished, 2004)
http://hal3.name/docs/daume04rkhs.pdf
Not directly related, but also I'm interested in Wolfe Dual:
http://www.cs.rochester.edu/~gildea/2008_Springwolfe.pdf
http://homepages.rpi.edu/~bennek/class/mmld/

Sunday, March 11, 2012

Github on wormwood

OK, two things to know.
  1. Need to set up ssh for multiple keys.  See e.g.
    http://www.karan.org/blog/index.php/2009/08/25/multiple-ssh-private-keys
  2. Need to do this:
    $ ssh-add ~/.ssh/id_rsa_github
  3. On gelato, I need something like this:
    $ exec ssh_agent bash<br />$ ssh-add ~/.ssh/id_rsa_github

Bye.

Friday, March 09, 2012

Using slicer on SPL computers

When you try to run slicer remotely on the SPL computer, you get something like this:

$ ./Slicer-build/Slicer
Number of registered modules: 94
ERROR: In /home/gcs6/build/slicer-rt/SlicerRt-build/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 404
vtkXOpenGLRenderWindow (0x333a200): Could not find a decent visual

ERROR: In /home/gcs6/build/slicer-rt/SlicerRt-build/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 404
vtkXOpenGLRenderWindow (0x333a200): Could not find a decent visual

X Error: BadValue (integer parameter out of range for operation) 2
  Extension:    135 (Uknown extension)
  Minor opcode: 3 (Unknown request)
  Resource id:  0x21
ERROR: In /home/gcs6/build/slicer-rt/SlicerRt-build/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 629
vtkXOpenGLRenderWindow (0x333a200): Cannot create GLX context.  Aborting.

error: [/workspace/gcs6/build/slicer-rt/SlicerRt-build/Slicer-build/bin/./SlicerQT-real] exit abnormally - Report the problem.

It seems you can workaround by doing this:

$ setenv LIBGL_ALWAYS_INDIRECT y

Saturday, February 18, 2012

Policy for ITK

Just to remind myself, set policy CMP0012 to avoid scary ITK include warning

Alternative platform testing

Excellent resource for testing software on different platforms


Wednesday, January 18, 2012

Online course links

X-ray, CT

MRI

Multi-modal
Anatomy guides (well, not for the course...)
Everything

 

Saturday, December 24, 2011

GoDaddy & SOPA

GoDaddy is foolish for supporting SOPA.  Gotta change to a new provider, e.g. http://www.hostgator.com/

Monday, November 21, 2011

LDAP on debian

Well, here is the starting point
http://research.partners.org/wiki/index.php/Active_Directory_on_Unix

But that doesn't quite work.  What is the difference between using ldap:// and ldaps://?  My opensuse box uses ldaps://, which seems to work ok.  But the debian instructions say use ldap://.

Debian has a very useful resource here.

http://www.debian-administration.org/articles/585

If I do "ldapsearch -x", this works using ldap://, but I get an error message "...a successful bind must be completed on the connection."  Possibly this is answered here:

http://forums.techarena.in/active-directory/662084-2.htm

See also this:

http://www.openldap.org/doc/admin24/appendix-common-errors.html

Eventually I learned the reason I get the error about "...a successful bind must be completed on the connection." is that I forgot to use a user name.  For example, the following works:

ldapsearch -v -D 'cn=myuser,cn=users,dc=example,dc=org' -H ldap://ldap.example.org -b dc=example,dc=org -W -x

This even works without "-x" option, which is good news.  But I still get the following error:

$ id myuser
id: myuser: No such user

Aha!  I got it.  I had mistakenly installed "nslcd, libnss-ldap, libpam-ldapd" instead of "nslcd, libnss-ldapd, libpam-ldapd"

How to restrict access to which LDAP users can log in?  See, for example:

http://linux.web.cern.ch/linux/docs/account-mgmt.shtml

The secret was to change the user names into the "filter shadow" line, like this:

filter shadow (!(cn=usr1)(cn=usr2))

Another possible problem is incorrect TLS certificate.  The web page which describes this cannot be found by web search.  Use inside knowledge to find the hidden URL on intranet.

Thursday, November 10, 2011

Pulse audio glitches again

Maybe it's not pulse, but usually it is.  Time to debug the problem

$ cat /proc/asound/cards
  0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfe8f4000 irq 16
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfe9ec000 irq 44

Not sure what it really means.  Phonon can be configured to use either of them, but they both skip.  My device is some kind of "on motherboard" thing.

$ lspci -v

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
        Subsystem: Dell Device 02e2
        Flags: bus master, slow devsel, latency 64, IRQ 16
        Memory at fe8f4000 (64-bit, non-prefetchable) [size=16K]
        Capabilities:
        Kernel driver in use: snd_hda_intel

01:00.1 Audio device: ATI Technologies Inc RV710/730
        Subsystem: PC Partner Limited R700 Audio Device [Radeon HD 4000 Series]
        Flags: bus master, fast devsel, latency 0, IRQ 44
        Memory at fe9ec000 (64-bit, non-prefetchable) [size=16K]
        Capabilities:
        Kernel driver in use: snd_hda_intel

Then, I read a web page that suggests deleting the ~/.pulse directory, and so I did.  And it fixed it!  But only until the next reboot.

    Saturday, October 08, 2011

    Haiku stuff

    Gnome-terminal problems (again)

    Sigh...looks like gnome-terminal bug came back:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631116

    1) The problem is probably related to an incompatibility with SCIM.  Disabling SCIM (using im-config) solves the problem.  See also:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632094

    2) Probably the answer is to switch from SCIM to IBus.

    http://en.wikipedia.org/wiki/Intelligent_Input_Bus

    3) Gnome-terminal has its own special way of setting an input method: using a right-click menu (wtf??)

    http://superuser.com/questions/109554/removing-scim-input-method-as-default-from-gnome-terminal

    Maybe you can set it to XIM and then use SCIM.

    Sunday, October 02, 2011

    JPOP resources

    A big thanks to these web sites for preserving our cultural heritage.

    http://www.otonomai.net
    http://mlbeto1169.blogspot.com/
    http://www.dimazdizon.com/category/japan/

    Sunday, September 11, 2011

    Virtualbox + windows 98

    This turned out to be trickier than I thought.  Virutalbox is not well optimized for windows 98.  Here are some tricks:

    http://forums.virtualbox.org/viewtopic.php?t=9918

    Saturday, September 10, 2011

    glib.GError: Unrecognized image file format

    Deluge crashes with this error.  How boring.

    The fix is to edit common.py as described by brianbrian

    http://ubuntuforums.org/archive/index.php/t-1063483.html

    Sunday, August 21, 2011

    Freshmeat review 2011-08-21 to 2011-07-24

    Eliot - scrabble game
    http://freshmeat.net/projects/eliot

    Potrace - bitmap tracing code
    http://freshmeat.net/projects/potrace

    Cinelerra - audio/video production system
    http://freshmeat.net/projects/cinelerra

    OpenMP Template Library - parallel STL implementation
    http://freshmeat.net/projects/omptl

    Tuesday, August 09, 2011

    Starview KVM sticky key problem

    After moving my office, I started having trouble with my Starview KVM.  It is a problem I vaguely remember having some years ago after it first arrived, and then I worked around the problem.  But now, after putting my computer together again, it came back.

    The problem is that sometimes, a letter will stick, and get repeated.  Like thisssssssssssss. 

    It seems to be a firmware bug.  According to Mike, you can fix it by installing new firmware.

    http://www.newegg.com/Product/Product.aspx?Item=N82E16817707139

    Now, after reading his posts, I understand how I solved it before.  There are dedicated keyboard mouse ports on the starview, but you can also plug your keyboard & mouse to the general purpose ports.  The general purpose ports don't have this problem.

    Saturday, August 06, 2011

    Friday, July 08, 2011

    Installing W7 SP1

    I'm trying to install W7 SP1 on Snowball.  The error message is:

    <put error message here>

    The problem is apparently that w7 requires access to boot manager (formerly boot.ini) to install SP1.

    http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/454535-opensuse-dual-booting-windows-7-loading-service-pack-1-windows-7-a.html

    Wednesday, July 06, 2011

    GUI testing

    Sikuli - GUI testing tool
    http://sikuli.org/

    Wednesday, June 29, 2011

    GMER

    A rootkit detection program for windows

    http://www.gmer.net/

    Tuesday, June 28, 2011

    *** VTE ***: Failed to load terminal capabilities from '/etc/termcap'

    Solution:

    sudo ln -s /usr/share/vte/termcap-0.0/xterm /usr/share/vte/termcap/xterm

    https://bugs.launchpad.net/ubuntu/+source/vte/+bug/140011

    Saturday, June 18, 2011

    Monday, June 13, 2011

    Freshmeat review 2011-06-13 to 2011-05-22

    World War vi - Side-scrolling game
    http://freshmeat.net/projects/wordwarvi

    JShot - One-step screen capture, annotate and upload
    http://freshmeat.net/projects/jshot

    Freeberb3 - Sound processing library
    http://freshmeat.net/projects/freeverb3

    Turious - TBS game
    http://freshmeat.net/projects/turious

    Morituri - CD ripper
    http://freshmeat.net/projects/morituri

    Naev - Space trading game
    http://freshmeat.net/projects/naev


    OCE - 3D computer aided design (CAD)
    http://freshmeat.net/projects/oce

    Cottage - graphics and sound engine for HTML5 games
    http://freshmeat.net/projects/cottage



    Sunday, June 12, 2011

    TPS in octave

    I was crying.  Needed some plots of TPS in 1D.  Gints Jekabson comes to the rescue!

    http://www.cs.rtu.lv/jekabsons/regression.html

    Monday, June 06, 2011

    Finding extra files in your svn directory

    Always I forget to do this before running "make package_source".

    $ svn status

    Sunday, June 05, 2011

    Build debian package: take 2

    This is my interpretation of http://debian-med.alioth.debian.org/docs/policy.html

    When everything is correct, you should be able to do this:
    1. cd plastimatch/trunk
    2. uscan --force-download
    3. svn-buildpackage -rfakeroot -uc -us
    However, while you are debugging, the above workflow is perhaps cumbersome if you are maintaining the source package.  It would require you to update e.g. the source tarball.  Instead, you can do this:
    1. cd source-dir
    2. debuild -j4 -i -us -uc -b
    3. debuild -j4 -i -us -uc -S
    Note that the last one doesn't work if the debian subdirectory in the source directory is a symlink.  You need to actually make a copy.
    1. cd source-dir
    2. cp -r ../trunk/debian .
    If you just want to run lintian, you can do this:
    1. lintian -b ./plastimatch_1.5.0-1_amd64.deb
    2. lintian ./plastimatch_1.5.0-1_source.changes
    When you are messing around with cmake settings and get-orig-source, you can use the following workflow:
    1. make new upstream tarball (don't forget to use pristine source directory -- cmake will include everythign)
    2. link upstream tarball to debian upstream tarball
    3. run get-orig-source
    For me, the following commands implement the above idea
    1. cd build/plastimatch-pristine
    2. make package_source
    3. cp plastimatch-1.5.0-beta.2493-Source.tar.bz2 ~/debian-med/packages/plastimatch
    4. cd ~/debian-med/packages/plastimatch
    5. ln -s plastimatch-1.5.0-beta.2493-Source.tar.bz2 plastimatch-1.5.0.orig.tar.bz2
    6. cd trunk
    7. debian/get-orig-source
    To test the package dependencies, you need a "clean pbuilder environment".  Do this:
    1. sudo pbuilder create
    2. sudo pbuilder --update
    3. sudo pbuilder --build foo_version.dsc
    The first time you do it, you need to do a few more steps.  See the debian policy document for details (http://www.debian.org/doc/manuals/maint-guide/build.en.html  See specifically section 6.4).

    Saturday, May 14, 2011

    Friday, May 06, 2011

    IHE-RO

    The IHE-RO documentation is somewhat elusive. 

    The technical framework web page has 3 documents.

    http://www.ihe.net/Technical_Framework/index.cfm

    And there are several more documents on the wiki

    http://wiki.ihe.net/index.php?title=Radiation_Oncology

    Also there are things like that have no links to them:

    http://wiki.ihe.net/index.php?title=File:IHE-RO_Dose_Compositing_Supplement_v1.0-TI.pdf&oldid=41224

    Sunday, March 20, 2011

    Chromaprint

    This looks very cool.  A new audio fingerprinting app.

    http://forums.musicbrainz.org/viewtopic.php?id=2432

    Thursday, March 10, 2011

    Recording playback

    I can't seem to record playback in either Win 7 or Linux

    Win 7
    • There is no option for stereo mix in my recording device properties
    • My hardware is Dell Inspiron Desktop 546MT, Via 1708S
    • I have updated my driver to Dell's latest version (R237832.exe, 10/25/2009)

    Friday, December 31, 2010

    Compiler list

    An excellent resource for compilers.

    http://www.math.utah.edu/faq/compilers/compilers.html

    Configuring Amarok with my Sansa Fuze

    Apparently Amarok can copy files to the FUZE.  The trick is the little unlabeled button on the FUZE bar of the Amarok collection list.

    http://www.goodbyemicrosoft.net/news.php?item.615.2

    Thursday, December 30, 2010

    Machine learning

    After my frustration with LIBSVM, I decided to look into other methods.  Weka suggests that PLS works well for my problem.  But anyway, I need to find a good package (weka is java therefore unsuitable).

    http://www.support-vector-machines.org/SVM_soft.html
    http://www.linux.org/docs/ldp/howto/AI-Alife-HOWTO-2.html
    http://torch5.sourceforge.net/
    http://mloss.org/software/
    https://spreadsheets.google.com/ccc?key=0Aunb9cCVAP6NdDVBMzY1TjdPcmx4ei1EeUZNNGtKUHc&hl=en#gid=0


    Reviews.

    Weka
    Very good for exploring data.  I found several good algorithms (mostly linear algorithms such as PLS).  However, not a final solution because it is written in Java.

    LIBSVM
    Performs poorly on my data.

    LIBLinear
    Not yet benchmarked.

    Waffles
    This will be good, but currently doesn't compile due to being 64-bit clean (gcc 4.5).

    dlib
    Looks promising.  There is no benchmarking tool (?)

    Shark
    Looks promising.  Not yet benchmarked.

    Shogun
    I previously reviewed this, using the Octave plugin.  However, I don't remember the results.  Need to re-benchmark.

    Thursday, November 25, 2010

    Another jpop site

    Seems to have downloadable music: http://www.nautiljon.com/

    Sunday, November 14, 2010

    Workarounds for github unreliability

    Recently looking at how to handle github unreliability problems.  This will probably involve creating a mirror site.

    MIght be possible using a "post-receive hook"

    http://help.github.com/post-receive-hooks/


    Monday, August 30, 2010

    Lame settings for transcoding voice

    Here is a reasonably good setting for low quality voice

    lame -a -m s -b 16 test.wav test.mp3

    See also

    http://www.hydrogenaudio.org/forums/index.php?showtopic=3270



    Tuesday, August 17, 2010

    Saving gmail messages

    I needed to re-compose a file which was split into 7 parts and sent to my gmail account.  Strangely, you cannot do this through the web interface -- instead you have to set up POP3 or IMAP to do this (!).  While trending on this idea, I learned that you can access Yahoo! mail through POP3 too, using the YPOPs! application.

    http://ypopsemail.com/

    Out of sight!

    But anyway, back to gmail.  I enabled POP3 (actually it was already enabled), and set up Claws to retrieve.  There is some complicated-looking instructions in the Claws help pages:

    http://www.claws-mail.org/faq/index.php/Installation_and_Configuration#Does_Claws_Mail_work_with_Gmail_accounts.3F


    Well, actually that part is not so complicated, but the part about effectively using gmail tags is.  The thing is, if you don't do that correctly, all of your "archive"d emails get thrown in your inbox together with everything else.

    Sunday, August 08, 2010

    Zerogsound

    Wow, excellent work by Zero G Sound to preserve our folk music heritage. 

    http://zerogsound.blogspot.com/

    Tuesday, July 27, 2010

    Saturday, July 24, 2010

    Grub error: symbol grub_xputs not found

    Yet another bad version of Grub got pushed to Debian testing.  Those guys really are not doing QA properly.  Anyway, the error message appears before the grub screen starts, and looks like this:
    Grub error: The symbol grub_xputs not found
    grub rescue>
    Apparently grub is confused because I have 2 hard disks (duh...).  You can read many bug reports about this, and it is still not solved after most of a year.  For example
    The solution is to burn a live cd (I use USB for this), and fix.  Here is the solution details, and it works quite well:


    Sunday, July 11, 2010

    American Buddha Online Library

    When you have a little free time, the following is a good read.

    http://www.american-buddha.com/

    Wednesday, June 16, 2010

    Perl30Ex.dll + IIS

    POST isn't working with Perl30Ex.dll.  Here is what I've checked:
    1. Check install, permissions, etc (everything seems configured correctly)
      http://blogs.iis.net/wadeh/archive/2009/04/13/running-perl-on-iis-7.aspx
    2. Look through CGI doc, try different options (no apparent effect)
      http://perldoc.perl.org/CGI.html
    3. Enable failed request tracking (no failures logged)
      http://mvolo.com/blogs/serverside/archive/2007/07/26/Troubleshoot-IIS7-errors-like-a-pro.aspx
    4. Compare source pages between working (apache) and non-working (iis) systems
      They are the same
    5. Disable windows authentication in IIS

    Saturday, June 12, 2010

    Radeon+Debian (again)

    This morning's update of Debian testing borked my X again.  If I try to run startx, the system hangs (black screen, unresponsive (?) keyboard).  Luckily, when booting from an older kernel, X seems to run fine.

    Here is my card:
    gsharp@wormwood:~$ lspci -v |grep VGA
    01:00.0 VGA compatible controller: ATI Technologies Inc RV710 [Radeon HD 4350] (prog-if 00 [VGA controller])

    Here are the pertinent bits from /var/log/Xorg.0.log

    Older kernel (working):
    (II) [KMS] Kernel modesetting enabled.
    (WW) Falling back to old probe method for vesa
    (WW) Falling back to old probe method for fbdev
    (II) LoadModule: "fbdevhw"
    (II) Loading /usr/lib/xorg/modules/linux/libfbdevhw.so
    (II) Module fbdevhw: vendor="X.Org Foundation"
            compiled for 1.7.7, module version = 0.0.2
            ABI class: X.Org Video Driver, version 6.0
    (II) RADEON(0): Creating default Display subsection in Screen section
            "Default Screen" for depth/fbbpp 24/32
    (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
    (II) RADEON(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)

    Newer kernel (not working):
    (II) Primary Device is: PCI 01@00:00:0
    (II) [KMS] drm report modesetting isn't supported.
    (WW) Falling back to old probe method for vesa
    (WW) Falling back to old probe method for fbdev
    (II) Loading sub module "fbdevhw"
    (II) LoadModule: "fbdevhw"
    (II) Loading /usr/lib/xorg/modules/linux/libfbdevhw.so
    (II) Module fbdevhw: vendor="X.Org Foundation"
            compiled for 1.7.7, module version = 0.0.2
            ABI class: X.Org Video Driver, version 6.0
    (EE) open /dev/fb0: No such file or directory
    (II) RADEON(0): TOTO SAYS 00000000fe9f0000
    (II) RADEON(0): MMIO registers at 0x00000000fe9f0000: size 64KB

    (II) RADEON(0): PCI bus 1 card 0 func 0
    (II) RADEON(0): Creating default Display subsection in Screen section
            "Default Screen" for depth/fbbpp 24/32
    ...
    (EE) RADEON(0): Timeout trying to update memory controller settings !
    (EE) RADEON(0): You will probably crash now ...
    (EE) RADEON(0): Timeout trying to update memory controller settings !
    (EE) RADEON(0): You will probably crash now ...
    ...
    The new (not working) kernel goes on and loads module "vgahw" as well, which the older (working) kernel doesn't.

    Originally, I had these three packages installed:
    xserver-xorg-video-ati
    xserver-xorg-video-radeon
    xserver-xorg-video-radeonhd
    So I removed the radeon one (presumably not needed for my card?):
    apt-get remove xserver-xorg-video-radeon
    This worked (in the sense that I get video), but didn't work (in the sense that X reverted to VESA).  The Xorg.log yields:
    (II) LoadModule: "ati"
    (WW) Warning, couldn't open module ati
    (II) UnloadModule: "ati"
    (EE) Failed to load module "ati" (module does not exist, 0)
    So, I manually add radeonhd to the /etc/X11/xorg.conf
    Section "Device"
        Identifier     "Device0"
        Driver         "radeonhd"
    EndSection
    However, this causes X not to start with the following error:
    (II) [DRM] Kernel mode setting enabled
    (EE) FATAL: RadeonHD presently does not work with kernel modesetting (KMS).
    Please disable KMS in your kernel.
    (II) UnloadModule: "radeonhd"
    (EE) Screen(s) found, but none have a usable configuration.
    Apparently the best way to deal with this is to tell the kernel to disable kernel modesetting, by adding radeon.modeset=0 (or is it radeonhd.modeset ??).  See e.g. this link: http://lists.opensuse.org/radeonhd/2009-11/msg00175.html

    To test this, I need to reboot, and specify the kernel parameters to grub.  This method is described in this link http://grumpymole.blogspot.com/2007/05/ubuntu-how-to-edit-grub-boot-parameters.html:
    • Press "Esc" to intercept boot countdown
    • Go to the grub menu entry
    • Press 'e' to start editing.
    • Scroll down to the "linux..." line. Add "radeon.modeset=0" to the end.  (Yes, radeon, not radeonhd).
    • Press CTRL-x to boot using that kernel and those parameters.
    The method for making these changes permanent are not well described, but here is how to do it:
    • Edit /etc/default/grub
    • Change GRUB_CMDLINE_LINUX to include "radeon.modeset=0"
    • grub-mkconfig -o /boot/grub/grub.cfg
    • grub-install /dev/sdb (or whichever drive has the relevant MBR)
    http://forum.nginx.org/read.php?26,90217,90217
    References:
    http://wiki.debian.org/AtiHowTo
    http://www.x.org/wiki/radeonhd
















    Friday, June 11, 2010

    Cluster file synchronization

    I like unison well enough, but maybe something better needed for the cluster.  For example csync2.  Look at the post by Vitek, with his recommendations:

    http://pooteeweet.org/blog/0/909#m909

    Wednesday, June 09, 2010

    kondemand problem

    I am getting sluggish performance out of twofish, with the following output from top.  Sometimes %si (software interrupts) goes very high, though it is not shown in the current top dump.
    top - 18:21:05 up 35 days,  3:30,  1 user,  load average: 0.71, 0.48, 0.39
    Tasks: 250 total,   1 running, 249 sleeping,   0 stopped,   0 zombie
    Cpu(s):  0.0%us,  0.0%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
    Mem:  20557640k total,   865564k used, 19692076k free,   159480k buffers
    Swap: 23446828k total,        0k used, 23446828k free,   532112k cached

      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    13359 gcs6      20   0 51564 3560 2560 R   18  0.0   0:03.12 top
       93 root      15  -5     0    0    0 S    2  0.0 305:29.57 kondemand/5
     4168 root      20   0  8908  504  376 S    2  0.0 199:42.04 irqbalance
       95 root      15  -5     0    0    0 S    2  0.0 303:43.57 kondemand/7
       50 root      15  -5     0    0    0 S    1  0.0 217:07.99 events/15
       99 root      15  -5     0    0    0 S    1  0.0 306:53.07 kondemand/11
      101 root      15  -5     0    0    0 S    1  0.0 332:41.09 kondemand/13
       89 root      15  -5     0    0    0 S    1  0.0 308:02.11 kondemand/1
       91 root      15  -5     0    0    0 S    1  0.0 319:29.00 kondemand/3
     4750 root      20   0 14608  632  476 S    1  0.0   2:11.19 cron

    Not sure the problem, but I will like to try upgrading the kernel.  It seems there are 3 different kernel revisions in the 4 machines.

    Sunday, June 06, 2010

    id3 tools on linux

    Ugh. Every time I need to debug ID3 tags, I have to sort through a bunch of buggy, obsolete id3 tools.  Well, this time I'll try to take notes.

    Here are the ones in Debian (starting with command line tools):

    id3
    http://code.google.com/p/id3/

    Completely useless (id3v1 only).

    id3tool
    http://nekohako.xware.cx/id3tool/
    Completely useless (id3v1 only).


    id3v2
    http://id3v2.sourceforge.net/

    Mostly useless.  Does not, for example, show encoding information.

    mp3diags
    http://mp3diags.sourceforge.net/
    Nice program.  Wish it would give more information about encoding.

    Monday, May 24, 2010

    Setting up NFS with a firewall

    The below post explains how to do this for CentOS (the relevant post is the one by MensaWater).  It works great!  Thanks MensaWater.  :)

    http://www.linuxquestions.org/questions/linux-networking-3/help-nfs-error-no-route-to-host-341562/page2.html

    The relevant text-mode firewall configuration tool is called system-config-securitylevel.  You can use spaces to separate the "other ports" that you need to add.

    For NFS4, the following post looks useful:

    http://blog.laimbock.com/2009/05/21/nfsv4-on-centos-53-and-fedora-11/

    Wednesday, May 05, 2010

    Sudo + ssh

    It can be done.  The first step is to do the ssh-agent and ssh-add stuff.

    http://www.sudo.ws/pipermail/sudo-users/2003-April/001477.html
    http://mah.everybody.org/docs/ssh

    Then the second piece of the puzzle is to do ssh -t so you can answer the sudo prompt properly.  But you need to "prime" sudo, so it caches your password.  See comment by crashingdaily in the following post:

    http://crashingdaily.wordpress.com/2007/06/29/rsync-and-sudo-over-ssh/

    Thursday, April 01, 2010

    BFGS notes

    In addition to the wikipedia articles, I found these nice notes:

    http://www.math.mtu.edu/~msgocken/ma5630spring2003/lectures.html

    http://www.math.mtu.edu/~msgocken/ma5630spring2003/lectures/

    Also these:

    http://www.srl.gatech.edu/education/ME6103/Quasi-Newton.ppt

    This looks really hands on:

    http://hal3.name/docs/daume04cg-bfgs.pdf


    A nice looking implementation.  Also, check references on this one, esp. for line search code:

    http://www.chokkan.org/software/liblbfgs/

    Matlab implementations of several optimizers:

    http://www4.ncsu.edu/~ctk/matlab_darts.html

    Another lbfgs implementation:

    http://www.cs.umd.edu/~oleary/LBFGS/

    Another paper describing LBFGS

    http://www.fs.utm.my/matematika/images/stories/matematika/200117103.pdf


    A survey of truncated newton methods

    http://iris.gmu.edu/~snash/nash/assets/TN_Survey/tn_survey.html

    Saturday, March 13, 2010

    Dicom test files

    Optimizer summary

    L-BFGS-B license

    I was poking around with the L-BFGS-B optimizer, which is used by plastimatch (also ITK).  I discovered it is GPL licensed, (and/or covered by ACM license):

    http://www.eecs.northwestern.edu/~nocedal/lbfgsb.html
    http://www.acm.org/publications/policies/softwarecrnotice

    I wonder if the license changed.  For example SciPy uses under a different license:

    http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_l_bfgs_b.html

    The SciPy list has a discussion of alternate optimizers of this class.

    http://osdir.com/ml/python.scientific.devel/2004-04/msg00005.html

    See also this regarding GSL routines.

    http://www.mail-archive.com/help-gsl@gnu.org/msg00603.html

    String libraries redux

    Well, the string library stuff is coming up again.  For my C++ code, I'm interested in what can be done better than std::string.  E.g. is CBstring better?  There are some comparisons by the authors:
    As far as it goes, Matthew Wilson's code looks interesting too:

    Monday, March 08, 2010

    Monte Carlo codes

    Monte Carlo codes: MCNPX, DPM, PENELOPE, etc

    GEANT4
    Here is the site for MCNPX
    Not sure where I can download DPM. Here is an old version
    Penelope. It is hard to find as well. But eventually I found it.
    VMC++. Apparently it is proprietary

    Sunday, March 07, 2010

    Smart pointers

    Plastimatch would benefit from smart pointers (or GC).  There are a couple of places in the code where logic must swap around data between containers, and do bookkeeping because the containers own the data.

    Here are some implementations of smart pointers:
    It would seem that smart pointers require C++.  Using C is too cumbersome (though possible, see earlier post).

    I'm slightly concerned about the loss of performance in naive reference
    counted smart pointers.  See for example this description:

    http://c2.com/cgi/wiki?ReferenceCounting

    Saturday, March 06, 2010

    New crop of blogging sites

    Here is what scribefire 3.5 supports.  These are APIs, not sites.
    • Wordpress
    • Movable Type
    • Drupal
    • Textpattern
    • Roller
    • MetaWeblog API
    • Blogger
    • Tumblr
    My current dissatisfaction with blogger is that you can only edit the 25 most recent posts.  This makes it difficult to update/merge older entries.

    From the w.blogger site, here are a slightly dated list of blog sites.

    Sunday, February 14, 2010

    Radeon + debian 2.0

    Still having problems with my ATI Radeon HD 4350 on linux.  The card has a RV710 (according to lspci), which means it should be supported by the debian radeonhd package.

    I try to delete xserver-xorg-video-radeon (it is presumably unneeded).  But when I do that, X fails to start.

    Thursday, February 11, 2010

    PDF markup and review

    Here are the contenders:
    • flpsed
    • scribus
    • pdfedit
    • Xournal

    Saturday, January 23, 2010

    DKMS autoload fails for fglrx (ATI proprietary driver)

    This message flashes on the screen at boot time, after the latest debian kernel update.  Unfortunately it doesn't appear in the log anywhere.I suppose the solution is to patch the driver like the following link. 
    http://lkml.org/lkml/2009/10/12/255
    In more detail, go to directory
    /usr/src/fglrx-8.681
    Edit the file kcl_io.c, and add the following line
    #include .
    Then run the following:
    sudo dkms build -m fglrx -v 8.681

    Friday, January 22, 2010

    Xsession: Login for (user) is disabled

    After upgrading my kernel, I got the error message, and X would not allow me to run a session.
    Xsession: Login for (user) is disabled
    This is fixed by editing /etc/shells, and adding a line for the LDAP-specified shell (in my case, /bin/PHSshell).

    http://www.linuxquestions.org/questions/susenovell-60/xsession-login-for-someuser-is-disabled.-369654/

    Monday, December 28, 2009

    LDAP + Kerberos

    I get an error like this:
    gcs6@gelato:/etc> ldapwhoami
    SASL/GSSAPI authentication started
    ldap_sasl_interactive_bind_s: Local error (-2)

    Not yet completely fixed, but looks like you need to do both of the following:

    http://research.imb.uq.edu.au/~l.rathbone/ldap/gssapi.shtml
    http://www.linuxquestions.org/questions/linux-networking-3/kerberos-kinit-reply-did-not-match-expectations-445698/

    Wednesday, December 23, 2009

    Setting up a new subversion repository

    1. Edit /etc/httpd/conf.d
      Add section where "Location" is the name of the module
      Set "SVNPath" as appropriate
      Set "AuthUserFile" to name of a new file
    2. Create password file, such as /var/www/svnusers-name-of-project
      For each user, add password such as:
      sudo htpasswd -m svnusers-name-of-project new-user
      (Actually, maybe the -m is not desired?)
    3. Create the archive:
      cd /home/subversion/repos/
      sudo svnadmin create name-of-project
      sudo chown -R apache.apache name-of-project
    4. Restart apache
      (If you don't do this, you get the dreaded "200 OK" error)
      In Centos, do this:  sudo /sbin/service httpd restart

    Tuesday, December 22, 2009

    Some RT links

    I'm looking for the definitions of machine coordinate system IEC 61217.  This doesn't seem to be available in any of the web pages.  Here is the reference for the spec:

    International Electrotechnical Commission, IEC 61217: Radiotherapy Equipment—Coordinates, Movements and Scales ~International Electrotechnical Commission, Geneva, 1996.

    Best reference I could find is the AAPM task group report.

    http://www.aapm.org/pubs/reports/OR_01.pdf

    What is IEC 60601-2-11?

    Medical electrical equipment - Part 2-11: Particular requirements for
    the safety and essential performance of gamma beam therapy equipment

    Short but useful link.  Describes IEC 61217 patient coordinates...
    http://atc.wustl.edu/home/news/2004_dicom_workshop/WRB2004%20Image%20IODs%20v3.pdf

    Good tutorial for DicomRT
    http://www.sgsmp.ch/dicom/germond.pdf

    NA-MIC kit test-based programming hints

    Saturday, December 19, 2009

    Strain

    First, basic description here.  For the moment, we are interested in the term "epsion_ij", which is Cauchy's strain tensor.  There is a simplified version (see Wikipedia page), in which the cross terms are neglected.  Consider only this one.
    http://www.efunda.com/formulae/solid_mechanics/mat_mechanics/strain.cfm
    http://en.wikipedia.org/wiki/Infinitesimal_strain_theory
    http://en.wikipedia.org/wiki/Hooke%27s_law
    http://en.wikipedia.org/wiki/Lam%C3%A9_parameters
    Regularization based on strain is described here:
    ftp://ftp.math.ucla.edu/pub/camreport/cam08-27.pdf


    Sunday, December 13, 2009

    libtool hangs

    I got this problem when building streamripper.  I guess it is because of the old configure script in libmad.  The workaround is to add the following line to the libtool script (after it is generated), after the line ECHO="echo":
    echo="echo"
    Here is the original poster who found the workaround:
    http://lists.opensuse.org/opensuse-bugs/2009-01/msg02935.html
    Still need to find a real fix for this.


    Saturday, December 05, 2009

    _CRTDBG_MAP_ALLOC

    Looks like the microsoft compiler has a tool for debugging memory leaks.
    http://msdn.microsoft.com/en-us/library/e5ewb1h3(VS.80).aspx

    Sunday, November 29, 2009

    Virtual box and debian

    Goal:  Virtualbox + solaris + X on debian.  There seem to be no "uber-newbie" tutorials out there.
    http://forums.virtualbox.org/viewtopic.php?f=7&t=5634
    This is not virtualbox related, but looks interesting:
    http://simh.trailing-edge.com/

    Friday, November 27, 2009

    Turning off autoplay for Debian

    When I pop in a CD on my debian box, it fires up Sound Juicer.  Yuck.  So, I removed Sound Juicer.  But now it fires up something else!  How to disable this puppy?  There are three possibilities discussed in various web pages:
    1. System -> Preferences -> Removable drives and media
    2. Applications -> System tools -> Configuration editor -> Apps -> Nautilus -> Preferences
    3. Desktop -> Gnome -> volume_manager
    It seems #2 is the correct option.  See also this site, for information how to do #2 by the command line.
    http://www.fedoraforum.org/forum/showthread.php?p=1266047

    Thursday, November 26, 2009

    Scheduling library

    This may be useful for streamripper
    http://freshmeat.net/projects/libscheduler

    Wednesday, November 18, 2009

    USB mounting on OpenSUSE

    This is an example of how to mount the usb stick on OpenSUSE.  Why doesn't it automount?  Even debian does.
    http://www.suseblog.com/quick-usb-stick-mounting-tip-for-suse-linux

    Sunday, November 15, 2009

    OpenCL segmentation faults on linux

    Ripping on linux

    I've been looking around for CD ripping solution for linux.  Look no further than "The Art of the Rip":

    https://thomas.apestaart.org/thomas/trac/wiki/DAD/Rip

    Name lookup with WINS on linux

    Go into the file nsswitch.conf located at /etc/nsswitch.conf. Find the Line "hosts: files dns". It's missing wins so make it like this "hosts: files dns wins". Then you can ping by NetBIOS name.

    http://www.linuxquestions.org/questions/susenovell-60/enabling-wins-lookup-463012/

    You need to install /lib/libnss_wins.so, which is in the winbind package.

    What does [NOTFOUND=return] in nsswitch.conf mean? Briefly, [NOTFOUND=return] means that the name service whose entry it follows should be considered authoritative (so that if it's up and it says such a name doesn't exist, believe it and return instead of continuing to hunt for an answer).

    http://www.unixguide.net/sun/faq/4.03.shtml

    Apparently this change requires a reboot (!) as well:

    http://docs.hp.com/en/5992-0715/ch06s01.html

    ScribeFire

    Welcome to the 21st century, Greg.  ScribeFire is a Firefox plugin for doing blogging, which is already much better than the web interface.

    https://addons.mozilla.org/en-US/firefox/addon/1730

    It even lets me edit previous posts which I made using the web interface.

    By default, it adds tracking cookies to your web site.  Probably you want to turn these off:

    http://blog.coldtobi.de/1_coldtobis_blog/archive/242_scribefire_inserts_zemanta_web_bug.html