여러 파티션이 있는 kvm qemu 디스크 이미지 마운트

여러 파티션이 있는 kvm qemu 디스크 이미지 마운트

다음 명령을 사용하여 KVM-qemu 디스크 이미지를 마운트하려고 합니다: sudo mount -o loop,offset=32256 centos6.img /mnt/centos6. 하지만 다음 오류가 표시됩니다 you must specify filesystem type. 디스크 이미지에 더 많은 파티션이 있으므로 다음을 시도했습니다.이 솔루션. 하지만 이것도 같은 오류가 발생합니다.

출력은 다음과 같습니다 fdisk -ul centos6.img.

Disk centos6.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001da69

      Device Boot      Start         End      Blocks   Id  System
centos6.img1   *        2048     1026047      512000   83  Linux
Partition 1 does not end on cylinder boundary.
centos6.img2         1026048    20971519     9972736   8e  Linux LVM
Partition 2 has different physical/logical endings:
     phys=(1023, 254, 63) logical=(1305, 106, 17)

답변1

이것은 나에게 효과적입니다.

kpartx -av cento.img

다음에서 생성된 루프 장치를 설치합니다 /dev/mapper.

sudo mount /dev/mapper/loop0p1 /mnt/destination

답변2

2048(시작 섹터) x 512(섹터 크기)는 1048576입니다. 그래서 당신은 실행해야

sudo mount -o loop,offset=1048576 centos6.img /mnt/centos6

오류 메시지가 나타나는 이유는 디스크의 임의의 비어 있는 지점에서 파일 시스템을 찾도록 커널에 지시하기 때문입니다. 그래서 거기에 있는 파일 시스템을 인식하지 못한다는 뜻입니다.

바라보다전체 디스크 이미지에서 파일 시스템 읽기배경.

당신은 시도 할 수 있습니다libguestfs, 여러 VM 디스크 이미지를 자동으로 마운트할 수 있습니다.

관련 정보