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><fs> add-drive /dev/shm/olaf/vdisk-sles11sp2_full_fate310510-disk0 ><fs> launch100% ??? 00:00><fs> sh "cd / ; chroot / ; /bin/pwd"libguestfs: error: sh: do_command: you must call 'mount' first to mount the root filesystem><fs> mount /dev/sda2 /libguestfs: error: mount: call launch before using this function\n(in guestfish, don't forget to use the 'run' command)><fs> launchlibguestfs: 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
Richard W.M. Jones
2013-Aug-22 18:33 UTC
Re: [Libguestfs] missing mount cmd confuses guestfish
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
Maybe Matching Threads
- Re: missing mount cmd confuses guestfish
- Re: missing mount cmd confuses guestfish
- [PATCH] Fix parsing of boot flag in do_part_get_bootable()
- [PATCH] daemon: always provide stdin when running chroot commands (RHBZ#1280029)
- [PATCH] daemon: improve internal commandrvf