linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd-www: FAQ note about user-space tools
@ 2019-11-07  9:39 Willem
  2019-11-07 22:28 ` Richard Weinberger
  0 siblings, 1 reply; 2+ messages in thread
From: Willem @ 2019-11-07  9:39 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

Hi,

the attached patch contains an update to the mtd-www ubifs faq:

 * Mention user-space tools for unwrapping UBI and UBIFS images.
   Note that I am the author of the ubidump tool.
 * A note about the vidhdrofs argument to modprobe.


willem


[-- Attachment #2: faq-ubifs.patch --]
[-- Type: text/plain, Size: 2399 bytes --]

--- a/faq/ubifs.xml
+++ b/faq/ubifs.xml
@@ -915,12 +915,19 @@ mount -t ubifs /dev/ubi0_0 /mnt/ubifs
 
 <h2><a name="L_ubifs_extract">How do I extract files from an UBI/UBIFS image?</a></h2>
 
-<p>Unfortunately, at the moment there are no user-space tools which can
-unwrap UBI and UBIFS images. UBIFS cannot be loop-back mounted either,
-because it does not work with block devices.</p>
+<p>
+    There are a couple of python tools for extracting and analyzing UBI images.
+    <ul>
+        <li><a href="https://github.com/jrspruitt/ubi_reader/">ubi_reader</a> - Collection of Python scripts for reading information about and extracting data from UBI and UBIFS images.</li>
+        <li><a href="https://github.com/nlitsme/ubidump/">ubidump</a> - Tool for viewing and extracting files from an UBIFS image.</li>
+    </ul>
+    There is also a company selling a closed source windows tool to do the same.
+</p>
 
-<p>However, kernel modules exist that allow you to create a virtual MTD
-onto which UBIFS can be mounted. You have two options:
+<p>
+    UBIFS cannot be loop-back mounted because it does not work with block devices.
+    However, kernel modules exist that allow you to create a virtual MTD
+    onto which UBIFS can be mounted. You have two options:
 <ol>
 	<li><code>nandsim</code>, which can simulate various NAND devices.
 	You can find an incomplete list of those devices
@@ -971,7 +978,7 @@ ubimkvol /dev/ubi0 -N "My UBIFS volume name" -s $VOLSIZE
 ubiupdatevol /dev/ubi0_0 ubifs.img
 
 # Mount it to any desired mount point
-mount /dev/ubi0_0 /mnt/ubifs
+mount -t ubifs /dev/ubi0_0 /mnt/ubifs
 </pre>
 
 <p>Now you have the filesystem in <code>/mnt/ubifs</code>. Use
@@ -987,9 +994,13 @@ the process is simpler.
 Write the image to the MTD via <code>ubiformat -f ubi.img</code>
 (assuming that is the name of your image file).
 You should be able to skip the instructions above after
-<code>modprobe ubi mtd=0</code>, since
+<code>modprobe ubi mtd=/dev/mtd0,2048</code>, since
 the UBI image should take care of the volume(s) itself.
-
+<p>
+    Note that the <i>vidhdrofs</i> ( the second argument after <code>mtd=</code>) is important,
+    for images with a larger eraseblock size this will also be a larger value.
+    With 256K eraseblocks you would need 4096 there.
+</p>
 
 <h2><a name="L_smaller_jrn">I need more space - should I make UBIFS journal smaller?</a></h2>
 


[-- Attachment #3: Type: text/plain, Size: 144 bytes --]

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd-www: FAQ note about user-space tools
  2019-11-07  9:39 [PATCH] mtd-www: FAQ note about user-space tools Willem
@ 2019-11-07 22:28 ` Richard Weinberger
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Weinberger @ 2019-11-07 22:28 UTC (permalink / raw)
  To: Willem; +Cc: linux-mtd

On Thu, Nov 7, 2019 at 10:39 AM Willem <itsme@xs4all.nl> wrote:
> the attached patch contains an update to the mtd-www ubifs faq:
>
>  * Mention user-space tools for unwrapping UBI and UBIFS images.
>    Note that I am the author of the ubidump tool.

I'd rather love to have these tools properly reviewed and upstreamed
into mtd-utils.

From a very quick look it seems that your ubi dumper is not correct.
You cannot compare LEBs without validating data_crc and copy_flag fields.

-- 
Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-07 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07  9:39 [PATCH] mtd-www: FAQ note about user-space tools Willem
2019-11-07 22:28 ` Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).