… images as well as disk and initramdisk images?

Peek ISO images

Using guestfish(1) this is an easy task. On a Debian system guestfish is packed in the libguestfs-tools:

~# guestfish -a cdrom.iso
><fs> list-filesystems 
/dev/sda1: iso9660
><fs> mkmountpoint /cd
><fs> mount /dev/sda1  /cd
><fs> mkmountpoint /squash
><fs> mount-loop /cd/LiveOS/squashfs.img /squash/
><fs> mkmountpoint /ext3
><fs> mount-loop /squash/LiveOS/ext3fs.img /ext3/
><fs> ls /ext3/ 
bin 
boot 
dev 
etc 
home 
initrd.img
[...]

Maybe we wanted to extract some file:

><fs> copy-out /ext3/initrd.img .

And guestfish is even scriptable and thusly eases your workflow when routinely handling image files.

BTW, wanna know what’s inside this particular iniramdisk /ext3/initrd.img?

Poke initramdisk

with tools from initramfs-tools:

~# lsinitramfs initrd.img
. 
kernel 
kernel/x86 
kernel/x86/microcode
[...]

Now you know, you desperately need the content of this initramdisk. Easy:

~# unmkinitramfs initrd.img ~/initrd/

Check.