linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Willem <itsme@xs4all.nl>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] mtd-www: FAQ note about user-space tools
Date: Thu, 7 Nov 2019 10:39:25 +0100	[thread overview]
Message-ID: <dd66d7fd-cd10-d8f5-b54a-17647d32a81a@xs4all.nl> (raw)

[-- 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/

             reply	other threads:[~2019-11-07  9:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07  9:39 Willem [this message]
2019-11-07 22:28 ` [PATCH] mtd-www: FAQ note about user-space tools Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd66d7fd-cd10-d8f5-b54a-17647d32a81a@xs4all.nl \
    --to=itsme@xs4all.nl \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).