In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you what the Linux system GRUB installation steps are. The content is concise and easy to understand. It will definitely make your eyes shine. I hope you can gain something through the detailed introduction of this article.
GNU GRUB is a multi-operating system boot manager. GNU GRUB is derived from GRUB (GRand Unified Bootloader). GRUB was originally designed and applied by Erich Stefan Boleyn.
The first method: 1 We add a disk to a redhat 5.4 system, create a partition, and format it.
Add a disk to a system in a virtual machine, I think everyone should be familiar with it.
Here I added a disk called sdb
# fdisk /dev/sdb Create a partition/dev/sdb1
#mkfs-t ex3 /dev/sdb1 Specify the file format of ext3 to format a disk partition
2 We create a directory called boot under the mnt directory
#mkdir /mnt/boot
Grub files are located in the/boot directory.
3 Mount disks to this directory
# mount /dev/sdb1 /mnt/boot
Installation requires writing files under the/boot directory, so mount them.
4 Installation We use grub-install to install grub
#grub-install –root-directory=/mnt /dev/sdb
- root-directory = This option specifies the location of the grub installation
At this point, we use this new disk grub has been successfully installed, we create a virtual machine, use this disk as a boot disk you can see the grub editing interface, then go to specify the root directory, kernel, etc., of course, this is the latter thing.
The second method: the contents of the grub directory generated after installation with grub-install are the same as the contents of the/usr/share/grub/i386-redhat directory under our current system, so we can also copy the file and then use the grub command to install grub.
1:#mount /dev/sdb1 /mnt/boot is still mount
#mkdir /mnt/boot/grub Create a directory of grubs
3: #cp /usr/share/grub/i386-redhat/* /mnt/boot/grub
Copy all the files of the former to the grub directory
4 #mount/dev/sdb1 uninstall
5 # grub Running grub command will pop up a black edit box
grub> root (hd1,0) Enter root (hd1,0) Enter (hd1, 0) indicates the first partition of the second disk
grub> setup (hd1) Enter setup (hd1) Enter This is installation
grub> quit Enter quit Enter Exit
At this point mount/dev/sdb1 to/mnt/boot and check the grub directory, you will find that you have the required files, and then use to create a new virtual machine to verify it.
Linux versions are: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and other versions. Deepin is one of the best Linux distributions in China; Ubuntu Kylin is a derivative distribution based on Ubuntu;Manjaro is a Linux distribution based on Arch;LinuxMint's default Cinnamon desktop is similar to Windows XP and easy to use;Ubuntu is a Linux operating system based on desktop applications.
What are the steps to install GRUB on Linux? Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserves, please pay attention to the industry information channel.
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.