Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save v6/42a46943d1a50aa4fd66 to your computer and use it in GitHub Desktop.
Save v6/42a46943d1a50aa4fd66 to your computer and use it in GitHub Desktop.
COMPLETE FIX -- Ubuntu Utopic Unicorn 14.10 -- The disk drive dev/mapper/cryptoswap1 is notready yet or not present (Also works for 14.04 and 15.04)

#Ultimate solution for this:

#http://askubuntu.com/questions/289858/disk-drive-for-dev-mapper-cryptswap-1-is-not-ready

Run the following command:

sudo gedit /etc/fstab

Then, using gedit, or vim, replace the following line:

/dev/mapper/cryptswap1 none swap sw 0 0

with a line, as follows, that adds , noauto to read:

/dev/mapper/cryptswap1 none swap sw, noauto 0 0

Then run the following command to edit your /etc/rc.local file:

sudo gedit /etc/rc.local

Immediately before the line that reads

exit 0

add these two lines:

sleep 5

swapon /dev/mapper/cryptswap1

Now,

I had the same issue. Eventually it turned out that the device in /etc/crypttab was wrong.

The system was installed from a USB pen-drive.

Because of this, during installation, the pen-drive was /dev/sda and the hard disc was /dev/sdb.

The swap partition was hence written into /etc/crypttab as /dev/sdb6.

After booting from the harddrive this became /dev/sda6 and the mapper could not find it any more.

To fix this just correct the line in /etc/crypttab to the correct /dev/sd?? or the UUID of the swap partition.

For example, if your swap is on /dev/sda4, you would change the following file:

cryptswap1 UUID=9086ae06-9274-4627-adab-d3baae1e4ee3 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

You would have a different UUID, of course. My UUID was 9086ae06-9274-4627-adab-d3baae1e4ee3.

To look like this:

cryptswap1 /dev/sda6 /dev/urandom swap,cipher=aes-cbc-essiv:sha256

You would have a different /dev entry for your swap partition, of course. My /dev entry for my swap partition was /dev/sda6.

I found it by installing gparted, running sudo gparted, and looking for a partition that had a type "unknown".

I also looked in /etc/fstab for something like "# swap was on /dev/sda6 during installation", just to be sure.

/dev/sda6 was the /dev entry.

@Paris79
Copy link

Paris79 commented Jun 4, 2017

Hi there

I am new to Linux but learning and willing. Been trying to fix this exact problem but I keep coming up with all kinds of errors that no one makes mention of so I am hoping that you might be able to guide me. Please bear in mind that I am new but trying to learn and I thank you for your time and patience.
So I get to the third step: and change the line to noauto, (do I save the gedit document?)
Then I try to run: sudo gedit /etc/rc.local but I get an error message:
(gedit:2787): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

What do I do? I have tried all the other suggestions and I keep getting error messages. I need to back up my computer and then install a new version of linux but it wont accept any of my external devices because the dev/mapper/ cryptoswap1 is not working properly.

Any help would be greatly appreciated, thank you.
Paris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment