Hello Chris, I understand that I wasn't very clear, so I'm going to explain step by step everything I did (I skipped very few steps). You may want to check the list of problems and the final notes I wrote at the end as they may be more helpful in categorizing the bugs I found than the rest of this post.
Sincerely, Grégoire Roumache 1. I created a virtual machine (VM) on Virtual Box, with a 20 Gio virtual hard drive. 2. After inserting the debian .iso file in the optical drive, I started the machine. 3. In the "Debian GNU/Linux installer menu (BIOS mode)", I selected the "Install" option, not the "Graphical install" option. 4. I selected the following options: - Language: English - Country: United States - Keymap: Belgian - Hostname: debian - Domain name: (left empty) - Time zone: Eastern - Partitioning method: Manual 5. In the "Partition disks", I selected the hard drive: "SCSI2 (0,0,0) (sda) - 21.5 GB ATA VBOX HARDDISK". 6. At the question "Create new empty partition table on this device?", I selected "Yes". 7. I selected the "pri/log 21.5 GB FREE SPACE" option, then I selected the following options: - How to use this free space: Create a new partition - New partition size: 256 MB - Type for the new partition: Primary - Location for the new partition: Beginning - Mount point: /boot - Bootable flag: on Then I selected "Done setting up the partition" 8. I selected the "pri/log 21.2 GB FREE SPACE" option, then: - How to use this free space: Create a new partition - New partition size: 1 GB - Type for the new partition: Primary - Location for the new partition: Beginning - Use as: swap area 9. I selected the "pri/log 20.2 GB FREE SPACE" option, then: - How to use this free space: Create a new partition - New partition size: 10 GB - Type for the new partition: Primary - Location for the new partition: End (/!\ this is important) - Mount point: / 10. I selected the "pri/log 10.2 GB FREE SPACE" option, then: - How to use this free space: Create a new partition - New partition size: 2 GB - Type for the new partition: Logical - Location for the new partition: Beginning - Mount point: /home 11. I selected the "pri/log 8.2 GB FREE SPACE" option, then: - How to use this free space: Create a new partition - New partition size: 2 GB - Location for the new partition: Beginning - Mount point: /tmp Note: it doesn't ask for the type of the new partition as it can only be: Logical. The partitions' list should now be: #1 primary 254.8 MB B f ext4 /boot #2 primary 1.0 GB f swap swap #5 logical 2.0 GB f ext4 /home #6 logical 2.0 GB f ext4 /tmp logical 6.2 GB FREE SPACE #3 primary 10.0 GB f ext4 / 12. Select "Finish partitioning and write change to disk", then confirm. 13. At "Software selection", select only "standard system utilities". 14. Install the GRUB loader to the master boot record on: /dev/sda. 15. The installation is now over, so let's check the partitions: # fdisk -l Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors Disk model: VBOX HARDDISK ... Disklabel type: dos Disk identifier: 0xe76778c5 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 22411264 41940991 19529728 9.3G 83 Linux /dev/sda4 2455550 10264575 7809026 3.7G 5 Extended /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux # cfdisk Disk: /dev/sda Size: 20 GiB, 21474836480 bytes, 41943040 sectors Label: dos, identifier: 0xe76778c5 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 22411264 41940991 19529728 9.3G 83 Linux /dev/sda4 2455550 10264575 7809026 3.7G 5 Extended |- /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux |- /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux FREE SPACE 10264576 22411263 12146688 5.8G # parted --list Model: ATA VBOX HARDDISK (scsi) Disk /dev/sda: 21.5GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 256MB 255MB primary ext4 boot 2 256MB 1256MB 1000MB primary linux-swap(v1) 4 1257MB 5255MB 3998MB extended 5 1257MB 3256MB 1999MB logical ext4 6 3257MB 5255MB 1999MB logical ext4 3 11.5GB 21.5GB 9999MB primary ext4 16. At this point, I shut down my machine to duplicate it. The goal is to check whether the problem would still appear with fdisk or parted. With cfdisk: 1. I sorted the partitions, note that there's 15.1 G of free space in sda4 eventhough the size for sda4 is 9.3 G. # cfdisk > s (==> type "s" or select the option "Sort") > w (==> type "w" or select the option "Write") Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 2455550 10264575 7809026 3.7G 5 Extended FREE SPACE 10264576 22411263 12146688 5.8G /dev/sda4 22411264 41940991 19529728 9.3G 83 Linux |- /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux |- /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux |- FREE SPACE 10266624 41940991 31674368 15.1G 2. If you relaunch cfdisk right after, it goes back to normal: # cfdisk Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 22411264 41940991 19529728 9.3G 83 Linux /dev/sda4 2455550 10264575 7809026 3.7G 5 Extended |- /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux |- /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux FREE SPACE 10264576 22411263 12146688 5.8G # fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 22411264 41940991 19529728 9.3G 83 Linux /dev/sda4 2455550 10264575 7809026 3.7G 5 Extended /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux 3. Relaunch cfdisk and sort: # cfdisk > s (==> type "s" or select the option "Sort") Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 2455550 10264575 7809026 3.7G 5 Extended FREE SPACE 10264576 22411263 12146688 5.8G /dev/sda4 22411264 41940991 19529728 9.3G 83 Linux |- /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux |- /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux |- FREE SPACE 10266624 41940991 31674368 15.1G 4. Select "Free space" inside sda4, then create a new partition of maximum size (15.1 G, inside the 9.3 G sda4): > n (==> type "n" or select the option "New") > 15.1G > w (==> type "w" or select the option "Write") Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 2455550 10264575 7809026 3.7G 5 Extended FREE SPACE 10264576 22411263 12146688 5.8G /dev/sda4 22411264 41940991 19529728 9.3G 83 Linux |- /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux |- /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux |- /dev/sda7 10266624 22411263 12144640 5.8G 83 Linux |- FREE SPACE 22413312 41940991 19527680 9.3G Note that instead of creating a 15.1 G partition, it created a 5.8 G one. 5. Now, let's check with cfdisk and fdisk: # cfdisk Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 2455550 10264575 7809026 3.7G 5 Extended |- /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux |- /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux |- /dev/sda7 10266624 22411263 12144640 5.8G 83 Linux FREE SPACE 10264576 22411263 12146688 5.8G /dev/sda4 22411264 41940991 19529728 9.3G 83 Linux # fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 2455550 10264575 7809026 3.7G 5 Extended /dev/sda4 22411264 41940991 19529728 9.3G 83 Linux /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux /dev/sda7 10266624 22411263 12144640 5.8G 83 Linux Note this: - it swapped sda3 and sda4 from before the creation of sda7 (with fdisk) - the free space (with cfdisk) is not actually free but is part of sda7 - the extended partition sda3 has a size of 3.7 G, however it's supposed to contain both sda5, sda6, sda7 => 1.9 + 1.9 + 5.8 > 3.7 (with both fdisk and cfdisk) - actually, sda3 only contains the first 2050 sectors of sda7, before sda7 somehow extends over the free space 6. If you delete the new partition, sda7, it gives this: # cfdisk Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 2455550 10264575 7809026 3.7G 5 Extended |- /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux |- /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux FREE SPACE 10264576 22411263 12146688 5.8G /dev/sda4 22411264 41940991 19529728 9.3G 83 Linux # fdisk -l Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 2455550 10264575 7809026 3.7G 5 Extended /dev/sda4 22411264 41940991 19529728 9.3G 83 Linux /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux Here, it seems that everything is solved. 7. However, if you try to resize sda3 (with cfdisk), to fill up the free space between sda3 and sda4, you get that "maximum size is 3998221312 bytes". This corresponds to 3998221312 / 512 = 7809026 sectors, exactly the size of sda3. That means, sda3 is already of maximum size and can't be resized. Note that if you try to create a new partition with fdisk, it will print: "no free sectors available" (option "n"). But if you list free unpartitioned space (option "F"), it will print this: Start End Sectors Size 10264576 22411263 12146688 5.8G 8. Now, if you try to resize with parted: # parted (parted) print Number Start End Size Type File system Flags 1 1049kB 256MB 255MB primary ext4 boot 2 256MB 1256MB 1000MB primary linux-swap(v1) 3 1257MB 5255MB 3998MB extended 5 1257MB 3256MB 1999MB logical ext4 6 3257MB 5255MB 1999MB logical ext4 4 11.5GB 21.5GB 9999MB primary ext4 (parted) resizepart 3 End? [5255MB]?> 11.5GB You should reboot before making further changes> q # reboot 9. After rebooting, sda3 has been resized and everything works perfectly somehow: # cfdisk Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 499711 497664 243M 83 Linux /dev/sda2 499712 2453503 1953792 954M 82 Linux swap / Solaris /dev/sda3 2455550 10264575 7809026 3.7G 5 Extended |- /dev/sda5 2455552 6359039 3903488 1.9G 83 Linux |- /dev/sda6 6361088 10264575 3903488 1.9G 83 Linux |- FREE SPACE 10264576 22411263 12146688 5.8G /dev/sda4 22411264 41940991 19529728 9.3G 83 Linux Some final notes for this post: - the partitioning problems don't seem to come from the installation process (installation of the OS) - there are problems with both fdisk and cfdisk - parted seems to work fine and also correct the problems of fdisk and cfdisk List of every problem I've noticed thus far: - sorting the partitions in cfdisk at the beginning messes everything, it displays 15.1 G of free space in a 9.3 G extended partition - creating a 15.1 G partition inside the 9.3 G extended partition, creates a 5.8 G partition - cfdisk displays free space that overlaps with occupied space - both cfdisk and fdisk display that the extended partition is smaller than the combination of the logical partitions it contains - the extended partition only contains the first two partitions and only 2050 sectors of the third - once you delete the newly created partition, the free space just stays between the extended partition sda3 and the partition at the end of the disk sda4, sda3 can't be resized Le dim. 8 nov. 2020 à 15:55, Chris Hofstaedtler <z...@debian.org> a écrit : > Hello gregoire roumache, > > Thank you for your report. > > * gregoire roumache <grouma...@gmail.com> [201108 14:52]: > > I installed this debian with a HDD of 20 Gio, and partitioned it > manually. > > > > Here are the partitions I made, in order: > > > > 1. 256 MB - primary - beginning - ext4 – /boot – bootable flag = on > > 2. 1 GB - primary - beginning - swap area > > 3. 10 GB - primary - end - ext4 - / > > 4. 2 GB - logical - beginning - ext4 - /home > > 5. 2 GB - logical - beginning - ext4 - /tmp > > > > [..] > > I don't understand your bug report. > > Could you please do these things / answer these questions: > > 1) Make a detailed reproduction steps list. What does "installed... > and partitioned manually" mean? Partitioned using cfdisk? > > 2) Provide output of fdisk -l before/after each step. > > 3) Do you think, this is > a) a bug in cfdisk? > b) your partition table? > c) in whatever tool that partitioned this disk initially? > > 4) Does the same problem appear if you use fdisk instead of cfdisk? > > 5) Does parted show the same problem? > > Chris >