LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Accessing .dd file extension (http://www.linuxquestions.org/questions/linux-newbie-8/accessing-dd-file-extension-792556/)

jdnow09 03-02-2010 05:01 AM

Accessing .dd file extension
 
Hello,

I am trying to access a .dd file extension. Do I have to mount it?


VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd

# fdisk -ul VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd

Blocks Id System
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd1 8192 1535999 763904 5 Extended
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd4 * 32 8191 4080 4 FAT16 <32M
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd5 8224 106495 49136 6 FAT16
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd6 106528 204799 49136 6 FAT16
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd7 204832 430079 112624 fc Unknown
VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd8 430112 1535999 552944 6 FAT16

Partition table entries are not in disk order
[root@cent1 installer]#

I am trying to grab some files off this file to create a PXE vmware boot.



john

adiehl 03-02-2010 06:05 AM

As there are several partitions in the file, you have to mount a specific partition.
For this, you have to tell mount the exact position and size of the partition you want to mount. Your output tells you at which block a partition starts and when it ends. Blocks have the size 512.

E.g., if you want to mount the 5th partition which starts at 8224 and ends at 106495, so it starts at byte 8224*524=4210688 and ends at 106495*512=54525440, the size is 54525440-4210688=50314752. You can mount it like this:

Code:

mount -o loop,offset=4210688,sizelimit=50314752 VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd5 /mnt

jdnow09 03-02-2010 12:34 PM

Quote:

Originally Posted by adiehl (Post 3882257)
As there are several partitions in the file, you have to mount a specific partition.
For this, you have to tell mount the exact position and size of the partition you want to mount. Your output tells you at which block a partition starts and when it ends. Blocks have the size 512.

E.g., if you want to mount the 5th partition which starts at 8224 and ends at 106495, so it starts at byte 8224*524=4210688 and ends at 106495*512=54525440, the size is 54525440-4210688=50314752. You can mount it like this:

Code:

mount -o loop,offset=4210688,sizelimit=50314752 VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd5 /mnt

Thanks a lot for your response. I will give it a try tonight.

Edit:

mount -o loop,offset=4210688,sizelimit=50314752 VMware-VMvisor-big-3.5.0_Update_2-110271.i386.dd5 /mnt/usbdrive (it did not work for me, saying something about the incorrect directory).


I was able to get it to work with this:

Code:


mount -o loop VMware-VMvisor-big-3.5.0_Update_3-123629.i386.dd /mnt/usbdrive -o offset=4210688

Thanks again.

john


All times are GMT -5. The time now is 11:44 AM.