[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#379835: marked as done (Windows Vista fails to boot after resizing in d-i)



Your message dated Wed, 07 Mar 2007 22:02:15 +0000
with message-id <E1HP4D9-00072F-FK@ries.debian.org>
and subject line Bug#379835: fixed in partman-partitioning 47
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: ntfsprogs
Version: 1.12.1-1
Severity: critical
Justification: causes serious data loss
Tags: d-i

After a resize using Debian Installer of an NTFS partition created with 
Windows Vista Beta 2, I found that the partition was no longer usable.

I have checked that this really is an issue by doing manual resizes of:
- an NTFS (1.2) partition created by installing Windows 2000
- an NTFS (3.1) partition created by installing Windows Vista Beta 2

The two are completely similar, except that the first is successful and 
the second leads to corruption. 

The corruption only becomes clear _after_ the physical partition is 
resized too; resizing the partition back to its original size does not 
get the partition back. ntfsfix does not help either.
Note that during the manual resize operation I used fdisk, but the 
installer uses libparted; the corruption occurs with both.

Logs for the resize of both NTFS partitions are attached and clearly show 
the problem.

I noticed that a 1.13.1 release is available, but cannot tell from the 
changelog if that would fix this issue.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-amd64-generic
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages ntfsprogs depends on:
ii  libc6               2.3.6-15   GNU C Library: Shared libraries
ii  libfuse2            2.5.3-2.1  Filesystem in USErspace library
ii  libntfs8            1.12.1-1   library that provides common NTFS

ntfsprogs recommends no packages.

-- no debconf information

debian:~# ntfsresize -i /dev/sda1
ntfsresize v1.12.1 (libntfs 8:1:0)
Device name        : /dev/sda1
NTFS volume version: 1.2
Cluster size       : 4096 bytes
Current volume size: 20974428672 bytes (20975 MB)
Current device size: 20974431744 bytes (20975 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 410 MB (2.0%)
Collecting resizing constraints ...
You might resize at 409182208 bytes or 410 MB (freeing 20565 MB).
Please make a test run using both the -n and -s options before real resizing!
debian:~# ntfsresize -s 9G /dev/sda1
ntfsresize v1.12.1 (libntfs 8:1:0)
Device name        : /dev/sda1
NTFS volume version: 1.2
Cluster size       : 4096 bytes
Current volume size: 20974428672 bytes (20975 MB)
Current device size: 20974431744 bytes (20975 MB)
New volume size    : 8999993856 bytes (9000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 410 MB (2.0%)
Collecting resizing constraints ...
Needed relocations : 99052 (406 MB)
WARNING: Every sanity check passed and only the dangerous operations left.
Make sure that important data has been backed up! Power outage or computer
crash may result major data loss!
Are you sure you want to proceed (y/[n])? y
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/sda1'.
You can go on to shrink the device for example with Linux fdisk.
IMPORTANT: When recreating the partition, make sure that you
  1)  create it at the same disk sector (use sector as the unit!)
  2)  create it with the same partition type (usually 7, HPFS/NTFS)
  3)  do not make it smaller than the new NTFS filesystem size
  4)  set the bootable flag for the partition if it existed before
Otherwise you won't be able to access NTFS or can't boot from the disk!
If you make a mistake and don't have a partition table backup then you
can recover the partition table by TestDisk or Parted's rescue mode.
debian:~# ntfsresize -i -f /dev/sda1
ntfsresize v1.12.1 (libntfs 8:1:0)
Device name        : /dev/sda1
NTFS volume version: 1.2
Cluster size       : 4096 bytes
Current volume size: 8999993856 bytes (9000 MB)
Current device size: 20974431744 bytes (20975 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 409 MB (4.5%)
Collecting resizing constraints ...
You might resize at 408817664 bytes or 409 MB (freeing 8591 MB).
Please make a test run using both the -n and -s options before real resizing!
debian:~# fdisk /dev/sda

The number of cylinders for this disk is set to 20023.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20482843+   7  HPFS/NTFS
/dev/sda2            2551        3158     4883760   83  Linux
/dev/sda3            3159        3280      979965   82  Linux swap / Solaris

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-20023, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2550, default 2550): +10000M

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS)

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/sda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1217     9775521    7  HPFS/NTFS
/dev/sda2            2551        3158     4883760   83  Linux
/dev/sda3            3159        3280      979965   82  Linux swap / Solaris

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

<<< REBOOT >>>

debian:~# ntfsresize -i -f /dev/sda1
ntfsresize v1.12.1 (libntfs 8:1:0)
Device name        : /dev/sda1
NTFS volume version: 1.2
Cluster size       : 4096 bytes
Current volume size: 8999993856 bytes (9000 MB)
Current device size: 10010133504 bytes (10011 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 409 MB (4.5%)
Collecting resizing constraints ...
You might resize at 408817664 bytes or 409 MB (freeing 8591 MB).
Please make a test run using both the -n and -s options before real resizing!
debian:~# ntfsresize -i /dev/sda1
ntfsresize v1.12.1 (libntfs 8:1:0)
Device name        : /dev/sda1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 20972564992 bytes (20973 MB)
Current device size: 20972568576 bytes (20973 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7887 MB (37.6%)
Collecting resizing constraints ...
You might resize at 7886684160 bytes or 7887 MB (freeing 13086 MB).
Please make a test run using both the -n and -s options before real resizing!
debian:~# ntfsresize -s 9G /dev/sda1
ntfsresize v1.12.1 (libntfs 8:1:0)
Device name        : /dev/sda1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 20972564992 bytes (20973 MB)
Current device size: 20972568576 bytes (20973 MB)
New volume size    : 8999993856 bytes (9000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7887 MB (37.6%)
Collecting resizing constraints ...
Needed relocations : 330204 (1353 MB)
WARNING: Every sanity check passed and only the dangerous operations left.
Make sure that important data has been backed up! Power outage or computer
crash may result major data loss!
Are you sure you want to proceed (y/[n])? y
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/sda1'.
You can go on to shrink the device for example with Linux fdisk.
IMPORTANT: When recreating the partition, make sure that you
  1)  create it at the same disk sector (use sector as the unit!)
  2)  create it with the same partition type (usually 7, HPFS/NTFS)
  3)  do not make it smaller than the new NTFS filesystem size
  4)  set the bootable flag for the partition if it existed before
Otherwise you won't be able to access NTFS or can't boot from the disk!
If you make a mistake and don't have a partition table backup then you
can recover the partition table by TestDisk or Parted's rescue mode.
debian:~# ntfsresize -i -f /dev/sda1
ntfsresize v1.12.1 (libntfs 8:1:0)
Device name        : /dev/sda1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 8999993856 bytes (9000 MB)
Current device size: 20972568576 bytes (20973 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7887 MB (87.6%)
Collecting resizing constraints ...
You might resize at 7886319616 bytes or 7887 MB (freeing 1113 MB).
Please make a test run using both the -n and -s options before real resizing!
debian:~# fdisk /dev/sda

The number of cylinders for this disk is set to 20023.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20481024    7  HPFS/NTFS
/dev/sda2            2551        3158     4883760   83  Linux
/dev/sda3            3159        3280      979965   82  Linux swap / Solaris

Command (m for help): d
Partition number (1-4): 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-20023, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2550, default 2550): +10000M

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 7
Changed system type of partition 1 to 7 (HPFS/NTFS)

Command (m for help): a
Partition number (1-4): 1

Command (m for help): p

Disk /dev/sda: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1217     9775521    7  HPFS/NTFS
/dev/sda2            2551        3158     4883760   83  Linux
/dev/sda3            3159        3280      979965   82  Linux swap / Solaris

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

<<< REBOOT >>>

debian:~# ntfsresize -i -f /dev/sda1
ntfsresize v1.12.1 (libntfs 8:1:0)
ERROR(5): Opening '/dev/sda1' as NTFS failed: Input/output error
This software has detected that your NTFS is corrupted. Please run chkdsk /f
on Windows then reboot it TWICE! Important, don't forget the /f parameter!
Afterwards you can run ntfsresize. No modification was made to NTFS.

fjp@debian:~$ ntfsfix /dev/sda1
Mounting volume... FAILED
Attempting to correct errors... FAILED
Failed to startup volume: Permission denied
Volume is corrupt. You should run chkdsk.

Attachment: pgpzD18GL5Gyr.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: partman-partitioning
Source-Version: 47

We believe that the bug you reported is fixed in the latest version of
partman-partitioning, which is due to be installed in the Debian FTP archive:

partman-partitioning_47.dsc
  to pool/main/p/partman-partitioning/partman-partitioning_47.dsc
partman-partitioning_47.tar.gz
  to pool/main/p/partman-partitioning/partman-partitioning_47.tar.gz
partman-partitioning_47_amd64.udeb
  to pool/main/p/partman-partitioning/partman-partitioning_47_amd64.udeb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 379835@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Frans Pop <fjp@debian.org> (supplier of updated partman-partitioning package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed,  7 Mar 2007 22:48:21 +0100
Source: partman-partitioning
Binary: partman-partitioning
Architecture: source amd64
Version: 47
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Frans Pop <fjp@debian.org>
Description: 
 partman-partitioning - Partitioning operations for partman (udeb)
Closes: 379835
Changes: 
 partman-partitioning (47) unstable; urgency=low
 .
   * Enable resizing of Windows Vista NTFS partitions again. Closes: #379835.
   * Wait for the device file to be created again after resizing an NTFS
     partition.
Files: 
 4819cb267f1b98e1b43c2f44a2a22320 671 debian-installer optional partman-partitioning_47.dsc
 635350d7ec97731187cbde1a7f1a47bf 90405 debian-installer optional partman-partitioning_47.tar.gz
 92d42a173b0400db236b7b6ec71978d9 85512 debian-installer optional partman-partitioning_47_amd64.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF7zOXgm/Kwh6ICoQRAo+VAKCkLIGyGyP2lnmGCsZYPBQY5HYYugCghu+W
ryqadDOEFQEpGUQlHkc7XRg=
=C/mj
-----END PGP SIGNATURE-----


--- End Message ---

Reply to: