Hi Erez,

On Mon, May 12, 2014 at 02:14:34PM +0300, Erez D wrote:
> On Mon, May 12, 2014 at 12:28 PM, Baruch Siach <bar...@tkos.co.il> wrote:
> > On Mon, May 12, 2014 at 12:14:14PM +0300, Erez D wrote:
> > > On Mon, May 12, 2014 at 12:05 PM, Baruch Siach <bar...@tkos.co.il>
> > wrote:
> > > > On Mon, May 12, 2014 at 11:46:43AM +0300, Erez D wrote:
> > > > > i need to clone a nand flash. which has ubifs on it
> > > > >
> > > > > doing 'dd' didn't work as the source and dest have different bad
> > sectors.
> > > >
> > > > dd is not the way to go with raw NAND flash access; it's not aware of
> > bad
> > > > blocks.
> > > >
> > > > > is there an easy way to clone a ubifs nand-flash ?
> > > >
> > > > You may be able get a working system using nanddump/nandwrite (see
> > > > http://thread.gmane.org/gmane.linux.drivers.mtd/45792/focus=46024, but
> > > > read
> > > > the whole thread). Generally, tough, this is not what you want to do
> > with
> > > > UBI/UBIFS. You should use ubiformat on the target, and copy the content
> > > > with
> > > > tar. See
> > http://www.linux-mtd.infradead.org/faq/ubifs.html#L_why_ubiformat
> > >
> > > will tar preserve uid/gid hard links, special files, /dev
> >
> > Yes, by default.
> >
> > > extended attr etc ?
> >
> > Yes. Use --xattrs.
> >
> > baruch
> 
> thanks, i'll try that.
> 
> can I ubiformat + untar from u-boot ?

I don't see support for either in mainline U-Boot. Barebox supports ubiformat 
but not tar extraction.

Your best option is to boot into RAM using a kernel combined with a minimal 
Busybox based initramfs, and extract you tar from there. Note tough that 
Busybox tar does not support extended attributes, so you must use GNU tar for 
this. Buildroot can generate a minimal initramfs image for you quite easily.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - bar...@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to