How to solve some problems in Linux

    image

    Introduction


    As you know, typical PC computers are assembled from very diverse components - a processor from one manufacturer, a video card from another, and a sound card from a third. Themes about printers / scanners / Wi-Fi adapters / TV tuners are just teeming everywhere on the forums. The ubiquitous Chinese manufacturers, not particularly striving for standardization, do not add optimism. The operating system has a difficult task to make all these devices work in concert.
    I bring to your attention a small guide on troubleshooting common Linux problems.

    Based on this .

    Bootloader recovery


    As a rule, Linux boot loaders are quite friendly with respect to other OSs, and during installation they detect the presence of neighbors on other partitions. But Windows during installation brazenly overwrites MBR with its bootloader, and goodbye, Linux.
    Do not tear your hair out of worry, first you need to prepare your favorite Linux LiveCD. Now any self-respecting distribution has its own LiveCD, but I liked % distrname% . Boot from the disk, enter the terminal with root rights and enter the following command:

    grub-install /dev/sda where sda ​​is the name of your bootable HDD / SSD / flash drive / floppy :)

    If the download lasts forever


    During the reign of Windows 9x, when loading Linux, dozens of lines ran across the screen, and it was possible to determine what exactly the download was stopped on. Splash gags are now in fashion, and it’s impossible to determine why your favorite Ubuntu has been loading for 40 minutes. In order to disable splash, press Shift (or whatever your distribution offers) when booting, become the cursor on the first line, press E, move the cursor to the line starting with kernel and press E. Remove the quiet and splash parameters . If the download stops immediately, it is recommended to add noapic to this line , this option will tell the kernel not to use APIC . Next, press Enter and B to start the download.
    image
    In SUSE, just enter splash = 0 in the boot options .
    image
    Well, the download has gone.
    image
    Next, wait for the error message, and google its text.

    What is in my buzzing box?


    There are such wonderful commands, as lspci well as lsusb, which will show what devices your PCI bus and USB ports are loaded with, respectively.
    The output of the command will be similar to this: To learn more about a specific device, there are options -s and -v : where the strange characters 001: 004 are the address of the device from the output of the lspci or lsusb command . If you are afraid when looking at the blinking cursor in the terminal, you can use the Hardinfo package

    Bus 001 Device 004: ID 03f0:2c17 Hewlett-Packard
    Bus 004 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
    Bus 002 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port




    sudo lspci -s 03:00.0 -v
    sudo lsusb -s 001:004 -v




    image

    Oh these x


    It often happens that after the end of the initial boot you see a black screen. What happened? Perhaps the video driver has flown. Of course, for a non-sophisticated user it is better to use the drivers from the repositories. In order to enter your favorite Gnome or KDE to start the package manager, press Ctrl-Alt-F1 and you will be taken to the terminal. Log in with root privileges and make your Xorg use VESA drivers: dpkg-reconfigure xserver-xorg command for debian / ubuntu, yast2 for SUSE, and then choose a VESA-compatible video card. Or nano /etc/X11/xorg.conf , look for the word intel , nvidia and the like in the Driver section there and change it to vesa. Next, run the x: kdm or gdm or startxfce4 , etc. (taste). If the screen is still black, beat the X with Ctrl-Alt-Backspace and see where the cat is buried: cat /var/log/Xorg.0.log | grep EE and google the error text.

    Network


    First, let's talk about the wireless network. Check for network availability with the ifconfig command . Naturally, your access point must be turned on and configured. If the output of the command does not have an interface named ath0 or wlan0 , then you need to do something. There are some great drivers like madwifi . Installation instructions can be found there. If they didn’t help, a utility such as NDISwrapper might help you . This crutch will allow the use of Windows drivers for wireless adapters in Linux.

    sudo ndiswrapper -i /path/to/driver.inf

    Then load the ndiswrapper module: sudo modprobe -v ndiswrapper

    Next, try to raise the network:

    sudo ifconfig wlan0 up
    sudo iwlist wlan0 scan


    If the system swears at the first command like “Interface Doesn't Support Scanning”, then you have incorrectly selected the name of the interface, or the wrong driver. The second command will start the search for the wireless network.

    Now about the wired network. Suppose that a patch cord is inserted into a network card, and the corresponding interface is present in the output of ifconfig. Next, we will talk about the case of getting the Internet using NAT over twisted pair. Let's check the availability of the Internet in the old-fashioned way: ping% sitename% . If the system swears like network is unreachable, then we will try this way: ping% ip_of_site% - call your friend and ask to tell Google aypishnik;) If now ping passes, then you have not set the DNS server address. Do nano /etc/resolv.conf and write a line there likenameserver% IP_of_dns_server% . If all else fails, you may not have paid for the Internet.

    As an epilogue


    Remember: it works - do not touch!

    Also popular now: