In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to make Linux GRUB boot on USB disk". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to make Linux GRUB boot on USB disk".
GNU GRUB (GRand Unified Bootloader referred to as "GRUB") is a multi-operating system startup program from the GNU project. GRUB is an implementation of the multi-boot specification, which allows users to have multiple operating systems in the computer at the same time and choose which operating system they want to run when the computer starts. GRUB can be used to select different kernels on operating system partitions or to pass boot parameters to those kernels.
When booting from a hard disk, the BIOS usually turns to the first sector of the first hard disk, the master boot record (MBR).
The process of loading GRUB and operating system includes the following steps:
Load record-the only thing the basic bootloader does is load the second bootloader.
Loading Grub--, the second bootloader, actually leads to more advanced features that allow users to load a specific operating system.
Load the system-- such as the linux kernel. GRUB transfers control of the machine to the operating system.
The difference is that Microsoft operating systems are booted using a boot method called chain loading, and the master boot record simply points to the first sector of the operating system partition.
Many distributions support usb startup, so can we make a usb startup tool tray ourselves? the answer is yes!
First, make the following assumptions
Usb device is / dev/sdb
Usb disk mount point / mnt/usbdisk
Let's briefly describe the steps for installing the grub bootstrap on the USB disk.
Determine the location of the usb disk, usually / dev/sdb
The code is as follows:
[root@localhost] # fdisk-l
Clear the mbr boot byte using the following command
The code is as follows:
[root@localhost] # dd if=/dev/zero of=/dev/sdb bs=512 count=1
Use mbr.bin in syslinux to load onto USB disk
The code is as follows:
[root@localhost] # locate mbr.bin
[root@localhost] # cat / somepath/share/syslinux/mbr.bin > / dev/sdb
Using fdisk to partition the USB disk, the similar result is as follows:
The code is as follows:
Device Boot Start End Blocks Id System
/ dev/sdb1 * 1 1018 993537 + 83 Linux
Create an ext3 file system on the partition and hang it on the USB disk
The code is as follows:
[root@localhost] # mkfs.ext3 / dev/sdb1
[root@localhost] # mkdir-p / mnt/usbdisk
[root@localhost] # mount / dev/sdb1 / mnt/usbdisk
Install GRUB boot loader to USB disk
The code is as follows:
[root@localhost] # grub-install-- no-floppy-- root-directory=/mnt/usbdisk / dev/sdb
Create a grub.conf profile
The code is as follows:
[root@localhost] #
Cat > / mnt/usbdisk/boot/grub/grub.conf
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: 228
*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.