Ubuntu system faults solved in those years

Source: Internet
Author: User

This article is a problem I encountered when using ubuntu. Most of them have found an effective solution on the Internet, which is recorded here and hopes to be useful to everyone.

-------------------------------------------------------------- Gorgeous text split line -------------------------------------------------------------------

I. screen damage: "six screens"

Some users who use the geforce GT xxxm series graphics card, the screen will be damaged when X is started; a screen is divided into six areas with a limit of 640x480. To solve this problem, you can start the Verification Mode nototalsizecheck in the device section:
(My machine is Lenovo y450, The ubuntu12.04 system is installed, the gt130m video card driver is installed, and then restarted. The screen is divided into six small screens. Use the following method to solve this problem !)

The specific solution is:
Choose Ubuntu 12.04 system Settings> hardware driver> install NVIDIA-current driver.
Do not restart. Please refer to the next step !!!
Terminal execution: sudo gedit/etc/X11/Xorg. conf
Add the option "modevalidation" "nototalsizecheck" in the device segment"
The modification is as follows:

   Section “Device”   Identifier “Default Device”   Option “NoLogo” “True”   Option “ModeValidation” “NoTotalSizeCheck”   EndSection


Six-screen splitting bugs after restart ~~~

Ii. errors encountered by VIM (prompt)


2.1 When Vim is used, the following error occurs: "e575: viminfo: Invalid start character is in the row: ster"
(Note: The English version system prompts an error: "e575: viminfo: Illegal starting char in line ...")

The solution is simple: Delete the. viminfo file in the main directory.

2.2 When editing a document in Vim, the following message is displayed: "e297: An error occurred while writing the swap file" (or a message is displayed when saving the file)

The source of the fault is that the root directory storage space is insufficient. you can repair it by deleting something!

Iii. Solve the problem that Ubuntu boot cannot be found after win7 + Ubuntu dual system is reinstalled

In both Windows and Ubuntu systems, after Windows is reinstalled, grub boot items of ubuntu will be overwritten. In this case, you can use the Ubuntu disc (or the USB flash drive) to fix GRUB boot items and remedy grub, the operation is as follows (the version is ubuntu12.04 ):

1. After starting with ubuntu12.04, go to "Try Ubuntu ".
 
2. Open the terminal. First create the root user, enter the command sudo passwd, enter the password 123 (set a simple one), then enter the root permission to perform operations on the system, and enter the command: su, and then enter the password 123 to enter the root user.
 
3. Enter the command in the terminal: sudo fdisk-l (L in lower case to view the partition information in the system). My system information is shown as follows:

root@ubuntu:/home/ubuntu# fdisk -lDisk /dev/sda: 250.1 GB, 250059350016 bytes255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0005f783   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT/dev/sda2          206848   102402047    51097600    7  HPFS/NTFS/exFAT/dev/sda3       102402048   204802047    51200000    7  HPFS/NTFS/exFAT/dev/sda4       204804094   488396799   141796353    5  Extended/dev/sda5       204804096   484204543   139700224   83  Linux/dev/sda6       484206592   488396799     2095104   82  Linux swap / SolarisDisk /dev/sdb: 2000 MB, 2000683008 bytes255 heads, 63 sectors/track, 243 cylinders, total 3907584 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xcad4ebea   Device Boot      Start         End      Blocks   Id  System/dev/sdb4   *          63     3907583     1953760+   6  FAT16root@ubuntu:/home/ubuntu# 


Find a line with the ID 83 (corresponding to the Linux system partition) and write down the partition of the Ubuntu System (my name is/dev/sda5 ).
Note: I used the USB flash drive for the above steps, so the following lines will be added:

/dev/sdb4   *          63     3907583     1953760+   6  FAT16

4. Enter mkdir/Media/temp. Create a folder named temp to mount/sda5.

5. Enter Mount/dev/sda5/Media/temp. Mount/sda5.

6. Enter the command in the terminal: grub-install -- root-directory =/Media/temp/dev/SDA. Reinstall grub2 to the Master Boot Record MBR on the hard disk. "installation finished. No error reported." indicates that the operation was successful.

7, restart the computer, at this time you can enter the grub2 boot interface (note, at this time cannot Boot Windows 7), choose to enter the Ubuntu system, enter the terminal, enter the command: sudo update-grub2

long@long-Ubuntu:~$ sudo update-grub2 [sudo] password for long: Generating grub.cfg ...Found linux image: /boot/vmlinuz-3.7.1Found initrd image: /boot/initrd.img-3.7.1Found linux image: /boot/vmlinuz-3.7.1.oldFound initrd image: /boot/initrd.img-3.7.1Found linux image: /boot/vmlinuz-3.5.0-22-genericFound initrd image: /boot/initrd.img-3.5.0-22-genericFound linux image: /boot/vmlinuz-3.5.0-21-genericFound initrd image: /boot/initrd.img-3.5.0-21-genericFound linux image: /boot/vmlinuz-3.5.0-17-genericFound initrd image: /boot/initrd.img-3.5.0-17-genericFound memtest86+ image: /boot/memtest86+.binFound Windows 7 (loader) on /dev/sda1donelong@long-Ubuntu:~$ 


Restart to see the magic effect ...... Dual-system rescue completed

4. APT-Get install cannot be installed

In some cases, the following prompt appears when you use apt-get to install the software:

Zhouyl @ Ubuntu :~ $ Sudo apt-Get install gnuplote: unable to obtain the lock/var/lib/dpkg/lock-open (11: Resource temporarily unavailable) E: unable to lock the management directory (/var/lib/dpkg/). Is there any other process occupying it?


The prompt is clear: the installation software is locked. How can we solve this problem? It's actually quite simple ......

Zhouyl @ Ubuntu :~ $ Sudo RM/var/lib/dpkg/lockzhouyl @ Ubuntu :~ $ Sudo apt-Get install gnuplot is reading the package list... the dependency tree of the software package being analyzed is reading status information... the following additional software packages will be installed after completion: gnuplot-NOx gnuplot-x11 Groff libwxbase2.8-0 libwxgtk2.8-0 psutils ......


V. sudo user problems

For example, if I use a long user to log in, but use sudo, the system prompts "UIO is not in the sudoers file. This incident will be reported ."

You can use the following methods to solve the problem:

1> enter the superuser mode. That is to say, if you enter "Su", the system will ask you to enter the superuser password and enter the password to enter the superuser mode.

2> Add the write permission for the file. That is, enter the command "chmod U + w/etc/sudoers"

3> edit the/etc/sudoers file. That is, enter the command "Vim/etc/sudoers", enter "I" to enter the editing mode, and find this line: "root all = (all) all "add" XXX all = (all) All "below (here XXX is your user name, for example, what I add to the following instance is
Long all = (all) All), then save (that is, press the ESC key first, and then enter ": WQ") to exit

4> revoke the write permission of a file. That is, enter the command "chmod U-W/etc/sudoers"

Now, the work is complete! Let's look at the effect:

Long @ Ubuntu :~ $ Sudo ifconfig [Sudo] password for long: Long is not in the sudoers file. This incident will be reported. Long @ Ubuntu :~ $ Long @ Ubuntu :~ $ Su password: \ root @ Ubuntu:/home/long # chmod U + w/etc/sudoersroot @ Ubuntu:/home/long # Vim/etc/sudoersroot @ Ubuntu: /home/long # chmod U-W/etc/sudoersroot @ Ubuntu:/home/long # root @ Ubuntu: /home/long # exityou have new mail in/var/mail/Longlong @ Ubuntu :~ $ Sudo ifconfig [Sudo] password for long: eth0 link encap: Ethernet hwaddr 00: 25: 86: 9C: 7e: 33 Inet ADDR: 192.168.2.239 bcast: 192.168.2.255 mask: 255.255.255.0 inet6 ADDR: fe80: 225: 86ff: fe9c: 7e33/64 scope: link up broadcast running Multicast MTU: 1500 Metric: 1 RX packets: 24563 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets: 1927 errors: 0 dropped: 0 overruns: 0 carrier: 0 Collisions: 0 txqueuelen: 1000 RX Bytes: 2281094 (2.1 MIB) TX Bytes: 248312 (242.4 kib)

Vi. How to Solve the Problem of shutdown and crashes in ubuntu12.04

1. # sudo Vim/etc/modules, add: APM power_off = 1 at the end of the file

2. # sudo Vim/boot/GRUB/grub. cfg
Find the following content:

inux --class gnu --class os {        recordfail        gfxmode $linux_gfx_mode        insmod gzio        insmod part_msdos        insmod ext2        set root='(hd0,msdos11)'        search --no-floppy --fs-uuid --set=root ed532c1f-b89a-470c-ad6f-539a3f04b993        linux   /boot/vmlinuz-3.2.0-24-generic-pae root=UUID=ed532c1f-b89a-470c-ad6f-539a3f04b993 ro   quiet splash $vt_handoff acpi=force        initrd  /boot/initrd.img-3.2.0-24-generic-pae}

As shown in the red mark above, add ACPI = force to force assurance and exit.

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.