1

I've been trying to install Ubuntu for the past two days or so, but I've been running into a problem: every time I run the installation program on the LiveCD, I always get the same (or a very similar) error:

"Failed to create Swap space

The creation of swap space in partition #3 of SCSI5 (0,0,0)(sda) failed."

So far, I've run DBAN (Darik's Boot and Nuke) on my HDD once, to make absolutely sure that everything on it had been erased. Then, I simply put in the LiveCD, and let it run the automated install. I get the above error directly after I tell it to automatically partition the HDD (it will work for a second or so, then this will pop up), forcing me back to the screen that lets me choose whether I want to automatically or manually partition the HDD.

Well, after failing to install the software manually, I did a little research and learned enough about partitioning Linux to use the 'Manual partitioning' option. I partitioned the HDD as follows (it's a 1TB drive):

/home  -  (the rest)- ext2, 
/     -   20GB   -    ext2, 
/boot  -  100MB   -   ext2, 
/swap  -  8GB
/EFIboot - 40MB

The only difference when I tried this method was that I got THIS message:

"Failed to create Swap space

The creation of swap space in partition #2 of SCSI5 (0,0,0)(sda) failed."

Basically, the only difference was that there was now a '2' instead of a '3'. If I may ask, what exactly am I doing wrong? I've tried looking around the internet (that's basically all I've done for the last two days), but no one seems to have the same problem that I have, and I've tried most of the solutions for similar problems (DBAN, formatting partitions in ext2 format, etc).

The only thing I haven't tried is using the terminal to manually partition the HDD...and I actually DID try to do this, but I wasn't able to get past 'su' 's password demand, so I wasn't able to use the terminal.

Thank you for your help in advance.

~Welsh

UPDATE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Alrighty, I just went and did a little more testing, and here's what I found (thanks to your advice, Cuban...and user, I made the appropriate modifications to my data portions):

When I tried using the manual installer again, this time I only created /boot, /(root), and /home partitions. When the EFI window popped up, I continued, and when the "You don't have swap" window popped up, I continued. Just like before, after about two seconds a window popped up, but it had a different error this time:

"Failed to create a file system

The ext4 file system creation in partition #1 of SCSI5 (0,0,0)(sda) failed."

At this point, I'm pretty sure the installer is just not going to work. Partition #1, in this case, was the /boot partition.

After I did that, I went and learned how to use fdisk, and succeeded in creating an 8GB Linux swap/Solaris partition in slot #1 (was that the correct way to create swap? It was Hexcode 82). At any rate, do you know what the file types are for /home, /(root), and /boot? If so, I can probably just completely format the HD before running the installer, since it's not doing so well at the partitioning part. Once I get it formatted manually, would I just go into the 'Manual Installation' part of the installer and 'Continue' without creating any partitions?

EDIT: Actually, I just went back into sudo fdisk /dev/sda, and then typed 'p'...and I saw a blank table of partitions, with no sign of the partition I had just created. Is that supposed to happen?

Thanks again for your help. Thanks to you I'm finally starting to enjoy Linux (even though I haven't even actually installed it yet).

~Welsh

UPDATE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I looked through a few other tutorials, and tried running and using GParted to partition my HDD. Well, when I went under 'Device' and 'Created a new Table', I got an error in the console: /dev/sda: unrecognised disk label. Maybe my HDD just can't be partitioned?

  • I'd not bother with /boot partition. It is easier if /boot is just a folder in the / partition. A 100MB boot partition tends to get full unless you are diligent about removing old kernels. The other thing I'd do differently is format /home and / as ext4, not ext2. Since you have no other OS in the box, it may be easier to use the Legacy/BIOS mode rather than the UEFI. This will negate the need for /EFIboot partition as well. As for your real problem, I have no idea. – user68186 Aug 2 '13 at 14:30
  • Couple of things: (1) use sudo <command> instead of su -c '<command>'. (2) DBAN was overkill, you don't need to scrub data to repartition. (3) when you did manual partitioning, you just changed the order of the partitions, so the number changing isn't indicative of anything. – SlightlyCuban Aug 2 '13 at 14:57
  • 1
    Try to do the manual partitioning, and make note of which partition swap is on (/dev/sda#) If swap still fails, go ahead and boot into the system (it won't really hurt anything), and run sudo mkswap /dev/sda# (# being the same from the install). If that breaks, update your answer with the output from mkswap. – SlightlyCuban Aug 2 '13 at 15:01
  • There, updated the thread...thanks for all the help so far! – Welsh Heron Aug 2 '13 at 19:04
  • Open a terminal and run dmesg to look for more detailed errors. – psusi Aug 3 '13 at 0:01
1

I would change the disk label, or create one if you don't have one. I think that is your root problem. You are either using a label that is reserved, or have some crazy random characters in it, or have none at all. Put something like 'Your-name-home' or 'your-name-laptop'. Be mindful of max character limit.

0

I had this same error, but I found my problem... I was using a bootable usb to install ubuntu 18, but instead of partitioning the hard-drive, it was partitioning itself.

In conclusion, check to make sure the space you are trying to partition is your hard-drive and not the usb. Sometimes you need to configure the BIOS to allow the hard-drive to be re-partitioned.

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.