+
+Greater use of blkid / libblkid
+-------------------------------
+
+guestfs_zero should use wipefs. See wipefs(8).
+
+There are various useful functions in libblkid for listing partitions,
+devices etc which we are essentially duplicating in the daemon. It
+would make more sense to just use libblkid for this.
+
+There are some places where we call out to the 'blkid' program. This
+might be replaced by direct use of the library (if this is easier).
+
+Visualization
+-------------
+
+Eric Sandeen pointed out the blktrace tool which is a better way of
+capturing traces than using patched qemu (see
+contrib/visualize-alignment). We would still use the same
+visualization tools in conjunction with blktrace traces.
+
+guestfish parsing
+-----------------
+
+At the moment guestfish uses an ad hoc parser which has many
+shortcomings. We should change to using a lex/yacc-based scanner and
+parser (there are better parsers out there, but yacc is sufficient and
+very widely available).
+
+The scanner must deal with the case of parsing a whole command string,
+eg. for a command that the user types in:
+
+ ><fs> add-drive-opts "/tmp/foo" readonly:true
+
+and also with parsing single words from the command line:
+
+ guestfish add-drive-opts /tmp/foo readonly:true
+
+Note the quotes are for scanning and don't indicate types.
+
+We should also allow variables and expressions as part of this new
+parsing code, eg:
+
+ set roots inspect-os
+ set product inspect-get-product-name %{roots[0]}
+
+% is better than $ because of shell escaping and confusion with shell
+variables.
+
+Can we combine this with ability to set and read environment
+variables? Currently guestfish uses many environment variables like
+$EDITOR without any corresponding ability to set them.
+
+ set EDITOR /usr/bin/emacs
+ echo $EDITOR # or %{EDITOR}
+ edit /etc/resolv.conf
+
+live CD inspection
+------------------
+
+ virt-inspector livecd.iso
+
+Could this be done through the core API and existing calls?
+
+There is a soft requirement for this in virt-manager, where it would
+be nice to be able to prepopulate the operating system hints based on
+what sort of ISO the user is trying to install from.
+
+Several sorts of CDs:
+
+ - live CD
+ - install-only CD
+ - network install CD
+ - supplemental CDs with additional packages but not bootable
+ on its own
+
+Some CDs are formatted as ISO9660 and larger ones as UDF (DVD format),
+but they all are unpartitioned.
+
+Bootable Linux CDs have an /isolinux directory.
+
+Bootable EFI CDs have an /EFI/BOOT directory.
+
+Fedora live CDs have /images/install.img which is a squashfs
+containing an ext4 root. We could consider mounting this and
+inspecting it separately, but it would be simple to get everything we
+need from other files in the CD directory.
+
+More recent Fedora install DVD has /.discinfo and /.treeinfo with some
+easy to parse information in it.
+
+Debian and Ubuntu CDs have a /.disk/info file which is the product
+string. There are other interesting files in /.disk. They also have
+a characteristic directory structure (eg. /dists, /pool/main) which
+looks like a Debian archive.
+
+Windows 2003 install CDs have some characteristic stamp files in the
+root directory, like: /win51 /win51ia /win51ia.sp2. The main
+installation files (CAB files) are in /i386 directory. The following
+files contain a lot of interesting information:
+
+ /i386/hivesft.inf
+ /i386/layout.inf
+ /i386/sis.inf
+ /i386/txtsetup.sif
+
+Windows 7 install CDs are quite different and pretty impenetrable.
+There are no obvious files to parse.
+
+More ntfs tools
+---------------
+
+ntfsprogs actually has a lot more useful tools than we currently
+use. Interesting ones are:
+
+ntfslabel: display or change filesystem label (we should unify all
+ set*label APIs into a single set_vfs_label which can deal with any
+ filesystem)
+
+ntfsclone: clone, image, restore, rescue NTFS
+
+ntfsinfo: print various information about NTFS volume and files
+
+ntfs streams: extract alternate streams from NTFS files
+
+Undelete files
+--------------
+
+Two useful tools:
+
+ - ext2undelete
+ - ntfsundelete
+
+More mkfs_opts options
+----------------------
+
+Useful options to offer:
+ - Set label.
+ - Set UUID.
+
+Use /proc/self/mountinfo
+------------------------
+
+This file contains lots of interesting information about
+what is mounted and where. eg:
+
+ 16 21 0:3 / /proc rw,relatime - proc /proc rw
+ 17 21 0:16 / /sys rw,relatime - sysfs /sys rw,seclabel
+ 18 23 0:5 / /dev rw,relatime - devtmpfs udev rw,seclabel,size=1906740k,nr_inodes=476685,mode=755
+ 26 21 253:3 / /home rw,relatime - ext4 /dev/mapper/vg-lv_home rw,seclabel,barrier=1,data=ordered
+
+This could be used instead of current hairy code to parse the output
+of the 'mount' command. We could add new APIs to return kernel mount
+options, type of filesystem at a mountpoint etc.