9

I've set my grandson's laptop to be able to dual boot (Vista and Ubuntu). I'd like to give as much space as possible to Ubuntu as Windows isn't used much. I'm pretty noob to Linux and have no real idea how to use gparted.

Here is a screenshot of gparted; it'd be great if someone could explain what it means and how to give more space to Ubuntu and less to Windows.

gparted screenshot

Tim
  • 32,861
  • 27
  • 118
  • 178
gypmaster
  • 131
  • 1
    You need to resize Ubuntu from a LiveCD (see How to resize partitions?), as it can't resize itself while it is in use. N.B. What error message is shown for the ntfs partition - was Vista shutdown properly, is the disk corrupt, etc? – Wilf Nov 18 '14 at 13:15
  • 1
    Lots of good answers here for you, and I would just caution you on two things: 1) Shrink your windows partition from inside windows, while it is running. This will prevent a lot of hassles later. 2) The free space created by #1 will be outside of the extended partition where Ubuntu is - you will need to include that space in the extended partition before you can add it to your Ubuntu partitions – Charles Green Nov 18 '14 at 14:03
  • How can I 'include that space in the extended partition'? – gypmaster Nov 19 '14 at 13:10

2 Answers2

4

This is what to consider before we can change partition size:

  • Changing partitions always bears a risk of data loss. Therefore backup all valuable data.
  • Only partitions that are unmounted can be altered, i.e. work on a live session (boot Ubuntu "Try out").
  • Ubuntu does not need much space (30 GB) but knowing that the other OS is Vista it may really be better to give Vista as little space as possible but not too small (or remove it entirely if you grandson agreed).
  • Ubuntu needs two partitions at least (root partition /, and swap) but it can handle more if needed. Some people recommend a seaparte HOME partition, which eases distribution upgrades and backups.
  • Swap needs to be in a single partition with no holes. It is therefore in the way when you enlarge your NTFS partition to hold Ubuntu.
  • Windows must not be hibernated.
  • We can only have 4 primary partitions in an MSDOS partition table. Make extended partitions to hold Ubuntu.

From your present partition layout it appears that the root partition for Ubuntu is a bit too small, and the swap partition is in the way of increasing your root partition.

It is possible to add a swap partition later but this may be too complicated for a first start into the Ubuntu universe.

Let me therefore recommend that you

  1. Backup all valuable data
  2. Delete and remove your existing Ubuntu partitions (this will delete all data in them!)
  3. Resize (shrink) the Windows partition (to the right side) according to the excellent answer you already have (but you may have to repair your filesystem from a Vista CD), or from Windows. Shrinking may need a defragmentation first.
  4. Re-install Ubuntu to the now sufficiently large unpartitioned space you will have gained in step 3.
  5. On re-installation of Ubuntu take care to select the unpartitioned space for installation of /, swap, and if applciable /home on "Do something else", or let the installer automatically do this for your by choosing "Install alongside of Windows".
Takkat
  • 142,284
  • Windows needs to be pointed to a bigger more open part or it'll bitch about lack of pagefile ram. – Virusboy Nov 18 '14 at 14:51
  • @Virusboy: I faintly remember sth. like that from the past... that's why "as small as possible" - if too small then it's impossible ;) Thanks for pointing to that. – Takkat Nov 18 '14 at 15:17
3

It's pretty simple. What you're going to want to do is start up gparted (via Alt+F2 and then entering gksudo gparted - you'll have to enter your password.)

Then, select the NTFS partition. My system has an NTFS partition, even though it's not quite set up the same way the screenshots and steps still apply.

  1. Select the NTFS partition:

    ntfs partition

  2. Click on the Resize button (arrow pointing to the right):

    resize

  3. Resize the partition to the desired size and then click Resize/Move:

    resize window

  4. Accept the changes once you've made all the adjustments you want:

    accept

The commands necessary will run and you should, aside from any non-normal occurrences, have the system you want.

Note: You may have to run some commands from the Windows installation disk to repair any system-level changes the resizing might have caused.

  • 2
    I would highly recommend using windows to resize its own partitions, then expanding the others through gparted – Geary Shull Nov 18 '14 at 13:32
  • @GearyShull That might be a good idea, since it will be able to repair itself. – RPiAwesomeness Nov 18 '14 at 14:14
  • 2
    I've had a number of people much more knowledgeable than myself recommend never using gParted to monkey with windows partitions if you can avoid it. That is exactly why. If gParted damages the partition, the user may not be able to log in to fix it. But if they are already logged in, then Windows has a chance to repair itself. As always, everything should be backed up prior to making changes. – Geary Shull Nov 18 '14 at 15:25
  • 1
    Yes, I always use Windows when shrinking the Windows partition(s). I believe I used EaseUS Partition Master last. Then use gparted to create the necessary Ubuntu partitions from the free space. – Seth Nov 18 '14 at 16:23