[Libguestfs] About Guest running Tiny Core Linux

Richard W.M. Jones rjones at redhat.com
Sun Mar 23 15:19:03 UTC 2014


On Sun, Mar 23, 2014 at 12:26:28PM +0000, Richard W.M. Jones wrote:
> Secondly, we should be able to inspect all Linux guests, including
> Tiny Core Linux, but it looks like in this case it is failing.  This
> is a bug.

I had a look at how the Tiny Core Linux ISO is arranged.  It loads the
main operating system root partition as a single large initramfs, with
optional modules loaded [somehow -- not sure of the exact mechanism]
as squashfs filesystems.  There's nothing wrong with that of course,
but it makes it challenging to have 'guestfish -i' open with the TCL
root filesystem, and thus programs like 'virt-cat', 'virt-ls' etc are
unlikely to work in the way you expect.  There's probably not much we
can do except have inspection simply identify that it is TCL.

I have filed a bug about this:

https://bugzilla.redhat.com/show_bug.cgi?id=1079734

Rich.

----------------------------------------------------------------------

Opening the ISO file:

$ guestfish --ro -a TinyCore-current.iso 

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> run
><fs> list-filesystems 
/dev/sda1: iso9660
><fs> mount /dev/sda1 /
><fs> ll /boot 
total 8720
dr-xr-xr-x 3 root root    2048 May 26  2013 .
dr-xr-xr-x 4 root root    2048 Jan 24 13:49 ..
-r--r--r-- 1 root root 5981138 Jan 24 13:49 core.gz
dr-xr-xr-x 2 root root    2048 May 26  2013 isolinux
-r--r--r-- 1 root root 2941168 Jan 24 13:49 vmlinuz
><fs> download /boot/core.gz /tmp/core.gz
><fs> ll /cde/optional 
total 4590
dr-xr-xr-x 2 root root   10240 Jan 24 13:49 .
dr-xr-xr-x 3 root root    2048 Jan 24 13:49 ..
-r--r--r-- 1 root root 1273856 Jan 24 13:49 Xlibs.tcz
-r--r--r-- 1 root root      44 Jan 24 13:49 Xlibs.tcz.md5.txt
[etc]
><fs> download /cde/optional/Xlibs.tcz /tmp/Xlibs.tcz
><fs> exit

The core initramfs:

$ zcat core.gz | cpio -it | grep etc/
17678 blocks
etc/hostname
etc/init.d
etc/init.d/tc-functions
etc/init.d/tc-restore.sh
etc/init.d/tc_noscan.lst
etc/init.d/dhcp.sh
etc/init.d/tc-config
etc/init.d/rc.shutdown
etc/init.d/settime.sh
etc/init.d/rcS
etc/init.d/services
etc/init.d/services/dhcp
etc/init.d/services/tftpd
etc/init.d/services/crond
etc/modprobe.conf
etc/passwd
etc/gshadow
[etc]

An optional module:

$ guestfish -a Xlibs.tcz 

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> run
><fs> list-filesystems 
/dev/sda: squashfs
><fs> mount /dev/sda /
><fs> ll /usr/bin/
total 137
drwxr-sr-x 2 root root   243 Aug 16  2013 .
drwxr-sr-x 6 root root    63 Dec 15  2011 ..
-rwxr-xr-x 1 root root   530 Jan 14  2011 desktop.sh
-rwxr-xr-x 1 root root   873 Jan 14  2011 getRGB
-rwxr-xr-x 1 root root 14000 Mar  8  2010 hsetroot
-rwxr-xr-x 1 root root  7156 May 20  2010 mcookie
-rwxr-xr-x 1 root root   649 Feb  8  2012 setupdesktop
-rwxr-xr-x 1 root root  4052 Mar  4  2010 showrgb
-rwxr-xr-x 1 root root  1234 Dec 22  2011 startx
-rwxr-xr-x 1 root root  1932 Jun  9  2009 waitforX
-rwxr-xr-x 1 root root 29672 Apr 18  2009 xauth
-rwxr-xr-x 1 root root  7196 Apr 18  2009 xkill
-rwxr-xr-x 1 root root 14376 Apr 18  2009 xlsfonts
-rwxr-xr-x 1 root root 21852 Apr 18  2009 xmodmap
-rwxr-xr-x 1 root root 29800 Apr 18  2009 xset
lrwxrwxrwx 1 root root     9 Nov  7 16:13 xsetup -> xsetup.sh
-rwxr-xr-x 1 root root  2820 Jan 14  2011 xsetup.sh



-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list