On 03/02/2017 08:53 PM, Warren Young wrote:> On Mar 2, 2017, at 6:36 PM, Robert Moskowitz <rgm at htt-consult.com>
wrote:
>> I want to image the drive at various 'checkpoints' so I can go
back and redo from a particular point?
>> what dd params work?
>>
>> dd if=/dev/sdb of=os.img bs=1M count=3210
> That looks plausible. (I haven?t verified your count parameter exactly.)
>
> However, I wonder why you?re trying to reinvent snapshots, a technology now
built into several advanced filesystems, such as btrfs and ZFS?
>
> https://en.wikipedia.org/wiki/Btrfs#Subvolumes_and_snapshots
>
> btrfs is built into CentOS 7. While there have been some highly-publicized
bugs in btrfs, they only affect the RAID-5/6 features. You don?t need that
here, so you should be fine with btrfs.
>
> And if you really distrust btrfs, ZFS is easy enough to integrate into
CentOS on-site.
>
> And if *that* is also out of the question, you have LVM2 snapshots:
>
> http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html
>
> Why reinvent the wheel?
This is Centos7-armv7. Not all the tools are there. I keep getting
surprises in some rpm not in the repo, but if I dig I will find it (but
php-imap is NOT built yet and that I need).
The base image is a dd, and you start with something like:
xzcat CentOS-Userland-7-armv7hl-Minimal-1611-CubieTruck.img.xz | sudo dd
of=/dev/sdb bs=4M; sync
btw, this reports:
0+354250 records in
0+354250 records out
3221225472 bytes (3.2 GB, 3.0 GiB) copied, 120.656 s, 26.7 MB/s
Then you boot up (connected via the JART with a USB/TTL for a serial
console).
I want a drive image, and that is easy to do. I disconnect my drive
from the CubieTruck, stick it into a USB/sata adapter, and I can image
the whole drive.
For just a development and snapshotting project, dd (and xzcat) do the
job, and really what the Fedora-arm and Centos-arm teams have been doing.
I actually did this 2+ years creating Redsleeve6 images, but can't find
any of my notes. :(