Solve the/dev/mapper/cryptswap1 and garbled system swap partition error when ubuntu is started.

Source: Internet
Author: User
Tags uuid gparted

After installing Ubuntu 14.10 (win7 hard drive, which is a dual system on a real machine), I was excited and started to enter its magic world, but a bunch of garbled characters appeared when I started the system, I think there may be problems. The garbled text contains a string of English characters/dev/mapper/cryptswap1. It can be seen from the swap words that the swap partition is faulty. Although the interface is started normally, it still feels a little imperfect. Therefore, we plan to solve this problem.

Although the computer boot normally, this does not mean that there is no problem. Swap partitions are similar to virtual memory, which plays a very important role in system stability. The result of my own practice is that if you use ubuntukylin (Qilin), there are two situations: one is that the boot is stuck here, you can only press the power key to restart the boot, after the system is restarted, it can normally enter the system. If the system is restarted again, it will be stuck here. In either case, the system will always be stuck here and can only be forced to shut down and cannot enter the desktop. Therefore, it seems that this problem still has some potential risks and must be solved.

I found a lot of information on the Internet, most of which are provided with a clue first, that is, the/etc/fstab file, which is a Mount command file for the boot, telling ubuntu how to mount it when it is started. After this file is opened through sudo gedit, it is found that swap is mounted using/dev/mapper/cryptswap1, so the error occurs when we start the system.

As a result, all kinds of prawns on the Internet say that they should use sudo blkid to view the UUID of the swap partition, and then write this UUID into fstab to replace it. What the UUID is different? Some people even connect to win C: all moved out. In fact, we can see through blkid that swap has no UUID at all. Why? This is because the swap partition is not mounted at startup. Therefore, the problem is not the UUID, but the swap partition itself.

The key point is coming! I found that although the swap partition was specified during system installation, the system was reinstalled carefully to find that swap was forced to "not" select and format, so although the disk space of the swap partition is left, it is not formatted. How to mount it? So the fundamental problem is here.

Next, format the swap partition and mount it.

Ubuntu has a gparted partition software which is very useful and can help us solve this problem. Some have already been installed on ubuntu. If you enter sudo gparted and return an error, it is not installed. Use apt-get install gparted to install it.

However, gparted cannot be executed with the current user sudo gparted. The system will prompt that you must use root to perform gparted operations. So we need to solve the root problem first, because the root user does not set a password by default, and you need to set a password through sudo passwd root. After setting the password, use su root to switch to the root user. In this case, you do not need to use sudo. Directly run the gparted command to open the disk management interface.

If you are familiar with disk partitions and the like, the subsequent operations should be fine. You will find a question mark in front of the swap partition, because the partition is not formatted, you just need to right-click to format it as linux-swap format. After formatting is complete, Click Green & radic;. After formatting is successful, you still need to activate swap. You do not need to activate this concept. You can also right-click and "enable swap space ".

After the switch is enabled, you will find that there is a key in front of it. Now the swap partition is OK. Do not turn off gparted first, right-click the swap, and copy the UUID. That's right, at this time, we finally saw the UUID that everyone is calling. At this time, copy the UUID to the/etc/fstab file and follow the instructions in the format.

This is almost the case here. I am not writing this article step by step, so some details may be omitted. However, the main tips of this article are as follows: swap has not been formatted, so it cannot be mounted at all, so it does not matter UUID, which is all nonsense.

These problems about ubuntu boot errors have been solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.