On Sat, Sep 28, 2013 at 12:41 AM, Alexander Holler <hol...@ahsoftware.de> wrote: > Am 27.09.2013 19:07, schrieb Jason Kridner: > >> On Thursday, September 26, 2013 2:26:40 PM UTC-4, Alexander Holler wrote: >> >>> Am 26.09.2013 20:21, schrieb Alexander Holler: >>>> >>>> >>>>>> autorun.sh: >>>>>> #!/bin/sh >>>>>> echo timer > /sys/class/leds/beaglebone\:green\:usr0/trigger >>>>>> dd if=/dev/mmcblk1 of=/mnt/BeagleBoneBlack-eMMC-image-$RANDOM.img >>> >>> bs=10M >>>>>> >>>>>> sync >>>>>> echo default-on > /sys/class/leds/beaglebone\:green\:usr0/trigger >>>> >>>> >>>> I think using dd and creating an image is a pretty bad way to build a >>>> backup. >>>> >>>> I would suggest to use >>>> >>>> sfdisk -d /dev/foo >sfdisk.emmc.txt >>>> mount emmc >>>> tar cpjf -C emmc . >>>> umount emmc >>> >>> >>> Of course, it should be >>> >>> tar cpjf emmc.tar.bz2 -C emmc . >>> >>> and another tar might be necessary for the second partition. >>> >>> And putting such a script together with busybox into an in-kernel >>> initramfs, and people would just have to build a card with one file, the >>> uImage. >>> >>> >> I still like having autorun.sh such that the script can be easily >> customized without rebuilding. Of course, MLO and u-boot.img are also >> required. The discussed Buildroot-based image is using initramfs. > > > As long as the eMMC still works (the first partition there is ok), there is > no need for mlo and u-boot on the sd-card. > > >> >> Seems like some work is required here to create the logic to make sure >> each >> partition is tar'd. Also, the restore script needs to be created. In >> general, this just requires some more testing. Any volunteers to try out >> the sfdisk/tar based solution? > > > To restore such a tar, use > > tar xpjf emmc.tar.bz2 -C emmc --numeric-owner > > after you've created or formatted and mounted the partition. And don't > forget that --numeric-owner on restore, otherwise bad things might happen.
Any thoughts on saving off the format name and type of a partition? sfdisk only saves that the partition is of type '83', not that it is formatted as 'ext4' with a certain label. > > Regards, > > Alexander Holler > > > -- > For more options, visit http://beagleboard.org/discuss > --- You received this message because you are subscribed to the Google > Groups "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to beagleboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.