On Tue, Jan 15, 2008 at 07:22:53PM +0100, Laurent Vivier wrote: > As it should be useful to be able to mount partition from a > disk image, (and as I need a break in my bug hunting) I've > modified the loop driver to mount raw disk image. > > To not break original loop device, as we have to change minor > numbers to manage partitions, a new parameter is added to the module:
I don't see the point in modifying the loop device driver when you can already access the partitions with existing device mapper functionality & tools. # losetup -f /var/lib/xen/images/fc6pvi386.img # kpartx -l /dev/loop0 loop0p1 : 0 208782 /dev/loop0 63 loop0p2 : 0 10265535 /dev/loop0 208845 # kpartx -a /dev/loop0 # ls /dev/mapper/loop0p* /dev/mapper/loop0p1 /dev/mapper/loop0p2 # mount /dev/mapper/loop0p1 /mnt/ # ls /mnt/ config-2.6.18-20.el5xen lost+found vmlinuz-2.6.18-20.el5xen grub symvers-2.6.18-20.el5xen.gz xen.gz-2.6.18-20.el5 initrd-2.6.18-20.el5xen.img System.map-2.6.18-20.el5xen xen-syms-2.6.18-20.el5 Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel