2

This is what GParted displays about my partitions.

Screenshot from GParted

And this is the output from df:

Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/sda1       61409452 4503052  53786836   8% /
udev              499168       4    499164   1% /dev
tmpfs             203192     784    202408   1% /run
none                5120       0      5120   0% /run/lock
none              507972      88    507884   1% /run/shm

How do I expand sda1 by the amount of the unallocated space so that it's size be 160 GiB? Can't find a way so far. "Resize/Move" and "Delete" items in the right-click menus appear grayed out for all the partitions.

9
  • 1
    Not sure I fully understand the question. Can you not right click on /dev/sda2, choose 'resize/move', and then shunt it along the disk? And then resize /dev/sda1 up to the remaining space? Or just remove and recreate /dev/sda2, after expanding /dev/sda1 (it's only swap you've got in there, after all)? Sep 9, 2012 at 18:55
  • +1 to the above; Considering your particular setup I think it's easier to: 1. remove the swap partition sda5 (unmount it prior to removing it) 2. delete the extended partition sda2 3. enlarge sda1 as you please 4. recreate the swap partition and any other additional partitions, either in an extended container or as primary ones(no more than four) Sep 9, 2012 at 19:16
  • @ire_and_curses "Resize/Move" is grayed out for any partition, same with "Delete". Made the edit to mention that. Would it make the difference if I boot from Live CD? (Sorry, I'm pretty much new to Linux.) Sep 9, 2012 at 19:24
  • @don_crissti Please see my comment on the ire_and_curses' comment. Sep 9, 2012 at 19:25
  • 1
    @DesmondHume - yes, boot from the livecd, UNMOUNT your partitions then proceed to resize/remove/recreate as per your taste Sep 9, 2012 at 19:29

1 Answer 1

4

You can use Gparted to accomplish your task.

Make sure that you do this from a live CD, to make sure that the drive(s) are unmounted.

This article shows how you can modify the partitioning of your Linux system with GParted (Gnome Partition Editor) without losing data. This includes resizing partitions (enlarging and shrinking), moving partitions on the hard drive, creating and deleting partitions, and even modifying filesystem types. GParted is a free partition editor available as a desktop program and also as a Live-CD. It supports the following filesystems: ext2, ext3, fat16, fat32, hfs, hfs+, jfs, linux-swap, reiserfs, reiser4, ufs, xfs, and even ntfs (Windows). Have alook at this

Source: howtoforge

NOTE: When dealing with partitions, always make sure that a backup is available in case something goes wrong. You may consider Clonezilla

0

You must log in to answer this question.

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