{"id":85959,"date":"2020-06-20T13:42:30","date_gmt":"2020-06-20T11:42:30","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/sozdanie-zagruzochnyh-obrazov-boobstrap-v1-0"},"modified":"2020-06-20T13:42:30","modified_gmt":"2020-06-20T11:42:30","slug":"sozdanie-zagruzochnyh-obrazov-boobstrap-v1-0","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/sozdanie-zagruzochnyh-obrazov-boobstrap-v1-0","title":{"rendered":"Creating bootable images with boobstrap v1.0","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><a rel=\"nofollow\" href=\"https:\/\/www.linux.org.ru\/images\/19230\/original.png\" itemprop=\"contentURL\"><br \/>\n      <img decoding=\"async\" alt=\"Creating bootable images with boobstrap v1.0\" src=\"\/wp-content\/uploads\/2020\/06\/a4ea5234f23c7734a849e9fbb725516d.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p>    <\/a><\/p>\n<p>I would like to introduce you to a framework called boobstrap, written in POSIX shell, for creating bootable images with GNU\/Linux distributions. The framework allows you to go through the entire process in three simple steps: from deploying the system in chroot, creating an initramfs image that includes the system from chroot, and ultimately a bootable ISO image. boobstrap includes three utilities mkbootstrap, mkinitramfs, and mkbootisofs respectively.<\/p>\n<p>mkbootstrap installs the system in a separate directory, with native support for CRUX, while for Arch Linux \/ Manjaro and Debian-based distributions, third-party utilities pacstrap, basestrap, and debootstrap should be used respectively.<\/p>\n<p>mkinitramfs creates an initramfs image; you can use the installed system in the directory as an \"overlay\" compressed with SquashFS, or boot into the system and work directly in tmpfs. For example, the mkinitramfs command `mktemp -d` --overlay \"arch-chroot\/\" --overlay \"\/home\" --squashfs-xz --output initrd will create an initrd file, including two overlays with the \"arch-chroot\/\" system and your \"\/home\", compressed with SquashFS, which you can then load via PXE into tmpfs, or create a bootable ISO image with this initrd.<\/p>\n<p>mkbootisofs creates a BIOS \/ UEFI bootable ISO image from the specified directory. You only need to place \/boot\/vmlinuz and \/boot\/initrd in the directory.<\/p>\n<p>boobstrap does not use busybox, and to create a working initramfs environment, a minimal set of programs is copied using ldd, necessary for booting and switching into the system. The list of programs to be copied, like everything else, can be configured through the config file \/etc\/boobstrap\/boobstrap.conf. Additionally, you can install any minimalist distribution in a separate chroot\/, from which to create a full initramfs environment. As such a minimalist yet full environment, the template \"crux_gnulinux-embedded\" is recommended, which after xz occupies a reasonable 37MB. Busybox, besides its size of 3-5MB compared to 30-50MB for a full GNU\/Linux environment, does not offer any other advantages, making its use in the project seem impractical.<\/p>\n<p>How to quickly check functionality and get started? Install and run.<\/p>\n<p># git clone https:\/\/github.com\/sp00f1ng\/boobstrap.git<br \/>\n# cd boobstrap<br \/>\n# make install# boobstrap\/tests\/crux_gnulinux-download-and-build<br \/>\n<noindex># qemu-system-x86_64 -enable-kvm -m 1G -cdrom tmp.*\/install.iso<noindex><\/p>\n<p>You also need to install dependencies, namely: cpio, grub, grub-efi, dosfstools, xorriso. The use of squashfs-tools is optional; you can work in tmpfs if you have sufficient RAM. If something is missing from the system, boobstrap will notify you upon startup.<\/p>\n<p>To simplify the creation of configurations, boobstrap offers the use of \"templates\" and \"systems\", which involve using \"templates\" (bootstrap-templates\/) for quick system installations from a file, while the \"systems\" (bootstrap-systems\/) are used for configuring the final setups.<\/p>\n<p>For example, running the script boobstrap\/bootstrap-templates\/crux_gnulinux-embedded.bbuild will install a minimal configuration of the CRUX GNU\/Linux system and save it in the file crux_gnulinux-embedded.rootfs. Next, you run boobstrap\/bootstrap-systems\/default\/crux_gnulinux.bbuild, which will load the initial configuration from the mentioned file, carry out all the necessary setup, and prepare a bootable ISO. This is convenient when, for instance, multiple systems use similar configurations: instead of describing the same set of packages each time, you can use one template to create bootable images of the systems with the final configuration.<\/p>\n<p>Where can all this be used?<\/p>\n<p>You configure the system in a file once, and by executing it, you build and\/or update the system. The system operates in tmpfs, which essentially makes it disposable. If the system fails, you can return to the initial state with the press of a Reset button. You can safely execute rm -rf \/.<\/p>\n<p>You can configure all your system configurations locally, create images, test them in a virtual machine or on dedicated hardware, and then upload them to a remote server, updating the entire system with just two commands: kexec -l \/vmlinuz --initrd=\/initrd &amp;&amp; kexec -e, rebooting it into tmpfs.<\/p>\n<p>Similarly, you can convert all systems, for example to VDS, to run on tmpfs, encrypt the disk \/dev\/vda and use it solely for data, without the need to keep the operating system on it. The only 'point of information leakage' in this case would be the 'cold dump' of your virtual machine's memory, and in the event of a system compromise (for example, through an SSH password guessing or a vulnerability in Exim), you can upload a new ISO via your provider's 'control panel' to restore the VDS to operation, not forgetting to edit the system configuration to close all vulnerabilities. This is faster than reinstalling, subsequent setup, and\/or recovery from backup, since essentially, the uploaded ISO with your system is your backup. 'Seven troubles \u2014 one reset.'<\/p>\n<p>Ultimately, you can create any distribution tailored to your tasks, write it to a USB drive, and work with it, updating as needed and rewriting it back to the USB drive. Store all data in the 'clouds.' No more worries about system preservation or backing it up, when the system, I repeat, essentially became 'disposable.'<\/p>\n<p>Your wishes, suggestions, and comments are welcome.<\/p>\n<p>The repository linked below contains a detailed README file (in English) explaining each utility and usage examples, as well as comprehensive documentation in Russian and a development history, available at the link: <a rel=\"nofollow\" href=\"https:\/\/www.linux.org.ru\/forum\/talks\/15747003\" title=\"A set of boot scripts boobstrap\">A set of boot scripts boobstrap<\/a>.<\/p>\n<p><\/noindex><\/noindex><\/p>\n<p>Source: <a \ncontent=\"nofollow\" rel=\"nofollow\" href=\"http:\/\/www.linux.org.ru\/news\/opensource\/15770856\">linux.org.ru<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0425\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c boobstrap, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b\u0439 \u043d\u0430 POSIX shell, \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0441 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u043c\u0438 GNU\/Linux. \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 \u0432\u0435\u0441\u044c \u043f\u0443\u0441\u0442\u044c \u0432 \u0442\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0448\u0430\u0433\u0430: \u043e\u0442 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 chroot, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f initramfs-\u043e\u0431\u0440\u0430\u0437\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0432 \u0441\u0435\u0431\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438\u0437 chroot, \u0438 \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0441\u0447\u0451\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0433\u043e ISO-\u043e\u0431\u0440\u0430\u0437\u0430. boobstrap \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0442\u0440\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b mkbootstrap, mkinitramfs [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":85960,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-85959","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/sozdanie-zagruzochnyh-obrazov-boobstrap-v1-0\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 boobstrap v1.0 | ProHoster\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/sozdanie-zagruzochnyh-obrazov-boobstrap-v1-0\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-06-20T11:42:30+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-06-20T11:42:30+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Creating boot images boobstrap v1.0 | ProHoster","description":"","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/sozdanie-zagruzochnyh-obrazov-boobstrap-v1-0","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 boobstrap v1.0 | ProHoster","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/sozdanie-zagruzochnyh-obrazov-boobstrap-v1-0","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-06-20T11:42:30+00:00","article:modified_time":"2020-06-20T11:42:30+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"85959","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 14:27:25","updated":"2022-09-27 23:23:39","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/85959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=85959"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/85959\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/85960"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=85959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=85959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=85959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}