Installation stuck at "Creating ext4 file system"
Boot from Ubuntu installation media.
Select 'Try Ubuntu without installing'.
Open GParted -> press the Windows key and type GParted.
Open GParted and delete all partitions you find on the disk.
Create a new partition - format it with ext4 - a size that fits your needs.
Create a new partition - format it with swap - a size matching the RAM.
On the desktop click Install Ubuntu, when asked choose Something else.
Select the ext4 partition you had created with GParted for Ubuntu before.
Select / as mount point and ext4 file system as format - start the installation.
Update addressing your comment that you receive errors and cannot create partitions :
Open GParted - click on Ignore.
Click on Device on the top menu.
Now click on Create Partition Table.
Select gpt when you have UEFI BIOS.
Select msdos when you have legacy BIOS.
Now you can create new partitions on the disk.
Update addressing your comment that you receive an error partition is currently active :
Screenshot shows that the swap partition is mounted.
Right-click the partition sda5 and click on Swapoff.
Right-click the partition sda2 and click Unmount.
In case it is not possible from Ubuntu media,
do it with the original GParted Live media.
Related videos on Youtube

Nikos
Updated on September 18, 2022Comments
-
Nikos about 1 year
I would like to ask for assistance in the following installation problem.
Here I choose the option Erase disk and install Ubuntu and next Continue on Writing the changes to the disk? dialog.
The problem is that when the installation is in that status, there is no progress and the installation cannot be completed.
If there is another option I should follow, please let me know. I remain at your disposal for more details.
I would like to edit the question, adding two more photos to ask for more instructions.
In this photo is the initial screen when I run GParted.
When I click on Device, and then Create Partition table, I have the following message and I cannot continue.
Could you advice how much should be the size of the partitions? My disk capacity is 300 GB and the memory is 2 GB. When I try to create the new partitions I have the following error:
Thank you in advance,
Nikos -
Nikos over 7 yearsThank you, I tried but was not possible to create a new partition. Now, I have the error "Libparted Bug found!" "input/output error during write on /dev/sda" and as options Retry, Cancel, Ignore.
-
Nikos over 7 yearsI am sorry but i still cannot complete the installation. I open the GParted and I delete the partitions, but when I clink on Create Partition Table I have another error message "1 partition is currently active on device/dev/sda". Do you know how I could upload pictures of the steps? Do I need to create a new question?
-
Nikos over 7 yearsI edited again the question with another photo, because I have another error.
-
cl-netbox over 7 years@Nikos : Please create the partitions with GParted before installing Ubuntu, then choose Something else and select the ext4 partition you created before for Ubuntu ... just do everything exactly as described. :)
-
Nikos over 7 yearscould you advice how much size should be the partition ? and how much time it normally takes to create?
-
cl-netbox over 7 years@Nikos : I made a Q&A that explains everything in a detailed way -> askubuntu.com/questions/743095/… - For Ubuntu I recommend a minimum of 20 GB - for Swap a size matching the RAM. Creating new partitions does only take seconds ... :)
-
Nikos over 7 yearsthere should be something wrong on my disk... it took about 30 minutes to create the ext4 partition and I received an error when I tried to create the swap partition
-
cl-netbox over 7 years@Nikos : This most likely seems to be the case ... you can try one alternative : Click on Device and create a new partition table, select mbr when you have a legacy BIOS, select gpt when you have an EFI based BIOS, then create the new partitions ... if you still receive errors, you unfortunately should replace the disk. :)
-
Nikos over 7 yearsI selected gpt, but I still have very long time to create a new partition... If I buy an SDD hard disk would be a problem with Ubuntu? I am still planning to install the Ubuntu from the USB.
-
Nikos over 7 yearshow could I know if the PC has UEFi BIOS or legacy BIOS ?
-
cl-netbox over 7 years@Nikos : When the PC is quite new, has the Secure Boot feature and came with Windows 8 or 10, it most probably has UEFI BIOS ... in case it is an older PC (what it looks like in your screenshots - because of the extended partition shown there) and came with Windows 7 or earlier, it most likely has legacy BIOS. :)
-
Nikos over 7 yearsI try one more time and i would like to ask for your support. I select Device and then Create New Partition table but then there is no option "mbr". The available options are: aix, amiga, bsd, dvh, gpt, mac, msdos, pc98, sun and loop. Do you know which option should I choose?
-
cl-netbox over 7 years@Nikos : When you have legacy BIOS, select msdos (that is for mbr), when you have UEFI BIOS select gpt. :)
-
Nikos over 7 yearsI still have error
-
cl-netbox over 7 years@Nikos : I am very sorry about this ... unfortunately I am running out of ideas ... most probably the disk is damaged ... but before you buy a new disk, please tell me what PC you have and how old it is, so that I can recommend the best option for you. :)
-
Nikos over 7 yearsthank you very much, what information you would like from the PC? and how can i find them?
-
cl-netbox over 7 years@Nikos : Producer (e.g. DELL) - Model (e.g. Insprion) and age of the PC ... :)
-
Nikos over 7 yearsthe age is between 5 and 10 years, there is no identification of producer or model, the processor is Pentium dual-core CPU E5200@ 2.50 GHz
-
cl-netbox over 7 years@Nikos : Thank you for the information ... my recommendation : do not spend any money for a new disk ... better buy a new PC. :)
-
Nikos over 7 yearsI would like to inform you that I bought a new disk and the installation completed properly. Thanks again for your support.