Troubleshoot Linux boot problems with GRUB
GRUB (Grand Unified Bootloader) is a boot program that allows users to install multiple distributions on the system and select a copy when the system starts up. GRUB is used on Unix-like systems. The GNU operating system and most distributions use GRUB as a bootloader. GRUB provides a bash-style command line interface that is easy to use.
Linux needs GRUB to boot, but you may encounter an error with GRUB preventing the boot process. You can identify the problem because you will then see the following signs appear:
Reinstall GRUB
If a serious error with the MBR is encountered on the system, it occurs in the case of a cursor blinking at the start of the machine. When an error occurs with the MBR you will not see the GRUB error message. Usually in that situation you will not be able to boot the system, it is best to use the rescue CD to boot the system. You can use Knoppix to boot.
After booting with the rescue disk, go to the chroot environment and use the grub-install command to reinstall GRUB. If you want to install GRUB in the MBR and the hard drive is addressed by the device file / dev / sda , you will have to use the command grub-install / dev / sda . This command will read the GRUB configuration file (located at /boot/grub/menu.lst on most distributions) and based on that to write a new GRUB bootloader to the MBR. Below is the information displayed when using grub-install to reinstall GRUB.
Manually start with GRUB
You do not need to reinstall GRUB. If the GRUB code still exists but because of an error in GRUB's configuration file the system cannot boot, then you can try to boot manually. This is the most suitable method if GRUB displays an error message and then stops the boot process. When manually entering all GRUB commands, you can see exactly where the error occurred to help troubleshoot. Follow these steps to manually download the GRUB configuration.
1. To enter the GRUB boot menu you need to check the system behavior carefully at startup. In most cases, it requires you to press the Escape key (ESC) when GRUB is processed. You will then switch to the GRUB command line. Alternatively, you can boot from a rescue CD and enter the GRUB command to open GRUB's command line interface.
2. GRUBShell provides some support for users so you don't need to remember the commands correctly. To see all GRUB commands you just need to use the help command.
3. When manual download GRUB requires you to manually enter all commands in the /boot/grub/menu.lst file. It's best to check the current content of the menu.lst file using the cat /boot/grub/menu.lst command. In this file you need to check what system needs to boot.
4. With the sample lines displayed on the screen, you can manually enter all GRUB lines. That means you must enter the root, kernel, and initrd lines. Eg:
GRUB will load in the first boot phase. There may be errors in the MBR, in the GRUB configuration file or in GRUB loaded files. In those cases you can manually enter all GRUB commands to check for errors. If no error is detected, you can choose to reinstall GRUB.
Linux needs GRUB to boot, but you may encounter an error with GRUB preventing the boot process. You can identify the problem because you will then see the following signs appear:
- GRUB has been completely deleted and you will see nothing except a blinking cursor when the server starts.
- GRUB will generate a specific GRUB error message.
- GRUB said it could not find a required file.
Reinstall GRUB
If a serious error with the MBR is encountered on the system, it occurs in the case of a cursor blinking at the start of the machine. When an error occurs with the MBR you will not see the GRUB error message. Usually in that situation you will not be able to boot the system, it is best to use the rescue CD to boot the system. You can use Knoppix to boot.
After booting with the rescue disk, go to the chroot environment and use the grub-install command to reinstall GRUB. If you want to install GRUB in the MBR and the hard drive is addressed by the device file / dev / sda , you will have to use the command grub-install / dev / sda . This command will read the GRUB configuration file (located at /boot/grub/menu.lst on most distributions) and based on that to write a new GRUB bootloader to the MBR. Below is the information displayed when using grub-install to reinstall GRUB.
root @ Knoppix: / # grub-install / dev / sda
You should not call / sbin / grub-install. Please call / usr / sbin / grub-install instead!
Tìm kiếm cho GRUB directory installation . tìm thấy: / boot / grub
Installation finished. No error reported.
Đây là nội dung của thiết bị map /boot/grub/device.map.
Hãy kiểm tra nếu này là đúng hoặc không. Nếu bất kỳ các dòng không đúng,
fix it and re-run the script `grub-install '.
(hd0) / dev / sda
Manually start with GRUB
You do not need to reinstall GRUB. If the GRUB code still exists but because of an error in GRUB's configuration file the system cannot boot, then you can try to boot manually. This is the most suitable method if GRUB displays an error message and then stops the boot process. When manually entering all GRUB commands, you can see exactly where the error occurred to help troubleshoot. Follow these steps to manually download the GRUB configuration.
1. To enter the GRUB boot menu you need to check the system behavior carefully at startup. In most cases, it requires you to press the Escape key (ESC) when GRUB is processed. You will then switch to the GRUB command line. Alternatively, you can boot from a rescue CD and enter the GRUB command to open GRUB's command line interface.

2. GRUBShell provides some support for users so you don't need to remember the commands correctly. To see all GRUB commands you just need to use the help command.

3. When manual download GRUB requires you to manually enter all commands in the /boot/grub/menu.lst file. It's best to check the current content of the menu.lst file using the cat /boot/grub/menu.lst command. In this file you need to check what system needs to boot.

4. With the sample lines displayed on the screen, you can manually enter all GRUB lines. That means you must enter the root, kernel, and initrd lines. Eg:
root (hd0,0)5. After entering those commands the system will wait for instructions. Usually, you enter the boot command. After entering the command the startup process will start. You need to pay close attention to detecting errors. If the system does not boot normally, it will also display an error message if you manually enter the lines in the menu.lst file. If that is the case, you need to check the error and restart the system until the boot process is done normally.
kernel /boot/vmlinuz-2.6.24-16-server root = / dev / sda2 ro splash
initrd /boot/initrd-2.6.24-16-server
GRUB will load in the first boot phase. There may be errors in the MBR, in the GRUB configuration file or in GRUB loaded files. In those cases you can manually enter all GRUB commands to check for errors. If no error is detected, you can choose to reinstall GRUB.
5 ★ | 1 Vote
You should read it
May be interested
- Install Ubuntu in Windows using the Wubi Installeryou want to find a solution to try ubuntu but don't like the idea of creating a partition, using the cd drive directly, or not having enough resources to run a virtual machine. try using the wubi installer program to run to ubuntu.
- Instructions for installing Microsoft Office 2007 in Ubuntu 9.04in the field of handling office work, microsoft office has almost no competitors with many outstanding features, the ability to handle smart and convenient jobs. however, for people using open source operating systems like ubuntu, using microsoft office suite is indeed a problem.
- Control Linux system with fstabin this article, i will show you how to use fstab to control your linux system.
- Instructions for installing Windows Fonts on Ubuntuthis is one of the basic steps when setting up, installing and using the ubuntu operating system. one of the most popular and most commonly used font sets is the microsoft standard suite, for example times new roman, arial, verdana ... but not available in ubuntu.
- 4 quick access to a Terminal in Linuxyou really need a terminal that is always available in linux? here are 4 different ways to quickly access a terminal.
- Install and configure Apache in Ubuntuin the following article, we will show you some basic steps to install and set up a web server system using apache on the ubuntu platform. in fact, this step is quite simple and easy, just use synaptic package manager, ubuntu software center to search and install apache2 module package.