Linux中内核参数reboot的妙用

本文详细介绍了如何解决在Intel DesktopBoard-D525MW主板上安装的多个操作系统(如OpenSUSE、CentOS、Trixbox/Elastix)在重启时卡住的问题。主要解决方法是在相应的GRUB配置文件中添加reboot=b参数。文章还提供了reboot参数的解释,并验证了该方法在不同版本的操作系统中适用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近在弄一个Intel 的Desktop Board-D525MW, 在该主板上安装了几个操作系统如:OpenSUSE,CentOS,Trixbox/Elastix(均基于CentOS)等。但这个过程中出现了个小问题:
reboot之后,系统无法真正reboot。而是系统在卸载完所有的应用程序及服务的时候停止不动了。类似如

Please stand by file rebooting the system:

md: Stopping all md devices

Synchronizing SCSI  cache for dish sda:

Restarting System.

....


解决方法是:在CentOS的/etc/grub.conf中添加reboot=b. 如:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title trixbox (2.6.18-128.1.10.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-128.1.10.el5  ro noht maxcpus=1 root=LABEL=/ reboot=b


或者在OpenSUSE的/boot/grub/menu.list中添加boot=b。如:

7 ##YaST - generic_mbr
  8 gfxmenu (hd0,1)/boot/message
  9 ##YaST - activate
 10 
 11 ###Don't change this comment - YaST2 identifier: Original name: linux###
 12 title Desktop -- openSUSE 11.4 - 2.6.37.1-1.2
 13     root (hd0,1)
 14     kernel /boot/vmlinuz-2.6.37.1-1.2-desktop root=/dev/disk/by-id/ata-Hitachi_HTS545016B9A300_100623PD6B0    0CXHLU1TB-part2 resume=/dev/disk/by-id/ata-Hitachi_HTS545016B9A300_100623PD6B00CXHLU1TB-part1 splash=silent quiet showopts vga=0x31a reboot=b 


保存并退出。系统在下次启动后才会生效。如下附上reboot的参数及解释(来自互联网):

/* reboot=b | s | t | k | e [, arm | old] | p
 54   warm   Don't set the cold reboot flag
 55   cold   Set the cold reboot flag
 56   bios   Reboot by jumping through the BIOS (only for X86_32)
 57   smp    Reboot by executing reset on BSP or other CPU (only for X86_32)
 58   triple Force a triple fault (init)
 59   kbd    Use the keyboard controller. cold reset (default)
 60   acpi   Use the RESET_REG in the FADT
 61   efi    Use efi reset_system runtime service
 62   pci    Use the so-called "PCI reset register", CF9
 63   force  Avoid anything that could hang.


该方法在OpenSUSE-11.4/CentOS-5.7/Trixbox-2.6.2.3/Elastix-2.2.0/Elastix-2.0.4/Elastix-1.6.0中测试通过。

 

Cheers!

 

MSN:yangjiazhi@live.com

Website: www.voipevents.com

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值