grub 菜单在 10 分钟后出现,并且响应非常慢

grub 菜单在 10 分钟后出现,并且响应非常慢

目前,我在 hp15r204tx 笔记本电脑上使用双启动的 ubuntu 16.04 LTS 和 windows 8.1,运行良好。但突然间 grub 在启动很长时间后才出现,当我移动箭头键选择任何选项时,grub 菜单非常滞后且响应缓慢。我的 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/sda11 during installation
UUID=dbfa8dc7-3265-4f19-85ef-584294eed2fe /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=207F-463D  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda10 during installation
#UUID=070ab5c2-2c28-4e86-baae-3d3900bfeeac none            swap    sw              0       0

这是 systemd-analyze blame 的输出

3min 392ms powerd.service
         46.608s apt-daily.service
         27.123s nmbd.service
         26.906s samba-ad-dc.service
         17.650s click-system-hooks.service
         12.655s NetworkManager-wait-online.service
          9.660s systemd-fsck@dev-disk-by\x2duuid-207F\x2d463D.service
          7.996s rstudio-server.service
          7.352s dev-sda10.device
          6.854s NetworkManager.service
          6.377s ModemManager.service
          4.877s accounts-daemon.service
          3.526s qemu-kvm.service
          3.511s gpu-manager.service
          3.058s ofono.service
          2.913s grub-common.service
          2.904s thermald.service
          2.268s apparmor.service
          1.880s plymouth-start.service
          1.875s polkitd.service
          1.725s systemd-user-sessions.service
          1.564s systemd-rfkill.service
          1.487s irqbalance.service
          1.423s binfmt-support.service
          1.388s lightdm.service
          1.386s systemd-udevd.service
          1.313s keyboard-setup.service
          1.299s setvtrgb.service
          1.289s apport.service
          1.231s rsyslog.service
          1.183s [email protected]
          1.171s systemd-tmpfiles-setup-dev.service
          1.171s ssh.service
          1.164s systemd-tmpfiles-setup.service
          1.092s bluetooth.service
           987ms upower.service
           905ms ondemand.service
           895ms wpa_supplicant.service
           864ms systemd-logind.service
           789ms systemd-journald.service
           678ms networking.service
           661ms sys-kernel-debug.mount
           651ms dev-hugepages.mount
           648ms dev-mqueue.mount
           633ms systemd-modules-load.service
           603ms avahi-daemon.service
           536ms console-setup.service
           515ms [email protected]
           504ms colord.service
           398ms nvidia-persistenced.service
           363ms pppd-dns.service
           362ms systemd-sysctl.service
           352ms systemd-timesyncd.service
           324ms systemd-udev-trigger.service
           324ms dev-sda11.swap
           306ms smbd.service
           297ms speech-dispatcher.service
           285ms kmod-static-nodes.service
           280ms rc-local.service
           274ms ufw.service
           225ms udisks2.service
           218ms systemd-remount-fs.service
           210ms systemd-journal-flush.service
           183ms alsa-restore.service
           177ms plymouth-read-write.service
           157ms systemd-random-seed.service
           145ms systemd-update-utmp.service
           130ms dns-clean.service
           128ms rtkit-daemon.service
           119ms openvpn.service
           111ms boot-efi.mount
           100ms systemd-backlight@backlight:intel_backlight.service
            49ms proc-sys-fs-binfmt_misc.mount
            17ms sys-fs-fuse-connections.mount
            16ms systemd-tmpfiles-clean.service
             6ms systemd-update-utmp-runlevel.service
             5ms ureadahead-stop.service
             4ms resolvconf.service
             2ms plymouth-quit-wait.service

这是我的 /etc/default/grub 文件的内容

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.old_scheme_first=1"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=1280x800

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

答案1

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

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

相关内容