Skip to content

Archive for

29
Jul

How to extract storage device information (Parte 2 – using lshw and xmlstarlet)

In Ubuntu 10.04, udevinfo is no longer available and I need to write a LiveCD tool to retrieve storage information (such as vendor, size, filesystem, label) from existing partitions (e.g /dev/sda1). So I cannot use the command lines anymore mentioned in my previous blog.

After a day of researching various tools and experiment parsing command line outputs. Eventually, I decide to use lshw to generate all the storage information and output into XML format. Then use xmlstarlet to extract specific device data. Read more »

Advertisements
19
Jul

Note on creating Ubuntu 10.04 (Lucid) LiveCD from scratch – missing initctl

It’s about time for me to update the LiveCD product, AppQoS Live! (based on Ubuntu 8.04 Hardy) and move on to Lucid 10.04 as more newer hardware having trouble to work with.

I was following the LiveCDCustomizationFromScratch documentation to experiment Ubuntu 10.04 LiveCD. Then I hit a problem when I booted off from the created LiveCD. The boot screen just hangs. Switching to one virtual console, the last few messages on the screen are:

Begin: Running /scripts/init-bottom/ ... 
Done.
init: ureadahead-other main process terminated with status 4
init: ureadahead-other main process terminated with status 4

Read more »

9
Jul

Example of using Python to logon & access Ajax (JSON) webpage in the background

We have an application written in PyGtk. Recently, we need to modify the application to access one of our AJAX/JSON webpages in the background. The beauty of AJAX/JSON webpages opens a channel for any applications to easily access the content. Especially for LAMP product, this avoids directly connecting to the database and using specific SQL queries. As long as the webpages are constructed in AJAX/JSON, then the Python cjson or json package can parse the returned JSON result into a dictionary object. Read more »