I would boot something like rescueOS (http://talk.maemo.org/showthread.php?t=75369) from an SD card and recreate the non-ubifs filesystems (I'm not really familiar with ubifs) then copy the original Maemo files to their right places (should also be stored on the SD card).