Comments on: Mount Raw Images https://pthree.org/2012/04/16/mount-raw-images/ Linux. GNU. Freedom. Tue, 31 Oct 2017 18:00:46 +0000 hourly 1 https://wordpress.org/?v=5.0-alpha-42127 By: Cool Kid https://pthree.org/2012/04/16/mount-raw-images/#comment-134682 Tue, 13 May 2014 22:06:07 +0000 http://pthree.org/?p=2351#comment-134682 No one on the internet has described this better. Thank you so much.

]]>
By: Vangelis https://pthree.org/2012/04/16/mount-raw-images/#comment-116528 Fri, 20 Apr 2012 16:36:26 +0000 http://pthree.org/?p=2351#comment-116528 sudo rmmod loop
sudo modprobe loop max_part=63 max_loop=8

Then if you mount your image with losetup /dev/loop0 my-image.img will have the partitions exposed in /dev/loop0p1 and /dev/loop0p2
---
I always add a file with the options under /etc/modprobe.d/loop.conf so that the extra options are loaded automatically upon boot:

sudo echo "options loop max_part=63 max_loop=8" > /etc/modprobe.d/loop.conf

]]>
By: sileht https://pthree.org/2012/04/16/mount-raw-images/#comment-116524 Tue, 17 Apr 2012 17:06:17 +0000 http://pthree.org/?p=2351#comment-116524 You can do that using Qemu/nbd-client:
qemu-nbd -n virt01.img -P2
nbd-client localhost 10809 /dev/nbd0
mount /dev/nbd0 /mnt

]]>
By: glandium https://pthree.org/2012/04/16/mount-raw-images/#comment-116523 Mon, 16 Apr 2012 21:23:19 +0000 http://pthree.org/?p=2351#comment-116523 libguestfs's guestmount might come handy, too.

]]>
By: textshell https://pthree.org/2012/04/16/mount-raw-images/#comment-116522 Mon, 16 Apr 2012 21:14:10 +0000 http://pthree.org/?p=2351#comment-116522 using the small tool kpartx (not KDE or X11) does automate that quite a bit with using the device mapper.

]]>