It can not mount.
#mount system.img /mnt/
mount: system.img is not a block device (maybe try `-o loop'?)
#mount -o loop system.img /mnt/
mount: you must specify the filesystem type
#file system.img
system.img: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 208782 sectors; partition
0x8e, starthead 0, startsector 208845, 12370050 sectors, code offset 0x48Solution_1
Mount1).Survey which is open to the loopback device to mount
#losetup -f/dev/loop0
#losetup /dev/loop0 system.img
2).To check the status of DEBAISUMAPPA add a partition
#ls /dev/mapper/control
Add partition mappings from partition tables
#kpartx -a /dev/loop0
#ls /dev/mapper/
control loop0p1 loop0p23).Check out the partition
#fdisk -l -u /dev/loop0Disk /dev/loop0: 6442 MB, 6442450944 bytes Disk
255 heads, 63 sectors/track, 783 cylinders, total 12582912 sectorsUnits = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System Device Boot
/dev/loop0p1 * 63 208844 104391 83 Linux
/dev/loop0p2 208845 12578894 6185025 8e Linux LVM
4).To Check status
Scan the volume group
#vgscanReading all physical volumes. This may take a while…
Found volume group " VolGroup00" using metadata type lvm2Scan the logic volume
#lvscaninactive '/dev/VolGroup00/LogVol00' [3.94 GB]
inactive '/dev/ VolGroup00/ LogVol01' [1.94 GB]Scan the physical volume
#pvscan
PV /dev/mapper/loop0p2 VG VolGroup00? lvm2 [5.88 GB / 0 free]
Total:1 [5.88 GB] / in use: 1 [5.88 GB] / in no VG: 0 [0 ]Check VG Enabled
#vgchange -ay
2 logical volume(s) in volume group "VolGroup00" now active
#lvscanACTIVE '/dev/VolGroup00/LogVol00' [3.94 GB] inherit
#mount /dev/VolGroup00/LogVol00 /mnt
7) If you try to mount a swap will failed
- mount /dev/VolGroup00/LogVol01 /mnt2
mount: you must specify the filesystem type
#umount /mnt
#vgchange -an
logical volume(s) in volume group "VolGroup00" now active
lvscaninactive '/dev/VolGroup00/LogVol00' [3.94 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
#kpartx -d /dev/loop0
#ls /dev/mapper/control
#losetup -d /dev/loop0
#losetup -f /dev/loop0
Solution_2
Mount
# fdisk -l -u system.img
last_lba(): I don't know how to handle files with mode 81ed
You must set cylinders.
You can do this from the extra functions menu.
Disk system.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
ovs_el5_x86_64.img1 * 63 208844 104391 83 Linux
ovs_el5_x86_64.img2 208845 12578894 6185025 8e Linux LVM
Calculate the byte offset to the desired partition by multiplying the Start location times the Unit size (e.g. 63 * 512 bytes = 32256 bytes). Using 'losetup', mount a loop device to the calculated partition of the image file.
# losetup -f system.img -o 32256
# losetup -a
/dev/loop0: [0821]:49057 (/OVS/EL5/system.img)
/dev/loop1: [0821]:49057 (system.img), offset 32256
# mkdir /mnt/img
# mount /dev/loop1 /mnt/img
# ls /mnt/img
config-2.6.18-8.1.14.0.2.el5 symvers-2.6.18-8.el5xen.gz
config-2.6.18-8.el5xen System.map-2.6.18-8.1.14.0.2.el5
grub System.map-2.6.18-8.el5xen
initrd-2.6.18-8.1.14.0.2.el5.img vmlinuz-2.6.18-8.1.14.0.2.el5
initrd-2.6.18-8.el5xen.img vmlinuz-2.6.18-8.el5xen
lost+found xen.gz-2.6.18-8.el5
symvers-2.6.18-8.1.14.0.2.el5.gz xen-syms-2.6.18-8.el5
#umount /mnt
#losetup -d /dev/loop0
#losetup -f /dev/loop0