# Mounting raw disk image

**URL:** <https://linux-tips.com/t/mounting-raw-disk-image/638>\
**Category:** Embedded\
**Created:** [April 1, 2018, 3:06pm UTC](https://linux-tips.com/t/mounting-raw-disk-image/638 "2018-04-01T15:06:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg](https://linux-tips.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@Greg](https://linux-tips.com/u/Greg)\
**Post date:** [April 1, 2018, 3:06pm UTC](https://linux-tips.com/t/mounting-raw-disk-image/638/1 "2018-04-01T15:06:13Z")

</div>

I’m trying to mount a raw Armbian disk image without writing it to sd card or an usb stick with following command and getting error:

```auto
$ sudo mount -o loop Armbian_5.35_Orangepizero_Ubuntu_xenial_default_3.4.113.img /mnt/tmp
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so. 

```

How can I mount the partition in the image? `file` output shows following information about image:

```auto
$ file Armbian_5.35_Orangepizero_Ubuntu_xenial_default_3.4.113.img
Armbian_5.35_Orangepizero_Ubuntu_xenial_default_3.4.113.img: DOS/MBR boot sector; 
  partition 1 : ID=0x83, start-CHS (0x40,0,1), end-CHS (0x3ff,3,32), 
  startsector 8192, 2834432 sectors

```

---

<div class="post-metadata">

**Author:** ![MisterNo](https://linux-tips.com/user_avatar/linux-tips.com/misterno/32/55_2.png) [@MisterNo](https://linux-tips.com/u/MisterNo)\
**Post date:** [April 1, 2018, 3:11pm UTC](https://linux-tips.com/t/mounting-raw-disk-image/638/2 "2018-04-01T15:11:25Z")

</div>

It is quite easy but you need to skip some bytes to position on the first partition.

As you can see on the output of the `file` command, start sector of given image is **8192**

Because of the each sector in a disk is **512** bytes, you need to skip 512x8192 = **4194304** bytes. So, exact command must be like that:

```auto
$ sudo mount -o loop,ro,offset=4194304 \
        Armbian_5.35_Orangepizero_Ubuntu_xenial_default_3.4.113.img /mnt/tmp

```
