Received: (at 33607) by debbugs.gnu.org; 23 Apr 2019 15:31:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 23 11:31:56 2019 Received: from localhost ([127.0.0.1]:54103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hIxOm-00029y-Cx for submit <at> debbugs.gnu.org; Tue, 23 Apr 2019 11:31:56 -0400 Received: from ec2-34-202-238-73.compute-1.amazonaws.com ([34.202.238.73]:46934 helo=vps.thesusis.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <psusi@HIDDEN>) id 1hIxOk-00029k-Cu for 33607 <at> debbugs.gnu.org; Tue, 23 Apr 2019 11:31:54 -0400 Received: from localhost (localhost [127.0.0.1]) by vps.thesusis.net (Postfix) with ESMTP id 0DF1C27582; Tue, 23 Apr 2019 11:31:48 -0400 (EDT) Received: from vps.thesusis.net ([IPv6:::1]) by localhost (ip-172-26-1-203.ec2.internal [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id feZEEbbFKnhE; Tue, 23 Apr 2019 11:31:47 -0400 (EDT) Received: by vps.thesusis.net (Postfix, from userid 1000) id C150A28865; Tue, 23 Apr 2019 11:31:47 -0400 (EDT) References: <4778628e-b3bf-b41d-747b-91c5bf49315e@HIDDEN> <dba43138-7ec1-fe7d-e477-9ad872bffc01@HIDDEN> User-agent: mu4e 0.9.18; emacs 25.2.2 From: Phillip Susi <phill@HIDDEN> To: Paul Ausbeck <paula@HIDDEN> Subject: Re: bug#33607: Recovered from partition list loop In-reply-to: <dba43138-7ec1-fe7d-e477-9ad872bffc01@HIDDEN> Date: Tue, 23 Apr 2019 11:31:47 -0400 Message-ID: <877ebkeo0s.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 33607 Cc: 33607 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.6 (/) Was the kernel able to correctly read the partition table at boot or after running blockdev --rereadpt? If fdisk and the kernel are both happy with it then it may just be a bug in parted. Paul Ausbeck writes: > When I posted the original problem I was sort of hoping to get some recovery advice. However, I've now recovered the partition table and I'm now posting just to further document my experience. I'm now thinking that the bug I encountered is likely in the fdisk program, but I still think that parted/partprobe could be improved to better handle loops in the partition table. > > To recover, I booted the system from a USB stick. At this point the disk partition table was still hosed and there were 255 associated devices, sda1 - sda255 in /dev. parted would still not print the hosed partition table, but bailed out as described previously. However, fdisk would print the table, but somehow saw only, I can't remember exactly, maybe 45 or 54 partitions. On a lark, I used fdisk to delete the extra partitions and wrote the edited table. Upon reboot, the disk was whole again with the correct/expected partition table in disk order. Go figure. > > Cheers, Paul Ausbeck
bug-parted@HIDDEN
:bug#33607
; Package parted
.
Full text available.Received: (at 33607) by debbugs.gnu.org; 5 Dec 2018 23:29:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 05 18:29:14 2018 Received: from localhost ([127.0.0.1]:34769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1gUgbS-0002QY-5I for submit <at> debbugs.gnu.org; Wed, 05 Dec 2018 18:29:14 -0500 Received: from mail-pl1-f171.google.com ([209.85.214.171]:41708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <paula@HIDDEN>) id 1gUgN1-00021R-GC for 33607 <at> debbugs.gnu.org; Wed, 05 Dec 2018 18:14:20 -0500 Received: by mail-pl1-f171.google.com with SMTP id u6so10776009plm.8 for <33607 <at> debbugs.gnu.org>; Wed, 05 Dec 2018 15:14:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soe.ucsc.edu; s=soe-google-2018; h=from:to:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=4CrNcK1JCqcX9xIoNN8hubo5+4Cehkt13y14joJBAkk=; b=Pq1tH3SK2HU5xQGapMO/LQ+iR6kcH9I2b091/UZiYoQmFj8/D4U1hvgWiXyTJR3u/n CTFEAUg7RRBIBUBrvYTh9CM76ZhZlk1/52TkcjZ7AtkFwXbW0aiu16PmSYgMtk5gH/Hj kyiActMeE1/QKnYZ0NPF7kQKZl/rGC2j14m8//QKAG6OzGz1gpFvD8N6ZQi5lCv2eneS IRz2OkME7iDtnMlQO+QOeFPBdpiNsIlB3ElMr0diWcffvKMpaAsyBRB3rV6PFIhF1SoE /NF784YDzMXSdd0E4pgEqZKRuHBOnMy2MJO77C5fsAwVrDnmOXh0pln/2BZmplqVGZ9U 3dUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=4CrNcK1JCqcX9xIoNN8hubo5+4Cehkt13y14joJBAkk=; b=rTF+4y2hkbywSgNvw7inR5waTubxP/4h25j11BXo6/mrQn8o9VB7l5dxf44EjQPKIz hH4nFCHYv6Uzh+aJII2EPLsfdnQeHpN08UGF5K6yNxGKLEYgUs0asryqWrgeqOlx46Vb V8T5BkrBU8o+uNjZVjiV6He/Cz/4lKNLthZAUpP/Mea0pSPZsD7UeJGsrAabx5ZMBEWN BcBus0+6Ww24m/cNhTP0WlLhJ7Dq8Ohozpm8bMUBTYvk/hL1AuWxb0F+pPaVtL7hzV6b hBgpKCRWDuMtLu/9cfdLqkbgaiLQ9DhP0TQ0Yeb6Z9qGiYWBBuaW3aYxJnknfiaJ3+n3 reiw== X-Gm-Message-State: AA+aEWbDK8TLsDHEmFcwRdaE72n2WxhHXWHRyo+InUst0qldfcl+GcGO +SHPAOljD7sI9negTrSmayaxIU2rbo8= X-Google-Smtp-Source: AFSGD/WZ/a9sOATUxylhsl9Va0on3/Ka6A2V9GJ2euM/k4DtMNJxVrWv2EyIuwr4c++A3bn/FpseBQ== X-Received: by 2002:a17:902:468:: with SMTP id 95mr25780654ple.3.1544051653449; Wed, 05 Dec 2018 15:14:13 -0800 (PST) Received: from [192.168.1.50] (c-76-21-18-82.hsd1.ca.comcast.net. [76.21.18.82]) by smtp.gmail.com with ESMTPSA id r8sm22848676pgr.48.2018.12.05.15.14.12 for <33607 <at> debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 15:14:12 -0800 (PST) From: Paul Ausbeck <paula@HIDDEN> X-Google-Original-From: Paul Ausbeck <paula@HIDDEN> To: 33607 <at> debbugs.gnu.org Subject: Recovered from partition list loop Message-ID: <dba43138-7ec1-fe7d-e477-9ad872bffc01@HIDDEN> Date: Wed, 5 Dec 2018 15:14:07 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 33607 X-Mailman-Approved-At: Wed, 05 Dec 2018 18:29:12 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) When I posted the original problem I was sort of hoping to get some recovery advice. However, I've now recovered the partition table and I'm now posting just to further document my experience. I'm now thinking that the bug I encountered is likely in the fdisk program, but I still think that parted/partprobe could be improved to better handle loops in the partition table. To recover, I booted the system from a USB stick. At this point the disk partition table was still hosed and there were 255 associated devices, sda1 - sda255 in /dev. parted would still not print the hosed partition table, but bailed out as described previously. However, fdisk would print the table, but somehow saw only, I can't remember exactly, maybe 45 or 54 partitions. On a lark, I used fdisk to delete the extra partitions and wrote the edited table. Upon reboot, the disk was whole again with the correct/expected partition table in disk order. Go figure. Cheers, Paul Ausbeck
bug-parted@HIDDEN
:bug#33607
; Package parted
.
Full text available.Received: (at submit) by debbugs.gnu.org; 4 Dec 2018 06:21:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 04 01:21:05 2018 Received: from localhost ([127.0.0.1]:59704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1gU44v-0000L8-4B for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 01:21:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <paula@HIDDEN>) id 1gU2su-0006bm-VV for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 00:04:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paula@HIDDEN>) id 1gU2so-0007xc-DK for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 00:04:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <paula@HIDDEN>) id 1gU2so-0007x6-73 for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 00:04:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <paula@HIDDEN>) id 1gU2sn-0005Sx-6V for bug-parted@HIDDEN; Tue, 04 Dec 2018 00:04:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paula@HIDDEN>) id 1gU2sj-0007mm-2Y for bug-parted@HIDDEN; Tue, 04 Dec 2018 00:04:29 -0500 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:45457) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <paula@HIDDEN>) id 1gU2si-0007lC-OM for bug-parted@HIDDEN; Tue, 04 Dec 2018 00:04:24 -0500 Received: by mail-pg1-x532.google.com with SMTP id y4so6789588pgc.12 for <bug-parted@HIDDEN>; Mon, 03 Dec 2018 21:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soe.ucsc.edu; s=soe-google-2018; h=from:to:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=cvI3yW9Aepn37UzdU68h+5uAHD0OKbWPpEQl6Gx3ca4=; b=DPZzMUABuBFiDXX5LUTnD8YPBUZcK+3wMCo0EZzvcTZezek+Jv0Wn5DNTVokps081Q agLRHludW09OrhrZiiXd4c8h3sJmzw4ucyQi5kBt+i+jd70KqOUzhAwTPnlMDqTGPwht QHcwIhvLAndmpgFaW9nuWjsRGBvi2oEqZAaOWLlM6Hp+GmbeQ7clLE6AzS9k88zjLzoY TQ0YekSBtXNo4J+sZzp/Y1C6GTmpfPlVoP86dUJxV5YTZEHkbWgGAu3Jfb6dhJ/TMP/L GK1yy3HWRADhAWuG7xHHjqmQffLpB9/Ka7sB3L14/91V1z7W/fdfbyhxV8B6/mrfJa7w DQ0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=cvI3yW9Aepn37UzdU68h+5uAHD0OKbWPpEQl6Gx3ca4=; b=mkdd3VZKMp1yVGAQ3dXq06xEPcwn5am2Ug8/GYOVCNB7p2fF7AbELUw7b/14L4ZNec dqUAd3JbZli/uoT4+/1FK4xga2h9awlhVzp2s+Lli4Sd/CwcuWi29bld4A/4yQAt1THg ile+aj2Tu9F1r+ElCEXr7C+JALEfJ1dhyR4Cehbw2LZEXM7GplGbrFzsrBTgYO6gdewa jmBs1nvN2Rbk3xGZvwKnCx5wNfnkc9NzgaOiDJc3as83BwYsnbj7kYf0omqgX6C6Z+Lx FUag5SrIobXWdryOkeh8Wl46DzGFsEQY44TfSV/uC47vtd0FobdnhLYbfR33k1GbtPk3 mAnA== X-Gm-Message-State: AA+aEWbGxEF87HkhjVBdTGermZEpmRyxfulwQW9q/IMjsO+0iKWnS/zn AgCxRgkcIXRtaTdb7k25iVahB7kFotY= X-Google-Smtp-Source: AFSGD/UxlMQO586bfKZ/O1i9ei11rud077NdU7rJfkHfHJ2UlYNhMe/UYlkJ08xKtztcVIW5itKCGw== X-Received: by 2002:a62:5716:: with SMTP id l22mr19207331pfb.16.1543899863046; Mon, 03 Dec 2018 21:04:23 -0800 (PST) Received: from [192.168.1.50] (c-76-21-18-82.hsd1.ca.comcast.net. [76.21.18.82]) by smtp.gmail.com with ESMTPSA id l5sm15169893pgp.82.2018.12.03.21.04.21 for <bug-parted@HIDDEN> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 21:04:22 -0800 (PST) From: Paul Ausbeck <paula@HIDDEN> X-Google-Original-From: Paul Ausbeck <paula@HIDDEN> To: bug-parted@HIDDEN Subject: Partition list loop Message-ID: <4778628e-b3bf-b41d-747b-91c5bf49315e@HIDDEN> Date: Mon, 3 Dec 2018 21:04:19 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 04 Dec 2018 01:21:04 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) I have a disk with three primary partitions and one extended partition. The extended partition originally contained 4 logical volumes sda5-8. sda5 and sda6 were 16GB, sda7 8GB, and sda8 the balance of the extended partition > 100GB. sda5 and sda6 contained debian jessie x86 and x64 boot filesystems. I wanted to install stretch filesystems on this disk so booting to sda6 I resized sda5 to fit into 8GB. I then used fdisk to delete sda5 and create two new 8GB partitions sda8 and sda9 where the 16GB sda5 formerly resided. When I committed the changes partprobe reported that the new partition table couldn't be read due to partitions being busy and I should reboot. After the reboot everything was as fdisk said it would be, partitions formerly sda6-8 were now sda5-7 and the new partitions were sda8-9. Now this is where things went off the rails. I decided that before making any more changes I would reorder the partition table to be in disk order, using fdisk's extended command, x, then f. After fixing the partition order, fdisk listed all nine partitions in partition order. I then committed the changes and again got the partprobe message that I should reboot. Well, at this point the drive would not boot properly. The linux kernel loads but partprobe is looping through the logical partitions again and again and creating many copies of the same five partitions, up to a max it looks like of sda255. If I run parted and try and print the partition table I get the following error: Assertion (metadata length >0) at .././../libparted/labels/dos.c:2313 in function add_logical_part_metadata() failed. At this point, I don't know exactly who to blame. Either fdisk has somehow created an unterminated, looping partition list, or parted/partprobe is erroneously processing a correct list. I'm reporting on the parted mailing list as I ran into your assertion and bug report instructions and thought you'd like to know about it. Personally, I'm thinking that parted/partprobe shouldn't loop back through the same partitions reporting them as additional partitions, even if the partition list is telling them to do so. Also, I'm hoping that someone on the parted list can tell me how to patch things up with dd. I can boot from a USB stick and use fdisk to print its idea of the partition table, below. Parted does not print the table but throws the above assertion. The table: Command (m for help): p Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xa0e33a5e Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 2459647 2457600 1.2G 7 HPFS/NTFS/exFAT /dev/sda2 2459648 84379647 81920000 39.1G 7 HPFS/NTFS/exFAT /dev/sda3 84379648 166299647 81920000 39.1G 7 HPFS/NTFS/exFAT /dev/sda4 166299648 488397167 322097520 153.6G 5 Extended /dev/sda5 166301696 183078911 16777216 8G 83 Linux /dev/sda6 183080960 199858175 16777216 8G 83 Linux /dev/sda7 199858176 233412607 33554432 16G 83 Linux /dev/sda8 233414656 250191871 16777216 8G 82 Linux swap / Solari /dev/sda9 250193920 488397167 238203248 113.6G 83 Linux
Paul Ausbeck <paula@HIDDEN>
:bug-parted@HIDDEN
.
Full text available.bug-parted@HIDDEN
:bug#33607
; Package parted
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.