I previously had the following partitions on my sda:

- - /home
  - /var
  - /tmp
- swap

Now I deleted /var, /tmp and the swap partition of that drive. This leaves me with around 35G of empty space. I tried booting the computer with Kubuntu 12.04 and use the partition tool to resize it, but it gave errors about being unable to set the partition geometry. This is the current state of the system:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0719ee6e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda2            2046   593893375   296945665    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5            2048   554829823   277413888   83  Linux

I would like to use sda completely for /home without reformatting the drive. Those 35G are not worth moving the data from and to the device, I would say currently. Is there a way to resize without loosing the data?

  • Why don't you just extend the size of sda5 to take up the entire size of sda2?
    – terdon
    Commented Oct 4, 2013 at 18:10
  • 1
    The partition starts at 2048. Just create a new empty partition table with fdisk, make sure to create a partition that starts at the same place and uses the full disk size. fdisk may even use 2048 as default starting point nowadays. Commented Oct 4, 2013 at 19:26
  • @terdon I tried to do that, but the KDE partition tool gave me the described error. Commented Oct 4, 2013 at 21:04
  • @frostschutz that sounds pretty cavalier, is it not a problem that the 2048 partition is within an extended one? Commented Oct 4, 2013 at 21:05
  • @queueoverflow, it's only a problem if you hardcoded the /dev/sda5 name somewhere rather than using UUIDs. In which case you also have to update your /etc/fstab or whatever. Commented Oct 4, 2013 at 21:24

1 Answer 1


I would download GParted Live or Parted Magic and burn it to a DVD/USB thumb drive and boot my system with it.

Once booted you can launch parted and extend the `/dev/sda2 partition as needed. You can also delete partitions etc. from this tool too.

       ss #1

  • It can be difficult to find a free download of Parted Magic - the only download link on that site is behind a $5 paypal "donation". I have found Parted Magic on various bit-torrent sites, but I'd recommend the GParted Live CD instead gparted.sourceforge.net/livecd.php
    – cas
    Commented Oct 5, 2013 at 4:44
  • or since queueoverflow mentioned ubuntu, just run apt-get install gparted and then sudo gparted
    – cas
    Commented Oct 5, 2013 at 4:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .