Ubuntu 17.04随机冻结
今天我从Ubuntu 16升级到17.一切正常,直到我离开电脑大约2-3个小时。 然后它崩溃了,除了没有错误屏幕或消息。 只是在它崩溃之前发生的最后一张图片。 鼠标不会移动,键盘不起作用,所有操作(我的下载停止…我不确切知道是否一切都没有)继续。 我只是认为这是一个随机的问题,并通过手动关闭我的机器继续,但它再次发生,我不认为这只是一件值得忽略的事情。 任何帮助对于如何解决这个问题都很好,因为我不知道。 我也在使用Ubuntu桌面。
更新: ls -alt /var/crash
的输出是
总共8
drwxr-xr-x 14 root root 4096 Apr 11 21:21 ..
drwxrwsrwt 2 root whoopsie 4096 Apr 11 21:14。
dpkg -l intel-microcode
给我错误
dpkg-query:找不到匹配intel-microcode的软件包
Free -h
total used free shared buff/cache available
内存:7.7G 1.8G 349M 101M 5.6G 5.5G
交换:0B 0B 0B
和swapon
没有输出。
下次更新:
cat /etc/fstab #If there was a hashtag at the start of a line it got bolded. # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # # / was on /dev/sda1 during installation UUID=8eedf4cb-b322-4455-905b- c50264691a4d / ext4 errors=remount-ro 0 1 /swapfile none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0
这是我的Gparted截图。
下一次更新:
sudo blkid
输出(PARTUUID在同一条线上它只是它没有这样出来)
/dev/sda1: UUID="8eedf4cb-b322-4455-905b-c50264691a4d" TYPE="ext4" PARTUUID="46d95458-01" /dev/sda5: UUID="4e48c05f-02d1-47ef-9a5f-bb8cba50dd2b" TYPE="ext4" PARTUUID="46d95458-05" /dev/sda6: UUID="7f7d6675-31a4-4100-9d32-5faa0e0cea3e" TYPE="swap" PARTUUID="46d95458-06" /dev/sdb1: LABEL="HD-LXU3" UUID="F45A29EB5A29AB76" TYPE="ntfs" PARTUUID="aa1e0d10-01"
输出ls -al /
总计2097264
drwxr-xr-x 24 root root 4096 5月26日12:10。
drwxr-xr-x 24 root root 4096 5月26日12:10 ..
drwxr-xr-x 2 root root 4096 May 27 23:15 bin
drwxr-xr-x 3 root root 4096 May 29 13:09 boot
drwxrwxr-x 2 root root 4096 5月26日11:44 cdrom
drwxr-xr-x 22 root root 4480 Jun 4 12:00 dev
drwxr-xr-x 140 root root 12288 Jun 2 17:36等
drwxr-xr-x 4 root root 4096 5月26日11:47回家
lrwxrwxrwx 1 root root 33 5月26日12:10 initrd.img – > boot / initrd.img-4.10.0-21-generic
lrwxrwxrwx 1 root root 33 5月26日11:50 initrd.img.old – > boot / initrd.img-4.10.0-19-generic
drwxr-xr-x 25 root root 4096 May 26 13:03 lib
drwxr-xr-x 2 root root 4096 Apr 11 21:07 lib64
drwx —— 2 root root 16384 May 26 11:43 lost + found
drwxr-xr-x 3 root root 4096 5月26日11:56媒体
drwxr-xr-x 2 root root 4096 Apr 11 21:07 mnt
drwxr-xr-x 5 root root 4096 May 28 09:51 opt
dr-xr-xr-x 242 root root 0 Jun 4 11:58 proc
drwx —— 4 root root 4096 May 29 21:03 root
drwxr-xr-x 30 root root 960 Jun 4 12:05 run
drwxr-xr-x 2 root root 12288 5月27日23:15 sbin
drwxr-xr-x 2 root root 4096 Apr 6 02:32 snap
drwxr-xr-x 2 root root 4096 Apr 11 21:07 srv
-rw ——- 1 root root 2147483648 5月26日11:44 swapfile
dr-xr-xr-x 13 root root 0 Jun 4 13:43 sys
drwxrwxrwt 16 root root 4096 Jun 4 13:46 tmp
drwxr-xr-x 11 root root 4096 Apr 11 21:13 usr
drwxr-xr-x 15 root root 4096 May 28 14:08 var
lrwxrwxrwx 1 root root 30 5月26日12:10 vmlinuz – > boot / vmlinuz-4.10.0-21-generic
lrwxrwxrwx 1 root root 30 5月26日11:50 vmlinuz.old – > boot / vmlinuz-4.10.0-19-generic
最终编辑
free -h
给了我:
> total used free shared buff/cache available Mem: 7.7G 889M 6.2G 46M 692M 6.6G Swap: 2.0G 0B 2.0G
swapon
给出:
NAME TYPE SIZE USED PRIO > /dev/dm-0 partition 2G 0B -1
并且ls -alh /swapfile
给出:
-rw ——- 1 root root 2.0G Jun 4 21:41 / swapfile
我的创业时间也增加了很多。
17.04和加密交换文件似乎存在问题…并且有一些解决方法……
像这样编辑你的/etc/crypttab
:
gksudo gedit /etc/crypttab
改变这一行:
cryptswap1 UUID=xxxx-xxxx-xxxx-xxxx /dev/urandom swap,offset=1024,cipher=aes-xts-plain64
对此:
cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64
还要确保/etc/fstab
包含以下内容:
/swapfile none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0
参考文献:
Ubuntu Desktop 17.04 64bit慢启动
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1668535
https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/1670336