backing up rootfs fails - after 40m FreeRunner continues booting

Bram Mertens mertensb.mazda at gmail.com
Tue Apr 21 23:04:33 CEST 2009


On Tue, Apr 21, 2009 at 9:21 AM, Paul Fertser <fercerpav at gmail.com> wrote:
> Hi,
>
> Any particular reason you omitted the list from Cc? Feel free to bring
> conversation back there, so everybody benefits.

No reason, just hit reply like I did with all other posts.  Only this
time Gmail didn't address the list but you personally.  Could have
something to do with the fact that you wrote your reply to me and CC'd
the list...

> On Tue, Apr 21, 2009 at 09:05:50AM +0200, Bram Mertens wrote:
>> On Tue, Apr 21, 2009 at 8:33 AM, Paul Fertser <fercerpav at gmail.com> wrote:
>> > Bram Mertens <mertensb.mazda at gmail.com> writes:
>> >> So it looks like NAND U-Boot was updated but NOR hasn't.  However
>> >> http://wiki.openmoko.org/wiki/Backup#Backing-up_flash_images
>> >> specifically states that you need to be in NOR U-Boot before
>> >> flashing/backing up.
>> >
>> > Then the wiki is wrong. There's absolutely zero sense in backing up
>> > u-boot itself and other partitions are perfectly readable when you
>> > boot to NAND.
>>
>> OK, is there any reason why one would want to be in U-Boot in the NOR
>> Flash for backing up instead of NAND flash?
>
> I guess no. For backing up you need a fixed u-boot anyway. And you can
> only update NAND u-boot. And NAND u-boot is loaded from NAND to RAM on
> start, so it can access any NAND partition for reading. It's
> recommended to use NOR u-boot to flash u-boot partition and also only
> NOR u-boot is available when one uses Qi.
>
> That said, i see no reason to use u-boot's backup facility at all,
> because if you can boot the device, you can scp or nc from it
> anyway. And if you can't boot from NAND for whatever reason, you can
> boot using any SD image and backup anything you need.
>
>> Perhaps you can update
>> the wiki page?  If not I'll rephrase it to:
>> As when flashing, you will need to be in
>> [http://wiki.openmoko.org/wiki/Booting_the_Neo_FreeRunner#Log_into_U-Boot_in_the_NAND_Flash
>> U-Boot in the NAND Flash].
>
> I guess it's ok, go ahead.
>
>> From what I understand the Booting_the_Neo_FreeRunner page could use
>> an update as well.  It only metions the possibility of flashing the
>> device in the "U-Boot in the NOR Flash" section not in the NAND
>> section.
>
> Yes, please update it.
>
>> Nor does it metion backing up the device.
>
> It's not very useful anyway, see above.
>
>> However the NOR section does have a comment that seems to be interesting:
>> When flashing the device via USB connection, you must choose Set
>> console to USB by pressing the AUX key until it is highlighted and
>> then press the power button to select it.
>
> I flashed Qi many times from NOR u-boot, never did anything special
> (so i suspect this suggestion is wrong).
>
>> Would this help prevent the timeout I get?
>
> No, NOR u-boot times out in 30 seconds anyway. You need to prepare
> everything beforehand and then start NOR to avoid hitting the timeout.
>
>> On another note: Backing up using NeoTool failed last night becuase

Reason I was unable to connect via SSH is that I included the MAC
address in NetworkManager's configuration and the usb0 device received
(or generated?) a new one.


So this time I was able to create a backup of the kernel, the U-Boot
and the rootfs using NeoTool (Thanks to Dale as well for a very clear
step-by-step).

Backing up the rootfs took about 10 minutes compared to +40 minutes
with dfu-util and the complete image is merely 83M in size, whereas
the file created by dfu-util is 247M when the backup is terminated due
to the timeout!

Does this mean that dfu-util backs up the entire disk (which according
to the output below is approx the size of the resulting jffs2 image)
and NeoTool only backs up the data that has been written?  However
even then 83M is less than what's reported in use.
Or does NeoTool compress the data somehow?

root at om-gta02:~# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  246.6M     92.9M    153.7M  38% /
/dev/root               246.6M     92.9M    153.7M  38% /
tmpfs                    40.0k         0     40.0k   0% /mnt/.exquisite
udev                      2.0M     12.0k      2.0M   1% /dev
shmfs                    61.6M     12.0k     61.6M   0% /dev/shm
/dev/mmcblk0p1            8.7M      3.8M      4.9M  44% /media/card
volatile                 61.6M    368.0k     61.3M   1% /var/volatile

> I never understood why anything special can be needed if we already
> have ssh/scp. Therefore never used NeoTool.

Perhaps (well actually likely) I'm missing something but as far as I
understand you need a working distribution before you would be able to
restore files via SSH.

The point of this exercise for me is to back up the only distro that
works for me so far - which is the distro that came with the device -
before attempting to install anything else.
My earlier attempts to install a distro to the SD card have not been
very successful: the one distro that boots apparantely has a
non-working dbus implementation or something meaning that few if any
applications are actually useful.
I was also unable to SSH into it but perhaps I could try that again
with my new-found knowledge about configuring NetworkManager for
FreeRunner.

Thanks again for the help, I'll play around some more tomorrow and
will update the wiki based on your suggestions.

One final remark to Arne: I didn't mean to say I wish to change the
logo, only that the device never booted, nor shut down or anything, it
just sat there for several minutes displaying the logo untill I pulled
the battery from it.

Bram




More information about the community mailing list