Linux configuration error: the system cannot be started or stewed

Source: Internet
Author: User
I recently encountered a lot of problems in linux configuration. I will summarize them, and the content will be a little complicated. I am eager to seek help! Happy new year! 1 Ubuntu boot occurs: piix4_smbus ***** hostsmbuscontrollernotenabled solution: Run: lsmod | grepi

I recently encountered a lot of problems in linux configuration. I will summarize them, and the content will be a little complicated. I am eager to seek help! Happy new year!

1. Ubuntu boot:

Piix4_smbus **** host smbus controller not enabled

Solution:

Run lsmod | grep i2c.

Root @ localhost:/dev # lsmod | grep i2c
I2c_piix4 8143 0
Root @ localhost:/dev # vi/etc/modprobe. d/blacklist. conf

Add i2c_piix4 to the list of non-loaded modules and add it at the end of the blacklist. conf file:

Blacklist i2c_piix4

Regenerate the boot file/boot/initrd. img:

Run update-initramfs-u-k all.

Then restart the system.

Cause:

The host CPU is 64-bit, but the installed ubuntu is 32-bit.

2. gcc compilation:

Error: call to '_ open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments

This is a phenomenon that occurs when I pre-install a lower version of gcc-4.4 under the gcc-3.4.5 version;

Solution:

Compile:

Make "CFLAGS =-U_FORTIFY_SOURCE"

Cause:

Some extended checking functions, such as buffer overflow and ignoring return value, were added from gcc 4.0. as early as feroda core 4, redhat enabled this gcc extension by default, on this basis, almost all fc4 software has been compiled. ubuntu does not enable this function until version 8.10;
However, after this function is enabled, many programs cannot be compiled, such as gcc :(, the solution is to disable the fortify extension during compilation:

3. automatically mount shared folders in linux (see this section for details ):

When I view the previously shared folder in the/mnt/hgfs/folder of Ubuntu in the virtual machine, I find that the shared folder does not disappear. Dizzy... after carefully checking the network connection status, the virtual machine and the host can ping each other, reset and change the folder, and grant the folder a large access permission, since/mnt/hgfs does not share a folder, mount it as needed and execute:

Mount-t cifs-o username = YOUR_USERNAME, password = YOUR_PASSWORD // HOME_HOST_IP/share/mnt/hgfs/mnt

Subsequently, the following error occurs: cifs vfs: cifs_mount failed w/return code =-22.

After checking the information, it turns out that samba_client is not installed. execute:

Apt-get install samba-client

If you have not installed samba, you also need to install it:

Apt-get install smaba

After the mounting command is executed, the shared folder returns to normal.

However, the preceding operations are temporary and resume normal after restart. you need to add the following lines to the/etc/fstab file:

// HOME_HOST_IP/share/mnt/hgfs/mnt cifs username = YOUR_USERNAME, password = YOUR_PASSWORD, rw 0 0

@ Aenon, you can also ~ /. Add to bashrc

Alias xxx = 'Mount-t smbfs-o username = Administrator. password = *** // HOME_HOST_IP/share/mnt/hgfs/mnt'

In this way, you can execute xxx when you need to mount the shared folder. you do not need to mount the shared folder every time you start the system.

Unmount the Mount folder: umount/mnt/hgfs/mnt/

Run: net share to view the folder shared by the computer host.

I have already set shared folders in the VM. they were previously automatically mounted and can be seen directly in/mnt/hgfs. I don't know why.

The reason was finally found today. it was because of the VMtools problem that it was okay to reinstall the VMtools again. Speechless.

Go to the VM menu VM/Reinstall VMware tools ..

The installation package of the tool will be available in/dev/cdrom1 (you can view the name in your Directory) and mounted to the/mnt/VMtools/directory.

Mount/dev/cdrom1/mnt/VMtools

Go to/mnt/VMtools to view the mounted files.

Copy the vmwarls-ls-9.2.3-1031360.tar.gz installation package to another folder (which cannot be decompressed at the Mount point) and decompress the package:

Tar zxvf VMwareTools-9.2.3-1031360.tar.gz

Go to: cd vmware-tools-distrib

Run:

/Vmware-install.pl

Then ENTER is installed by default. then you can see your shared folder in the/mnt/hgfs folder. I have spent so much time on such a simple task. Dizzy...

I think it is not a good method to add a Mount file in/etc/fstab. once your host uses a dynamic ip address, the ip address changes when it is started up next time. Then ubuntu in your virtual machine cannot be started. It prompts a Mount error. The second method used in the past is to re-install it. now I have learned a new method.

4. file configuration error linux cannot start

Restart the virtual machine system and press shift at startup. a page similar to the following is displayed, that is, go to grub:

Press the "e" Key to enter the command line editing mode. the following page is displayed:

Add the following in the second line:

Init =/bin/bash

Then press Ctrl-x to continue the startup. The system will skip the mounting error and continue to execute the command. after entering the command line, fix your configuration information! Restart after the repair is completed.

5. if you switch the tab key, the following message is displayed:

Every time you execute a command, press the tab key to use the complete function. the following section appears, dizzy.

Cd sour-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8: zh_CN.GB2312)

Solution:
Apt-get purge locales
Apt-get autoclean
Apt-get install locales
Cd/usr/share/locales
./Install-language-pack en_US.UTF-8
Dpkg-reconfigure locales
Repaired
Run locale to view related information.

Thanks http://www.xdty.org/912

6. scull compilation problems:

The kernel code used in LDDR3 is 2.6.10. now the new linux has changed and some problems encountered during the compilation process have been solved.

A: Note:

Problem: scripts/Makefile. build: 46: *** CFLAGS was changed in "/home/chenfang/scull/Makefile", Fix it use EXTRA_CFLAGS.Stop .:

Solution: change CFLAGS in Makefile to EXTRA_CFLAGS.

B: tip:

Problem: linux/config. h cannot be found in main. c,

Solution: change config. h in main. c to autoconf. h.

C: tip:

Problem: make [2]: *** [/home/libin/project/ldd3/examples/scull/pipe. o] Error 1
Make [1]: *** [_ module _/home/libin/project/ldd3/examples/scull] error 2

Solution: Add # include in pipe. c.

D: prompt:

Problem: make [2]: *** [/home/libin/project/ldd3/examples/scull/access. o] Error 1

Make [1]: *** [_ module _/home/libin/project/ldd3/examples/scull] error 2

Solution: Add in access. c

E: tips:

/Home/cs/lddr/scull/access. c: In function 'scull _ w_open ':

/Home/cs/lddr/scull/access. c: 185: error: 'struct task_struct 'has no member named 'uid'
Make [2]: *** [/home/cs/lddr/scull/access. o] Error 1
Make [1]: *** [_ module _/home/cs/lddr/scull] Error 2

Solution:

Current-> uid changed to current-> cred-> uid
Modify current-> euid to current-> cred-> euid

Then compile it.

7. ubuntu font

Thank you for sharing @ Dean Chen.

Root @ localhost:/home/cs/lddr/scull # locale
Locale: Cannot set LC_CTYPE to default locale: No such file or directory
Locale: Cannot set LC_MESSAGES to default locale: No such file or directory
Locale: Cannot set LC_ALL to default locale: No such file or directory
LANG = en_US
LANGUAGE =
LC_CTYPE = "en_US"
LC_NUMERIC = "en_US"
LC_TIME = "en_US"
LC_COLLATE = "en_US"
LC_MONETARY = "en_US"
LC_MESSAGES = "en_US"
LC_PAPER = "en_US"
LC_NAME = "en_US"
LC_ADDRESS = "en_US"
LC_TELEPHONE = "en_US"
LC_MEASUREMENT = "en_US"
LC_IDENTIFICATION = "en_US"
LC_ALL =

Add the following content at the end of the/etc/profile file:

Export LC_ALL = C

Run # source/etc/profile

Execute locale to view

You can.

If the font is missing, run the following command to install the font:

Apt-get -- reinstall install language-pack-en

Font Update command:

Update-locale LC_ALL = en_US.UTF-8 LANG = en_US.UTF-8

The level is limited. please advise me more!

Dean Chen

 

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.