增加 Linux 挂载 Image 文件.

Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
rick.chan 2021-01-07 15:01:50 +08:00
parent 8a58002e91
commit c6241ae97d
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# Linux 挂载 Image 文件
```bash
sudo fdisk -lu <img>
# 显示类似如下信息
Device Boot Start End Blocks Id System
<img> * 2048 1026047 512000 83 Linux
```
将 Start\*512 得到 mount 的 offset512 是一个扇区的大小,以上面为例子就是 2048\*512
```bash
sudo mount -o loop,offset=<offset> <img> <mount point>
```
使用完毕后用如下命令卸载:
```bash
sudo umount <mount point>
```