Difference between revisions of "Kernel parameters (Русский)"

From ArchWiki
Jump to navigation Jump to search
(Created page with "Category:Kernel en:Kernel parameters es:Kernel parameters ja:Kernel parameters zh-CN:Kernel parameters There are three ways to pass options to the kernel a...")
 
m (link to "Boot loader" instead of "Boot loaders")
(28 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:Kernel]]
+
[[Category:Kernel (Русский)]]
 
[[en:Kernel parameters]]
 
[[en:Kernel parameters]]
 
[[es:Kernel parameters]]
 
[[es:Kernel parameters]]
[[ja:Kernel parameters]]
+
[[ja:カーネルパラメータ]]
[[zh-CN:Kernel parameters]]
+
[[zh-hans:Kernel parameters]]
There are three ways to pass options to the kernel and thus control its behaviour:
+
{{unmaintained (Русский)}}
 +
{{Translateme (Русский)|переведено лишь частично}}
 +
Существует три способа передачи параметров ядру и контроля над ним:
  
# When building the kernel. See [[Kernel Compilation]] for details.
+
# При сборке ядра. Полная информация [[Kernel Compilation]].
# When starting the kernel (usually, when invoked from a boot loader).
+
# При запуске ядра (через системный загрузчик).
# At runtime (through the files in {{ic|/proc}} and {{ic|/sys}}). See [[sysctl]] for details.
+
# На этапе выполнения (через файлы в {{ic|/proc}} и {{ic|/sys}}). Более подробно смотрите документацию по утилите [[sysctl]].
  
 
This page now explains in more detail the second method and shows a list of most used kernel parameters in Arch Linux.
 
This page now explains in more detail the second method and shows a list of most used kernel parameters in Arch Linux.
  
== Configuration ==
+
== Настройка ==
  
{{Note|You can check the parameters your system was booted up with by running {{ic|$ cat /proc/cmdline}} and see if it includes your changes.}}
+
{{Note (Русский)|You can check the parameters your system was booted up with by running {{ic|$ cat /proc/cmdline}} and see if it includes your changes.}}
  
 
Kernel parameters can be set either temporarily by editing the boot menu when it shows up, or by modifying the boot loader's configuration file.
 
Kernel parameters can be set either temporarily by editing the boot menu when it shows up, or by modifying the boot loader's configuration file.
  
Here we are adding the parameters {{ic|quiet}} and {{ic|splash}} to [[Syslinux]], [[GRUB]], [[GRUB Legacy]], [[LILO]], [[Gummiboot]] and [[rEFInd]].
+
Here we are adding the parameters {{ic|quiet}} and {{ic|splash}} to [[Syslinux]], [[GRUB]], [[GRUB Legacy]], [[LILO]], [[gummiboot (Русский)]] and [[rEFInd (Русский)]].
  
 
==== Syslinux ====
 
==== Syslinux ====
Line 36: Line 38:
 
==== GRUB ====
 
==== GRUB ====
  
* Press {{ic|e}} when the menu shows up and add them on the {{ic|linux}} line:
+
* Нажмите {{ic|e}} в момент показа загрузочного меню и добавьте в строку, содержащую {{ic|linux}}:
  
 
: {{bc|1=linux /boot/vmlinuz-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff ''quiet splash''}}
 
: {{bc|1=linux /boot/vmlinuz-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff ''quiet splash''}}
  
: Press {{ic|b}} to boot with these parameters.
+
: Нажмите {{ic|b}} для загрузки с этими параметрами.
  
 
* To make the change persistent after reboot, while you ''could'' manually edit {{ic|/boot/grub/grub.cfg}} with the exact line from above, for beginners it's recommended to:
 
* To make the change persistent after reboot, while you ''could'' manually edit {{ic|/boot/grub/grub.cfg}} with the exact line from above, for beginners it's recommended to:
Line 52: Line 54:
 
:: {{bc|# grub-mkconfig -o /boot/grub/grub.cfg}}
 
:: {{bc|# grub-mkconfig -o /boot/grub/grub.cfg}}
  
For more information on configuring GRUB, see the [[GRUB]] article.
+
Полная информация по настройке [[GRUB]].
  
 
==== GRUB Legacy ====
 
==== GRUB Legacy ====
Line 64: Line 66:
 
* To make the change persistent after reboot, edit {{ic|/boot/grub/menu.lst}} and add them to the {{ic|kernel}} line, exactly like above.
 
* To make the change persistent after reboot, edit {{ic|/boot/grub/menu.lst}} and add them to the {{ic|kernel}} line, exactly like above.
  
For more information on configuring GRUB Legacy, see the [[GRUB Legacy]] article.
+
Полная информация по настройке [[GRUB Legacy]].
 +
 
 +
==== iPXE ====
 +
 
 +
<pre>
 +
#!ipxe
 +
 
 +
kernel http://mirror.yandex.ru/archlinux/iso/2014.11.01/arch/boot/x86_64/vmlinuz archiso_http_srv=http://mirror.yandex.ru/archlinux/iso/2014.11.01/ archisobasedir=arch checksum=y ip=dhcp
 +
initrd http://mirror.yandex.ru/archlinux.iso/2014.11.01/arch/boot/x86_64/archiso.img
 +
boot
 +
</pre>
  
 +
Полная информация по настройке [http://ipxe.org/ iPXE - open source boot firmware].
 
==== LILO ====
 
==== LILO ====
  
* Add them to {{ic|/etc/lilo.conf}}:
+
* Добавить {{ic|/etc/lilo.conf}}:
  
 
: {{bc|<nowiki>
 
: {{bc|<nowiki>
Line 75: Line 88:
 
         </nowiki>''quiet splash''}}
 
         </nowiki>''quiet splash''}}
  
For more information on configuring LILO, see the [[LILO]] article.
+
Полная информация по настройке [[LILO]].
  
 
==== Gummiboot ====
 
==== Gummiboot ====
Line 85: Line 98:
 
: Press {{ic|Enter}} to boot with these parameters.
 
: Press {{ic|Enter}} to boot with these parameters.
  
{{Note|If you have not set a value for menu timeout, you will need to hold {{ic|Space}} while booting for the Gummiboot menu to appear.}}
+
{{Note (Русский)|If you have not set a value for menu timeout, you will need to hold {{ic|Space}} while booting for the Gummiboot menu to appear.}}
  
* To make the change persistent after reboot, edit {{ic|/boot/loader/entries/arch.conf}} (assuming you set up your [[Unified Extensible Firmware Interface#EFI System Partition|EFI System Partition]] and configuration files according to the instructions in the [[Beginners' guide#Gummiboot|Beginners' Guide]]) and add them to the {{ic|options}} line:
+
* To make the change persistent after reboot, edit {{ic|/boot/loader/entries/arch.conf}} (assuming you set up your [[Unified Extensible Firmware Interface#EFI System Partition|EFI System Partition]]{{Broken section link}} and configuration files according to the instructions in the [[systemd-boot]] and add them to the {{ic|options}} line:
  
 
: {{bc|1=options root=/dev/sda2 rw ''quiet splash''}}
 
: {{bc|1=options root=/dev/sda2 rw ''quiet splash''}}
  
For more information on configuring Gummiboot, see the [[Gummiboot]] article.
+
Полная информация по настройке [[gummiboot (Русский)]].
  
 
==== rEFInd ====
 
==== rEFInd ====
Line 102: Line 115:
 
options "quiet splash ro root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff"</nowiki>}}
 
options "quiet splash ro root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff"</nowiki>}}
  
For more information on configuring kernel parameters in rEFInd, see [http://www.rodsbooks.com/refind/linux.html Configuring the rEFInd Bootmanager]
+
Полная информация по настройке [http://www.rodsbooks.com/refind/linux.html Менеджер загрузки rEFInd]
  
== Parameter list ==
+
== Список параметров ==
  
 
Parameters always come in {{ic|parameter}} or {{ic|1=parameter=value}}. All of these parameters are case-sensitive.
 
Parameters always come in {{ic|parameter}} or {{ic|1=parameter=value}}. All of these parameters are case-sensitive.
  
{{Note|Not all of the listed options are always available. Most are associated with subsystems and work only if the kernel is configured with those subsystems built in. They also depend on the presence of the hardware they are associated with.}}
+
{{Note (Русский)|Not all of the listed options are always available. Most are associated with subsystems and work only if the kernel is configured with those subsystems built in. They also depend on the presence of the hardware they are associated with.}}
  
 
{| class="wikitable"
 
{| class="wikitable"
!parameter!!Description
+
!Параметр!!Описание
 
|-
 
|-
| root= || Root filesystem.
+
| root= || Корневая файловая система.
 
|-
 
|-
| ro || Mount root device read-only on boot (default<sup>1</sup>).
+
| ro || При загрузке монтировать корневую ФС только в режиме чтения (default<sup>1</sup>).
 
|-
 
|-
| rw || Mount root device read-write on boot.
+
| rw || При загрузке монтировать корневую ФС в режиме чтения/записи.
 
|-
 
|-
| initrd=|| Specify the location of the initial ramdisk.
+
| initrd=|| Путь образа-инициализатора.
 
|-
 
|-
| init= || Run specified binary instead of {{ic|/sbin/init}} (symlinked to [[systemd]] in Arch) as init process.
+
| init= || Запустить процесс пользовательского режима {{ic|/sbin/init}} (ссылка на [[systemd]] в Arch).
 
|-
 
|-
 
| init=/bin/sh || Boot to shell.
 
| init=/bin/sh || Boot to shell.
Line 129: Line 142:
 
| systemd.unit=multi-user || Boot to a specified runlevel.
 
| systemd.unit=multi-user || Boot to a specified runlevel.
 
|-
 
|-
| systemd.unit=rescue || Boot to single-user mode (root).
+
| systemd.unit=rescue || Загрузка в однопользовательском режиме (root).
 
|-
 
|-
| nomodeset || Disable [[Kernel Mode Setting]].
+
| nomodeset || Disable [[Kernel mode setting]].
 
|-
 
|-
 
| zswap.enabled || Enable [[Zswap]].
 
| zswap.enabled || Enable [[Zswap]].
 
|}
 
|}
  
<sup>1</sup> [[mkinitcpio]] uses {{ic|ro}} as default value when neither {{ic|rw}} or {{ic|ro}} is set by the [[Boot loaders|boot loader]]. Boot loaders may set the value to use, for example GRUB uses {{ic|rw}} by default (see {{Bug|36275}} as a reference).
+
<sup>1</sup> [[mkinitcpio]] uses {{ic|ro}} as default value when neither {{ic|rw}} or {{ic|ro}} is set by the [[boot loader]]. Boot loaders may set the value to use, for example GRUB uses {{ic|rw}} by default (see {{Bug|36275}} as a reference).
  
For a complete list of all options, please see the [https://www.kernel.org/doc/Documentation/kernel-parameters.txt kernel documentation].
+
Полный список всех опций смотрите в [https://www.kernel.org/doc/Documentation/kernel-parameters.txt документации].
  
== See also ==
+
== Ссылки ==
  
 
* [[Power saving#Kernel parameters]]
 
* [[Power saving#Kernel parameters]]
 
* [http://files.kroah.com/lkn/lkn_pdf/ch09.pdf List of kernel parameters with further explanation and grouped by similar options]
 
* [http://files.kroah.com/lkn/lkn_pdf/ch09.pdf List of kernel parameters with further explanation and grouped by similar options]
 +
* [http://ipxe.org/ iPXE - open source boot firmware]

Revision as of 09:58, 28 September 2018

Tango-preferences-desktop-locale.pngЭта страница нуждается в сопроводителеTango-preferences-desktop-locale.png

Статья не гарантирует актуальность информации. Помогите русскоязычному сообществу поддержкой подобных страниц. См. Команда переводчиков ArchWiki

Tango-preferences-desktop-locale.pngЭта статья или раздел нуждается в переводеTango-preferences-desktop-locale.png

Примечания: переведено лишь частично (обсуждение: Talk:Kernel parameters (Русский)#)

Существует три способа передачи параметров ядру и контроля над ним:

  1. При сборке ядра. Полная информация Kernel Compilation.
  2. При запуске ядра (через системный загрузчик).
  3. На этапе выполнения (через файлы в /proc и /sys). Более подробно смотрите документацию по утилите sysctl.

This page now explains in more detail the second method and shows a list of most used kernel parameters in Arch Linux.

Настройка

Примечание: You can check the parameters your system was booted up with by running $ cat /proc/cmdline and see if it includes your changes.

Kernel parameters can be set either temporarily by editing the boot menu when it shows up, or by modifying the boot loader's configuration file.

Here we are adding the parameters quiet and splash to Syslinux, GRUB, GRUB Legacy, LILO, gummiboot (Русский) and rEFInd (Русский).

Syslinux

  • Press Tab when the menu shows up and add them at the end of the string:
linux /boot/vmlinuz-linux root=/dev/sda3 initrd=/boot/initramfs-linux.img quiet splash
Press Enter to boot with these parameters.
  • To make the change persistent after reboot, edit /boot/syslinux/syslinux.cfg and add them to the APPEND line:
APPEND root=/dev/sda3 quiet splash

For more information on configuring Syslinux, see the Syslinux article.

GRUB

  • Нажмите e в момент показа загрузочного меню и добавьте в строку, содержащую linux:
linux /boot/vmlinuz-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff quiet splash
Нажмите b для загрузки с этими параметрами.
  • To make the change persistent after reboot, while you could manually edit /boot/grub/grub.cfg with the exact line from above, for beginners it's recommended to:
Edit /etc/default/grub and append your kernel options to the GRUB_CMDLINE_LINUX_DEFAULT line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
And then automatically re-generate the grub.cfg file with:
# grub-mkconfig -o /boot/grub/grub.cfg

Полная информация по настройке GRUB.

GRUB Legacy

  • Press e when the menu shows up and add them on the kernel line:
kernel /boot/vmlinuz-linux root=/dev/sda3 quiet splash
Press b to boot with these parameters.
  • To make the change persistent after reboot, edit /boot/grub/menu.lst and add them to the kernel line, exactly like above.

Полная информация по настройке GRUB Legacy.

iPXE

#!ipxe

kernel http://mirror.yandex.ru/archlinux/iso/2014.11.01/arch/boot/x86_64/vmlinuz archiso_http_srv=http://mirror.yandex.ru/archlinux/iso/2014.11.01/ archisobasedir=arch checksum=y ip=dhcp
initrd http://mirror.yandex.ru/archlinux.iso/2014.11.01/arch/boot/x86_64/archiso.img
boot

Полная информация по настройке iPXE - open source boot firmware.

LILO

  • Добавить /etc/lilo.conf:
image=/boot/vmlinuz-linux
        ...
        quiet splash

Полная информация по настройке LILO.

Gummiboot

  • Press e when the menu appears and add the parameters to the end of the string:
initrd=\initramfs-linux.img root=/dev/sda2 rw quiet splash
Press Enter to boot with these parameters.
Примечание: If you have not set a value for menu timeout, you will need to hold Space while booting for the Gummiboot menu to appear.
  • To make the change persistent after reboot, edit /boot/loader/entries/arch.conf (assuming you set up your EFI System Partition[broken link: invalid section] and configuration files according to the instructions in the systemd-boot and add them to the options line:
options root=/dev/sda2 rw quiet splash

Полная информация по настройке gummiboot (Русский).

rEFInd

  • To make the change persistent after reboot, edit /boot/EFI/arch/refind_linux.conf (ie. refind_linux.conf in the folder your kernel is located in) and append them to all/required lines, for example:
"Boot to X"   "root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff ro rootfstype=ext4 quiet splash
  • If you've disabled auto-detection of OS's in rEFInd and are defining OS stanzas instead in /boot/EFI/refind/refind.conf to load your OS's, you can edit it like:
menuentry "Arch" {
	loader /EFI/arch/vmlinuz-arch.efi
	options "quiet splash ro root=PARTUUID=978e3e81-8048-4ae1-8a06-aa727458e8ff"

Полная информация по настройке Менеджер загрузки rEFInd

Список параметров

Parameters always come in parameter or parameter=value. All of these parameters are case-sensitive.

Примечание: Not all of the listed options are always available. Most are associated with subsystems and work only if the kernel is configured with those subsystems built in. They also depend on the presence of the hardware they are associated with.
Параметр Описание
root= Корневая файловая система.
ro При загрузке монтировать корневую ФС только в режиме чтения (default1).
rw При загрузке монтировать корневую ФС в режиме чтения/записи.
initrd= Путь образа-инициализатора.
init= Запустить процесс пользовательского режима /sbin/init (ссылка на systemd в Arch).
init=/bin/sh Boot to shell.
systemd.unit=
systemd.unit=multi-user Boot to a specified runlevel.
systemd.unit=rescue Загрузка в однопользовательском режиме (root).
nomodeset Disable Kernel mode setting.
zswap.enabled Enable Zswap.

1 mkinitcpio uses ro as default value when neither rw or ro is set by the boot loader. Boot loaders may set the value to use, for example GRUB uses rw by default (see FS#36275 as a reference).

Полный список всех опций смотрите в документации.

Ссылки