增加 Linux 挂载 Image 文件.
Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
parent
8a58002e91
commit
c6241ae97d
|
@ -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 的 offset(512 是一个扇区的大小,以上面为例子就是 2048\*512)。
|
||||
|
||||
```bash
|
||||
sudo mount -o loop,offset=<offset> <img> <mount point>
|
||||
```
|
||||
|
||||
使用完毕后用如下命令卸载:
|
||||
|
||||
```bash
|
||||
sudo umount <mount point>
|
||||
```
|
Loading…
Reference in New Issue