You are not logged in.

#1 2014-11-28 06:22:15

iaw4
Member
Registered: 2014-11-28
Posts: 46

auto-script running clone?

I would like to clone my running arch system's root partition (boot is on it, too) from one running system to another disk, possibly USB and possibly with a different size.

I believe this should not be too hard.  it means I should boot in single-user mode (so that the root partition is read-only), then copy it with rsync (https://wiki.archlinux.org/index.php/fu … with_rsync), update the blkid in the new $dest/etc/ , and start worrying about the boot.  (there is a real nice aspect to Mac's---they can scan connected drives for bootable partitions when one holds down the alt-key.)  reading the doc, my guess is that syslinux is the easier solution.  this again means filling in the blkid to $dest/boot/syslinux.cfg, and then running syslinux.  ultimately, my script will be something like

    perl clone-my-install.pl /dev/sdx1

with some additional safety checks (is root mount ro?  is /dev/sdx1 an ext4 partition, large enough, and empty? etc.)  come to think of it, this script would make a good additional boot-up menu choice for arch itself.

before I write it myself, has someone already written this?

/iaw

Offline

Board footer

Powered by FluxBB