How to create extended partition in Fedora via terminal.I'm getting this type of notification while trying to create new partition via Gparted partition Editor
*"It is not possible to create more than 4 primary paritions

If you want more partitions you should first create an extended partition. Such a partition can contain other partitions. Because an extended partition is also a primary partition it might be necessary to remove a primary partition first."*

Will you tell me how to allocate ......... unalloacted space(70gb) to extended partition through terminal

Thanks in Advance.

Dani AI

Generated

A short, practical summary that fills gaps in the thread and shows a safe command-line flow.

As noted, the difference between an MBR (msdos) disk and a GPT disk determines whether an extended partition is needed. On MBR the classic 4-entry limit applies; GPT has no extended/logical concept. First step is to confirm the disk device name and partition-table type and to locate the 70 GB of free space:

sudo parted /dev/sda print free

This shows whether the table is msdos (MBR) or gpt and the exact start/end offsets to use. (wiki.archlinux.org)

If the disk uses an MBR (msdos) label, create one extended partition that contains logical partitions, then format the logical partition. Using parted (safer than editing raw sectors by hand) — replace START/END with the numbers from print free:

sudo parted /dev/sda mkpart extended START END
sudo parted /dev/sda mkpart logical ext4 START END
sudo mkfs.ext4 /dev/sda5    # format the new logical partition (replace with the partition number parted shows)

mkpart supports extended and logical only on msdos labels; check parted help for exact syntax and units. (gnu.org)

If the disk is GPT, do not create an extended partition — create normal partitions (or convert to GPT if appropriate). If modifying the disk that hosts a running system (root, /boot, or an active LVM VG), perform these steps from a live/rescue environment and back up first, as partition changes can make the system unbootable. After creating a partition, make a filesystem, obtain its UUID and add an /etc/fstab entry (UUID=...) so mounts remain stable across reboots:

sudo mkfs.ext4 /dev/sda5
sudo blkid /dev/sda5
sudo mkdir -p /mnt/data
# add a line like: UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  /mnt/data  ext4  defaults  0  2
# then run: sudo mount -a

Booting into rescue/live media is recommended when the target disk is in use. Use UUIDs in fstab to avoid device-name surprises. (docs.redhat.com)

Notes/tips: ’s fdisk approach works too, but parted handles both msdos and gpt more cleanly. Always back up important data before changing partition tables; when in doubt, work from live media.

Recommended Answers

All 5 Replies

what is this Fedora?

Fedora Redhat

On a standard partition table, you can only have 4 primary partitions. When people may need to have more than 4, then they make at least one an extended partition, which is kind of like another partition table, where you can create more partitions. Windows operating system bootloaders have to boot from a primary partition, but current linux grub bootloaders are not so constrained. I have see people with 4 or more bootable partitions on their systems using extended partitions.

fdisk /dev/hda

select the size and type of new partition type

partprobe

mkdir /data
mount -t ext3 /dev/hda? /data
3) vi /etc/fstab
/data /data ext3 defaults 1 2

Before creating a partition, boot into rescue mode and do parttion after that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.