[Email protected]:~# mount-o loop/data/kvm-pool/windows7.img/media/b/mount: You must specify the file system type
The direct mount is going to fail, let's first use fdisk-l to look at the disk information:
[email protected]:~# fdisk -l /data/kvm-pool/windows7.imgdisk /data/kvm-pool/ windows7.img: 21.5 gb, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectorsunits = Fan Area of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesi/o size (Minimum/optimal): 512 bytes / 512 bytesdisk identifier: 0x9c75197d devices Start start Endpoints Blocks Id Systems /data/kvm-pool/windows7.img1 * 2048 206847 102400 7 hpfs/ntfs/exfat/data/ kvm-pool/windows7.img2 206848 41940991 20867072 7 hpfs/ntfs/exfat
The
can see that the disk image contains two partitions. The disk contains two partitions, and we try to mount the second partition. As you can see from the information above, the starting position of the second partition is 206848 sectors, each sector size is bytes, so the starting position is 2048*512 (B). Then we'll mount the partition:
[Email protected]:~# mount -o loop,offset=$ ((206848*512)) /data/kvm-pool/windows7.img /media/B/ The disk contains an unclean file system (0, 0). The file system wasn ' t safely closed on windows. fixing. [email protected]:~# ls /media/b/autoexec.bat hiberfil.sys Program Files UsersCloudMusic pagefile.sys Recovery Windowsconfig.sys PerfLogs $Recycle. Bindocuments and sEttings programdata system volume information
This article is from the "Mu mu blog" blog, please make sure to keep this source http://slyadm.blog.51cto.com/6223864/1761449
Linux mount img Image file