kicherer.org
  • Homepage
  • Gallery
  • Github

Select your language

  • English (UK)
  • Deutsch
  1. You are here:  
  2. Home
  3. Blog

Main menu

  • Homepage
  • Blog
    • List of blog entries
  • Projects
  • Gallery

Other

  • Miscellaneous
  • Imprint

Mounting a partition inside an image

Details
Published: 28 April 2012

Ever tried to mount a partition that is inside an image with multiple partitions? With kpartx of the multipath-tools package, it's really easy. It scans the image and creates a individual device file for every partition using the device mapper.

Example in case of a KVM image: http://blog.piotrj.org/2009/03/mounting-raw-kvmqemu-image.html

Image as hard disk for Virtualbox

Details
Published: 28 April 2012

First create a loop device for the image:

losetup -f /path/to/image

Then create a vmdk file for the resulting loop device:

VBoxManage internalcommands createrawvmdk -filename my_image.vmdk -rawdisk /dev/loop/0

This vmdk file can be used by Virtualbox as a hard disk.

Page 5 of 5

  • 1
  • 2
  • 3
  • 4
  • 5