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

This is a discussion on Bug#298042: debian-installer: fails to mark partition type as linux if reusing a ntfs partition - Debian ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

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

  1. Bug#298042: debian-installer: fails to mark partition type as linux if reusing a ntfs partition

    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 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]



    --
    To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. Bug#298042: debian-installer: fails to mark partition type as linux if reusing a ntfs partition

    Colin Watson 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."



    --
    To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  3. Bug#298042: debian-installer: fails to mark partition type as linux if reusing a ntfs partition

    On Fri, Oct 10, 2008 at 04:49:47PM -0300, Otavio Salvador wrote:
    > Colin Watson 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]



    --
    To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

+ Reply to Thread