AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 920142
Accepted
Uwe Pfeifer
Uwe Pfeifer
Asked: 2017-05-30 11:47:33 +0800 CST2017-05-30 11:47:33 +0800 CST 2017-05-30 11:47:33 +0800 CST

Ubuntu 17.04 启动 / 在 SSD 上但速度慢

  • 772

我有以下输出,我的 ubuntu 启动速度非常慢。启动需要大约 2-3 分钟,而 Windows 只需要 15 秒。这里是 journalctl 的输出:http: //paste.ubuntu.com/24706296/

如果有人可以帮助我,那就太好了,因为我真的很想快速启动到 ubuntu。

我在 SSD (/) 上有所有东西,但在硬盘上只有 /var 和 /home。

编辑:

须藤 blkid:

/dev/sda1: LABEL="Wiederherstellung" UUID="1E5EB9035EB8D4AD" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="daad9650-8cde-491d-80db-7dda8e1874c0"
/dev/sda2: UUID="56B9-5488" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="419f5006-cb88-4fcc-9b5e-39ca6d657edb"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="e924079c-0c0c-4157-b82d-85f0a8ef5e8c"
/dev/sda4: UUID="6862CAA762CA78F8" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="4c2eb33b-8ea1-4c7e-9c72-25c490d407ce"
/dev/sda5: UUID="76A07C5BA07C2431" TYPE="ntfs" PARTUUID="887bbacf-c0e9-44b0-bf46-1385b114068b"
/dev/sda6: UUID="c89b4926-af5a-416a-b61a-006aaa34a3cc" TYPE="ext4" PARTUUID="abab0c8d-8d6e-4529-8d94-1a88d0900861"
/dev/sda7: UUID="69152b87-29d1-410d-a49b-b31e1e9885f4" TYPE="swap" PARTUUID="7d94acf0-a66c-44d4-ba94-d3cd4ca6a31b"
/dev/sdb1: PARTLABEL="Microsoft reserved partition" PARTUUID="bdc2d24e-e974-441f-b190-b8b285579f87"
/dev/sdb2: LABEL="Volume" UUID="1A4A64574A643225" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="ec522179-fc5b-4406-a029-1036e2e1df7c"
/dev/sdb3: UUID="da267417-9a48-45a2-a3e2-2bc62163003a" TYPE="ext4" PARTUUID="8c1e23df-5f97-44f8-a344-3fb713b13bf6"
/dev/sdb4: UUID="f2362bd0-5a3d-4e0f-b915-d7ab299d0be9" TYPE="ext4" PARTUUID="c85406d4-71fc-46f6-a9c4-a4f76b2cc185"

猫 /etc/fstab:

# /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).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=c89b4926-af5a-416a-b61a-006aaa34a3cc /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=56B9-5488  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb4 during installation
UUID=f2362bd0-5a3d-4e0f-b915-d7ab299d0be9 /home           ext4    defaults        0       2
# /var was on /dev/sdb3 during installation
UUID=da267417-9a48-45a2-a3e2-2bc62163003a /var            ext4    defaults        0       2
/swapfile                                 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

免费-h:

              total        used        free      shared  buff/cache   available
Mem:           7,7G        2,8G        121M         92M        4,8G        4,5G
Swap:          7,8G          0B        7,8G

uwe@loopy-ubuntu:~$ swapon

NAME      TYPE      SIZE USED PRIO
/dev/sda7 partition 7,8G   0B   -1

uwe@loopy-ubuntu:~$ ls -al /

total 1541232
drwxr-xr-x  24 root root       4096 Mai 29 08:00 .
drwxr-xr-x  24 root root       4096 Mai 29 08:00 ..
drwxr-xr-x   2 root root       4096 Mai 29 08:00 bin
drwxr-xr-x   4 root root       4096 Mai 29 00:07 boot
drwxr-xr-x   2 root root       4096 Mai 28 23:02 cdrom
drwxr-xr-x  20 root root       4480 Mai 30 11:52 dev
drwxr-xr-x 139 root root      12288 Mai 29 21:38 etc
drwxr-xr-x   5 root root       4096 Mai 28 23:02 home
lrwxrwxrwx   1 root root         33 Mai 29 00:04 initrd.img -> boot/initrd.img-4.10.0-22-generic
drwxr-xr-x  25 root root       4096 Mai 29 00:24 lib
drwxr-xr-x   2 root root       4096 Mai 29 00:06 lib32
drwxr-xr-x   2 root root       4096 Apr 12 05:06 lib64
drwx------   2 root root      16384 Mai 28 22:51 lost+found
drwxr-xr-x   3 root root       4096 Mai 29 08:00 media
drwxr-xr-x   2 root root       4096 Apr 12 05:06 mnt
dr-xr-xr-x 325 root root          0 Mai 30 11:50 proc
drwx------   3 root root       4096 Apr 12 05:17 root
drwxr-xr-x  30 root root        940 Mai 30 11:56 run
drwxr-xr-x   2 root root      12288 Mai 29 00:06 sbin
drwxr-xr-x   2 root root       4096 Apr  6 10:32 snap
drwxr-xr-x   2 root root       4096 Apr 12 05:06 srv
-rw-------   1 root root 1578106880 Mai 28 23:01 swapfile
dr-xr-xr-x  13 root root          0 Mai 30 11:58 sys
drwxrwxrwt  19 root root       4096 Mai 30 11:56 tmp
drwxr-xr-x  11 root root       4096 Mai 29 00:06 usr
drwxr-xr-x  15 root root       4096 Apr 12 05:18 var
lrwxrwxrwx   1 root root         30 Mai 29 00:04 vmlinuz -> boot/vmlinuz-4.10.0-22-generic

新的 ls -alh /swapfile:

-rw------- 1 root root 4,0G Mai 30 22:40 /swapfile

uwe@loopy-ubuntu:~$ free -h total used free shared buff/cache available Mem: 7,7G 3,7G 1,3G 129M 2,8G 3,7G Swap: 4,0G 0B 4,0G

journalctl: uwe@loopy-ubuntu:~$ journalctl --boot | pastebinit http://paste.ubuntu.com/24737809/

我自己创建了交换文件。 http://paste.ubuntu.com/24737883/

boot
  • 1 1 个回答
  • 1058 Views

1 个回答

  • Voted
  1. Best Answer
    heynnema
    2017-05-31T12:07:31+08:002017-05-31T12:07:31+08:00

    部分答案...正在进行中...

    步骤1:

    您的 SSD 上可能有一些磁盘损坏。

    让我们首先检查您的文件系统是否有错误。

    要检查 Ubuntu 分区上的文件系统...

    • 引导到 GRUB 菜单
    • 选择高级选项
    • 选择恢复模式
    • 选择根访问
    • 在 # 提示符下,键入sudo fsck -f /
    • 如果有错误,请重复 fsck 命令
    • 类型reboot

    第 2 步:在我告诉你之前不要这样做

    现在我们开始修复您的 /swapfile 问题。

    编辑你的/etc/fstab...

    gksudo gedit /etc/fstab
    

    更改此行:

    /swapfile   none   swap    sw              0       0
    

    对此:

    #/swapfile   none   swap    sw              0       0
    

    保存文件并退出 gedit。

    重新启动并注意是否有启动时间改进。

    更多待定...

    如果启动时间得到改善...删除 /swapfile...

    在 /dev/sdb 上创建交换分区或交换文件...

    编辑 /etc/fstab...

    删除 /dev/sda7 交换分区...

    第 3 步:

    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

    • 1

相关问题

  • grub 菜单中的“恢复”选项是什么?

  • 用户如何避免在启动时输入密码?[关闭]

  • 更改 Wubi 的启动顺序

  • 如何在 Ubuntu 启动时显示或隐藏启动消息?

  • 如何避免启动时出现“S to Skip”消息?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve