embeded/raspberry pi

img 파일 마운트 하기

구차니 2021. 11. 20. 23:18

mount offset 기능을 이용해서 계산해 적당히 붙이면 된다고..

# fdisk -l whatever.img
Device         Boot     Start       End  Blocks  Id System
whatever.img1            8192    122879   57344   c W95 FAT32 (LBA)
whatever.img2          122880   5785599 2831360  83 Linux

# mount -v -o offset=4194304 -t vfat whatever.img /mnt/img/one
# mount -v -o offset=62914560 -t ext4 whatever.img /mnt/img/two

[링크 : https://raspberrypi.stackexchange.com/questions/13137/how-can-i-mount-a-raspberry-pi-linux-distro-image]