Vid*_*uth 8 wallpaper boot grub2 systemd 16.04
我想要达到的目标:
我想自定义我的 Ubuntu 16.04 LTS 安装的完整启动以显示实际在我桌面上的相同壁纸。
到目前为止我取得的成就:
通过添加以下几行/etc/deault/grub并在update-grub之后执行,将墙纸添加到 grub 菜单中。
export GRUB_MENU_PICTURE="/boot/grub/wallpaper.png"
export GRUB_COLOR_NORMAL="white/black"
export GRUB_COLOR_HIGHLIGHT="black/white"
Run Code Online (Sandbox Code Playgroud)将壁纸添加到启动画面和登录画面
问题:
当我启动时,图片在 grub 中显示,但后来我很少看到启动画面,而是得到一个几乎空白的屏幕,显示文件系统检查,如下所示:
/dev/sda1: clean, 201776/60878736 files, 4991277/243040256 blocks
Run Code Online (Sandbox Code Playgroud)
这使我无法获得我想要实现的启动体验,因为在那之后不久就会弹出启动画面。
题:
如何从显示中删除此消息,以便使用我心爱的壁纸无缝启动,而无需完全关闭文件系统检查(如果可能)?
您应该能够使用内核参数loglevel=或quiet
loglevel= All Kernel Messages with a loglevel smaller than the
console loglevel will be printed to the console. It can
also be changed with klogd or other programs. The
loglevels are defined as follows:
0 (KERN_EMERG) system is unusable
1 (KERN_ALERT) action must be taken immediately
2 (KERN_CRIT) critical conditions
3 (KERN_ERR) error conditions
4 (KERN_WARNING) warning conditions
5 (KERN_NOTICE) normal but significant condition
6 (KERN_INFO) informational
7 (KERN_DEBUG) debug-level messages
quiet [KNL] Disable most log messages
Run Code Online (Sandbox Code Playgroud)
我不确定这会隐藏在什么级别(或者你希望你的靴子有多安静)。
重新启动计算机,然后在 grub 菜单中点击e以编辑启动参数。
linux...使用箭头键向下滚动到行尾
添加所需的loglevel参数或添加quiet到该行的末尾。例子:
linux /vmlinuz-4.4.0-21.generic.efi.signed root=/dev/mapper/encrypted ro loglevel=4
Run Code Online (Sandbox Code Playgroud)
或者
linux /vmlinuz-4.4.0-21.generic.efi.signed root=/dev/mapper/encrypted ro quiet
Run Code Online (Sandbox Code Playgroud)
完成编辑后,按 F10
为此,请编辑 /etc/default/grub
编辑该行:
GRUB_CMDLINE_LINUX_DEFAULT=
如果需要,取消注释,并添加所需的日志级别或安静 - 例如GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4"或GRUB_CMDLINE_LINUX_DEFAULT="quiet"
并运行 sudo update-grub
fsck 默认由 initramfs 运行。通过删除它并让 systemd 运行 fsck,我们将能够重定向输出。
man initramfs有关从 ramfs 中删除 fsck 的更多信息,请参见wiki.ubuntu.com/Initramfs。
来自拱形维基:
现在将位于 /usr/lib/systemd/system/ 的 systemd-fsck-root.service 和 systemd-fsck@.service 文件复制到 /etc/systemd/system/ 并编辑它们,像这样配置 StandardOutput 和 StandardError:
[服务]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/systemd/systemd-fsck
StandardOutput=null
StandardError=journal+console
TimeoutSec=0
在 Ubuntu 中,这些文件都位于 /lib/systemd/system
如果文件系统在启动过程中没有被 initramfs 检查,systemd-fsck-root.service 将自动运行。
见http://manpages.ubuntu.com/manpages/wily/man8/systemd-fsck@.service.8.html