From: Brian D. <du...@ap...> - 2005-12-14 02:15:56
|
I have a general linux question that has troubled me for some time. After googling to no success, I thought I would put it to the openpsion mailing list. The problem is this: I have made an image of a compactflash disk to a file by: dd if=/dev/sda of=afilename Now /dev/sda, the compactflash disk, has been formatted to have a couple of partitions, /dev/sda1 and /dev/sda2. afilename is just a file that is the same size as the compactflash card. The question is how to mount the partitions within afilename so that I can get to them. Normally one does "dd if=/dev/sda1 of=foo", which can then be mounted as, e.g., "mount -o loop foo /mnt/disk". With a file of a raw, multipartioned disk, I am at a loss as to how to mount the partitions within the file. Interestingly, you can "fdisk afilename", and it will report back the partitions o.k. dd if=/dev/sda of=afilename is obviously the fastest way to back up the complete contents of a CF disk. But if I can't get to the partitions in the file... With an actual CF disk, /dev/sdb, say, of equal or larger size to the original /dev/sda, the contents of the original disk can be restored by "dd if=afilename of=/dev/sdb". But it would be nice to be able to mount the partitions within the file, without a physical CF card! Anybody have an answer? B.D. |