0

我想创建一个图像,它将:

  • 在引导期间显示尽可能多的信息(用于引导步骤的粗略分析)
  • 尽可能快地引导到 shell 提示符

注意:引导加载程序是 grub2,但我无法创建相应的标签,所以我使用了最接近的可用标签:“grub”。

4

1 回答 1

0

这是我想出的,尝试使用 Suse Studio 提供的界面。在每次启动设备时运行的脚本中:

# read in some variables
. /studio/profile

if [ -f /etc/init.d/suse_studio_firstboot ]
then
  # Put commands to be run on the first boot of your appliance here
  echo "Running SUSE Studio first boot script..."

  #remove grub2 splash screen and boot delays
  sed -i "s/GRUB_HIDDEN_TIMEOUT_QUIET=true/GRUB_HIDDEN_TIMEOUT_QUIET=false/" /etc/default/grub
  sed -i "s/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=0/" /etc/default/grub
  sed -i "s/quiet splash=silent//" /etc/default/grub
  sed -i "s/gfxterm/console/" /etc/default/grub
  sed -i "s/GRUB_THEME.*//" /etc/default/grub
  sed -i "s/GRUB_BACKGROUND.*//" /etc/default/grub
  /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
  rm -f /etc/init.d/suse_studio_firstboot
  sync
  /sbin/reboot
fi

示例可以在这里找到:https ://susestudio.com/a/AMSHUG/pc-flasher-32-bit-mbr-efi

于 2015-01-02T16:21:06.910 回答