2

I have dual-booted Windows 8.1 and Fedora 24. But, I want to triple book now, with another not very known Linux OS. My partitions looks like this:

GParted Result

I know that I can only create 4 primary partitions, and in my case I already have the 4 primary partitions, therefore, I cannot create a new partition with my unallocated space. I simply want now to put that unallocated space under my /dev/sda4 extended partition, so that maybe I can install my new Linux OS in that partition. Also the output of fdisk -l command can be found below:

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: dos
Disk identifier: 0x6b62875c

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048    718847    716800   350M  7 HPFS/NTFS/exFAT
/dev/sda2          718848 790124543 789405696 376.4G  7 HPFS/NTFS/exFAT
/dev/sda3       840456192 842553343   2097152     1G 83 Linux
/dev/sda4       842553344 976773119 134219776    64G  5 Extended
/dev/sda5       842555392 850943999   8388608     4G 82 Linux swap / Solaris
/dev/sda6       850946048 976773119 125827072    60G 83 Linux

The Linux OS that I want to install is a custom one based on Debian, and it doesn't include GParted so that I can change stuff with Live CD. Any idea how to get around this situation and install my new OS in the unallocated space?

2

Use GParted from a live CD/USB to move your partitions around (you can't do this from the mounted Linux itself). You can use any live distribution that includes GParted, such as GParted Live.

First move the /boot partition to the beginning of the unallocated space (“Resize/Move” button, set “Free space preceding” to 0). Then move the beginning of the extended partition to the beginning of the unallocated space and set the size as large as it goes.

To gain a little more flexibility, you can move the existing /boot partition to a logical partition. I don't think you can do this directly in GParted, you need to create a logical partition of the same size, copy the data, and remove the original partition.

Alternatively, a separate /boot partition is necessary only on old computers with BIOS limitations (and I don't think any of those can run Windows 8) or if the root partition is encrypted (which yours isn't), so you could move all the files from the /boot partition into the /boot directory of the root partition and then remove the /boot partition.

Whichever strategy you choose, you've modified /boot, so you need to run grub2-install again. If you changed /boot from a primary partition to a logical partition, you need to update /etc/fstab and /boot/grub2/grub.cfg to reflect the changed partition number. If you moved /boot to the root partition, you need to remove the entry from /etc/fstab and also update /boot/grub2/grub.cfg. I'm not sure if you're supposed to edit grub.cfg directly on Fedora; the wiki may help.

For more flexibility with partitions, use LVM. It's easier to resize partitions, they don't have to occupy consecutive disk space, manipulations are less error-prone and you can often do it from the live system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.