欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Ubuntu 16.04 启动长时间停留在紫屏状态 - Loading Initial Ramdisk

程序员文章站 2024-03-20 15:29:46
...

Ubuntu 16.04 启动长时间停留在紫屏状态 - Loading Initial Ramdisk

1. Ubuntu 16.04 启动长时间停留在紫屏状态

Ubuntu 16.04 启动长时间停留在紫屏状态 - Loading Initial Ramdisk

2. Advanced options for Ubuntu

Ubuntu 16.04 启动长时间停留在紫屏状态 - Loading Initial Ramdisk

3. Loading Initial Ramdisk

选择以下内核:
Ubuntu, with Linux 4.15.0-42-generic 默认内核
Ubuntu, with Linux 4.15.0-39-generic 内核
Ubuntu, with Linux 4.15.0-29-generic 内核
然后按键 Enter 启动,全部都无法正常启动,停留在 Loading Initial Ramdisk...

Ubuntu 16.04 启动长时间停留在紫屏状态 - Loading Initial Ramdisk

Ubuntu 16.04 启动长时间停留在紫屏状态 - Loading Initial Ramdisk

4. Recovery Mode - 恢复模式

重启系统 -> Advanced options for Ubuntu (高级选项) -> Ubuntu, with Linux 4.15.0-42-generic (recovery mode)
Ubuntu 16.04 启动长时间停留在紫屏状态 - Loading Initial Ramdisk

Ubuntu 操作系统带有恢复模式,通过 Recovery Mode,用户可以访问损坏系统的命令行,修复错误配置的文件,测试系统内存是否工作等等。

要在 Ubuntu *问恢复模式,必须运行 GRUB 引导加载程序,如果你正在使用其他引导加载程序,则可能无法访问此功能。

5. Recovery Mode - fsck

恢复模式下的 fsck 功能可以通过扫描损坏的硬盘并删除它们来快速修复损坏的硬盘。

要使用 fsck,请使用向下箭头在 Recovery Mode 菜单中突出显示它,然后按 Enter 键启动,让它自动删除损坏的数据。
Ubuntu 16.04 启动长时间停留在紫屏状态 - Loading Initial Ramdisk

根据系统启动报告 Checking filesystems 失败提示,可以看出 Ubuntu 系统不能启动的真正原因是 /etc/fstab 项挂载失败。

6. Ubuntu 系统开机自动挂载失败导致系统无法启动

cat /etc/fstab

aaa@qq.com:~$ cat /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/sda1 during installation
UUID=53a5a063-1ea4-434d-ad98-6cdaefff158a /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=ed619771-4748-4f5a-86a5-355c8c22a290 none            swap    sw              0       0
/dev/disk/by-uuid/6d76a02c-8296-4aac-8b0b-5ac1d667a6a9 /mnt/6d76a02c-8296-4aac-8b0b-5ac1d667a6a9 auto nosuid,nodev,nofail                  ,x-gvfs-show 0 0
/dev/disk/by-uuid/79dd189b-b1b6-48c4-9c90-560934f420f5 /mnt/79dd189b-b1b6-48c4-9c90-560934f420f5 auto nosuid,nodev,nofail                  ,x-gvfs-show 0 0

# foreverstrong
/dev/sda /media/famu/DISK_DATA     ext4    defaults    0    0

aaa@qq.com:~$

vim /etc/fstab 修改文件,将挂载失效的行注释,reboot 重启进入正常启动。

aaa@qq.com:~$ cat /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/sda1 during installation
UUID=53a5a063-1ea4-434d-ad98-6cdaefff158a /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=ed619771-4748-4f5a-86a5-355c8c22a290 none            swap    sw              0       0
/dev/disk/by-uuid/6d76a02c-8296-4aac-8b0b-5ac1d667a6a9 /mnt/6d76a02c-8296-4aac-8b0b-5ac1d667a6a9 auto nosuid,nodev,nofail                  ,x-gvfs-show 0 0
/dev/disk/by-uuid/79dd189b-b1b6-48c4-9c90-560934f420f5 /mnt/79dd189b-b1b6-48c4-9c90-560934f420f5 auto nosuid,nodev,nofail                  ,x-gvfs-show 0 0

# foreverstrong
# /dev/sda /media/famu/DISK_DATA     ext4    defaults    0    0

aaa@qq.com:~$