Преамбула.
Ноутбук HP Compaq NX6110 используется чуть больше полгода. И всё шло нормально: suspend-to-ram, powerdown... Пока последнее время не воспользовался перезагрузкой из меню и позже командой reboot/shutdown -r. Результат один:
- после сообщения
reboot: Restarting systemмёртвое зависание ноутбука. Нет реакции ни на что кроме кнопки Power Off/On.
Ни один Линукс на nx6110 не смог уйти после ребута в рестарт и все они полностью вешали ноутбук намертво. Решение проблемы некоторым образом осложнялось тем, что на той же Intel-архитектуре, но существенно свежее, т.е. LGA 1155, рестарт после reboot выполняется нормально.
Дня три сражался и искал решение с перерывами, и таки нашёл.
Разыскал великолепнейшую статью на англоязычном сайте (парень не обидится за полное цитирование со ссылкой на оригинал).
Решение проблемы полного зависания ноутбука на рестарте после разгрузки системыHOWTO: Fix Linux hang/freeze during reboots and restartsAug.04, 2009 in
Boot,
HOWTOPurpose: There are some machines on which Linux will freeze, after a restart or a shutdown command is issued, right at the very end of the process forcing you to do a hard reset – press the reset/power button the system or plug the cord which is not good.In this post we will see how you can resolve almost 99% of freeze/hang that occurs during shutdown or reboot.
Why this happensThere are many reasons why this happens – some times it is an BIOS issue or sometimes it’s just that your system has a different kind of hardware setup, for example no keyboard controller, and Linux (the kernel) does not understand how to tackle that situation. Most of the time if it is a BIOS issue it is not very easy to ask your system vendor to give you an immediate BIOS fix that will take care of the issue and hence you have to rely on some kernel parameters that you need to pass to fix the hang/freeze issue.
Let’s say you bought a new machine and you notice that your Linux distribution hangs at the very end of the reboot/shutdown process, upon giving any of the following commands:
# shutdown -r now
# shutdown -h now
# reboot
# halt
# poweroff
# Ctrl+Alt+Del
SolutionIn order to fix the issue, you should try one-by-one passing the following parameter to the kernel, in the form of “
reboot=<parameter>”, at the time of boot:
warm = Don’t set the cold reboot flag
cold = Set the cold reboot flag
bios = Reboot by jumping through the BIOS (only for X86_32)
smp = Reboot by executing reset on BSP or other CPU (only for X86_32)
triple = Force a triple fault (init)
kbd = Use the keyboard controller. cold reset (default)
acpi = Use the RESET_REG in the FADT
efi = Use efi reset_system runtime service
pci = Use the so-called “PCI reset register”, CF9
force = Avoid anything that could hang.
As per my experience, one of the parameters (in blue color above) should be able to resolve your hang (or freeze) issue 90% of the time:
reboot=bios
or
reboot=acpi
Once your system boots you can verify whether the parameter was correctly passed or not by issuing the following command:
# cat /proc/cmdline
Output:
root=/dev/sda ro vga=791 quiet reboot=bios
You can find the list of all the above parameters in the
reboot.c file in the Linux kernel source.
By default, the Linux kernel uses the
reboot=kbd method i.e. it tries to look for a keyboard controller and issue a reset/shutdown command to it. But there are some systems like some of the Intel Atom processor based machines that don’t have a keyboard controller and the above fixes are required. If you read the
reboot.c file carefully there are some major main stream machines from Dell, Sony, HP, etc. that require the above “reboot=” fix. I guess sometime it is easier to fix the issue by using the kernel parameter rather than fixing in the BIOS.
Also you can also use the first letter (as denoted in the “[]” brackets) of each of the parameter:
reboot=b # for reboot=[b]ios
reboot= a # for reboot=[a]cpi
and you can pass multiple parameter at the same time and Linux kernel will try in order specified:
reboot=a,b,k,c # for reboot=acpi,bios,kbd,cold
Happy Reboot=’ing!
Забегая вперёд, как 'опция=параметр' для ядра использовал именно 'reboot=bios'. Почему?
Потому, что команда reboot из FreeDOS запущенного с флешки отрабатывала нормально.
Как и в совсем другой версии DOS, команда reboot отрабатывала тоже нормально.
Собственно заглянуто было для корректировки и уточнения и на:
https://www.kernel.org/doc/Documentation/kernel-parameters.txt reboot= [KNL]
Format (x86 or x86_64):
[w[arm] | c[old] | h[ard] | s[oft] | g[pio]] \
[[,]s[mp]#### \
[[,]b[ios] | a[cpi] | k[bd] | t[riple] | e[fi] | p[ci]] \
[[,]f[orce]
Where reboot_mode is one of warm (soft) or cold (hard) or gpio,
reboot_type is one of bios, acpi, kbd, triple, efi, or pci,
reboot_force is either force or not specified,
reboot_cpu is s[mp]#### with #### being the processor
to be used for rebooting.
Два подряд пробных и удачных ребута с параметром ядру
reboot=biosподтвердило, что проблема полностью решена.
Спасибо:Kushal Koolwal из Индии за обзорную статью
kernel.org за массу опций/параметров к ядру
Кстати, решение на просторах англоязычной сети найдено по запросу
linux hangs on reboot
Первой же ссылкой