forked from Mirror/pmbootstrap
Optional --rsync parameter for pmbootstrap install only copies the diff (#1151)
Should reduce wear of sd card. Example usage: pmbootstrap install --sdcard=/dev/mmcblk0 --no-fde --rsync More rsync output with pmbootstrap -v.
This commit is contained in:
parent
cd7280e1ee
commit
bdeec7a255
6 changed files with 36 additions and 12 deletions
|
@ -49,14 +49,20 @@ def format_and_mount_root(args):
|
|||
|
||||
|
||||
def format_and_mount_pm_crypt(args):
|
||||
# Block device
|
||||
if args.full_disk_encryption:
|
||||
device = "/dev/mapper/pm_crypt"
|
||||
else:
|
||||
device = "/dev/installp2"
|
||||
|
||||
# Format
|
||||
if not args.rsync:
|
||||
logging.info("(native) format " + device)
|
||||
pmb.chroot.root(args, ["mkfs.ext4", "-F", "-q", "-L", "pmOS_root", device])
|
||||
|
||||
# Mount
|
||||
mountpoint = "/mnt/install"
|
||||
logging.info("(native) format " + device + " (ext4), mount to " +
|
||||
mountpoint)
|
||||
pmb.chroot.root(args, ["mkfs.ext4", "-F", "-q", "-L", "pmOS_root", device])
|
||||
logging.info("(native) mount " + device + " to " + mountpoint)
|
||||
pmb.chroot.root(args, ["mkdir", "-p", mountpoint])
|
||||
pmb.chroot.root(args, ["mount", device, mountpoint])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue