question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ubifs image extract failed

See original GitHub issue

When parsing an ubifs image, binwalk uses ubireader_extract_files to extract. However it may fail sometimes, and the extracted directory contained nothing but empty directory.

$ binwalk -e 0.ubi

$ tree .
.
├── 0.ubi
└── _0.ubi.extracted
    ├── 0.ubi
    └── ubifs-root
        └── 122063392
            └── kernel    # empty

If using ubireader_extract_images manually, it will extract files successfully. Then run binwalk against the extracted file.

$ ubireader_extract_images ./0.ubi

$ tree .
.
├── 0.ubi
└── ubifs-root
    └── 0.ubi
        ├── img-122063392_vol-kernel.ubifs
        └── img-122063392_vol-ubi_rootfs.ubifs

The ubifs file is attached. 0.zip

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
krshcommented, Nov 22, 2021

Some notes:

  • UBI + UBIFS: works with binwalk or ubireader_extract_files
  • UBI + SquashFS: doesn’t work with binwalk and works well with ubireader_extract_images

Can someone confirm this analysis?

0reactions
krshcommented, Nov 19, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting content from an extracted ubi image
So my next approach was to extract the content from this image to get eventually the squashfs filesystem. To do so I wanted...
Read more >
Unpacking a ubi image with an ubifs image inside
First of all the file cant be extracted by any tools because you will get an error that less than 2 layout blocks...
Read more >
ubifs image extract failed - binwalk - Bountysource
When parsing an ubifs image, binwalk uses ubireader_extract_files to extract. However it may fail sometimes, and the extracted directory ...
Read more >
Linux Flash for Newbies - The Next Generation: UBI and UBIFS
UBI (unsorted block images) is an abstraction layer that rides on top of MTD. While MTD directly shows all physical characteristics of the...
Read more >
UBIFS FAQ and HOWTO - MTD utils
How do I extract files from an UBI/UBIFS image? ... This may trigger an error straight away, but usually at this point no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found