2007-12-13 01:20:20 |
Agostino Russo |
description |
Binary package hint: partman-auto-loop
Creating disk images in Linux is slow, and unless fallocate is implemented, it will be necessary to generate the images on the windows side.
97,102c97
< #skip resize_range check if images are already created
< if true; then #TBD check if images are already created
< cursize=10000000000
< minsize=0
< else
< case $partition_fs in
---
> case $partition_fs in
126,127d120
< db_input critical partman-auto-loop/unclean_ntfs || true
< db_go || true
129d121
< reboot
137,138c129
< esac
< fi
---
> esac
213d203
< pidof /sbin/mount.ntfs >> /var/run/sendsigs.omit
225,226c215,216
< # Ensure that no old loop images are present and mountable.
< mkdir -p /tmpmountpoint
---
> # Ensure that no old loop images are present.
> found_images=
233,246c223
< if mount -t auto -o loop,ro /host$path /tmpmountpoint 2>/dev/null; then
< db_progress STOP
< db_subst partman-auto-loop/unclean_host PARTITION "$partition"
< db_subst partman-auto-loop/unclean_host DISK "$disk"
< db_subst partman-auto-loop/unclean_host IMAGES "$path"
< db_input critical partman-auto-loop/unclean_host || true
< db_capb
< db_go || true
< db_capb backup
< umount /tmpmountpoint || true
< rmdir /tmpmountpoint || true
< umount /host || true
< exit 1
< fi
---
> found_images="${found_images:+$found_images }$path"
248a226,237
> if [ "$found_images" ]; then
> db_progress STOP
> db_subst partman-auto-loop/unclean_host PARTITION "$partition"
> db_subst partman-auto-loop/unclean_host DISK "$disk"
> db_subst partman-auto-loop/unclean_host IMAGES "$found_images"
> db_input critical partman-auto-loop/unclean_host || true
> db_capb
> db_go || true
> db_capb backup
> umount /host || true
> exit 1
> fi
269,277c258,260
< if ![ -f "/host/$path" ];then
< mkdir -p "/host${path%/*}"
< if [ "$(basename /host$path)" = "swap.disk" ]; then
< #swap requires a file with no holes
< dd if=/dev/zero of="/host$path" bs="1MB" count="$1"
< else
< dd if=/dev/zero of="/host$path" bs="1MB" seek="$1" count=0
< fi
< fi
---
> mkdir -p "/host${path%/*}"
> rm -f "/host$path"
> dd if=/dev/zero of="/host$path" bs="1000000" seek="$1" count=0
Template: partman-auto-loop/unclean_ntfs
Type: error
Description: The NTFS partition is unclean, probably the system was not shutdow$ |
Binary package hint: partman-auto-loop
Creating disk images in Linux is slow, and unless fallocate is implemented, it will be necessary to generate the images on the windows side.
The following is a preliminary patch against autopartition-loop
97,102c97
< #skip resize_range check if images are already created
< if true; then #TBD check if images are already created
< cursize=10000000000
< minsize=0
< else
< case $partition_fs in
---
> case $partition_fs in
126,127d120
< db_input critical partman-auto-loop/unclean_ntfs || true
< db_go || true
129d121
< reboot
137,138c129
< esac
< fi
---
> esac
213d203
< pidof /sbin/mount.ntfs >> /var/run/sendsigs.omit
225,226c215,216
< # Ensure that no old loop images are present and mountable.
< mkdir -p /tmpmountpoint
---
> # Ensure that no old loop images are present.
> found_images=
233,246c223
< if mount -t auto -o loop,ro /host$path /tmpmountpoint 2>/dev/null; then
< db_progress STOP
< db_subst partman-auto-loop/unclean_host PARTITION "$partition"
< db_subst partman-auto-loop/unclean_host DISK "$disk"
< db_subst partman-auto-loop/unclean_host IMAGES "$path"
< db_input critical partman-auto-loop/unclean_host || true
< db_capb
< db_go || true
< db_capb backup
< umount /tmpmountpoint || true
< rmdir /tmpmountpoint || true
< umount /host || true
< exit 1
< fi
---
> found_images="${found_images:+$found_images }$path"
248a226,237
> if [ "$found_images" ]; then
> db_progress STOP
> db_subst partman-auto-loop/unclean_host PARTITION "$partition"
> db_subst partman-auto-loop/unclean_host DISK "$disk"
> db_subst partman-auto-loop/unclean_host IMAGES "$found_images"
> db_input critical partman-auto-loop/unclean_host || true
> db_capb
> db_go || true
> db_capb backup
> umount /host || true
> exit 1
> fi
269,277c258,260
< if ![ -f "/host/$path" ];then
< mkdir -p "/host${path%/*}"
< if [ "$(basename /host$path)" = "swap.disk" ]; then
< #swap requires a file with no holes
< dd if=/dev/zero of="/host$path" bs="1MB" count="$1"
< else
< dd if=/dev/zero of="/host$path" bs="1MB" seek="$1" count=0
< fi
< fi
---
> mkdir -p "/host${path%/*}"
> rm -f "/host$path"
> dd if=/dev/zero of="/host$path" bs="1000000" seek="$1" count=0
Template: partman-auto-loop/unclean_ntfs
Type: error
Description: The NTFS partition is unclean, probably the system was not shutdow$ |
|