The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Extended partion shrinked. How to use the unallocated space beyond it?

    Discussion in 'Linux Compatibility and Software' started by Sredni Vashtar, Oct 22, 2007.

  1. Sredni Vashtar

    Sredni Vashtar Notebook Evangelist

    Reputations:
    28
    Messages:
    593
    Likes Received:
    0
    Trophy Points:
    30
    Ok, when I discovered that I could not have more than 15 partitions in Linux, I stopped creating volumes in my extended partition leaving some 50 GB of unused space inside it. I have three primary partitions (NTFS and FAT16 - dell's diagnostics) and an extended partition with NTFS and ext3 volumes, plus swap).

    I Installed kanotix, ubuntu, manually installed grub on the ubuntu partition, fixed Vista's bootloader in order to boot Vista, Kanotix and Ubuntu. Everything seemed fine.

    This evening I decide I could expand my last volume in the extended partition so that I could use up all the space left. To my dismay I discovered that the unallocated space is outside the extended partition and that there is no way to use it. WTF???
    Neither GParted nor Vista are able to include the unallocated space in the extended partition so that I could expand the last volume.

    How do I get my disk space back?
    And, more importantly, how could that have happened? AFAIK the logical volumes size is determined by the start of the next logical volume. But who changed the size of the extended partition? The ubuntu install? Grub? GParted? Vista?
     
  2. Eleison

    Eleison Thanatos Eleison

    Reputations:
    1,677
    Messages:
    1,462
    Likes Received:
    0
    Trophy Points:
    55
    Not being a Linux expert, I can't say for certain, but my best guess would be to try deleting the partition you are trying to merge with the unpartitioned space, then repartition the whole lot. Of course, the data loss is a significant disadvantage of my suggestion, but it might work.
     
  3. tripinva

    tripinva Notebook Consultant NBR Reviewer

    Reputations:
    62
    Messages:
    187
    Likes Received:
    0
    Trophy Points:
    30
    Expand the logical partition (sda4?) first to fill all the space, then it'll move the unallocated space to where you can expand your last partition.

    - Trip
     
  4. Sredni Vashtar

    Sredni Vashtar Notebook Evangelist

    Reputations:
    28
    Messages:
    593
    Likes Received:
    0
    Trophy Points:
    30
    That's what I tried to do: but gparted does not allow me to expand /dev/sda4 (options are greyed out). Vista's pm doesn't even allow me to select the extended partition.

    I ran
    sfdisk -l -x /dev/sda
    and, as I expected, the problem resides in tha main partition table in the MBR. The extended partition endsector is not the last sector of the disk.
    I am a little hesitant in modifying its' entry by hand, mostly because I got a warning saying that the extended partition does not begin at the beginning of a cylinder (thanks Vista, for that) and I don't get an integer number by dividing the number of cylinders by the size of the blocks.

    I am pretty pissed off since removing the extended partition would mean removing the two linux directories and reinstall everything. And all this because of the artificial and arbitrary limitation of 15 partitions Linux has for scsi disks. And I thought it was windows the OS with the limitations... :-(

    I will try to run gparted from a live CD, since I guess the option is greyed out because I cannot unmount the / directory that's on one logical partition.
     
  5. Sredni Vashtar

    Sredni Vashtar Notebook Evangelist

    Reputations:
    28
    Messages:
    593
    Likes Received:
    0
    Trophy Points:
    30
    Thaks for the suggestion, but I am afraid it won't work since it's the extended partition size that is wrong. I am afraid that by removing the last logical partition its size could diminish even further. I will try that as a last option.
     
  6. tripinva

    tripinva Notebook Consultant NBR Reviewer

    Reputations:
    62
    Messages:
    187
    Likes Received:
    0
    Trophy Points:
    30
    This may help. I had dismounted a partition that I wanted to expand and QtParted wouldn't let me do it from within Kubuntu since it was supposedly "busy." Booted off the GParted Live disk and it expanded just fine.

    - Trip
     
  7. Sredni Vashtar

    Sredni Vashtar Notebook Evangelist

    Reputations:
    28
    Messages:
    593
    Likes Received:
    0
    Trophy Points:
    30
    It helped. :)
    I had to disable swap and then I was able to expand sda4 and then sda15.

    I still wonder what caused the problem, though.

    Thanks everybody for your support.