Editing Guestfish

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<code>guestfish</code> - the guest filesystem shell included in <code>[[libguestfs-tools]]</code> package in [[Ubuntu]]/Debian.
+
guestfish - the guest filesystem shell included in <code>[[libguestfs-tools]]</code> package in [[Ubuntu]]/Debian.
 
* https://libguestfs.org/guestfish.1.html
 
* https://libguestfs.org/guestfish.1.html
 
Commands:
 
[[list-devices]]
 
[[list-partitions]]
 
[[lvs]]
 
[[pvs]]
 
[[vfs-type]]
 
[[file]]
 
ls, ll, cat, more, download and tar-out
 
 
  
  
 
  [[resize2fs-size]] /dev/sda145 16G https://www.ullright.org/ullWiki/show/libguestfs-tools-virtual-machine-image-tools
 
  [[resize2fs-size]] /dev/sda145 16G https://www.ullright.org/ullWiki/show/libguestfs-tools-virtual-machine-image-tools
  
guestfish -a IMAGE.QCOW2
 
 
guestfish -a IMAGE.QCOW2 -i
 
  
 
  guestfish -a IMAGE.QCOW2
 
  guestfish -a IMAGE.QCOW2
 
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>
 
 
><fs> run
 
libguestfs: error: launch: this function can only be called in the config state
 
><fs>
 
 
><fs> list-filesystems
 
/dev/sda1: ext4
 
 
><fs> [[e2fsck]] /dev/sda1
 
libguestfs: error: e2fsck: e2fsck 1.45.5 (07-Jan-2020)
 
e2fsck: need terminal for interactive repairs
 
 
><fs>  e2fsck /dev/sda2
 
libguestfs: error: e2fsck: e2fsck 1.45.5 (07-Jan-2020)
 
/dev/sda2 is mounted.
 
e2fsck: Cannot continue, aborting.
 
 
 
guestfish -a IMAGE.qcow2  -i
 
guestfish: no operating system was found on this disk
 
 
If using guestfish ‘-i’ option, remove this option and instead
 
use the commands ‘run’ followed by ‘list-filesystems’.
 
You can then mount filesystems you want by hand using the
 
‘mount’ or ‘mount-ro’ command.
 
 
If using guestmount ‘-i’, remove this option and choose the
 
filesystem(s) you want to see by manually adding ‘-m’ option(s).
 
Use ‘[[virt-filesystems]]’ to see what filesystems are available.
 
 
If using other virt tools, this disk image won’t work
 
with these tools.  Use the guestfish equivalent commands
 
(see the virt tool manual page).
 
 
  
 
== Related terms ==
 
== Related terms ==
 
* <code>[[guestmount]]</code>
 
* <code>[[guestmount]]</code>
* <code>[[qemu-nbd]]</code>
 
  
 
== See also ==
 
== See also ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page:

Advertising: