Grub cmdline linux default nomodeset

Why do I need to replace «quiet splash» with «nomodeset»? [duplicate]

Generally you do not want nomodeset as permanent boot parameter. Its just needed until you install the nVidia proprietary driver from the Ubuntu repository (not directly from nVidia). See askubuntu.com/questions/61396/…

1 Answer 1

Short answers for your questions:

1) The option nomodeset means do not load video drivers.

2) Install suitable video drivers or read second option of long answer

1) nomodeset

The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.

Note that this option is sometimes needed for nVidia cards when using the default «nouveau» drivers. Installing proprietary nvidia drivers usually makes this option no longer necessary, so it may not be needed to make this option permanent, just for one boot until you installed the nvidia

quiet

This option tells the kernel to NOT produce any output (a.k.a. Non verbose mode). If you boot without this option, you’ll see lots of kernel messages such as drivers/modules activations, filesystem checks and errors. Not having the quiet parameter may be useful when you need to find an

splash

This option is used to start an eye-candy «loading» screen while all the core parts of the system are loaded in the background. If you disable it and have quiet enable you’ll get a blank screen.

2) To find drivers in Ubuntu, open the menu, type Drivers, and select Additional Drivers. Upon opening, the system will run a quick scan. This will find out if your system has hardware that would benefit from having proprietary drivers installed. It is here that you will find proprietary drivers.

enter image description here

How to permanently set kernel boot options on an installed OS?

Читайте также:  Enable linux subsystem for windows

Press Ctrl + Alt + T and type:

sudo gedit /etc/default/grub 

A text editor will open with the grub configuration file. Near the top of that file you will see something very similar to this:

GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" 

add your custom boot options to the GRUB_CMDLINE_LINUX_DEFAULT line, so for instance:

GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset" GRUB_CMDLINE_LINUX="" 

Источник

Kernel parameters

There are three ways to pass options to the kernel and thus control its behaviour:

  1. When building the kernel—in the kernel’s config file. See Kernel#Compilation for details.
  2. When starting the kernel—using command line parameters (usually through a boot loader).
  3. At runtime—through the files in /proc/sys/ (see sysctl) and /sys/ .

Note: The options of loadable modules can be set via .conf files in /etc/modprobe.d/ . See Kernel module#Using files in /etc/modprobe.d/.

Between the three methods, the configurable options differ in availability, their name and the method in which they are specified. This page only explains the second method (kernel command line parameters) and shows a list of the most used kernel parameters in Arch Linux.

Most parameters 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.

Kernel command line parameters either have the format parameter or parameter=value .

Configuration

  • You can check the parameters your system was booted up with by running cat /proc/cmdline and see if it includes your changes.
  • The Arch Linux installation medium uses Syslinux for BIOS systems, and GRUB for UEFI systems.

Kernel parameters can be set either temporarily by editing the boot entry in the boot loader’s boot selection menu, or permanently by modifying the boot loader’s configuration file.

The following examples add the quiet and splash parameters to Syslinux, systemd-boot, GRUB, GRUB Legacy, LILO, and rEFInd.

Syslinux

linux /boot/vmlinuz-linux root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 rw initrd=/boot/initramfs-linux.img quiet splash
  • To make the change persistent after reboot, edit /boot/syslinux/syslinux.cfg and add them to the APPEND line:
APPEND root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 rw quiet splash

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

systemd-boot

initrd=\initramfs-linux.img root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 rw quiet splash
  • If you have not set a value for menu timeout, you will need to hold Space while booting for the systemd-boot menu to appear.
  • If you cannot edit the parameters from the boot menu, you may need to edit /boot/loader/loader.conf and add editor 1 to enable editing.
  • To make the change persistent after reboot, edit /boot/loader/entries/arch.conf (assuming you set up your EFI system partition) and add them to the options line:
options root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 rw quiet splash

For more information on configuring systemd-boot, see the systemd-boot article.

Читайте также:  Linux rename all folders

GRUB

linux /boot/vmlinuz-linux root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 rw quiet splash
  • To make the change persistent after reboot, you could manually edit /boot/grub/grub.cfg with the exact line from above, or if using grub-mkconfig:
GRUB_CMDLINE_LINUX_DEFAULT
# grub-mkconfig -o /boot/grub/grub.cfg

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

GRUB Legacy

kernel /boot/vmlinuz-linux root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 rw quiet splash
  • To make the change persistent after reboot, edit /boot/grub/menu.lst and add them to the kernel line, exactly like above.

For more information on configuring GRUB Legacy, see the GRUB Legacy article.

LILO

image=/boot/vmlinuz-linux . quiet splash

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

rEFInd

  • Press + , F2 , or Insert on the desired menu entry and press it again on the submenu entry. Add kernel parameters at the end of the string:
root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 rw initrd=\boot\initramfs-linux.img quiet splash
  • To make the change persistent after reboot, edit /boot/refind_linux.conf and append them between the quotes in all required lines, for example
"Boot using default options" "root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 rw quiet splash"
  • If you have disabled auto-detection of OSes in rEFInd and are defining OS stanzas instead in esp/EFI/refind/refind.conf to load your OSes, you can edit it like:

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

EFISTUB

dracut

dracut is capable of embedding the kernel parameters in the initramfs, thus allowing to omit them from the boot loader configuration. See dracut#Kernel command line options.

Hijacking cmdline

Even without access to your bootloader it is possible to change your kernel parameters to enable debugging (if you have root access). This can be accomplished by overwriting /proc/cmdline which stores the kernel parameters. However /proc/cmdline is not writable even as root, so this hack is accomplished by using a bind mount to mask the path.

First create a file containing the desired kernel parameters

root=UUID=0a3407de-014b-458b-b5c1-848e92a327a3 ro console=tty1 logo.nologo debug

Then use a bind mount to overwrite the parameters

# mount -n --bind -o ro /root/cmdline /proc/cmdline

The -n option skips adding the mount to /etc/mtab , so it will work even if root is mounted read-only. You can cat /proc/cmdline to confirm that your change was successful.

Читайте также:  Which linux mint cinnamon vs mate vs xfce

Parameter list

This list is not comprehensive. For a complete list of all options, please see the kernel documentation.

    The kernel uses rw if neither ro or rw are explicitly set on kernel command line (see bootparam(7) § General non-device-specific boot arguments ). However, mkinitcpio uses ro as the default value overriding the kernel’s default (see mkinitcpio(8) § EARLY INIT ENVIRONMENT ). Boot loaders may also have their own configured default, for example, grub-mkconfig uses rw (see FS#36275 as a reference).

Note: rw is required when using mkinitcpio’s fsck hook (see [1]) or when using F2FS as the root file system.

See also

Источник

Grub cmdline linux default nomodeset

Современные дистрибутивы Linux показывают процесс загрузки, выводя текст информационных сообщений на дисплей, сконфигурированный в видеорежим с высоким разрешением. Однако иногда из-за неправильно установленного драйвера видеокарты сообщения загрузки становятся не видны — Linux загружается с черным экраном.

Проблема решается конфигурированием загрузчика GRUB — выбором для него текстового режима вывода сообщений вместо графического, и настройкой параметров загрузки, которые GRUB передает ядру Linux.

[Конфигурирование загрузчика GRUB]

В Ubuntu загрузчик GRUB конфигурируется путем редактирования текстового файла /etc/default/grub. Ниже описан процесс по шагам, который позволяет постоянно включить текстовый режим при загрузке.

1. Откройте файл конфигурации GRUB в текстовом редакторе (вместо mcedit может быть любой другой редактор текста, например gedit или даже vi):

~$ sudo mcedit /etc/default/grub 

Раскомментируйте строку GRUB_TERNINAL=console, это задаст использование текстового вывода самим загрузчиком GRUB.

# Раскомментируйте эту строку, чтобы запретить графический
# терминал (только для grub-pc):

Примечание: символ # в начале строки означает строку комментария, которая не обрабатывается.

2. Отредактируйте аргументы загрузки Linux, закомментируйте строку, где передаются опции splash quiet, и замените их на nomodeset. Это запретит вывод сообщений загрузки Linux в графическом режиме.

#GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"

GRUB_CMDLINE_LINUX_DEFAULT

3. Обновите конфигурацию GRUB командой update-grub:

~$ sudo update-grub Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file . Found linux image: /boot/vmlinuz-5.0.0-17-generic Found initrd image: /boot/initrd.img-5.0.0-17-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin done

Полезно также изменить опцию, которая на позволит вывести на несколько секунд меню GRUB, изменив опцию GRUB_TIMEOUT. По умолчанию она установлена в 0, что заставляет GRUB сразу переходить к загрузке, не выводя меню. Я изменил эту опцию, настроив время отображения меню загрузки 3 секунды:

1. Ручное задание параметра «nomodeset» в загрузочной строке ядра для загрузки Linux site:dell.com.
2. About Kernel Boot Parameters site:ubuntu.com.
3. Справочник по параметрам ядра.

Источник

Оцените статью
Adblock
detector