Rootfs file type


#1

Hi,

I want to know the rootfs file
hikey-jessie_developer_20150208-104.emmc.img
type.
Basically, I want to “untar” the above file, add some of my own stuff,
and “tar” it again as the rootfs file image. I tried various methods, e.g.,
mounting as a loop device or kpartx, all of them do not work.

fdisk -l shows the following:

plumgrid@yhs-plumgrid:~/hikey$ fdisk -l hikey-jessie_developer_20150208-104.emmc.img

Disk hikey-jessie_developer_20150208-104.emmc.img: 978 MB, 978442240 bytes
255 heads, 63 sectors/track, 118 cylinders, total 1911020 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk hikey-jessie_developer_20150208-104.emmc.img doesn’t contain a valid partition table
plumgrid@yhs-plumgrid:~/hikey$

anybody knows the procedure of how to mount this image properly?

Thanks.


#2

Hi yhs,

The image is in sparse format. You must “unsparse it” before to use it.

You can find some instructions to unpack / pack the images in sparse format.

Best regards.