viernes, 13 de enero de 2023

Loading kernel from grub

The kernel is located in the boot partition of your system, and on most Linux distributions, the boot partition is usually the first partition on the hard drive, and it is usually mounted at /boot. The kernel image file is typically located in the /boot directory and is named vmlinuz-<kernel version>.

On the grub command line, you can locate the kernel by typing ls command to list the contents of the /boot directory. The kernel should be listed among the contents of the directory and you should be able to find the current kernel version.

Here is an example of how you would locate the kernel on the grub command line:

  1. Boot your system into the grub command line by pressing 'e' when the grub menu is displayed during the boot process.
  2. Use the ls command to list the contents of the /boot directory.
grub> ls (hd0) (hd0,msdos1) (hd1) (hd1,msdos1)
  1. You can see the available partitions, select the partition that contains the boot directory, for example (hd0,msdos1) for the first partition.
grub> ls (hd0,msdos1)/

 

  1. You will see the contents of the boot partition, and you can find the kernel image file with the name vmlinuz-<kernel version>

Please note that, your partition naming and location of the kernel image may vary depending on your Linux distribution. Also, you should make sure that your grub configuration is correct and that you have the correct partition where the boot directory is located.


The / at the end of the command ls (hd0,msdos1)/ is used to specify the directory that the ls command should be executed in.

In this case, the command is used to list the contents of the /boot directory, which is located on the first partition of the hard drive. The / specifies that the command should be run in the root directory of the partition (hd0,msdos1). Without the / at the end of the command, the ls command would be executed in the current directory, which may not be the root directory of the partition and thus it would not show the contents of the /boot directory.

The ls command is used to list the contents of a directory, and the directory specified after the command is where the contents will be listed from.

In this case, the / is used to specify the root directory of the partition (hd0,msdos1) so that the contents of the /boot directory can be listed.

In summary, the / at the end of the command is used to specify the directory that the ls command should be executed in and it will show the contents of the /boot directory where kernel image file is located.

https://www.suse.com/c/loading-linux-kernel-manually-using-grub-sles/

No hay comentarios:

Publicar un comentario