docs: admin-guide: Update bootloader and installation instructions

Updates the bootloader and installation instructions in
admin-guide/README.rst to align with modern practices.

Details of Changes:

 - Added guidance on using EFISTUB for UEFI/EFI systems.
 - Noted that LILO is no longer in active development and provides
   alternatives.
 - Kept LILO instructions but marked as Legacy LILO Instructions.
   Suggest removal in future patch.

Signed-off-by: Hunter Chasens <hunter.chasens18@ncf.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
[jc: repaired added whitespace warnings]
Link: https://lore.kernel.org/r/20240207171007.45405-1-hunter.chasens18@ncf.edu
This commit is contained in:
Hunter Chasens 2024-02-07 12:10:07 -05:00 committed by Jonathan Corbet
parent 7da8bdbf8f
commit 3a5f1c3d83

View file

@ -262,9 +262,11 @@ Compiling the kernel
- Make sure you have at least gcc 5.1 available. - Make sure you have at least gcc 5.1 available.
For more information, refer to :ref:`Documentation/process/changes.rst <changes>`. For more information, refer to :ref:`Documentation/process/changes.rst <changes>`.
- Do a ``make`` to create a compressed kernel image. It is also - Do a ``make`` to create a compressed kernel image. It is also possible to do
possible to do ``make install`` if you have lilo installed to suit the ``make install`` if you have lilo installed or if your distribution has an
kernel makefiles, but you may want to check your particular lilo setup first. install script recognised by the kernel's installer. Most popular
distributions will have a recognized install script. You may want to
check your distribution's setup first.
To do the actual install, you have to be root, but none of the normal To do the actual install, you have to be root, but none of the normal
build should require that. Don't take the name of root in vain. build should require that. Don't take the name of root in vain.
@ -301,32 +303,51 @@ Compiling the kernel
image (e.g. .../linux/arch/x86/boot/bzImage after compilation) image (e.g. .../linux/arch/x86/boot/bzImage after compilation)
to the place where your regular bootable kernel is found. to the place where your regular bootable kernel is found.
- Booting a kernel directly from a floppy without the assistance of a - Booting a kernel directly from a storage device without the assistance
bootloader such as LILO, is no longer supported. of a bootloader such as LILO or GRUB, is no longer supported in BIOS
(non-EFI systems). On UEFI/EFI systems, however, you can use EFISTUB
which allows the motherboard to boot directly to the kernel.
On modern workstations and desktops, it's generally recommended to use a
bootloader as difficulties can arise with multiple kernels and secure boot.
For more details on EFISTUB,
see "Documentation/admin-guide/efi-stub.rst".
If you boot Linux from the hard drive, chances are you use LILO, which - It's important to note that as of 2016 LILO (LInux LOader) is no longer in
uses the kernel image as specified in the file /etc/lilo.conf. The active development, though as it was extremely popular, it often comes up
kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or in documentation. Popular alternatives include GRUB2, rEFInd, Syslinux,
/boot/bzImage. To use the new kernel, save a copy of the old image systemd-boot, or EFISTUB. For various reasons, it's not recommended to use
and copy the new image over the old one. Then, you MUST RERUN LILO software that's no longer in active development.
to update the loading map! If you don't, you won't be able to boot
the new kernel image.
Reinstalling LILO is usually a matter of running /sbin/lilo. - Chances are your distribution includes an install script and running
You may wish to edit /etc/lilo.conf to specify an entry for your ``make install`` will be all that's needed. Should that not be the case
old kernel image (say, /vmlinux.old) in case the new one does not you'll have to identify your bootloader and reference its documentation or
work. See the LILO docs for more information. configure your EFI.
After reinstalling LILO, you should be all set. Shutdown the system, Legacy LILO Instructions
------------------------
- If you use LILO the kernel images are specified in the file /etc/lilo.conf.
The kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
/boot/bzImage. To use the new kernel, save a copy of the old image and copy
the new image over the old one. Then, you MUST RERUN LILO to update the
loading map! If you don't, you won't be able to boot the new kernel image.
- Reinstalling LILO is usually a matter of running /sbin/lilo. You may wish
to edit /etc/lilo.conf to specify an entry for your old kernel image
(say, /vmlinux.old) in case the new one does not work. See the LILO docs
for more information.
- After reinstalling LILO, you should be all set. Shutdown the system,
reboot, and enjoy! reboot, and enjoy!
If you ever need to change the default root device, video mode, - If you ever need to change the default root device, video mode, etc. in the
etc. in the kernel image, use your bootloader's boot options kernel image, use your bootloader's boot options where appropriate. No need
where appropriate. No need to recompile the kernel to change to recompile the kernel to change these parameters.
these parameters.
- Reboot with the new kernel and enjoy. - Reboot with the new kernel and enjoy.
If something goes wrong If something goes wrong
----------------------- -----------------------