Debian Wheezy 在删除 quiet 参数后不显示引导消息

Debian Wheezy doesn't show boot messages after deleting quiet param

我是嵌入式系统中的 运行 Debian,看到通过串行控制台启动,但我不知道如何显示启动消息。

我看到 BIOS、grub 菜单,然后:

正在加载 Linux 3.2.0-4-686-pae ...

正在加载初始 ramdisk ...

在登录提示符

之前别无其他

我已经从 /etc/default/grub 中删除了 'quiet' 参数,然后执行了 update-grub 命令。启动后我看到 cmdline 是正确的,没有那个参数:

猫 /proc/cmdline :

BOOT_IMAGE=/vmlinuz-3.2.0-4-686-pae root=UUID=0d645791-109e-4ce4-87be-1cc7074da5f8 ro

但它不起作用...我还缺少什么?我需要用特定标志重新编译内核还是什么?

uname -a :

Linux 主机名 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u2 i686 GNU/Linux

/boot/grub/grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal_input serial
terminal_output serial
set timeout=2
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-686-pae' --class debian --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root c1265ba3-c4bd-493f-9fec-7c015099c0bc
    echo    'Loading Linux 3.2.0-4-686-pae ...'
    linux   /vmlinuz-3.2.0-4-686-pae root=UUID=0d645791-109e-4ce4-87be-1cc7074da5f8 ro  
    echo    'Loading initial ramdisk ...'
    initrd  /initrd.img-3.2.0-4-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-686-pae (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set=root c1265ba3-c4bd-493f-9fec-7c015099c0bc
    echo    'Loading Linux 3.2.0-4-686-pae ...'
    linux   /vmlinuz-3.2.0-4-686-pae root=UUID=0d645791-109e-4ce4-87be-1cc7074da5f8 ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /initrd.img-3.2.0-4-686-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

我卡住了!任何帮助将不胜感激!

谢谢

编辑:

对不起大家,我犯了一个愚蠢的错误。我定义了

GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"

在/etc/default/grub

我认为这足以让 grub 将串行规范传递给内核,但当然不是,GRUB 仅将 GRUB_CMDLINE_LINUX 变量作为参数传递给内核。

在GRUB_CMDLINE_LINUX中添加控制台参数使内核接收控制台设置并使用串口进行消息输出:

GRUB_CMDLINE_LINUX="video=off elevator=deadline console=ttyS0,115200"

现在可以了。 对于愚蠢的误解,我们深表歉意,感谢您的宝贵时间! :)

您可以尝试在内核参数中使用 verbose 标志而不是 quiet 标志,然后执行 update-grub。 正如此 wiki.

所建议的

您可以尝试在您删除 quiet 选项的内核行中添加

console=tty0 console=ttyS0,115200n8

其中 115200 是您想要的速度。请参阅 ubuntu 操作方法。