<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 12, 2014 at 12:28 PM, Baruch Siach <span dir="ltr"><<a href="mailto:baruch@tkos.co.il" target="_blank">baruch@tkos.co.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Erez,<br>
<div class=""><br>
On Mon, May 12, 2014 at 12:14:14PM +0300, Erez D wrote:<br>
> On Mon, May 12, 2014 at 12:05 PM, Baruch Siach <<a href="mailto:baruch@tkos.co.il">baruch@tkos.co.il</a>> wrote:<br>
</div><div class="">> > On Mon, May 12, 2014 at 11:46:43AM +0300, Erez D wrote:<br>
> > > i need to clone a nand flash. which has ubifs on it<br>
> > ><br>
> > > doing 'dd' didn't work as the source and dest have different bad sectors.<br>
> ><br>
> > dd is not the way to go with raw NAND flash access; it's not aware of bad<br>
> > blocks.<br>
> ><br>
> > > is there an easy way to clone a ubifs nand-flash ?<br>
> ><br>
> > You may be able get a working system using nanddump/nandwrite (see<br>
> > <a href="http://thread.gmane.org/gmane.linux.drivers.mtd/45792/focus=46024" target="_blank">http://thread.gmane.org/gmane.linux.drivers.mtd/45792/focus=46024</a>, but<br>
> > read<br>
> > the whole thread). Generally, tough, this is not what you want to do with<br>
> > UBI/UBIFS. You should use ubiformat on the target, and copy the content<br>
> > with<br>
> > tar. See <a href="http://www.linux-mtd.infradead.org/faq/ubifs.html#L_why_ubiformat" target="_blank">http://www.linux-mtd.infradead.org/faq/ubifs.html#L_why_ubiformat</a><br>
><br>
</div><div class="">> will tar preserve uid/gid hard links, special files, /dev<br>
<br>
</div>Yes, by default.<br>
<br>
> extended attr etc ?<br>
<br>
Yes. Use --xattrs.<br>
<div class="HOEnZb"><div class="h5"><br>
baruch<br></div></div></blockquote><div><br></div><div>thanks, i'll try that.<br><br></div><div>can I ubiformat + untar from u-boot ? <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">
<br>
--<br>
<a href="http://baruch.siach.name/blog/" target="_blank">http://baruch.siach.name/blog/</a> ~. .~ Tk Open Systems<br>
=}------------------------------------------------ooO--U--Ooo------------{=<br>
- <a href="mailto:baruch@tkos.co.il">baruch@tkos.co.il</a> - tel: <a href="tel:%2B972.2.679.5364" value="+97226795364">+972.2.679.5364</a>, <a href="http://www.tkos.co.il" target="_blank">http://www.tkos.co.il</a> -<br>
</div></div></blockquote></div><br></div></div>