Tag Archives: 【Linux】

error: no such device: xxx xxx Entering rescue mode… grub rescue >

[update time: 2017/5/18]
I. Purpose of this paper:
I these days in the installation of dual systems, Win7 + Ubuntu, Linux and system layer is not very familiar with me, and indeed encountered a lot of problems. This paper is mainly aimed at the “system boot” aspects of the problem to do some sorting. This article provides an approach to system boot. Specific problems are described as follows:
1. The original system of my PC is Win7 system, and then I want to install an Ubuntu system.
2. The process of installing the system is arranged in another blog, please refer to here for details.
3, problem, case 1: after I install the system and restart, but the system directly into the original Windows 7 system, and there are no choice system interface (GRUB is start the implementation specification, which allows a user can have multiple operating systems at the same time inside a computer, in the startup of computer, want to run the operating system).
4. Case II: I made a similar mistake in another situation, and the solution I used was similar, so I put it together. The situation is described as follows: in the case of successful installation of two systems, I entered the win7 system disk management, and then the Ubuntu system related to the deletion of the disk, equivalent to the deletion of the formatting of the Ubuntu system. The problem comes, restart the computer, can not enter the win7 system, the following interface appears :(because of the previous operation, the system boot file has been deleted).

2. Solution:
1. Plug in the USB drive that has been successfully burned into the system, then choose to try Ubuntu and enter the Ubuntu system interface. (The item without UEFI was selected for this article)
2. Make sure the machine is connected to the Internet, open the terminal and enter the following command:

sudo -i
add-apt-repository ppa:yannubuntu/boot-repair && apt-get update
apt-get install -y boot-repair && boot-repair

The first line indicates entering root account mode.
line 2 adds the software source and updates the system.
third action install boot-repair and start the software after the installation is complete.

3. Input relevant instructions according to prompts. Part of the process diagram is shown below.


4, restart the computer, if successful, the system boot interface has come out, you can choose the required system.

3. Reference materials for this paper
1, use the Boot – repair repair double system: http://jingyan.baidu.com/article/5553fa82cd48a765a23934ae.html?qq-pf-to=pcqq.c2c

【Linux】psql: FATAL: Ident authentication failed for user “username” Error and Solution

Question:I have installed Postgresql.x server under Red Hat Enterprise Linux 5. I have created username/password and database. But when I try to connect it via PHP or psql use the following syntax:

psql -d myDb -U username -W
It gives me an error that reads as follows:

psql:Fatal: Ident authentication failed for user “username”.
How do I fix this error?

A. To fix this error, open the PostgreSQL client authentication configuration file /var/lib/pgsql/data/pg_hba.conf:
# vi /var/lib/pgsql/data/pg_hba.conf:
# vi /var/lib/pgsql/data/pg_hba.conf: # vi /var/lib/pgsql/data/pg_hba.conf: # vi /var/lib/pgsql/data/pg_hba.conf.

    Which hosts are allowed to connect, which clients are authenticated, which PostgreSQL usernames are available to which users, and which databases are accessible

By default, Postgresql uses identity-based authentication. All you have to do is allow authentication to your network or web server based on username and password.IDENT will never allow you to log in via the -U and -W options. Add the following to allow logins through local hosts only:

local all all trust
host all 127.0.0.1/32 trust

Save and close the file. Restart the Postgresql server:
# service Postgresql Restart
Now you should be able to log in using the following command:
$ psql -d myDb -U username -W