Saturday, November 4, 2017

partitioning - Resizing ext4 partition and applying it to an NTFS partition in Ubuntu 12.04.1?

I made a miscalculation on my Ubuntu install and now need more space for my Windows (NTFS) partition (sda2). The problem is that I allocated ~ 100GiB to what I thought would be a shared media storage directory; this was placed in an extended partition (sda4), comprised of ~ 7GiB in a swap file (sda5) and ~ 100GiB in an ext4 storage partition (sda6), respectively. I no longer require this partitioning and am now looking to allocate this sda6 space more judiciously.


As I understand it, I need to be able to have unallocated space in a partition next to the partition that I would like to add space to. There I have a problem, as I need to move ~55GiB from sda6 (ext4) to sda2 (NTFS). Please note that sda1 is a small NTFS Windows boot partition and sda3 is my ext4 Ubuntu install partition that does not have any unallocated space (at present), and only 22GiB unused.


Lastly, I am presently in GParted off of a USB boot and have a pending operation of shrinking /dev/sda6/ from 99.96GiB to 44.18GiB, but alas, I cannot add to sda2 as was my intention. I have backed up my system, though I would prefer not to undertake anything with a large probability of file loss or grub2 failure. May I please have any relevant recommendations? Thanks so much in advance.


ubuntu@ubuntu:~$ sudo fdisk -l
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 / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x8d769ec6
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 409599 203776 7 HPFS/NTFS/exFAT
/dev/sda2 409600 341301247 170445824 7 HPFS/NTFS/exFAT
/dev/sda3 341301248 399894527 29296640 83 Linux
/dev/sda4 399896574 625141759 112622593 5 Extended
/dev/sda5 399896576 415518719 7811072 82 Linux swap / Solaris
/dev/sda6 415520768 625141759 104810496 83 Linux
Disk /dev/sdb: 4022 MB, 4022337024 bytes
255 heads, 63 sectors/track, 489 cylinders, total 7856127 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 38 7839719 3919841 b W95 FAT32

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...