&ot Journeys' End

Journeys' End

We walk many paths, many roads
Till death halts our steps.
Every day a new adventure,
A new journey of self discovery.

20080724

grub, xfs, debian

Running grub-install with a XFS partition will likely fail - there is a reason lilo is used when XFS is root! The issue is grub-install creates the stage files in /boot/grub, which grub then expects to find when it accesses the disk directly using its own file system drivers. For most file systems sync is sufficient to force this to be true, but not with XFS - unless grubs's XFS drivers replays the journal, grub won't find the files. The detailed why of this is covered in this thread. To get around this, one needs to effectively replace sync with mount -r -o remount /; mount -w -o remount /. A quick a nasty way to get grub going with XFS partition is as follows:

  • init 1 # need single user mode to be able to remount root
  • cp /usr/sbin/grub-install /tmp # make a copy of grub-install to butcher
  • vim /tmp/grub-install
  • # now butcher grub-install as follows:
  • # 1. find the line that says "Sync to prevent GRUB from not finding stage files
  • # 2. deleted everything after sync
  • # 3. add exit 0 after sync for good measures
  • /tmp/grub-install # invoke our amputated grub-install to just produce the stage files
  • mount -r -o remount / # flush everything by mount as read only
  • mount -w -o remount / # remount since grub needs it to be rw
  • grub # invoke the grub shell
  • root (hdx,y) # manually specify the disk x partition y where /boot/grub/* is located
  • setup (hdx) # install grub into the disk x's MBR. DO NOT specify a partition number, XFS's sector 0 is NOT reserved for boot loaders!!
  • quit # exit grub
  • reboot # should work now

Cheers,
Steve

Labels: , , ,

20080716

unoffical libfg repository

I have set up an unofficial git respository for libfg patches and new swig generated python interface, as Gavin Baker (the author) appears to be busy with other things. This is a maintance only repository as far as libfg goes - I don't plan on adding any more features (since all the ones I need are there already). I will however work to produce a more pythonic interface to libfg, as the swig generated interface is a straight port of C api into Python.

Currently the repository contains the following fixes and enhancements:

  • RGB565 and RGB555 patch by Adalbert Prokop
  • fg_new_compatible_frame patch by echoline
  • mmap fix by me
  • swig generated Python interface by me

If you have a patch against libfg, please post it at the libfg project's page first, and then to me if Gavin does not respond. I do not intend to take over development of libfg, and it is my hope Gavin will in the future make this obselete/redundant.

Cheers,
Steve

Labels: , , , , , ,

20080328

eeepc, likes and dislikes

Likes:

  • nice and small
  • all the hardware works, including sleep/suspend
  • runs debian based OS by default
  • can run an external monitor at decent resolution

Dislikes:

  • uses fastinit which only boots into single user mode, so user "user" is always logged in. Endless frustration playing with X11 startup in vain to get a multiuser login screen
  • when kmixer shows a speaker with a cross on top, it means built in speakers will be used. When it is a speaker with no cross on top, it means headphone jack will be used. Talk about counter-intuitive.
  • keyboard truly sucks

Cheers,
Steve

Labels: , , , ,

20080107

Finally, PIC under Linux made Easy

I have been looking for software to work with my PIC-PG2 programmer under Linux for a while now. Previously I have been using windows and PICPROG which while nice, still involved messing with windows and stuff. The situation back then (around 2006) was bleak - there were no up to-date and actively maintained Linux software for PIC developers. Now there is.

PikLab is a fantastic piece of work which does for Linux what MPLAB does for Windows. Big thanks to Nicolas Hadacek and Alain Gibaud and all contributors for producing a much needed piece of software.


Cheers,
Steve

Labels: , ,

20040714

Downloads

Here is a summary of some stuff I wrote for one reason or another. Source is provided where I am not overly embrassed by the code :) Please submit bug reports etc by commenting on this entry :)
  • html2pml Converts simple html to pml Features
    • Works where python is available
    • Works pretty well :-)
    • Preserves bold and italic
    Download
  • lagrange polynomial solver Attempts to fit a lagrange polynomial through the give data points using the matrix solver library, which has also been updated to be cleaner and better. Features
    • Small
    • Works :D
    • Portable to almost everything under the Sun
    • Outputs in a format that can be easily pasted into mathpad or matlab for plotting
    Download
  • ictor An OISC interpreter written in C as a base for obfuscation excercise. Features
    • Small
    • Fast
    • Portable to almost everything under the Sun
    Download
  • arp-deny A quick program I wrote to make life easier when I need to do MAC based filtering on my wireless netbsd 1.6.2 router. It simply prints to stdout IP/MAC mapping in a format suitable for use with arp -f taking in to account allowed hosts etc. This was used in my efforts to create a wireless router using netbsd. Features
    • Command line based
    • Easily scriptable
    • Works!
    Download
  • reverse-vw Another basty hack I wrote one late night/early morning after ruxcon. Reverses austnet's vw about generation of possible hostnames from a given format string, then creates the vw string using austnet's hash function. When collisions are detected, the generated hostname is looked up via dns to make sure its not a false positive. It must be noted false positives are possible, even if the hostname resolves. Only works in *nix! You will need to modify source to compile under windows. Features
    • Command line based
    • Flexible format string
    • up to 8 numerical replacements
    • DNS lookup to reduce false positives
    Download
  • myroom[2] My first 2 game, simple break-out-of-room style puzzle. Features
    • Makes you hate me
    • Opengl accelerated
    • In game console
    • GlUT library for portability
    Download
  • mp3Organiser A Visual Basic program for oganising your (massive) mp3 collection :) Features
    • Sorts files into directories based on specified fields of ID3v1/2 tag
      • Sorts incrementally by artist/song/genre/album/etc, in any order
    • File renamer to rename songs based on ID3v1 tag information
      • File renamer supports format strings to create your own combination
    • ID3Tag removal utility to remove ID3Tags
      • Can be applied to entire directories
    • ID3Tag Editor with single and multiple file support
      • Can add id3v1 tags to files that doesn't have them
    • Very cool busy animation :)
    • Extensive online documentation included
    Download
  • n30n A visualisation I wrote for a friend's band. Started off as a particle engine, then had motion blurr, scripting, and sound recording added to it. Can you say feature creep? :P Features
    • Opengl accelerated
    • Scripting support
    • Motion blurr
    • Induces motion sickness in some ;)
    Download
  • matrix solver Update 7/5/2005 - solves for parametric matrices. Update 4/5/2005 - proper detection of the nature of solutions, code clean up, as well as fixing the infinite loop that occurs for certain matrices. A simple program I wrote after learning about matrixes. It performs Guassian elimination on a given matrix, then uses what I considered a very elegant loop to perform back subtitution to solve the system of equations where a solution exists. Features
    • Command line based
    • Detects unique, parametric solutions, as well as no solutions
    • Prints unique and parametric solutions
    • Works! :)
    • Will print out working
    • Small
    Download
  • img2text A basty hack I wrote one late night/early morning after seeing a image represented by letters of different colors in html. It could use more work, using an index system with CSS for example to drastically reduce the size of the produced HTML. W3C compliant html would be nice too :) Only works with tga images! Features
    • Command line based
    • (Auto)scaling
    Download

Labels: , ,