In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how the Linux system fixes the GRUB boot failure. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Step 1: find the corresponding sector and / boot/grub directory of the system
Note: assume that the hard disk interface type sd,hd0 corresponds to sda hd1 and corresponds to sdb.
(hd0) ≠ (hd0)
(hd1,gpt2) = (hd1,2)
Ls (hd1,gpt2) View (hd1,gpt2) sector information (drive letter, space, etc.)
Ls (hd1,gpt2) / View (hd1,gpt2) the contents of the sector (files, text, etc.)
If you print the catalog information for each sector, two situations occur:
1. Ls (hd1,gpt2) displays a Unknow filesystem prompt indicating that this sector is not the system partition we are looking for
2. Ls (hd1,gpt2) display / boot / proc and other system directory information indicates that this sector is the system partition we are looking for.
If you find the system partition for the corresponding sector, you may encounter two situations:
1. / boot/grub is in the A directory.
2. There is / grub in the / boot,B directory under directory A (set prefix= (hd1,gpt2) / grub command is used to load the system kernel in the second step)
Grub > ls
(hd0), (hd1), (hd1, gpt1), (hd2,gpt2), (hd3, gpt3)
Step 2: load the system kernel
Grub > set root=hd1,2 # you don't need parentheses here, you can add parentheses. There is a difference between hd0 and hd1
Grub > set prefix= (hd1,2) / boot/grub
Grub > linux / vmlinuz root=/dev/sdb2 # vmlinuz must use TAB completion (may have a suffix). Note that sda or sdb need to depend on your actual situation.
Grub > initrd / initrd.img-xxx # TAB completion. Version needs to be unified in the case of multiple cores.
Grub > boot
Tip: if you unfortunately enter BusyBox after boot, you can check the log of the error carefully and repeat the second step after rebooting the system (the parameters set above will be cleared after restarting the system).
Step 3: modify the grub boot
If you successfully enter the system, remember to immediately message grub boot, otherwise the problem will still exist after restarting the system.
Sudo update-grub2 # grub2 command (higher version uses grub2)
$sudo grub-install / dev/sdb
Step 4: restart the system
After restarting the system, you can enter the system normally.
Reboot
Thank you for reading! This is the end of this article on "how to fix the problem of GRUB boot failure in Linux system". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.