Debian Bug report logs - #298042
debian-installer: fails to mark partition type as linux if reusing a ntfs partition

version graph

Package: partman-base; Maintainer for partman-base is Debian Install System Team <debian-boot@lists.debian.org>; Source for partman-base is src:partman-base.

Reported by: robinud@volja.net

Date: Fri, 4 Mar 2005 09:33:01 UTC

Severity: important

Tags: patch

Merged with 402606, 413065

Fixed in version partman-base/128

Done: Colin Watson <cjwatson@ubuntu.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#298042; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to robinud@volja.net:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: robinud@volja.net
To: submit@bugs.debian.org
Subject: debian-installer: fails to mark partition type as linux if reusing a ntfs partition
Date: Fri, 4 Mar 2005 10:27:33 +0100
Package: debian-installer
Severity: normal

*** Please type your report below this line ***

If one tries to use an old ntfs partition as an ext3 root
partition, then d-i forgets to change the partition id
from 7 (NTFS) to 83 (Linux).

Then grub failed to install itself on the disk.
I guess the above is the cause.

Also, if grub is somehow booted, it will list the partition
as unknown type and fail to load the kernel image or even to
browse the directories.

This happened with an official sarge snapshot from 20050225.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-k7-smp
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)


----------------------------------------------------------------
Varno. Enostavno. Vredno. Internet dodatne storitve.
http://www.voljatel.si/storitve/




Bug reassigned from package `debian-installer' to `partman'. Request was from Frans Pop <aragorn@tiscali.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `partman' to `partman'. Request was from Joey Hess <joeyh@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `partman' to `partman-base'. Request was from Frans Pop <elendil@planet.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Forcibly Merged 298042 413065. Request was from Frans Pop <elendil@planet.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Severity set to `important' from `normal' Request was from Frans Pop <elendil@planet.nl> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#298042; Package partman-base. (Fri, 10 Oct 2008 19:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 10 Oct 2008 19:12:03 GMT) Full text and rfc822 format available.

Message #20 received at 298042@bugs.debian.org (full text, mbox):

From: Colin Watson <cjwatson@ubuntu.com>
To: robinud@volja.net, 298042@bugs.debian.org
Subject: Re: debian-installer: fails to mark partition type as linux if reusing a ntfs partition
Date: Fri, 10 Oct 2008 20:04:14 +0100
tags 298042 patch
user ubuntu-devel@lists.ubuntu.com
usertags 298042 ubuntu-patch intrepid
thanks

On Fri, Mar 04, 2005 at 10:27:33AM +0100, robinud@volja.net wrote:
> If one tries to use an old ntfs partition as an ext3 root
> partition, then d-i forgets to change the partition id
> from 7 (NTFS) to 83 (Linux).
> 
> Then grub failed to install itself on the disk.
> I guess the above is the cause.
> 
> Also, if grub is somehow booted, it will list the partition
> as unknown type and fail to load the kernel image or even to
> browse the directories.

I'm pretty sure that this is because the CHANGE_FILE_SYSTEM command in
parted_server forgets to record that the partition table is changed.
When partman was originally written, this didn't matter because there
would generally also be a CREATE_FILE_SYSTEM command sent which would
mark the partition table as changed. However, it turned out that we
couldn't always use CREATE_FILE_SYSTEM because e.g. libparted can't
create resizable ext3 file systems, so this hasn't been guaranteed for
quite some time. Thus, when the COMMIT command is sent, parted_server
sees that the partition table is "unchanged" and so doesn't bother to
tell libparted to commit its changes to disk.

This doesn't happen if you create new partitions in the same run of
partman (without any intervening steps that involve committing changes
to disk), since the NEW_PARTITION command does record that the partition
table is changed.

The following patch should fix this bug which IMO is release-critical
(although I know that previous releases went out with this bug). I'm
afraid I'm not up to speed with d-i's current freeze state; Otavio, may
I commit this patch? I confess that I have not yet tested it, although I
have replicated the original bug under controlled conditions. I should
be able to perform a similar test soon with a fixed parted_server and
report back.

Index: debian/changelog
===================================================================
--- debian/changelog	(revision 56346)
+++ debian/changelog	(working copy)
@@ -1,3 +1,10 @@
+partman-base (128) UNRELEASED; urgency=low
+
+  * Record that CHANGE_FILE_SYSTEM changes the partition table (closes:
+    #298042).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 10 Oct 2008 19:55:51 +0100
+
 partman-base (127) unstable; urgency=low
 
   * Add human readable descriptions for MMC/SD cards.
Index: parted_server.c
===================================================================
--- parted_server.c	(revision 56346)
+++ parted_server.c	(working copy)
@@ -1640,6 +1640,7 @@
         scan_device_name();
         if (dev == NULL)
                 critical_error("The device %s is not opened.", device_name);
+        change_named(device_name);
         open_out();
         if (2 != iscanf("%as %as", &id, &s_fstype))
                 critical_error("Expected partition id and file system");

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]




Tags added: patch Request was from Colin Watson <cjwatson@ubuntu.com> to control@bugs.debian.org. (Fri, 10 Oct 2008 19:12:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#298042; Package partman-base. (Fri, 10 Oct 2008 19:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Otavio Salvador <otavio@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 10 Oct 2008 19:54:02 GMT) Full text and rfc822 format available.

Message #27 received at 298042@bugs.debian.org (full text, mbox):

From: Otavio Salvador <otavio@debian.org>
To: Colin Watson <cjwatson@ubuntu.com>
Cc: 298042@bugs.debian.org, robinud@volja.net
Subject: Re: Bug#298042: debian-installer: fails to mark partition type as linux if reusing a ntfs partition
Date: Fri, 10 Oct 2008 16:49:47 -0300
Colin Watson <cjwatson@ubuntu.com> writes:

> The following patch should fix this bug which IMO is release-critical
> (although I know that previous releases went out with this bug). I'm
> afraid I'm not up to speed with d-i's current freeze state; Otavio, may
> I commit this patch? I confess that I have not yet tested it, although I
> have replicated the original bug under controlled conditions. I should
> be able to perform a similar test soon with a fixed parted_server and
> report back.

Yes. Please test it and if it does solve the  issue please commit and
upload it. I'll be doing a installer upload but partman-base isn't
part of initrd so this doesn't block it to happen.

Thanks a lot by looking at this issue.

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#298042; Package partman-base. (Mon, 13 Oct 2008 18:30:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 13 Oct 2008 18:30:04 GMT) Full text and rfc822 format available.

Message #32 received at 298042@bugs.debian.org (full text, mbox):

From: Colin Watson <cjwatson@ubuntu.com>
To: Otavio Salvador <otavio@debian.org>
Cc: 298042@bugs.debian.org, robinud@volja.net
Subject: Re: Bug#298042: debian-installer: fails to mark partition type as linux if reusing a ntfs partition
Date: Mon, 13 Oct 2008 19:28:55 +0100
On Fri, Oct 10, 2008 at 04:49:47PM -0300, Otavio Salvador wrote:
> Colin Watson <cjwatson@ubuntu.com> writes:
> > The following patch should fix this bug which IMO is release-critical
> > (although I know that previous releases went out with this bug). I'm
> > afraid I'm not up to speed with d-i's current freeze state; Otavio, may
> > I commit this patch? I confess that I have not yet tested it, although I
> > have replicated the original bug under controlled conditions. I should
> > be able to perform a similar test soon with a fixed parted_server and
> > report back.
> 
> Yes. Please test it and if it does solve the  issue please commit and
> upload it. I'll be doing a installer upload but partman-base isn't
> part of initrd so this doesn't block it to happen.

It passed my controlled-conditions test, so I've committed and uploaded.
Thanks!

-- 
Colin Watson                                       [cjwatson@ubuntu.com]




Reply sent to Colin Watson <cjwatson@ubuntu.com>:
You have taken responsibility. (Mon, 13 Oct 2008 19:00:06 GMT) Full text and rfc822 format available.

Notification sent to robinud@volja.net:
Bug acknowledged by developer. (Mon, 13 Oct 2008 19:00:07 GMT) Full text and rfc822 format available.

Message #37 received at 298042-close@bugs.debian.org (full text, mbox):

From: Colin Watson <cjwatson@ubuntu.com>
To: 298042-close@bugs.debian.org
Subject: Bug#298042: fixed in partman-base 128
Date: Mon, 13 Oct 2008 18:32:04 +0000
Source: partman-base
Source-Version: 128

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

partman-base_128.dsc
  to pool/main/p/partman-base/partman-base_128.dsc
partman-base_128.tar.gz
  to pool/main/p/partman-base/partman-base_128.tar.gz
partman-base_128_i386.udeb
  to pool/main/p/partman-base/partman-base_128_i386.udeb
partman-utils_128_i386.udeb
  to pool/main/p/partman-base/partman-utils_128_i386.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 298042@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <cjwatson@ubuntu.com> (supplier of updated partman-base 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.8
Date: Mon, 13 Oct 2008 19:24:45 +0100
Source: partman-base
Binary: partman-base partman-utils
Architecture: source i386
Version: 128
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Colin Watson <cjwatson@ubuntu.com>
Description: 
 partman-base - Partition the storage devices (partman) (udeb)
 partman-utils - Utilities related to partitioning (udeb)
Closes: 298042
Changes: 
 partman-base (128) unstable; urgency=low
 .
   * Record that CHANGE_FILE_SYSTEM changes the partition table (closes:
     #298042).
Checksums-Sha1: 
 05718d7d74815980b9228ddc71005c615915a672 1039 partman-base_128.dsc
 01a525cf5435bd64f09fb0a764e9c0e289700299 161079 partman-base_128.tar.gz
 c572ce459d2eab8cefd7e74fb5e19c6bd0cc7b6d 130244 partman-base_128_i386.udeb
 c82cf5e138ece5ce839b2c7f62fda4cd93a4b2f1 3466 partman-utils_128_i386.udeb
Checksums-Sha256: 
 1fb88f8c3157d4882d46c2e9710afd8b06d60f70a2c42bee0f84bf1f42d8dae7 1039 partman-base_128.dsc
 85580d562a7fcf9f76f7152fd57c290915dc636af1e8bebf19542db64656c9eb 161079 partman-base_128.tar.gz
 a819e5273113124158bafd3a7b8be2a54012ef5bd39b6a086cbf745aa586e0e1 130244 partman-base_128_i386.udeb
 7d7b42b0b00eb3886caf3476d60e1395d37a5a6e1c326c01c917738b007d9020 3466 partman-utils_128_i386.udeb
Files: 
 6a591650ef838e64967c72366fbcd816 1039 debian-installer standard partman-base_128.dsc
 60c5e4dc6d552f21e0d644558faea2a8 161079 debian-installer standard partman-base_128.tar.gz
 79b1f40b4bbce09c97c313f65e7eb7b3 130244 debian-installer standard partman-base_128_i386.udeb
 03cc51dd60e50bdb66cd9b5c15ca24a7 3466 debian-installer extra partman-utils_128_i386.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Colin Watson <cjwatson@debian.org> -- Debian developer

iD8DBQFI85Lk9t0zAhD6TNERAqkwAJ0WD2pN622GkjPHPry7bXACj5kkwgCdGrEW
oSy7COkmny3rAB2vROr3GHU=
=3p6r
-----END PGP SIGNATURE-----





Reply sent to Colin Watson <cjwatson@ubuntu.com>:
You have taken responsibility. (Mon, 13 Oct 2008 19:00:07 GMT) Full text and rfc822 format available.

Notification sent to "Mohammed Hagag" <mohamedhagag1981@gmail.com>:
Bug acknowledged by developer. (Mon, 13 Oct 2008 19:00:07 GMT) Full text and rfc822 format available.

Merged 298042 402606 413065. Request was from Colin Watson <cjwatson@debian.org> to control@bugs.debian.org. (Mon, 02 Feb 2009 10:33:04 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 25 May 2009 07:29:59 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 08:21:08 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.