View Single Post
debernardis's Avatar
Posts: 2,142 | Thanked: 2,054 times | Joined on Dec 2006 @ Sicily
#757
Originally Posted by hawaii View Post
He means formatting rootfs as well.
Right, it is useful as well. Let's go and see where it must be done.

Ah, while looking at the code, here's a typo:
Code:
#Restore the RootFS from $backupRootFile
mount -t ubifs ubi0_0 /tmp/mnt/rootfs
if [ $? -ne 0 ]; then
   umount -t ubufs
   $T2S -s 2 -H left -y $y -T 0xF800 -t "  Error: cannot mount the RootFS."; y=$((y+20))
pressAnyKey
break
Should be "umount -t ubifs" I bet.

Then after a few lines he writes:
Code:
$T2S -s 2 -H left -y $y -T 0 -t "  Clearing the RootFS..."; y=$((y+20))
  busybox rm -rf /tmp/mnt/rootfs/*
Here he nukes the rootfs' files. Formatting should replace the "busybox rm" line.

Anybody knows the right way to go? I'm scared to mess with ubifs, I haven't quite understood how it works

EDIT: is it "ubiformat /dev/whatever"?
and [Q] Why do you want to format rootfs just before restoring instead that having an extra command to do that? [A] Because if user formats rootfs with that command and forgets to restore a rootfs tar immediately after, will be left with an unbootable device that has necessarily to be reflashed.
__________________
Ernesto de Bernardis


Last edited by debernardis; 2011-05-15 at 18:11.
 

The Following User Says Thank You to debernardis For This Useful Post: