missing mount cmd confuses guestfish
<fs> add-drive /dev/shm/olaf/vdisk-sles11sp2_full_fate310510-disk0 <fs> launch 100% ⟦▒⟧ 00:00 <fs> sh "cd / ; chroot / ; /bin/pwd"
<fs> mount /dev/sda2 /
<fs> launch
I think calling "sh" before "mount" should not confuse guestfish like that: # guestfish (1.20.4 on sles11sp3) Welcome to guestfish, the libguestfs filesystem interactive shell for editing virtual machine filesystems. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell libguestfs: error: sh: do_command: you must call 'mount' first to mount the root filesystem libguestfs: error: mount: call launch before using this function\n(in guestfish, don't forget to use the 'run' command) libguestfs: error: you must call guestfs_add_drive before guestfs_launch
<fs>
Olaf
On Sun, Aug 18, Olaf Hering wrote:
I think calling "sh" before "mount" should not confuse guestfish like that:
# guestfish (1.20.4 on sles11sp3)
Doing the same, by accident, with 1.22.5 causes a crash: # guestfish -r -v --network
<fs> add-drive /work/kvm/images/opensuse12.3/disk0.raw <fs> launch
<fs> sh "ip a" guestfsd: main_loop: new request, len 0x30 guestfsd: error: do_command: you must call 'mount' first to mount the root filesystem *** glibc detected *** guestfsd: free(): invalid pointer: 0x00007fffd8425ba0 *** libguestfs: error: sh: do_command: you must call 'mount' first to mount the root filesystem <fs> mount /de======= Backtrace: ========= /lib64/libc.so.6(+0x733b6)[0x7f4994ae83b6] /lib64/libc.so.6(cfree+0x6c)[0x7f4994aed2dc] guestfsd[0x409e6f] guestfsd[0x40a01b] guestfsd[0x43e9a1] guestfsd[0x422bd7] guestfsd[0x41606c] /lib64/libc.so.6(__libc_start_main+0xfd)[0x7f4994a93bfd] uestfsd[0x405189]
... Olaf
On Thu, Aug 22, 2013 at 02:40:27PM +0200, Olaf Hering wrote:
On Sun, Aug 18, Olaf Hering wrote:
I think calling "sh" before "mount" should not confuse guestfish like that:
# guestfish (1.20.4 on sles11sp3)
Doing the same, by accident, with 1.22.5 causes a crash:
# guestfish -r -v --network
<fs> add-drive /work/kvm/images/opensuse12.3/disk0.raw <fs> launch
<fs> sh "ip a" guestfsd: main_loop: new request, len 0x30 guestfsd: error: do_command: you must call 'mount' first to mount the root filesystem *** glibc detected *** guestfsd: free(): invalid pointer: 0x00007fffd8425ba0 *** libguestfs: error: sh: do_command: you must call 'mount' first to mount the root filesystem <fs> mount /de======= Backtrace: ========= /lib64/libc.so.6(+0x733b6)[0x7f4994ae83b6] /lib64/libc.so.6(cfree+0x6c)[0x7f4994aed2dc] guestfsd[0x409e6f] guestfsd[0x40a01b] guestfsd[0x43e9a1] guestfsd[0x422bd7] guestfsd[0x41606c] /lib64/libc.so.6(__libc_start_main+0xfd)[0x7f4994a93bfd] uestfsd[0x405189]
Yup, that's a bug :-( https://bugzilla.redhat.com/show_bug.cgi?id=1000121 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
On Thu, Aug 22, 2013 at 07:33:09PM +0100, Richard W.M. Jones wrote:
On Thu, Aug 22, 2013 at 02:40:27PM +0200, Olaf Hering wrote:
On Sun, Aug 18, Olaf Hering wrote:
I think calling "sh" before "mount" should not confuse guestfish like that:
# guestfish (1.20.4 on sles11sp3)
Doing the same, by accident, with 1.22.5 causes a crash:
# guestfish -r -v --network
<fs> add-drive /work/kvm/images/opensuse12.3/disk0.raw <fs> launch
<fs> sh "ip a" guestfsd: main_loop: new request, len 0x30 guestfsd: error: do_command: you must call 'mount' first to mount the root filesystem *** glibc detected *** guestfsd: free(): invalid pointer: 0x00007fffd8425ba0 *** libguestfs: error: sh: do_command: you must call 'mount' first to mount the root filesystem <fs> mount /de======= Backtrace: ========= /lib64/libc.so.6(+0x733b6)[0x7f4994ae83b6] /lib64/libc.so.6(cfree+0x6c)[0x7f4994aed2dc] guestfsd[0x409e6f] guestfsd[0x40a01b] guestfsd[0x43e9a1] guestfsd[0x422bd7] guestfsd[0x41606c] /lib64/libc.so.6(__libc_start_main+0xfd)[0x7f4994a93bfd] uestfsd[0x405189]
Yup, that's a bug :-(
Seems to just be a missing initializer: https://github.com/libguestfs/libguestfs/commit/fc2947b1125aa34b5f04efd2d39c... I'll look for similar cases. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
participants (2)
-
Olaf Hering -
Richard W.M. Jones