ubuntu16.04启动时遇见的问题。

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
cocolee
帖子: 27
注册时间: 2015-03-03 1:46
系统: ubuntu 14

ubuntu16.04启动时遇见的问题。

#1

帖子 cocolee » 2016-06-16 12:32

我把启动时出错(/var/log/kern.log)的日志(红色)的给贴出来,如下:
[ 0.252736] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 2.016471] pci 0000:00:1a.0: EHCI: BIOS handoff failed (BIOS bug?) 01010001
[ 3.616380] pci 0000:00:1d.0: EHCI: BIOS handoff failed (BIOS bug?) 01010001
[ 7.923492] ACPI Error: [AR02] Namespace lookup failure, AE_NOT_FOUND (20150930/psargs-359)
[ 7.923499] ACPI Error: Method parse/execution failed [\_SB.PCI0.PEG0._PRT] (Node ffff8802568e4910), AE_NOT_FOUND (20150930/psparse-542)
[ 8.032605] radeon 0000:01:00.0: VCE init error (-22).
[ 9.223613] EXT4-fs (sda1): re-mounted. Opts: discard,errors=remount-ro
NetworkManager[790]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
<warn> [1466046578.0548] failed to enumerate oFono devices: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
[ 0.015143] mce: [Hardware Error]: Machine check events logged
[ 0.236144] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 1.979939] pci 0000:00:1a.0: EHCI: BIOS handoff failed (BIOS bug?) 01010001
kernel: [ 3.579878] pci 0000:00:1d.0: EHCI: BIOS handoff failed (BIOS bug?) 01010001
kernel: [ 7.962660] ACPI Error: [AR02] Namespace lookup failure, AE_NOT_FOUND (20150930/psargs-359)
kernel: [ 7.962667] ACPI Error: Method parse/execution failed [\_SB.PCI0.PEG0._PRT] (Node ffff8802568e4910), AE_NOT_FOUND (20150930/psparse-542)
kernel: [ 7.962667] ACPI Error: Method parse/execution failed [\_SB.PCI0.PEG0._PRT] (Node ffff8802568e4910), AE_NOT_FOUND (20150930/psparse-542)
kernel: [ 10.134797] EXT4-fs (sda1): re-mounted. Opts: discard,errors=remount-ro
NetworkManager[710]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
kernel: [ 299.885483] mce: [Hardware Error]: Machine check events logged
kernel: [ 2354.678327] usb 3-7: device descriptor read/64, error -110
kernel: [ 2365.301792] usb 3-7: device descriptor read/64, error -110
kernel: [ 3084.749134] usb 3-7: device descriptor read/64, error -110
cocolee
帖子: 27
注册时间: 2015-03-03 1:46
系统: ubuntu 14

Re: ubuntu16.04启动时遇见的问题。

#2

帖子 cocolee » 2016-06-16 12:35

这些都是出错的日志,系统不知道我自己乱改了哪里,假如开机不插电源就会出现登录不了(登录界面不能输入密码,上面有一行英文)。麻烦各位帮我看看,谢谢。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu16.04启动时遇见的问题。

#3

帖子 poloshiao » 2016-06-16 14:18

1. Ubuntu 16.04 記錄檔 可以使用 journalctl 指令搜尋
http://manpages.ubuntu.com/manpages/wil ... ctl.1.html
journalctl - Query the systemd journal
我把启动时出错(/var/log/kern.log)的日志(红色)的给贴出来,如下:
系统不知道我自己乱改了哪里,假如开机不插电源就会出现登录不了(登录界面不能输入密码,上面有一行英文)。
2. /var/log/kern.log 通常從開機選單選擇 linux kernel 版本 載入 linux kernel 以後才開始記錄 跟 kernel 有關的記錄
journalctl 則更早期即開始產生記錄
2-1. 剛好互相對照
插电源 及 不插电源
比對他們的 journalctl 指令搜尋結果

3. https://lists.archlinux.org/pipermail/a ... 33422.html
journalctl -f _TRANSPORT=kernel
3-1. 在 Ubuntu 16.04
使用
sudo journalctl -f _TRANSPORT=kernel
可以查看類似的 /var/log/kern.log 記錄
3-2. 如果確定是 kernel 引起的 參閱
https://help.ubuntu.com/16.04/servergui ... -dump.html
Kernel Crash Dump
Hardware failure

4. 問題是
你開機遇见的問題
有沒有除了 kernel 以外 其它因素影響 ?
上面有一行英文
5. 擷個圖 貼上來
cocolee
帖子: 27
注册时间: 2015-03-03 1:46
系统: ubuntu 14

Re: ubuntu16.04启动时遇见的问题。

#4

帖子 cocolee » 2016-06-17 17:34

poloshiao 写了:1. Ubuntu 16.04 記錄檔 可以使用 journalctl 指令搜尋
http://manpages.ubuntu.com/manpages/wil ... ctl.1.html
journalctl - Query the systemd journal
我把启动时出错(/var/log/kern.log)的日志(红色)的给贴出来,如下:
系统不知道我自己乱改了哪里,假如开机不插电源就会出现登录不了(登录界面不能输入密码,上面有一行英文)。
2. /var/log/kern.log 通常從開機選單選擇 linux kernel 版本 載入 linux kernel 以後才開始記錄 跟 kernel 有關的記錄
journalctl 則更早期即開始產生記錄
2-1. 剛好互相對照
插电源 及 不插电源
比對他們的 journalctl 指令搜尋結果

3. https://lists.archlinux.org/pipermail/a ... 33422.html
journalctl -f _TRANSPORT=kernel
3-1. 在 Ubuntu 16.04
使用
sudo journalctl -f _TRANSPORT=kernel
可以查看類似的 /var/log/kern.log 記錄
3-2. 如果確定是 kernel 引起的 參閱
https://help.ubuntu.com/16.04/servergui ... -dump.html
Kernel Crash Dump
Hardware failure

4. 問題是
你開機遇见的問題
有沒有除了 kernel 以外 其它因素影響 ?
上面有一行英文
5. 擷個圖 貼上來
你好,感谢您的关注,我这两天试了很多回,没有出现我所描述的不能登录系统这个情况了,我也不知道什么原因,关于之前的接通电源与不接通电源不能登录系统也没有出现。不过之前是为了解决ubuntu不能挂起的问题,下载了pm-utils,并修改了配置,弄了几下之后,就出现我之前描述的问题了,并且挂起的问题也没有解决,然后我又把pm-utils卸载了,并把配置改了回去,就好了,前两天又出现了这种情况,不过重启一下就好了,一楼那是16号的开机启动的错误日志,我也不明白那是什么意思。再次感谢您。
cocolee
帖子: 27
注册时间: 2015-03-03 1:46
系统: ubuntu 14

Re: ubuntu16.04启动时遇见的问题。

#5

帖子 cocolee » 2016-06-27 18:25

poloshiao 写了:1. Ubuntu 16.04 記錄檔 可以使用 journalctl 指令搜尋
http://manpages.ubuntu.com/manpages/wil ... ctl.1.html
journalctl - Query the systemd journal
我把启动时出错(/var/log/kern.log)的日志(红色)的给贴出来,如下:
系统不知道我自己乱改了哪里,假如开机不插电源就会出现登录不了(登录界面不能输入密码,上面有一行英文)。
2. /var/log/kern.log 通常從開機選單選擇 linux kernel 版本 載入 linux kernel 以後才開始記錄 跟 kernel 有關的記錄
journalctl 則更早期即開始產生記錄
2-1. 剛好互相對照
插电源 及 不插电源
比對他們的 journalctl 指令搜尋結果

3. https://lists.archlinux.org/pipermail/a ... 33422.html
journalctl -f _TRANSPORT=kernel
3-1. 在 Ubuntu 16.04
使用
sudo journalctl -f _TRANSPORT=kernel
可以查看類似的 /var/log/kern.log 記錄
3-2. 如果確定是 kernel 引起的 參閱
https://help.ubuntu.com/16.04/servergui ... -dump.html
Kernel Crash Dump
Hardware failure

4. 問題是
你開機遇见的問題
有沒有除了 kernel 以外 其它因素影響 ?
上面有一行英文
5. 擷個圖 貼上來
你好,今天出现了我说的这个问题。
cocolee
帖子: 27
注册时间: 2015-03-03 1:46
系统: ubuntu 14

Re: ubuntu16.04启动时遇见的问题。

#7

帖子 cocolee » 2016-06-28 10:04

这是出现的问题。
附件
IMG_20160625_173427R.jpg
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu16.04启动时遇见的问题。

#8

帖子 poloshiao » 2016-06-28 10:20

IMG_20160625_173427R.jpg
1. http://manpages.ubuntu.com/manpages/xen ... gin.8.html
pam-nonlogin
Prevent non-root users from login

2. 看看 有沒有這兩個檔案 ?
2-1. sudo ls -al /var/run/nologin
2-2. sudo ls -al /etc/nologin

3. 如果有 看看 它的內容
3-1. sudo cat /var/run/nologin
3-2. sudo cat /etc/nologin
cocolee
帖子: 27
注册时间: 2015-03-03 1:46
系统: ubuntu 14

Re: ubuntu16.04启动时遇见的问题。

#9

帖子 cocolee » 2016-06-28 10:40

poloshiao 写了:
IMG_20160625_173427R.jpg
1. http://manpages.ubuntu.com/manpages/xen ... gin.8.html
pam-nonlogin
Prevent non-root users from login

2. 看看 有沒有這兩個檔案 ?
2-1. sudo ls -al /var/run/nologin
2-2. sudo ls -al /etc/nologin

3. 如果有 看看 它的內容
3-1. sudo cat /var/run/nologin
3-2. sudo cat /etc/nologin
你好,没有。为什么我输入命令总会有个无法解析主机呢?我修改过了hosts。
附件
2016-06-28 10-46-51屏幕截图.png
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: ubuntu16.04启动时遇见的问题。

#10

帖子 vickycq » 2016-06-28 11:52

cocolee 写了:为什么我输入命令总会有个无法解析主机呢?我修改过了hosts。
执行以下指令将结果全部复制贴上来

代码: 全选

head -n15 /etc/hosts
cat /etc/hostname 
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
cocolee
帖子: 27
注册时间: 2015-03-03 1:46
系统: ubuntu 14

Re: ubuntu16.04启动时遇见的问题。

#11

帖子 cocolee » 2016-06-28 12:30

vickycq 写了:
cocolee 写了:为什么我输入命令总会有个无法解析主机呢?我修改过了hosts。
执行以下指令将结果全部复制贴上来

代码: 全选

head -n15 /etc/hosts
cat /etc/hostname 
cocolee@AE86:~$ head -n15 /etc/hosts
# Copyright (c) 2014-2016, racaljk.
# https://github.com/racaljk/hosts
# Last updated: 2016-06-26

# This work is licensed under a CC BY-NC-SA 4.0 International License.
# https://creativecommons.org/licenses/by-nc-sa/4.0/

# Localhost (DO NOT REMOVE)
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

# Modified hosts start

cocolee@AE86:~$ cat /etc/hostname
AE86

你好,就是这些,麻烦了。 :em06
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: ubuntu16.04启动时遇见的问题。

#12

帖子 vickycq » 2016-06-28 13:05

cocolee 写了: cocolee@AE86:~$ head -n15 /etc/hosts
# Copyright (c) 2014-2016, racaljk.
# https://github.com/racaljk/hosts
使用了 racaljk/hosts,未保存 hosts 的原有内容
尝试在 hosts 开头增加如下内容

代码: 全选

127.0.0.1   localhost AE86
127.0.1.1   AE86

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
若需使用自动 hosts 更新器,也要注意其是否会覆盖 hosts 的现有内容
或根据需求 自行撰写 hosts 自动更新脚本

hosts 自动更新脚本一例
将上文的内容保存为 /etc/hosts-0 每次更新时自动附加到 hosts 文件的头部

代码: 全选

#!/bin/bash
wget -O /etc/hosts-tmp https://raw.githubusercontent.com/racaljk/hosts/master/hosts
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
mv /etc/hosts /etc/hosts-old
echo '# Last updated: '`date` >> /etc/hosts
cat /etc/hosts-0 >> /etc/hosts
grep -v '^127.0.0.1\|^255.255.255.255\|^::1\|^fe80' /etc/hosts-tmp >> /etc/hosts
rm /etc/hosts-tmp
racaljk 提供的 hosts 更新脚本 https://github.com/racaljk/hosts/tree/master/tools
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
cocolee
帖子: 27
注册时间: 2015-03-03 1:46
系统: ubuntu 14

Re: ubuntu16.04启动时遇见的问题。

#13

帖子 cocolee » 2016-06-28 18:50

vickycq 写了:
cocolee 写了: cocolee@AE86:~$ head -n15 /etc/hosts
# Copyright (c) 2014-2016, racaljk.
# https://github.com/racaljk/hosts
使用了 racaljk/hosts,未保存 hosts 的原有内容
尝试在 hosts 开头增加如下内容

代码: 全选

127.0.0.1   localhost AE86
127.0.1.1   AE86

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
若需使用自动 hosts 更新器,也要注意其是否会覆盖 hosts 的现有内容
或根据需求 自行撰写 hosts 自动更新脚本

hosts 自动更新脚本一例
将上文的内容保存为 /etc/hosts-0 每次更新时自动附加到 hosts 文件的头部

代码: 全选

#!/bin/bash
wget -O /etc/hosts-tmp https://raw.githubusercontent.com/racaljk/hosts/master/hosts
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
mv /etc/hosts /etc/hosts-old
echo '# Last updated: '`date` >> /etc/hosts
cat /etc/hosts-0 >> /etc/hosts
grep -v '^127.0.0.1\|^255.255.255.255\|^::1\|^fe80' /etc/hosts-tmp >> /etc/hosts
rm /etc/hosts-tmp
racaljk 提供的 hosts 更新脚本 https://github.com/racaljk/hosts/tree/master/tools
将上文的内容替换之后就好了,谢谢啦。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu16.04启动时遇见的问题。

#14

帖子 poloshiao » 2016-06-28 18:56

1. 表示 你的電腦 開機時 取名為 AE86 見 3.

2. 說明
在你的電腦裡 有兩個檔案
/etc/hostname
/etc/hosts
3. 開機程序 會讀取這個 /etc/hostname 檔案 為你的電腦取名為 AE86
viewtopic.php?p=3169376#p3169376
为什么我输入命令总会有个无法解析主机呢
4. 因為 需要時 會去 /etc/hosts 檔案 解析你的主机的網址 (或說 DNS)
但是 你的 /etc/hosts 檔案 沒有 AE86 所以 無法解析成 IPv4 或 IPv6 網址
所以 出現 无法解析主机 的訊息
4-1. /etc/hosts 包含 AE86 舉例
127.0.0.1 AE86 # 127.0.0.1 表示 IPv4 的 localhost 網址
127.0.1.1 AE86 # 127.0.1.1 表示 IPv4 的 localhost 網址
192.168.1.13 AE86 # 192.168.1.13 請以你的 eth0 或 wlan0 網址代入
::1 AE86 # ::1 表示 IPv6 的 localhost 網址
........
4-2. 以上 至少需要有一個
通常是
127.0.0.1 AE86
否則 就會出現 无法解析主机 的訊息

5. 注意
/etc/hostname 的 AE86 跟 /etc/hosts 的 AE86 要完全一致
例如大小寫 要完全一致

6. 安裝 Ubuntu 時 預設 應該會自動設定好 /etc/hostname 與 /etc/hosts 不需手動再修改
除非你變更了安裝時的預設值 才需要手動修改

7. 參見
http://manpages.ubuntu.com/manpages/xen ... ame.1.html
hostname - show or set the system's host name
FILES
/etc/hostname Historically this file was supposed to only contain the
hostname and not the full canonical FQDN. Nowadays most software is
able to cope with a full FQDN here. This file is read at boot time by
the system initialization scripts to set the hostname.
/etc/hosts Usually, this is where one sets the domain name by aliasing
the host name to the FQDN.
回复