zoukankan      html  css  js  c++  java
  • explor img file

    1, get offset

    # parted bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img 
    GNU Parted 3.1
    Using /workspace/bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) p                                                                
    Model:  (file)
    Disk /workspace/bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img: 3565MB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags: 
    
    Number  Start   End     Size    Type     File system  Flags
     1      4194kB  3565MB  3561MB  primary  ext4         boot
    
    (parted) unit B
    (parted) p                                                                
    Model:  (file)
    Disk /workspace/bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img: 3565158400B
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags: 
    
    Number  Start     End          Size         Type     File system  Flags
     1      4194304B  3565158399B  3560964096B  primary  ext4         boot
    
    (parted) 

    get the ext4 partation offset 4194304

    or u can use fdisk:

    fdisk -l /workspace/bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img
    
    Disk /workspace/bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img: 3565 MB, 3565158400 bytes, 6963200 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 label type: dos
    Disk identifier: 0xca52207f
    
                                                           Device Boot      Start         End      Blocks   Id  System
    /workspace/bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img1   *        8192     6963199     3477504   83  Linux

    the offset is 8192(sectors) * 512 = 4194304 Byte

    2,mount 

    mount -o loop,ro,offset=4194304 bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img  /mnt/
    http://www.cnblogs.com/skynext/
  • 相关阅读:
    Chrome 控制台console的用法[转]
    Page Visibility(页面可见性) API介绍、微拓展[转]
    移动端rem单位用法[转]
    JavaScript继承方式详解[转]
    说说React
    Flex 布局教程:语法篇[转]
    git 常用命令总结
    Supervisor 在ubuntu系统下添加自启动
    Django 通过APNS推送消息
    通过 python-xmp-toolkit 读取图片xmlp信息
  • 原文地址:https://www.cnblogs.com/skynext/p/7927632.html
Copyright © 2011-2022 走看看