Linux mount disk image

user-pic
Vote 0 Votes

若要 mount 一個以 dd dump 出來的 image
(例如 dd if=/dev/sda of=disk.img)
先用 fdisk -l disk.img 看一下 Sector size 是多少, 通常是 512
要 mount 那一個分割區, 就用 offset 參數指定 512*Start 位置
例如 partition 1 Start 2048, offset 就是 512*2048 = 1048576
mount -o loop,offset=1048576 disk.img /mnt

About this Entry

This page contains a single entry by Pank published on July 20, 2018 2:54 PM.

CNAME and other data was the previous entry in this blog.

Latest Apache repo for CentOS is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives