In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to solve the problem of grub in the installation of u-disk ubuntu. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
The solution to the grub problem when installing ubuntu on U disk is as follows: first, insert the USB disk to start the computer, open the terminal to find the installed partition, then check the file to find the partition of grub2, and change from rescue to normal. Finally, restart the system and type [sudo update-grub2].
The solution to the grub problem when installing ubuntu on U disk:
1. Plug in the flash drive to start the computer and open the terminal.
Sudo-I
First find out which partition your ubuntu10.04 is installed in, and use:
Fdisk-l
Here the partition where my ubuntu10.04 root directory is located is / dev/sda2.
The root directory of the original system is mounted below:
Mount / dev/sda2 / mnt
/ dev/sda2 is mounted under / mnt, of course you can choose another place. Note here that if you have a separate partition for / boot, mount / boot separately, for example, if your original / boot is mounted on / dev/sda12, you need to type mount / dev/sda12 / mnt/boot here. I didn't separate it out here, so I don't need it.
Here is the final step:
Grub-install-root-directory=/mnt / dev/sda
(note: there is a space bar after / mnt, do not write / dev/sda2)
If you see
Installation finished.No Error Reported.
It means it has been successful!
Enter the following command at the terminal:
Sudo update-grub2
Follow the prompt to enter the password, and if it goes well, there will be a similar statement as follows, which means that it is successful.
Grub.cfg... Found Debian background: moreblue-orbit-grub.pngFound linux image: / boot/vmlinuz-2.6.31-15-genericFound initrd image: / boot/initrd.img-2.6.31-15-genericFound memtest86+ image: / boot/memtest86+.bindone
If there is no similar statement above, search for grub in Synaptic. You can install the grub-pc with the Ubuntu flag. After installation, type
Sudo update-grub2
Just update grub2.
At this time without a flash drive to restart directly, found that still can not directly enter the system, but entered the grub rescue mode.
2.grub rescue
Since there are only a small number of basic commands available in rescue mode, you must take some action to load the normal module and then enter the normal mode.
The commands that can be used in rescue mode are: set,ls,insmod,root,prefix (set startup path)
First assume that the core file of grub2 is in the (hd0,8) partition, and then see how to enter the normal mode (normal) booted from (hd0,8) from rescue mode.
The search command cannot be used in rescue mode. If you don't know which partition the grub2 file is in, you can check it with the ls command, such as
Ls (hd0,8) / view (hd0,8) the partition root directory to see if there is a boot folder
Ls (hd0,8) / boot/ View (hd0,8) the files in the / boot directory of the partition
Ls (hd0,8) / boot/grub/ View (hd0,8) Partition / boot/grub directory files
By viewing the file, you can determine which partition the grub2 core file is in, and then you can make the transition from rescue to normal:
First ls look at the partition, according to the partition list, guess / the number of the partition and then ls (hd0,x) / look at the file under the partition directory to determine to find / partition, if not, keep looking. Find / partition (hd0,x) continue
Grub rescue > set root= (hd0,x) grub rescue > set prefix=/boot/grubgrub rescue > insmod normalrescue > normal
You can enter the system. However, it still entered grub rescue mode after reboot, which did not completely solve the problem.
3. Enter the system, open the terminal and enter:
Sudo update-grub2sudo grub-install / dev/sda
After reboot again, I found that everything was done.
On how to solve the problem of grub in u-disk installation ubuntu is shared here, I hope the above content can be of some help to 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.