8

enter image description here

These are my current disk partitions. /yedek is for some personal backup files. As you can see there is only Ubuntu on my PC. I will install Windows, too. Because of this I want to shrink /dev/sda3 . It currently 546GB and I want to split it: 300GB for / and 246GB for Windows (NTFS) is OK for me.

I'm using GParted for the first time. How can I shrink /? I don't want to lose any datas from Ubuntu.

1 Answer 1

13

You cannot shrink a mounted partition. Boot from a live CD/USB and from there run gparted. This way you can shrink the partition. After the install, you must use this live media again to repair grub.

Edit:

  1. Back up your files.
  2. Create the live media if you don't own it already.
  3. Boot from it, and run gparted.
  4. Select the partition, and click resize, which will bring you to a new window.
  5. Grab the bar at the right end with the mouse, and shrink the bar.
  6. Now execute the task, it will take time, because first it will do some tests and later it will move some data.
    1. If a message pops up that you might ruin the boot process, you should not execute the task. (If this happens, then you need to repair grub.)
  7. I suggest, that when it is over, you reboot.
  8. The new partition can be created from the normal ubuntu.
  9. After you installed windows, do come to this site, and you will find how to repair grub, which was overwritten by windows. Here is the solution for this: How can I repair grub? (How to get Ubuntu back after installing Windows?)
6
  • 1
    is it safe ? I mean, i don't want to lose any datas from Ubuntu installation. Is Gparted installed as default on Live CD? Or can i install it while booting from Live CD ?
    – Eray
    Apr 15, 2012 at 17:23
  • 1
    Gparted is on the live media by default, but if it is not there, you can install it. I suggest you do one task at a time: first shrink, and then you create an ntfs partition. Nothing is safe, but if you make some backups, then it will be ok. I didn't came across problems with gparted for more than a year now.
    – gajdipajti
    Apr 15, 2012 at 17:27
  • 1
    If gparted messes up something, it will be the partition that you are shrinking. But before it does the actual resizing, it will run a dry test, to make sure everything is ok.
    – gajdipajti
    Apr 15, 2012 at 17:28
  • 1
    ok, i'll copy my important files to /yedek . Lastly, can you tell which way should i follow? Step by step please .
    – Eray
    Apr 15, 2012 at 17:29
  • 2
    Windows will overwrite the master boot record, so you would not be able to boot to ubuntu and access your files. This will help you on your quest: askubuntu.com/questions/88384/…
    – gajdipajti
    Apr 15, 2012 at 17:43

You must log in to answer this question.

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