Skip to content

XceptN’s Tech Stuff

All About Tech

Is there a way to somehow mount a (shutdown) Xen disk image and browse files?

Posted on September 15, 2008 By XceptN No Comments on Is there a way to somehow mount a (shutdown) Xen disk image and browse files?

Yes .. Many .. One is
# losetup /dev/loop0 System.img
# kpartx -a /dev/loop0
# ls -l /dev/mapper/loop0*
brw-rw—- 1 root disk 253, 0 Jul 14 18:53 /dev/mapper/loop0p1
brw-rw—- 1 root disk 253, 1 Jul 14 18:53 /dev/mapper/loop0p2
# mount /dev/mapper/loop0p2 /mnt

Another is

# fdisk -l -u System.img
…
Device Boot Start End Blocks Id System
System.img1 * 63 208844 104391 83 Linux
System.img2 208845 8385929 4088542+ 83 Linux
# echo 208845\*512 | bc
106928640
# mount -o loop,offset=106928640 System.img /mnt

But those will not work for partitions which are LVM .. like:
# fdisk -l -u System.img
Disk System.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
System.img1 * 63 208844 104391 83 Linux
System.img2 208845 8385929 4088542+ 8e Linux LVM

mount fails with:
mount: you must specify the filesystem type
or
ioctl: LOOP_SET_STATUS: Invalid argument
(if you use an offset mount)

I am pretty sure that there is a way to mount the logical volumes under that LVM
from dom0 .. Need to investigate..

BTW
this is not supposed to work also if the filesystem is encrypted.. That
requires encryption arguments to be passed along too.. That is rreally
advised for the sake of security.

storage, xen

Post navigation

Previous Post: Xen Kernel Hangs booting Dom0 at Relinquishing VGA console
Next Post: Mounting an LVM Logical Volume in an Oracle VM Disk Image

Related Posts

How to Use “tcpdump” to Log OCFS2 Interconnect (o2net)? linux
udev: what, why, how? linux
HP QLogic Drivers development
First Step to Become a Xen Guru virtualization
A basic LVM Setup linux
backup the mbr linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Dipping Toes into Nix Package Manager | Installing Freeplane
  • Fujitsu Workplace Protect Face Recognition Best Practices on Q704
  • Fujitsu STYLISTIC Q704 Fingerprint Scanner Problems
  • Two Generations of Computing Equipment…
  • IBM Model M Keyboard Goes Blank

Recent Comments

  1. r0cky on Fujitsu LIFEBOOK UH572 Ultrabook Touch Pad Review: Linux
  2. XceptN on Fujitsu LIFEBOOK UH572 Ultrabook Touch Pad Review: Linux
  3. r0cky on Fujitsu LIFEBOOK UH572 Ultrabook Touch Pad Review: Linux
  4. Kaylee on Mounting an LVM Logical Volume in an Oracle VM Disk Image
  5. Theron Conrey on Open Source Virtualization for Smaller Carbon Footprint

Archives

  • June 2024
  • November 2014
  • October 2014
  • April 2014
  • March 2014
  • December 2012
  • November 2012
  • October 2010
  • April 2010
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008

Categories

  • blogging
  • communication
  • desktop
  • development
  • firmware
  • Fujitsu
  • gprs
  • gps
  • hardware
  • internet
  • java
  • kernel
  • keyboard
  • linux
  • masteryourbiz
  • mms
  • mobile
  • multimedia
  • network
  • OracleVM
  • palm
  • python
  • rokr e6
  • social media networking
  • storage
  • sysadm
  • tablet
  • twitter
  • virtualization
  • wap
  • windows
  • wordpress
  • xen

Copyright © 2025 XceptN’s Tech Stuff.

Powered by PressBook Masonry Dark