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 > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what is the function of Diskimage-builder". In daily operation, I believe that many people have doubts about the role of Diskimage-builder. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts about "what is the role of Diskimage-builder?" Next, please follow the editor to study!
DIB stage root.d
Create or adapt an initialized root file system environment. This is generally built into the distribution or built directly on an existing image.
During a build process, only one element can use root.d, unless it can be very carefully adapted to the context built by other elements without blindly overwriting the root.d of other elements.
Run: outside of chroot.
Extra-data.d
When pulling data from the host environment during the construction of image, all the data (such as SSH keys, http proxy configuration, etc.) should be copied to $TMP_HOOKS_PATH.
Run: outside chroot
Pre-install.d
Run the code within chroot, which was run before packages was installed, so it is ideal for adding apt sources.
Run: within chroot
Install.d
Run after pre-install.d, also within chroot. This is a great place to install packages, link into configuration management tools, or do specific image operations.
Run: within chroot
Post-install.d
Run the code within chroot. This is a great place to handle tasks that you want to do between installing the system / software and starting the image for the first time. Some examples of use:
Run chkconfig to disable unwanted services and clear the cache left by package manager to reduce the size of image.
Run: within chroot
Block-device.d
Customize the block device on which the image resides (such as partitions). Run after the target tree is ready, but before cleanup.d.
Run: outside chroot
Finalise.d
Do some final debugging work on the root file system. Runs within chroot and after the root file system is copied to the mounted file system. This is a good place to reset SELinux metadata, install grub startup loading, and so on.
Since the operation here takes place within the final image, it is important to restrict the operation here and only do some operations that must modify the metadata and image of the file system. For most operations, it should be done within the preferred.
Run: within chroot
Cleanup.d
Clean up the contents of the root file system.
Run: outside chroot
Note: there is no difference between the various stages (root,extra-data,pre_install,install,post_install,block-device,fianlise) except in chroot and chroot, but they are used to regulate the operation (the meaning is different, of course, but the process is the same).
DIB logic startup process
BIOS, hardware self-test, and then handed over to the first storage device (hard disk, network …)
The main function of MBR,MBR is to describe the disk and find boot (MBR code explanation) (GRUB does not find kernel files through the file system, because the kernel has not been started at this time, so there is no file system, but directly access the first partition of the hard disk (there is a partition table in MBR) to find the kernel files.
BOOT loader, today's boot loader has two main functions: grub and extlinux,boot loader are used to load kernel files from disk into memory sink. In the bootloader element in DIB, the bootloader installation script is a very good bootloader installation script, which can be used to install bootloader on almost all linux distributions
Kernel loaders, there are also a variety of, used to use init, now many linux systems use systemd, but also retain init compatibility.
Detection hardware
Load driver
Mount the root file system
Execute the first program / sbin/init
Mirror essence
A mirror is a piece of storage that holds all the data from the partition table to the file system to the contents of the file. The general composition is as follows: MBR, the format of the file system, such as inod
Partition table
The partition table is saved in MBR and occupies the first 512 bytes of the disk:
001-440 bytes MBR startup code initiated by BIOS
441-446 bytes MBR hard disk signature
447-510 bytes partition tables (primary and extended partitions, not logical partitions)
511-512 bytes MBR start signing 0xAA55.
At this point, the study of "what is the role of Diskimage-builder" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.