0

I have to OS installed: ubuntu 14.04 LTS and MS Windows 7 Pro.

Linux system:

1) System Partition 50GB, 30GB free

2) Home Partition 100GB, 60 GB Free

3) Swap Partition 8GB

Windows 7:

1) There is only one system partition something about 160 GB as far as i remember.

Here's what's my disk looks like:

Disk / dev / sda: 320.1 GB, 320,072,933,376 bytes

heads: 255, sectors / track 63, Cylinders: 38913, all in all sectors: 625142448

Unit = sectors, or 1 * 512 = 512 bytes

The sector size (logical / physical) in bytes: 512/512

Size I / O (minimum / optimum) in bytes: 512/512

Disk ID: 0x2197dc6f

Device    Boot    Start      End        Blocks     ID System

/dev/sda1  *      2048       206847     102400     7  HPFS/NTFS/exFAT

/dev/sda2         206848     314781695  157287424  7  HPFS/NTFS/exFAT

/dev/sda3         314783742  625141759  155179009  5 Extended

/dev/sda5         314783744  412438527  48827392   83 Linux

/dev/sda6         412440576  607750143  97654784   83 Linux

/dev/sda7         607752192  625141759  8694784    82 Linux swap / Solaris

I would like to shrink the Linux's system partition by 20 GB and Home Partition by 20 GB and then add it to my Windows 7 OS.

I would be eternally grateful if you could give me step-by-step tutorial on how to do this, bcos I wouldn't like to mess my PC up ;P

1
  • It will be quicker (if you have external drive) to backup your linux data on it and do a fresh linux install. Else check howtogeek.com/116742/… just shrink both / and /home partitions and format gained space as NTFS. Also check howtogeek.com/howto/35807/… for making Windows and Linux cooperate more.
    – julka
    Jan 11, 2015 at 20:52

1 Answer 1

1

EDIT: According to your fdisk output, I adjusted the solution. Also, as it was pointed out, you need to boot on a live session (LiveCD or LiveUSB) so that none of your partitions are mounted.

Follow these steps to rearrange your partitions:

  1. If you are not familiar with partitioning using GParted, read this post: How to resize partitions?
  2. Resize sda7 (Home) to 81920 MiB and move it as far as possible to the right.
  3. Resize sda6 (System) to 30720 MiB and move it as far as possible to the right.
  4. Resize sda2 (Windows) so as to fill the empty space (≈ 40 GiB).
  5. Repair GRUB using Boot-Repair. You shouldn't need to fix the MBR, but if Windows fails to boot after these steps, it wouldn't be a bad choice to try that. See this article: https://help.ubuntu.com/community/Boot-Repair (follow the 2nd option if you want to stay on your live session)
5
  • Dear @fredg999, I have added the output of the "sudo fdisk -l" to the first post :)
    – Zwierzak
    Jan 12, 2015 at 5:27
  • Note that you'll probably have to run this from livecd - to minimize the home/linux drives at least.
    – NoBugs
    Jan 12, 2015 at 5:28
  • Thank you for this advice. As soon as i have some spare time i will follow your instructions and do what's need to be done :D
    – Zwierzak
    Jan 12, 2015 at 8:36
  • And could u tell me, can i for example boot in Windows 7, then via EASEUS Partition Master resize my disc? Will it work or do i have to do it on the linux system?
    – Zwierzak
    Jan 12, 2015 at 21:53
  • @Zwierzak EaseUS Partition Master does not support ext4 partitions, therefore I would not recommend using it because of the higher risk of data loss. I would recommend using GParted from a live session, because it is safer and rather easy, but there are a few ways to format from your Windows installation if you prefer: How do I format a drive as EXT4 on Windows 7?
    – fredg999
    Jan 12, 2015 at 22:31

You must log in to answer this question.

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