![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| loopback in 4.1.4.0 AIX server | terron79 | AIX | 0 | 03-12-2007 01:10 PM |
| Loopback files on a FAT based Filesystem? | deckard | Filesystems, Disks and Memory | 1 | 01-25-2007 02:24 PM |
| Help With Reading Partitioned Tapes | dhaverstick | HP-UX | 2 | 05-23-2006 07:56 AM |
| Can I Use Loopback Devices with LVM? | deckard | Filesystems, Disks and Memory | 3 | 03-09-2005 03:27 AM |
| Loopback Interface...Vanished??? | silvaman | UNIX for Advanced & Expert Users | 1 | 09-21-2002 01:38 PM |
|
|
LinkBack | Thread Tools | Display Modes |
| Forum Sponsor | ||
|
|
|
||||
|
Partitioned Image
I actually want to mount a partition within the image. The image file that QEMU created is paritioned. 'fdisk' can recognize that it is partitioned, but it seems that mount can't if it's not a block device. I know the image file contains partitions because when I run QEMU it gives me /dev/hda1 /dev/hda2 and /dev/hda3 all from that one loopback file.
EDIT 08232007: SOLVED! It took almost two years to find an answer to this, and I'm certain the answer was around when I asked the question. But I'm posting this here to hopefully help anyone else in the future who has the same needs. The key to doing what I wanted to do, is to use the 'offset' option for mounting the loopback file. First use 'fdisk' to determine where your partitions within the loopback file start and what their internal names are. You also need to find out what the offset if going to be. To do that, run the following against the original drive: Code:
localhost ~ # fdisk -l /dev/sdd Disk /dev/sdd: 2013 MB, 2013265920 bytes 16 heads, 15 sectors/track, 16384 cylinders Units = cylinders of 240 * 512 = 122880 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdd1 2 16384 1965952+ 6 FAT16 Code:
localhost ~ # fdisk -l -u -C 16384 microsd.img
Disk microsd.img: 0 MB, 0 bytes
16 heads, 15 sectors/track, 16384 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
microsd.img1 255 3932159 1965952+ 6 FAT16
Code:
localhost ~ # echo $((255*512)) 130560 Code:
mount microsd.img1 /mnt/partition1 -o loop,offset=130560 Loopback mountin' a specific partition inside a disk image | Tux in a row Extended example is available here: Mounting disks with Linux's loopback device Last edited by deckard; 04-17-2008 at 02:27 PM. Reason: Found a solution almost two years later. :) |