Skip to content

Instantly share code, notes, and snippets.

@hgomez
Created May 8, 2013 16:51
Show Gist options
  • Select an option

  • Save hgomez/5541819 to your computer and use it in GitHub Desktop.

Select an option

Save hgomez/5541819 to your computer and use it in GitHub Desktop.
cant mount QEMU file
> qemu-img create -f raw hda.img 2G
> qemu-system-arm -m 256 -M versatilepb -kernel vmlinuz-3.2.0-4-versatile -initrd initrd.gz -hda hda.img -append “root=/dev/ram”
> qemu-img info hda.img
image: hda.img
file format: raw
virtual size: 2.0G (2147483648 bytes)
disk size: 1.3G
> mkdir mount
> sudo mount -o loop,offset=32256 hda.img mount
mount: you must specify the filesystem type
@hgomez
Copy link
Copy Markdown
Author

hgomez commented May 8, 2013

Fix using @skherzi suggestion

sudo losetup /dev/loop0 hda.img 
sudo kpartx -a /dev/loop0
sudo mount /dev/mapper/loop0p1 mount

losetup usage for QEMU found here also :

http://alexeytorkhov.blogspot.fr/2009/09/mounting-raw-and-qcow2-vm-disk-images.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment