命令行 为什么在启动时显示启动消息?

分享于 

4分钟阅读

ubuntu

  繁體

问题

当我启动Ubuntu或Fedora时,它们显示一个黑屏,其中包含一堆启动进程的[OK]消息。

我可不可以在Ubuntu中隐藏它们?

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 但它仍然显示引导文本。

输出为apt-cache policy plymouth | grep Installed


Installed: 0.9.2-3ubuntu17



这是/etc/default/grub


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 acpi=force"


GRUB_CMDLINE_LINUX=""



运行后:


sudo apt-get clean, apt-get autoremove, apt-get update, apt-get upgrade



结果是相同的:


...


[ OK ] Started CUPS Scheduler.


<more yidi yada>


[ OK ] Started Run anacron jobs.


[ OK ] Started ACPI event daemon.


[ OK ] Started Set the CPU Frequency Scaling governor.


 Starting Hold until boot process finishes up... any system changes.pp link was shut down.



然后Ubuntu用用户名显示登录屏幕。

同样:


$ sudo dpkg-reconfigure -a


[sudo] password for user: 


Unknown option: a


Usage: dpkg-reconfigure [options] packages


 -u, --unseen-only Show only not yet seen questions.


 --default-priority Use default priority instead of low.


 --force Force reconfiguration of broken packages.


 --no-reload Do not reload templates. (Use with caution.)


 -f, --frontend Specify debconf frontend to use.


 -p, --priority Specify minimum priority question to show.


 --terse Enable terse mode.



$ sudo dpkg-reconfigure plymouth


[sudo] password for user: 


update-initramfs: deferring update (trigger activated)


update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults


update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults


Processing triggers for initramfs-tools (0.125ubuntu12) ...


update-initramfs: Generating /boot/initrd.img-4.13.0-36-generic




答案1

Plymouth是在启动和关闭Ubuntu系统时提供图形化"splash"屏幕的应用程序。


答案2

你看到的那些OK/FAIL消息是引导过程中输出到TTY1的引导消息。

隐藏这些消息,编辑/etc/default/grub


sudo nano /etc/default/grub



更改以下行:


GRUB_CMDLINE_LINUX_DEFAULT=quiet #Don't show Ubuntu bootup text


GRUB_CMDLINE_LINUX="console=tty12" #Don't show kernel text



更新grub:

 
sudo update-grub



而不是隐藏使用启动画面覆盖它
使用plymouth,一个图形化的启动动画,你可以提供一个漂亮的bootscreen,非常适合桌面机器。

sudo apt-get install plymouth-theme-ubuntu-logo



静默启动你的Linux



COM  STA  COMM  BOO  引导  Comma