Which procedure is used to edit a grub boot entry?
GNU GRUB (short for GNU GRand Unified Bootloader, commonly referred to as GRUB) is the default boot loader for most Linux operating systems. From the GRUB menu, you can select which kernel to boot into, or modify menu entries to change how the kernel will boot. This can be useful when troubleshooting a failing instance. The GRUB menu is displayed during the boot process. The menu is not accessible via normal SSH, but you can access it via the EC2 Serial Console. PrerequisitesBefore you can configure and use GRUB, you must grant access to the serial console. For more information, see Configure access to the EC2 Serial Console. Configure GRUBBefore you can use GRUB via the serial console, you must configure your instance to use GRUB via the serial console. To configure GRUB, choose one of the following procedures based on the AMI that was used to launch the instance. Amazon Linux 2To configure GRUB on an Amazon Linux 2 instance
To configure GRUB on an Ubuntu instance
To configure GRUB on a RHEL instance
For instances that are launched using a CentOS AMI, GRUB is configured for the serial console by default. The following is an example of
Use GRUBAfter GRUB is configured, connect to the serial console and reboot the instance with the reboot command. During reboot, you see the GRUB menu. Press any key when the GRUB menu appears to stop the boot process, allowing you to interact with the GRUB menu. Single user modeSingle user mode will boot the kernel at a lower runlevel. For example, it might mount the filesystem but not activate the network, giving you the opportunity to perform the maintenance necessary to fix the instance. To boot into single user mode
Emergency modeEmergency mode is similar to single user mode except that the kernel runs at the lowest runlevel possible. To boot into emergency mode, follow the steps in Single user mode in the preceding section, but at step 6 add the word 4 instead of 1. |