mount a image for linux & qnx

how to mount  a  image for linux & qnx ? I wasted some time on it recently. writing the note, hope it can help!  

Step-by-step guide

mount a image with mutil parition on linux [losetup and kpartx is needed]

  1. losetup /dev/loop0 <your mutilparition image file>,
  2. kpartx -a /dev/loop0,
    1. then you can find all the parition in /dev/mapper/ eg /dev/mapper/loop0p1, /dev/mapper/loop0p2
  3. mount /dev/mapper/loop0p1 <your work directory>
  4. umount <your work directory>
  5. kpartx -d /dev/loop0
  6. losetup -d /dev/loop0

mount a image with single parition on linux

  1. mount -o loop <your single image file> <your work directory>
  2. or you can  use "mount <your single image file> <your work directory>" directly in the glsdk

mount a image on qnx

  1. devb-loopback blk cache=256k,vnode=128,automount=lo0:<your work directory>:qnx6 loopback ro,blksz=2048,fd=<your single image file>
  2. umount <your work directory>
  3. slay devb-loopback to delete lo0 completely
posted @ 2017-05-09 17:35  marf.cn  阅读(652)  评论(0编辑  收藏  举报