Author Topic: Can't modify image  (Read 372 times)

Offline jmaurin

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Can't modify image
« on: July 02, 2017, 09:08:22 pm »
Hi.
I started working in a company which has a custom board using A20. It's based on cubieboard 2.
There is an image ready for this board......but I would like modify/update this image and old developer (is not in company anymore) just leave .img file, nothing else.
First problem: I can't discompact this image. When I try to discompact using ImgRePacker, I got and error ('unknow type' for rootfs.fex). Everything else was file. rootfs.fex is created, but I can't mount this file :( I don't know why.

Then, I tried to get another 'compatible' image.....I found this one: http://dl.cubieboard.org/software/a20-cubieboard/lubuntu/cb2-lubuntu-server-20140125/
This image worked fine, but didn't have SSH enabled and I need to make some changes (install programs, update kernel, etc..) so I unpacked using ImgRePacker and copied rootfs.fex to another linux machine. This time I could successfull mount 'rootfs.fex' using: "mount -t ext4 rootfs.fex /mnt/A". Then 'chroot' to this mount point and installed openssh-server.
After that, 'exit' (quit chroot) and umount /mnt/A. Now is the problem: the file 'rootfs'.fex' isn't changed. The filesize and md5sum is the same!

If I mount again this file, I can see all changes that I've made in previous mount.....but nothing is 'applied' to original file. What am I doing wrong?
Also, I've checked with 'mount' and the file is connectred mounted (with RW option inclusive).

This board (based on cubietruck2) doesn't have USB or any kind of display....is meant only for remote access and main CPU is A20.

What am I doing wrong?

Tks!

Offline jmaurin

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Can't modify image
« Reply #1 on: July 03, 2017, 02:33:44 pm »
It's my mistake about file doesn't changed, it's working!

But the other problem perssist....I can't mount my old rootfs.fex :(
How can I 'know' what filetype is?

Output from ImgRepacker:

Code: [Select]
"\bootloader.fex"               extracted (format: FAT16 image)
        "\Vbootloader.fex"              extracted (format: unknown/empty?)
        "\env.fex"              extracted (format: unknown)
        "\Venv.fex"             extracted (format: unknown/empty?)
        "\boot.fex"             extracted (format: Android boot image)
        "\Vboot.fex"            extracted (format: unknown/empty?)
        "\rootfs.fex"           extracted (format: sparse image)
        "\Vrootfs.fex"          extracted (format: unknown/empty?)
        "\radarfs.fex"          extracted (format: sparse image)
        "\Vradarfs.fex"         extracted (format: unknown/empty?)

This image is based on lubuntu-server-nand (Linaro)....