Disk images might be generated on the Windows side

Bug #176019 reported by Agostino Russo
4
Affects Status Importance Assigned to Milestone
Wubi
Fix Released
Medium
Unassigned
partman-auto-loop (Ubuntu)
Fix Released
Undecided
Evan

Bug 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.
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$

Tags: wubi
Agostino Russo (ago)
description: updated
Revision history for this message
Agostino Russo (ago) wrote :

The template message was truncated:

Template: partman-auto-loop/unclean_ntfs
Type: error
Description: The NTFS partition is unclean, probably the system was not shutdown properly, please run "chkdsk /r" from Windows and once that is fixed you should be able to resume the installation. Press OK to reboot.

Revision history for this message
Agostino Russo (ago) wrote :

For a more recent versions of the patch code please see:

https://code.launchpad.net/~ago/partman-auto-loop/lupin-support

Agostino Russo (ago)
Changed in wubi:
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Evan (ev) wrote :

Ago,

The patch you've provided (in the form of a branch) is incomplete:

>> #skip resize_range check if images are already created
>> if true; then #TBD check if images are already created

Can you code the check, and let me know when your branch is updated?

Thanks!

Revision history for this message
Agostino Russo (ago) wrote :

Done in new version

Evan (ev)
Changed in partman-auto-loop:
assignee: nobody → evand
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-auto-loop - 0ubuntu13

---------------
partman-auto-loop (0ubuntu13) hardy; urgency=low

  [ Agostino Russo ]
  * Allow disk images to be created externally (LP: #176019).
  * Added template required by autopartition-loop.

  [ Evan Dandrea ]
  * Add /host/boot to fstab (LP: #173659). Thanks Agostino Russo.

 -- Evan Dandrea <email address hidden> Fri, 18 Jan 2008 15:58:52 -0500

Changed in partman-auto-loop:
status: Fix Committed → Fix Released
Agostino Russo (ago)
Changed in wubi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.