In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "Linux how to achieve USB boot installation", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Linux how to achieve USB boot installation" this article.
Overview of bootable flash drive production
There is no doubt that booting from a flash drive is very convenient, but only if its capacity is large enough to accommodate at least the content of the installed CD (about 700MB), so it is recommended that the capacity is 1GB. In addition, we also need to use a piece of software, namely SYSLINUX. Prior to 3.00, the software only supports the FAT16 file system; since version 3.00, SYSLINUX also supports FAT32, but it is recommended to use the FAT16 file system because it is more compatible.
After plugging in the flash drive, you can run the dmesg command or the sudofdisk-l command to see the device name assigned to it by the system. Readers, please note.
Meaning, whenever you encounter / dev/sdX1 in the future, please replace the X with your specific device address.
Third, make boot flash drive manually.
The process of manual installation is to use SYSLINUX to create a boot flash drive; then copy the contents of the Ubuntu disc to the boot disk, remember to include all hidden files / directories; rename the isolinux directory to syslinux, and rename the file isolinux.cfg to syslinux.cfg; to set the computer to boot from the flash drive. After reboot, you can install the operating system from the flash drive.
First of all, we introduce how to use SYSLINUX to make boot flash drive. In fact, SYSLINUX is a boot loader that runs on the MS-DOS/WindowsFAT file system. Most flash drives use the FAT file system, so let's go directly to how to add SYSLINUX boot blocks to your flash drive:
1. Install syslinux. SYSLINUX supports both Linux and Microsoft Windows (the executable file for this software is located in\ win32\ syslinux.exe). For more information, visit the SYSLINUX home page at http://www.syslinux.org/. The installation under the UbuntuLinux operating system is as follows:
Sudoapt-getinstallsyslinuxmtools
two。 Insert the flash drive into the machine and mount it. Generally, the mount process is automatic. If you use the Linux operating system to mount the flash drive automatically, you can use the command-tvfat/dev/sda1/mnt to mount the flash drive. Notice that / mnt here is the mount point. If you are using Windows, the system will automatically assign it a drive letter, such as F:.
3. Make a startup flash drive. If you are using Linux and have mounted the flash drive as described above, use the command syslinux-s/dev/sda1 to make the boot flash drive. If you are using a Windows system and the drive letter of the flash drive is FRV, then use the syslinux-s-mF: command to make the boot flash drive.
4. At this point, a new file named ldlinux.sys will be generated in the root directory of the flash drive. Note that this is a hidden file that may not be visible in Windows Explorer, but can be viewed by entering the appropriate command at a command prompt, such as dir/aF:. Well, now we can boot the computer from our boot flash drive, and if we see the SYSLINUX message text and the prompt "boot:", the boot is successful.
It is important to note that for IDE disks, when we boot the system from the USB drive, the hard drive appears as sda.
When using the Windows version of syslinux, be sure to use the-m option to ensure that the master boot record (MBR) of ISOLINUX is copied; otherwise, the original MBR will continue to be used so that it does not point to your syslinux.cfg file.
The above describes how to make a bootable flash drive, and let's start with how to copy the contents of the Ubuntu installation CD to the boot flash drive that has just been made.
When we copy the contents of the Ubuntu installation CD to our boot flash drive, be sure to copy all the files and directories on the CD. Also note that the contents of the CD are copied here, not the ISO image of CD is installed, which should not be confused. In addition, in order to copy the contents of the CD, we do not have to burn the downloaded ISO image to the CD. Under Linux, you can mount the image as follows:
Mount-oloop/path/to/ubuntu.iso/path/to/mount/point
Be sure to copy all hidden files and directories on it. In Gnome, press the key combination Ctrl-H to view hidden files. On MSWindows systems, you can use the following command (assuming D: is the drive letter of the CD-ROM drive and F: is the letter of the flash drive):
Xcopy/e/h/kd:\ *. * f:
When we copy the contents of the installation CD to the boot flash drive, we then move the files to the root directory. This step is not required for boot disks made using syslinux3.35 or later. For boot flash drives made before version 3.35, we need to copy the files from the following directories to the root directory of the flash drive:
Isolinux (all files)
Casper (vmlinuz and initrd.gz)
Install (all files)
Well, after the above work, the next thing we need to do is to adjust the SYSLINUX.CFG.
For the * version of syslinux, you just need to rename the isolinux directory to syslinux, and then rename the file isolinux.cfg in this directory to syslinux.cfg. For older versions of syslinux, the file isolinux.cfg needs to be renamed to syslinux.cfg. Then edit the file to delete all / casper/ and / install/ in all paths, for example, the line in the original file is as follows:
DEFAULT/casper/vmlinuz
It should now be changed to:
DEFAULTvmlinuz
Save the file and make sure it is named syslinux.cfg.
After adjusting the SYSLINUX.CFG file, we can boot the system from the flash drive. Set up BIOS, let the machine boot from the flash drive, insert the flash drive we have made, and install the Ubuntu system just like from the installation CD.
After the ◆ installation is complete, edit / etc/fstab so that / media/cdrom0 points to the CD drive instead of the USB drive. If you do not do so, you will receive an error message "Cannotmountvolume.Invalidmountoptionwhenattemptingtomountthevolume" when you mount the flash drive. This is because the installer thinks it is being installed from the CD drive.
In order to edit / etc/fstab, you need to open it first, with the following command:
Sudogedit/etc/fstab
Find the following (usually at the bottom of the file):
/ dev/sdb1/media/cdrom0udf,iso9660user,noauto,exec,utf800
Let's comment it out with a # at the beginning of the line, as follows:
# / dev/sdb1/media/cdrom0udf,iso9660user,noauto,exec,utf800
Of course, you can also rename the actual cdrom mount point to / media/cdrom0 if you like.
Save this file to complete the manual boot installation of the Linux flash drive installation.
The above is all the contents of the article "how to realize the boot installation of USB disk in Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow 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.