[root@dywmac ~]# cd /usr/src [root@dywmac src]# file crt15g.img crt15g.img: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, boot drive 0x80, 1st sector stage2 0x6298, GRUB version 0.94; partition 1: ID=0x83, active, starthead 32, startsector 2048, 262144 sectors; partition 2: ID=0x8e, starthead 113, startsector 264192, 28672000 sectors, code offset 0x48
[root@dywmac src]# mount crt15g.img /mnt/test mount: you must specify the filesystem type
[root@dywmac src]# fdisk -luc crt15g.img
You must set cylinders.
You can do this from the extra functions menu.
Disk crt15g.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: 0x0006315d
Device Boot Start End Blocks Id System
crt15g.img1 * 2048 264191 131072 83 Linux
[root@dywmac src]# mount -o rw,loop,offset=1048576 crt15g.img /mnt/loop/ [root@dywmac src]# mount | grep crt15 /usr/src/crt15g.img on /mnt/loop type ext4 (rw,loop=/dev/loop0,offset=1048576) [root@dywmac src]# ls /mnt/loop/ config-2.6.32-573.el6.x86_64 symvers-2.6.32-573.el6.x86_64.gz config-4.8.1-1.el6.elrepo.x86_64 symvers-4.8.1-1.el6.elrepo.x86_64.gz efi System.map-2.6.32-573.el6.x86_64 grub System.map-4.8.1-1.el6.elrepo.x86_64 initramfs-2.6.32-573.el6.x86_64.img vmlinuz-2.6.32-573.el6.x86_64 initramfs-4.8.1-1.el6.elrepo.x86_64.img vmlinuz-4.8.1-1.el6.elrepo.x86_64 lost+found
[root@dywmac src]# mount -o rw,loop,offset=135266304 crt15g.img /mnt/loop/ mount: unknown filesystem type 'LVM2_member' [root@dywmac src]# losetup --offset 135266304 /dev/loop1 crt15g.img
[root@dywmac src]# mount /dev/loop1 /mnt/loop1 mount: unknown filesystem type 'LVM2_member'
vg_crt。
[root@dywmac src]# vgscan Reading all physical volumes. This may take a while... Found volume group "dywmac" using metadata type lvm2 Found volume group "vg_crt" using metadata type lvm2
vg_crt vg。
[root@dywmac ~]# vgchange -ay vg_crt 3 logical volume(s) in volume group "vg_crt" now active
vg_crt-root。
[root@dywmac ~]# mount /dev/mapper/vg_crt-root /mnt/root/
vg_crt-root。
[root@dywmac ~]# umount /mnt/root/
vg_crt-root, vg_crt-home, vg_crt-swap mapping。
[root@dywmac ~]# dmsetup remove vg_crt-{root,home,swap}
[root@dywmac ~]# losetup -d /dev/loop1