Ubuntu 16.04 | Failing to create swap space error on installation

8,159

I had this problem with 15.10. The solution for me was below:


Partitioning Layout

Ubuntu requires, at minimum, a 5 GB partition mounted as /.
For my 16.04 installation, I created a 100 GB / partition, and a 5 GB swap partition.

So, my partitions will look like this (numbers made up):

/dev/sda3: ext4: 100 GB
/dev/sda4: swap: 5 GB

Installation

When installing, select the Something else option.
Then, click on the partition you created for /, and click "Change".
- Check "use this partition", and for the mount point, type /

For swap, Ubuntu should auto detect it. All you need to do is select the swap partition, click "Change", and ensure it is used by Ubuntu.

That's all!

The new partitioning layout fixed the problems for me.
I don't know if it was the simplicity, or the pre-made partitions, but 15.10 installed smoothly. Hopefully it'll work for you, too. :)

Share:
8,159

Related videos on Youtube

OSKali
Author by

OSKali

Updated on September 18, 2022

Comments

  • OSKali
    OSKali over 1 year

    I am a new user to ubuntu, and I am wanting to learn it all, I am trying to install it onto my desktop computer as a full OS (not a dual-boot/secondary OS).

    So i have followed all the simple installations of what ubuntu ask me, once ive finished the 3 steps into installing it, I am asked to do either of the 4 things (Erase disk, encrypt, use lvm & or something else)

    I chose Erase entire disk as I am wanting to have it has a my core OS. I chose the hard drive I wish to have Ubuntu installed on (500GB HDD), I click install now, and it gives me the usual write changes to disk, i go ahead and continue, then it brings me to the "Where are you?" sector of the installation, what then shortly I am greeted by the error message "The creation of swap space in partition #3 of SCSI1 (0,1,0)(sdb) failed". I am unsure of why this is occurring as its a new drive that I had purchased and Ubuntu is supposed to do all the partitioning its self.

    I have done some extensive googling, and none of what I have managed to find that corresponds to the installation of what I am doing. I am installing Ubuntu Desktop 16.04 from a USB flash drive.

    My computer specifications are: AMD-FX 8320 Processor 16 GB DDR3 RAM 500HDD Seagate & 2TB WD Black.

    I have also attempted to install the OS on the 2TB HD and have received the same error. I can do a live boot completely fine. Any help is highly appreciated,

    Thank you.

    Require more information just ask.

    EDIT: I may of figured why the drive doesn't partition it gives me this error "/dev/sda: unrecognised disk label"

    I have checked for this error and found something: http://gparted.org/h2-fix-msdos-pt.php#disk-unallocated, but it doesnt seem to do anything, I create the partition table, then create a prim partition (500gb) what i then try to create it (or apply it) it gives me the same "unrecongised disk" then resets the disk back to how it was.

    • InitializeSahib
      InitializeSahib almost 8 years
      Have you tried manually partitioning the drive instead of using Ubuntu's default partitioning method?
  • OSKali
    OSKali almost 8 years
    Thank you for the detailed answer, how ever this couldn't help me, at the moment the HDD keeps getting unrecognised. I have added the partition table to the HDD, then I go to partition all of the drive, I name the label "primary" and then create it, after ive created it I get an error, libparted messages: /dev/sdb unrecognised disk label. Do I have to name the label something spetific or just name it as "primary" ive partitioned the tables and everything, but when it comes to applying the partition i am greeted within that error.
  • InitializeSahib
    InitializeSahib almost 8 years
    @OSKali are you labeling the disk or one of the partitions? for me, not giving any label has worked so far
  • OSKali
    OSKali almost 8 years
    One of the partitions. I do not know how to name the disk whats a little embarrassing. I have installed Ubuntu Desktop on my server (when I had it) completely fine, I am unsure of why its doing this now though.
  • InitializeSahib
    InitializeSahib almost 8 years
    @OSKali can you try deleting the current table, making a new one, not specifying any label, and see if it applies the table?
  • OSKali
    OSKali almost 8 years
    Sure, just to be sure, i do use the msdos partitioning table correct?
  • InitializeSahib
    InitializeSahib almost 8 years
    @OSKali if your computer is UEFI, use a GPT table. If it's BIOS, use a MSDOS table.
  • OSKali
    OSKali almost 8 years
    Ok i have managed to fix it, everything is all good now, thank you for the help. :)
  • Boris Hamanov
    Boris Hamanov almost 8 years
    @SahibPrime... If a hard disk is larger than 2TB, it MUST be GPT.