How to format unallocated space in ubuntu?

7,774

Solution 1

You won't be able to do this while running Ubuntu. The reason is that you're extended partition (/dev/sda4) is currently being used, and so you cannot modify it.

You'll need to boot to an Ubuntu live CD/USB. Once you do that, you can run GParted, extend (resize) the extended partition (/dev/sda4), then create more partitions, resize or move around existing partitions, etc within that extended partition.

Solution 2

Just right click on the unallocated space and choose New. After that, choose partition type, File system type, add it, and then Apply. See images for detail.

enter image description here

enter image description here

Solution 3

I was able to do it on Ubuntu 16.04. I tried to do it via terminal using parted, fdisk, sfdisk, lsblk etc. commands (after browsing through various stackoverflow / askubuntu answers) but was unable to do so.

I was not able to see the disk info in lsblk command. What helped me is open up the disk utility program. There you would find the unallocated disks.

Disk Utility Screenshot

There use the + icon to create a new partitions which would format the drive and there you go. lsblk will show you the new drive ready to be mounted. :)

Share:
7,774

Related videos on Youtube

otaku
Author by

otaku

Just another dev

Updated on September 18, 2022

Comments

  • otaku
    otaku over 1 year

    I was installing Ubuntu alongside windows 7 on my laptop. I installed Ubuntu and during installation by mistake formatted my D drive. I installed ubuntu but now I have the remaining free unallocated space from my D drive lying waste. How do I get it back?

    Also I want to add more space to my home partition say another 50GB and leave the remaining for windows. How do I do this?

    Here is my gparted
    http://imgur.com/jv3WzzX

  • otaku
    otaku over 9 years
    It says "It is not possible to create more than 4 primary partitions. 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."
  • Mitch
    Mitch over 9 years
    Try booting from the Ubuntu live DVD or the Gparted Live.
  • otaku
    otaku over 9 years
    will booting from a bootable usb work?
  • Mitch
    Mitch over 9 years
    It may. You also may have to create a logical partition instead.
  • otaku
    otaku over 9 years
    could you tell more on how would I have to create it?
  • Mitch
    Mitch over 9 years
    Under step 1 in the second image under Create as: choose logical. The reason to use a live CD is the ability to un-mount the drive, so these operations can happen.