Extracting description from image?

Other questions, messages

Moderator: feffer

Post Reply
dagsverre

Extracting description from image?

Post by dagsverre » Mon May 24, 2004 1:20 pm

Is it very hard to get hold of the image description strings? I looked in the image files but it looks like the description is compressed (bad choice in my opinion, what is 200 chars compared to an entire image, and simply looking at the top of a file to get the description would be nice, it could be put right after the header?)... any easier way to get hold of it than manually hacking through the format? Any pointers to which source files I should look at? (Yeah I'm lazy, but please also consider this a feature request for the command-line frontend).

I'm creating a network-bootable GUI for novice-friendly lab maintenance (just a very simple shell script frontend to partimage), and would like to be able to browse using the image descriptions. Sure, I'll work around it, using the image descriptions would simply be the most obvious way.

// Dag Sverre

DW

Cheat

Post by DW » Tue May 25, 2004 10:11 pm

I created a similar sort of thing for my place of work, using dialog (ncurses).
I cheated, and did NOT use the description built into partimage, because it was too hard to get at.
Instead, when the end-user saved a partition, two files are saved.
1) the partimage file: filename.pi064.gz
and
2) some meta-data: filename.info
filename.info is just plain text, that contains a one line description of the computer/partition (as entered by the end-user when the file was saved) as well as a description of the processor ( grep name /proc/cpuinfo >> filename.info ) and the PCI devices ( grep Class /proc/pci >> filename.info)

I then use this data to display the list the filenames (as well as the description) in order of "best match" in terms of "same CPU?", "same/similar PCI devices?".

dagsverre

Thanks for the reply

Post by dagsverre » Wed May 26, 2004 9:05 am

I'm using dialog too, and LTSP. And the metadata approach is what I'm doing now. I'm only planning on partition size grouping of the images though, not by CPUs and PCI devices... but that was a great idea! I don't think I'll have that much use for it, but it's just fun to know somebody did that.

The problem is I would like to use the network capabilities included, for the security added over a simple NFS mount... but then I can only transfer the images to the server, not the metadata.

I think I'll now either just forget about security (not that important, only document-empty OS images anyway), or forget about the network capabilities included (*) and use for instance LUFS (http://lufs.sourceforge.net/) instead.

*) What are they doing there anyway? I feel the network capabilities are out of scope of a partition imaging program and consider it kind of bloat, it should have been a seperate project. Yes, it makes it really easy for the people needing that particular feature, but that case can be made in many other cases where people still decide for seperation. Then again, I'm one of those who would really like to see the partimage engine as a seperate command line utility, and have the interface just built on top of that, like the custom is in Unix. (Just some friendly criticism ... it IS a great project, and I'm very grateful for the job done - and if I really wanted this restructuring done I'd fork and do it myself, eh?).

DW

Post by DW » Thu May 27, 2004 9:53 pm

I would have to agree.
You may have noticed that the client/server model has been dropped in version 0.7.x.
I suspect that "fdupoux" and "ladurelf" have come from a Microsoft programming environment. Partimage does a few things contrary to the behaviour I have come to expect from a UNIX programme. (Such as not: being able to send the image file to stdout , and having compression built in, rather than piping the output through a compression programme ) .
Interesting to note: Despite partimage falling outside of the UNIX norms, it is no less of a programme. It is a wonderful collection of 1’s and 0’s that has saved me (and my co-workers) many hours of work.

A command line version of partimge? GNU parted is not that far from it.

igorvc
Posts: 4
Joined: Tue Sep 11, 2007 12:44 pm
Location: Brazil
Contact:

Post by igorvc » Tue Sep 11, 2007 12:53 pm

DW wrote: A command line version of partimge? GNU parted is not that far from it.
Please, see: http://www.partimage.org/forums/viewtop ... =1741#1741

That`s it ...

Post Reply