Tom Gundersen
d1d3768d9d
image-info: include more properties
...
This gets us closer to returning all the properties we support as
customizations.
Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-11-26 13:48:09 +01:00
Tom Gundersen
eee08c41ac
image-info: support images with empty partitions
...
Official RHEL EC2 images come with an empty partition, simply ignore
it rather than fail.
Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-11-24 17:43:00 +01:00
Tom Gundersen
18934d4249
tools/image-info: add support for naked partitions
...
In case there is no partition table, we assume the whole image is
one big partition and treat is as such.
Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-10-25 11:46:25 +02:00
Lars Karlitski
2854b2938e
image-info: don't use rpm --verify with --root
...
RPM uses the host's passwd instead of that in the target to get uid
and gid mappings.
Run it in a chroot to work around this bug.
2019-10-05 14:47:35 +02:00
Lars Karlitski
5040e6b427
image-info: sort bootmenu entries
...
The order doesn't matter, but should be the same between different runs
of image-info.
2019-10-04 01:51:07 +02:00
Tom Gundersen
41c6f5dd0b
image-info: include partition table id
...
Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-10-03 12:35:51 +02:00
Lars Karlitski
b170ea036c
image-info: include output from rpm --verify
...
This shows the changes an image has relative to what its rpm database
thinks is installed. Output is:
"rpm-verify": {
"missing": [ <missing files> ],
"changed": { <map from filename to rpm attribute octet > }
}
Alas, this makes running image-info slower.
2019-10-01 17:05:10 +02:00
Lars Karlitski
01b7402ce2
image-info: include partition label and uuid
2019-09-30 22:28:28 +02:00
Lars Karlitski
9867846ff4
tools/image-info: consistent use of - over _
...
And remove a stray comment and whitespace.
2019-09-30 22:28:28 +02:00
Tom Gundersen
e43955a4c5
image-info: include the image format
...
Use qemu-img to query the image format and include that in the report.
Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-09-30 15:15:14 +02:00
Lars Karlitski
bf3d7fcdca
image-info: add basic support for multiple partitions
...
For each partition, find out if its the root or boot partition and
gather only the relevant information. Make sure that we don't get
information from /boot twice.
2019-09-30 13:32:53 +02:00
Lars Karlitski
172a23bdb2
image-info: bootloader=unknown instead of creashing
2019-09-30 13:32:53 +02:00
Lars Karlitski
457f5f697e
image-info: assume bootable=False if key is not present
...
sfdisk doesn't include the "bootable" key in its output when a partition
is not marked as bootable.
2019-09-30 13:32:53 +02:00
Lars Karlitski
5fbc734a15
tools: add image-info
...
Rough draft of image-info, a tool that extracts high-level information
about an os image. It prints this information in JSON form on stdout.
Run it like this:
$ tools/image-info <image>
It supports all images that qemu-ndb supports.
2019-09-29 13:44:56 +02:00