Jan Kundrát wrote:
Troy Dawson wrote:
Unless there is something critical that most people use, we usually let RedHat deal with it and push out the fix. Since they say they have already fixed it, and it will come out in the next release, expect the fix in SL 5.3.

OK; considering that nobody complained so far and that I'm happy with my fix, this sounds reasonable.

Just out of curiosity, what are you really doing with this? When you say you are "extrating partitions", that doesn't mean anything to me. I can mount my virtual partitions using lomount, and get files off them. Or I can repartition the disk in my virtual machine. I've read the man page and the information about kpartx, but I guess I just don't know when I would use this. What specific thing do you use this for?

A disk image created by virt-install contains the image of a whole disk (like /dev/sda), not just a partition with the filesystem (like /dev/sda1) -- there are some other data like partition table and optionally more partitions.

While you *might* get access to the first partition using simple `mount -o loop /path/to/image /target`, there were some cases where that failed for me, IIRC.


I wasn't able to do that with mount, but I was with lomount (it's in the xen 
rpm)
First I ran fdisk on the file
  fdisk -l /path/disk.img
Then I used lomount to mount the partition I wanted
  lomount -t ext3 -diskimage /path/disk.img -partition 1 /mnt/tmp/

And then I was able to get the file off that I needed.
Oh, but don't do this on a running virtual machine, I don't know what it would do, but I believe it would be bad.

Using kpartx, one can setup a special block devices which give access to just the "partitions" from the disk image. One can consider this kpartx to an alternative to what kernel normally does when it creates /dev/sda{1,2,3} from /dev/sda.

Cheers,
-jkt

Thanks for letting me know what you do with kpartx. I hadn't heard of it until I saw your e-mail.
Troy

--
__________________________________________________
Troy Dawson  [EMAIL PROTECTED]  (630)840-6468
Fermilab  ComputingDivision/LCSI/CSI DSS Group
__________________________________________________

Reply via email to