From 32322960234c8ec91e0d42835a3ec5ee63305070 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 2 Feb 2019 11:00:00 +0100 Subject: Adding upstream version 20190202. Signed-off-by: Daniel Baumann --- system-boot/CHANGELOG.txt | 142 ++ system-boot/COPYING | 674 +++++++++ system-boot/Makefile | 132 ++ system-boot/VERSION | 1 + system-boot/backend/dracut/live.script | 11 + system-boot/backend/initramfs-tools/kms.hook | 25 + system-boot/backend/initramfs-tools/live.hook | 254 ++++ system-boot/backend/initramfs-tools/live.script | 59 + system-boot/components/0001-init-vars.sh | 11 + system-boot/components/0010-debug | 27 + system-boot/components/0020-read-only | 72 + system-boot/components/0030-verify-checksums | 89 ++ system-boot/components/2010-remove-persistence | 31 + system-boot/components/3020-swap | 62 + system-boot/components/9990-cmdline-old | 327 +++++ system-boot/components/9990-fstab.sh | 25 + system-boot/components/9990-initramfs-tools.sh | 75 + system-boot/components/9990-main.sh | 195 +++ system-boot/components/9990-misc-helpers.sh | 1713 ++++++++++++++++++++++ system-boot/components/9990-mount-cifs.sh | 28 + system-boot/components/9990-mount-http.sh | 93 ++ system-boot/components/9990-mount-iscsi.sh | 54 + system-boot/components/9990-mount-nfs.sh | 28 + system-boot/components/9990-netbase.sh | 139 ++ system-boot/components/9990-netboot.sh | 41 + system-boot/components/9990-networking.sh | 179 +++ system-boot/components/9990-overlay.sh | 337 +++++ system-boot/components/9990-select-eth-device.sh | 108 ++ system-boot/components/9990-toram-todisk.sh | 103 ++ system-boot/frontend/live-boot | 20 + system-boot/frontend/live-swapfile | 100 ++ system-boot/manpages/Makefile | 57 + system-boot/manpages/bin/update-version.sh | 54 + system-boot/manpages/en/live-boot.7 | 214 +++ system-boot/manpages/en/persistence.conf.5 | 206 +++ system-boot/manpages/es/live-boot.es.7 | 303 ++++ system-boot/manpages/es/persistence.conf.es.5 | 224 +++ system-boot/manpages/fr/live-boot.fr.7 | 306 ++++ system-boot/manpages/fr/persistence.conf.fr.5 | 224 +++ system-boot/manpages/ja/live-boot.ja.7 | 229 +++ system-boot/manpages/ja/persistence.conf.ja.5 | 155 ++ system-boot/manpages/po/es/live-boot.7.po | 1077 ++++++++++++++ system-boot/manpages/po/es/persistence.conf.5.po | 634 ++++++++ system-boot/manpages/po/fr/live-boot.7.po | 1080 ++++++++++++++ system-boot/manpages/po/fr/persistence.conf.5.po | 634 ++++++++ system-boot/manpages/po/ja/live-boot.7.po | 1058 +++++++++++++ system-boot/manpages/po/ja/persistence.conf.5.po | 615 ++++++++ system-boot/manpages/po4a.cfg | 4 + system-boot/manpages/pot/live-boot.7.pot | 890 +++++++++++ system-boot/manpages/pot/persistence.conf.5.pot | 510 +++++++ 50 files changed, 13629 insertions(+) create mode 100644 system-boot/CHANGELOG.txt create mode 100644 system-boot/COPYING create mode 100644 system-boot/Makefile create mode 100644 system-boot/VERSION create mode 100755 system-boot/backend/dracut/live.script create mode 100644 system-boot/backend/initramfs-tools/kms.hook create mode 100755 system-boot/backend/initramfs-tools/live.hook create mode 100755 system-boot/backend/initramfs-tools/live.script create mode 100755 system-boot/components/0001-init-vars.sh create mode 100755 system-boot/components/0010-debug create mode 100755 system-boot/components/0020-read-only create mode 100755 system-boot/components/0030-verify-checksums create mode 100755 system-boot/components/2010-remove-persistence create mode 100755 system-boot/components/3020-swap create mode 100755 system-boot/components/9990-cmdline-old create mode 100755 system-boot/components/9990-fstab.sh create mode 100755 system-boot/components/9990-initramfs-tools.sh create mode 100755 system-boot/components/9990-main.sh create mode 100755 system-boot/components/9990-misc-helpers.sh create mode 100755 system-boot/components/9990-mount-cifs.sh create mode 100755 system-boot/components/9990-mount-http.sh create mode 100755 system-boot/components/9990-mount-iscsi.sh create mode 100755 system-boot/components/9990-mount-nfs.sh create mode 100755 system-boot/components/9990-netbase.sh create mode 100755 system-boot/components/9990-netboot.sh create mode 100755 system-boot/components/9990-networking.sh create mode 100755 system-boot/components/9990-overlay.sh create mode 100755 system-boot/components/9990-select-eth-device.sh create mode 100755 system-boot/components/9990-toram-todisk.sh create mode 100755 system-boot/frontend/live-boot create mode 100755 system-boot/frontend/live-swapfile create mode 100644 system-boot/manpages/Makefile create mode 100755 system-boot/manpages/bin/update-version.sh create mode 100644 system-boot/manpages/en/live-boot.7 create mode 100644 system-boot/manpages/en/persistence.conf.5 create mode 100644 system-boot/manpages/es/live-boot.es.7 create mode 100644 system-boot/manpages/es/persistence.conf.es.5 create mode 100644 system-boot/manpages/fr/live-boot.fr.7 create mode 100644 system-boot/manpages/fr/persistence.conf.fr.5 create mode 100644 system-boot/manpages/ja/live-boot.ja.7 create mode 100644 system-boot/manpages/ja/persistence.conf.ja.5 create mode 100644 system-boot/manpages/po/es/live-boot.7.po create mode 100644 system-boot/manpages/po/es/persistence.conf.5.po create mode 100644 system-boot/manpages/po/fr/live-boot.7.po create mode 100644 system-boot/manpages/po/fr/persistence.conf.5.po create mode 100644 system-boot/manpages/po/ja/live-boot.7.po create mode 100644 system-boot/manpages/po/ja/persistence.conf.5.po create mode 100644 system-boot/manpages/po4a.cfg create mode 100644 system-boot/manpages/pot/live-boot.7.pot create mode 100644 system-boot/manpages/pot/persistence.conf.5.pot (limited to 'system-boot') diff --git a/system-boot/CHANGELOG.txt b/system-boot/CHANGELOG.txt new file mode 100644 index 0000000..c7af538 --- /dev/null +++ b/system-boot/CHANGELOG.txt @@ -0,0 +1,142 @@ +2018-09-15 Daniel Baumann + + * Releasing version 20180915. + + [ Raphaël Hertzog ] + * Fixing typo in nls_ascii module (nls_asci -> nls_ascii). + * Improving removable_dev() in 9990-misc-helpers.sh when /sys/block/ is empty (#847802). + * Only copying /etc/live/boot if it exists. + * Do not duplicate files in /lib/live/boot/ and /bin/boot/ in the initrd, thanks to Daniel Reichelt (#864385). + * Fixing spelling errors in live-boot(7). + + [ Ronny Standtke ] + * Fixing read-only persistence mode with overlayfs, thanks to Ronny Standtke (Closes: #877776). + + [ Benjamin Drung ] + * Don't replace busybox's wget by the true wget (#885455). + * Avoiding double slashes in some paths (#885453). + * Support setting upperdir tmpfs size with overlay-size boot parameter (#885466). + * Simplify mount point handling by using /run/live instead of /lib/live/mount (#886328). + * Adding configuration variables to build a stripped down initrd (#886337). + + [ Daniel Reichelt ] + * Using klibc's mount again for fuse mounts (#868559). + + [ Raphaël Hertzog ] + * Stripping comments from checksums files passed to "shaXsum -c" (#856482). + + [ raizo62] + * Updating DNSFILE even if DNSFILE contains only commented or empty lines. + + [ Sameer Agrawal ] + * Fixing ifconfig parsing (#892772). + + [ Chas Williams ] + * Adding back persistance fsck option. + + [ Luca Boccassi ] + * Using true|false instead of y|n for environment variables. + + [ Charles Williams ] Removing workaround for ipconfig issues. + * Fixing custom mounts after switch to /run/live. + + [ Luca Boccassi ] + * Fixing fromiso after switch to /run/live. + + [ Benjamin Drung ] + * Fixing overlay mount after switch to /run/live. + * Removing sourcing /scripts/functions in components. + * Support live-{top,premount,bottom} hooks (#884355). + + [ Luca Boccassi ] + * Adding backward compatibility rbind mount /lib/live/mount -> /run/live. + + [ Erik Ziegenbalg ] + * Adding support for local ISO in fromiso (ONIE). + + [ Luca Boccassi ] + * Clarify fromiso documentation in live-boot manpage. + * Fixing typos in recently added manpage changes. + + [ Benjamin Drung ] + * Fixing resolving FQDN given by DHCP. + * Double quoting to prevent globbing and word splitting. + +2016-11-01 Daniel Baumann + + * Releasing version 20161101. + + [ Kristian Klausen ] + * Adding FAT ascii iocharset support. + * Adding option to override UUID embedded in the initramfs (live-media-uuid). + * Adding option to specific alternative mount opts for live-media (live-media-mount-opts). + + [ Gaudenz Steinlin ] + * Immediately detecting medium from live-media parameter. + * Fixing removable device flag handling for live-medium. + * Adding plymouth support for LUKS password prompt. + * Using human readable device label for LUKS prompt. + * Using build UUID in initramfs. + +2016-07-01 Daniel Baumann + + * Releasing version 20160701. + + [ Kristian Klausen ] + * Copying /etc/live/boot{,.conf} to initramfs. + * Checking /etc/live/boot.conf exist before trying copy. + + [ Daniel Baumann ] + * Adding commit messages to previous changelog. + +2016-06-01 Daniel Baumann + + * Releasing version 20160601. + + [ trebmuh ] + * Adding French manpage translations. + + [ Carlos Zuferri ] + * Using 'Live Systems Project' as default project in .pot files. + + [ Evgeni Golov ] + * Updating manpages with default overlay filesystem. + + [ Michael Prokop ] + * Reverting toram bootoption to expected behaviour. + * Supporting dns bootoption. + + [ Ulrich Dangel ] + * Adding kms modules to initramfs. + + [ Michael Prokop ] + * Try loading phram module twice to fix loading issue. + * Ignoring "unknown" filesystems in is_supported_fs(). + * Enabling write-mode for persistency related devices in readonly/forensic mode. + + [ Evgeni Golov ] + * Making copying libnss_dns.so.* unconditionally. + * Fixing nodhcp option to actually force DHCP off (Closes: #832734). + + [ Wolfgang Scheicher ] + * Enabling multiple lower layers for overlayfs. + + [ Russell Stuart ] + * Setting default host in fetch urls to be ROOTSERVER if it is blank (Closes: #832735). + + [ Evgeni Golov ] + * Fixing detection of (no)persistence option in read-only mode. + + [ Daniel Baumann ] + * Correcting spelling typo in variable name in live-boot frontend, thanks to Gianfranco Costamagna . + + [ Raphaël Hertzog ] + * No longer modifying PATH to point to /root and thus stop using executables from /root (Closes: #823069). + * Some fixups to ensure we work with busybox/klibc-utils. + + [ Daniel Baumann ] + * Correcting version string in changelog. + +2016-05-01 Daniel Baumann + + * Releasing version 20160501. diff --git a/system-boot/COPYING b/system-boot/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/system-boot/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/system-boot/Makefile b/system-boot/Makefile new file mode 100644 index 0000000..e3f3946 --- /dev/null +++ b/system-boot/Makefile @@ -0,0 +1,132 @@ +# Makefile + +SHELL := sh -e + +LANGUAGES = $(shell cd manpages/po && ls) + +SCRIPTS = backend/*/* frontend/* components/* + +all: build + +test: + @echo -n "Checking for syntax errors" + + @for SCRIPT in $(SCRIPTS); \ + do \ + sh -n $${SCRIPT}; \ + echo -n "."; \ + done + + @echo " done." + + @# We can't just fail yet on bashisms (FIXME) + @if [ -x "$$(which checkbashisms 2>/dev/null)" ]; \ + then \ + echo -n "Checking for bashisms"; \ + for SCRIPT in $(SCRIPTS); \ + do \ + checkbashisms -f -x $${SCRIPT} || true; \ + echo -n "."; \ + done; \ + echo " done."; \ + else \ + echo "W: checkbashisms - command not found"; \ + echo "I: checkbashisms can be obtained from: "; \ + echo "I: http://git.debian.org/?p=devscripts/devscripts.git"; \ + echo "I: On Debian based systems, checkbashisms can be installed with:"; \ + echo "I: apt-get install devscripts"; \ + fi + +build: + @echo "Nothing to build." + +install: + # Installing components + mkdir -p $(DESTDIR)/lib/live/boot + cp components/* $(DESTDIR)/lib/live/boot + + # Installing executables + mkdir -p $(DESTDIR)/usr/share/initramfs-tools/hooks + cp backend/initramfs-tools/live.hook $(DESTDIR)/usr/share/initramfs-tools/hooks/live + mkdir -p $(DESTDIR)/usr/share/initramfs-tools/scripts + cp backend/initramfs-tools/live.script $(DESTDIR)/usr/share/initramfs-tools/scripts/live + + mkdir -p $(DESTDIR)/bin + cp frontend/* $(DESTDIR)/bin + + # Installing docs + mkdir -p $(DESTDIR)/usr/share/doc/live-boot + cp -r COPYING $(DESTDIR)/usr/share/doc/live-boot + + # Installing manpages + for MANPAGE in manpages/en/*; \ + do \ + SECTION="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \ + install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE}); \ + done + + for LANGUAGE in $(LANGUAGES); \ + do \ + for MANPAGE in manpages/$${LANGUAGE}/*; \ + do \ + SECTION="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \ + install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \ + done; \ + done + +uninstall: + # Uninstalling executables + rm -f $(DESTDIR)/bin/live-boot + rm -f $(DESTDIR)/bin/live-swapfile + rmdir --ignore-fail-on-non-empty $(DESTDIR)/bin > /dev/null 2>&1 || true + + rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live + rm -f $(DESTDIR)/usr/share/initramfs-tools/scripts/live + + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/hooks > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true + + # Uninstalling docs + rm -rf $(DESTDIR)/usr/share/doc/live-boot + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/doc > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true + + # Uninstalling manpages + for MANPAGE in manpages/en/*; \ + do \ + SECTION="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \ + rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE} .en.$${SECTION}).$${SECTION}; \ + done + + for LANGUAGE in $(LANGUAGES); \ + do \ + for MANPAGE in manpages/$${LANGUAGE}/*; \ + do \ + SECTION="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \ + rm -f $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \ + done; \ + done + + for SECTION in $(for MANPAGE in $(ls manpages/en/*); do basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1; done | sort -u); \ + do \ + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/man$${SECTION} > /dev/null 2>&1 || true; \ + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/*/man$${SECTION} > /dev/null 2>&1 || true; \ + done + + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true + + rmdir --ignore-fail-on-non-empty $(DESTDIR) > /dev/null 2>&1 || true + +clean: + @echo "Nothing to clean." + +distclean: clean + @echo "Nothing to distclean." + +reinstall: uninstall install diff --git a/system-boot/VERSION b/system-boot/VERSION new file mode 100644 index 0000000..aeee441 --- /dev/null +++ b/system-boot/VERSION @@ -0,0 +1 @@ +20180915 diff --git a/system-boot/backend/dracut/live.script b/system-boot/backend/dracut/live.script new file mode 100755 index 0000000..0774bfb --- /dev/null +++ b/system-boot/backend/dracut/live.script @@ -0,0 +1,11 @@ +#!/bin/sh + +#set -e + +. /bin/live-boot + +DRACUT_FIXME () +{ + # dracut entry point for live-boot is FIXME(); function + Live +} diff --git a/system-boot/backend/initramfs-tools/kms.hook b/system-boot/backend/initramfs-tools/kms.hook new file mode 100644 index 0000000..7302c12 --- /dev/null +++ b/system-boot/backend/initramfs-tools/kms.hook @@ -0,0 +1,25 @@ +#!/bin/sh +# hook for adding kms modules + +set -e + +# initramfs-tools header + +PREREQ="" +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +for module in i915 radeon nouveau ; do + manual_add_modules $module +done diff --git a/system-boot/backend/initramfs-tools/live.hook b/system-boot/backend/initramfs-tools/live.hook new file mode 100755 index 0000000..a5444c5 --- /dev/null +++ b/system-boot/backend/initramfs-tools/live.hook @@ -0,0 +1,254 @@ +#!/bin/sh + +set -e + +. /usr/share/initramfs-tools/hook-functions + +[ "${QUIET}" ] || echo -n "live-boot:" + +# Reading configuration file from filesystem and live-media +for _FILE in /etc/live/boot.conf /etc/live/boot/* \ + /run/live/medium/live/boot.conf /run/live/medium/live/boot/* +do + if [ -e "${_FILE}" ] + then + . "${_FILE}" + fi +done + +# Checking live-boot +if [ ! -e /bin/live-boot ] +then + echo + echo "W: live-boot-initramfs-tools (backend) installed without live-boot," + echo "W: this initramfs will *NOT* have live support." + exit 0 +fi + +[ "${QUIET}" ] || echo -n " core" + +mkdir -p "${DESTDIR}/bin" +cp -a /bin/live-boot "${DESTDIR}/bin" + +mkdir -p "${DESTDIR}/lib/live" +cp -a /lib/live/boot "${DESTDIR}/lib/live" + +mkdir -p "${DESTDIR}/etc/live" +if [ -e /etc/live/boot.conf ] +then + cp -a /etc/live/boot.conf "${DESTDIR}/etc/live" +fi +if [ -e /etc/live/boot ] +then + cp -a /etc/live/boot "${DESTDIR}/etc/live" +fi + +# klibc dependencies +for FILE in /lib/libacl* /lib/libblkid* /lib/libuuid* /lib/libdevmapper* /lib/libattr* +do + if [ ! -e "${DESTDIR}/${FILE}" ] && ls "${FILE}" > /dev/null 2>&1 + then + cp -a "${FILE}" "${DESTDIR}/${FILE}" + fi +done + +# udev dependencies +if [ "${MINIMAL:-}" != "true" ] && [ "${MINIMAL:-}" != "yes" ] +then + for FILE in /lib/udev/*_id + do + copy_exec "${FILE}" + done +fi + +if [ -e /lib/udev/rules.d/60-cdrom_id.rules ] && [ "${DISABLE_CDROM:-}" != "true" ] && \ + [ "${DISABLE_CDROM:-}" != "yes" ] +then + mkdir -p "${DESTDIR}/lib/udev/rules.d" + cp -p /lib/udev/rules.d/60-cdrom_id.rules "${DESTDIR}/lib/udev/rules.d" +fi + +[ "${QUIET}" ] || echo -n " filesystems" + +# Configuration: keymap (usefull when using encryption) +if [ -x /bin/loadkeys ] && [ -r /etc/console/boottime.kmap.gz ] +then + copy_exec /bin/loadkeys + + mkdir -p "${DESTDIR}/etc" + cp /etc/console/boottime.kmap.gz "${DESTDIR}/etc" +fi + +# Configuration: Unique ID +if [ -r /etc/live/uuid.conf ] +then + mkdir -p "${DESTDIR}/conf" + cp /etc/live/uuid.conf ${DESTDIR}/conf +fi + +# Filesystem: btrfs +manual_add_modules btrfs + +# Filesystem: cifs +if [ -x /sbin/mount.cifs ] +then + copy_exec /sbin/mount.cifs + manual_add_modules cifs +fi + +# Filesystem: ext3/ext4 +manual_add_modules ext3 +manual_add_modules ext4 + +# Filesystem: hfs/hfsplus +manual_add_modules hfs +manual_add_modules hfsplus + +# Filesystem: jffs2 +manual_add_modules jffs2 + +if [ -x /usr/bin/rsync ] && [ "${MINIMAL:-}" != "true" ] && [ "${MINIMAL:-}" != "yes" ] +then + copy_exec /usr/bin/rsync /bin +fi + +# Filesystem: squashfs +copy_exec /sbin/losetup +manual_add_modules loop +manual_add_modules squashfs +manual_add_modules sqlzma +manual_add_modules unlzma + +# Filesystem: aufs/overlay +manual_add_modules aufs +manual_add_modules overlay + +# Filesystem: vfat +if [ "${DISABLE_FAT:-}" != "true" ] && [ "${DISABLE_FAT:-}" != "yes" ] +then + manual_add_modules nls_cp437 + manual_add_modules nls_iso8859-1 + manual_add_modules nls_utf8 + manual_add_modules nls_ascii + manual_add_modules vfat +fi + +# Filesystem: ntfs +if [ "${DISABLE_NTFS:-}" != "true" ] && [ "${DISABLE_NTFS:-}" != "yes" ] +then + manual_add_modules ntfs +fi + +[ "${QUIET}" ] || echo -n " devices" +# Hardware: cdrom +if [ "${DISABLE_CDROM:-}" != "true" ] && [ "${DISABLE_CDROM:-}" != "yes" ] +then + manual_add_modules ide-cd + manual_add_modules ide-generic + manual_add_modules ohci1394 + manual_add_modules sbp2 + manual_add_modules sr_mod +fi + +# Hardware: usb +if [ "${DISABLE_USB:-}" != "true" ] && [ "${DISABLE_USB:-}" != "yes" ] +then + manual_add_modules sd_mod +fi + +# Hardware: network +auto_add_modules net + +# Program: eject +if [ -x /usr/bin/eject ] +then + copy_exec /usr/bin/eject /bin +fi + +[ "${QUIET}" ] || echo -n " utils" + +# Feature: Verify Checksums +if [ -e /etc/progress-linux_version ] +then + copy_exec /usr/bin/sha256sum /bin +else + copy_exec /usr/bin/md5sum /bin +fi + +# Program: memdisk +if [ -x /usr/bin/memdiskfind ] +then +[ "${QUIET}" ] || echo -n " memdisk" + copy_exec /usr/bin/memdiskfind + manual_add_modules phram + manual_add_modules mtdblock +fi + +# Program: udev +if [ -x /sbin/udevadm ] +then + [ "${QUIET}" ] || echo -n " udev" + copy_exec /sbin/udevadm +fi + +# Program: blockdev +if [ -x /sbin/blockdev ] +then + [ "${QUIET}" ] || echo -n " blockdev" + copy_exec /sbin/blockdev +fi + +# FUSE kernel module +if [ "${DISABLE_FUSE:-n}" != "true" ] && [ "${DISABLE_FUSE:-n}" != "yes" ] +then + manual_add_modules fuse + + # FUSE filesystem: httpfs2 + if [ -x /usr/bin/httpfs2_ssl ] + then + [ "${QUIET}" ] || echo -n " httpfs:ssl" + copy_exec /usr/bin/httpfs2_ssl /bin/httpfs + elif [ -x /usr/bin/httpfs2 ] + then + [ "${QUIET}" ] || echo -n " httpfs" + copy_exec /usr/bin/httpfs2 /bin/httpfs + fi + + # FUSE filesystem: curlftpfs + if [ -x /usr/bin/curlftpfs ] + then + [ "${QUIET}" ] || echo -n " ftpfs" + copy_exec /usr/bin/curlftpfs /bin + fi +fi + +# iSCSI +if [ -x /usr/sbin/iscsistart ] +then + [ "${QUIET}" ] || echo -n " iscsi" + copy_exec /usr/sbin/iscsistart /bin + #manual_add_modules ib_iser + manual_add_modules iscsi_tcp + manual_add_modules crc32c +fi + +# Some experimental stuff + +[ "${QUIET}" ] || echo -n " dns" + +# /lib/libnss_dns.so.*:a DNS +# /lib/libnss_files.so.*: /etc/hosts and /etc/passwd +# /lib/libnss_compat.so.*: /etc/passwd + +for _SHLIB in $(find /lib -name 'libnss_dns.so.*' -o -name 'libnss_files.so.*') +do + copy_exec "${_SHLIB}" +done + +if [ ! -e "${DESTDIR}/etc/nsswitch.conf" ] +then + # Needed to make "hostname -f" honor the domainname provided by DHCP + echo "hosts: files dns" > "${DESTDIR}/etc/nsswitch.conf" +fi + +[ "${QUIET}" ] || echo . diff --git a/system-boot/backend/initramfs-tools/live.script b/system-boot/backend/initramfs-tools/live.script new file mode 100755 index 0000000..5bec741 --- /dev/null +++ b/system-boot/backend/initramfs-tools/live.script @@ -0,0 +1,59 @@ +# Live system filesystem mounting -*- shell-script -*- + +. /bin/live-boot + +live_top() +{ + if [ "${live_top_used}" != "yes" ]; then + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-top" + run_scripts /scripts/live-top + [ "$quiet" != "y" ] && log_end_msg + fi + live_top_used=yes +} + +live_premount() +{ + if [ "${live_premount_used}" != "yes" ]; then + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-premount" + run_scripts /scripts/live-premount + [ "$quiet" != "y" ] && log_end_msg + fi + live_premount_used=yes +} + +live_bottom() +{ + if [ "${live_premount_used}" = "yes" ] || [ "${live_top_used}" = "yes" ]; then + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-bottom" + run_scripts /scripts/live-bottom + [ "$quiet" != "y" ] && log_end_msg + fi + live_premount_used=no + live_top_used=no +} + + +mountroot() +{ + # initramfs-tools entry point for live-boot is mountroot(); function + Live +} + +mount_top() +{ + # Note, also called directly in case it's overridden. + live_top +} + +mount_premount() +{ + # Note, also called directly in case it's overridden. + live_premount +} + +mount_bottom() +{ + # Note, also called directly in case it's overridden. + live_bottom +} diff --git a/system-boot/components/0001-init-vars.sh b/system-boot/components/0001-init-vars.sh new file mode 100755 index 0000000..603cf43 --- /dev/null +++ b/system-boot/components/0001-init-vars.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +mountpoint="/run/live/medium" +alt_mountpoint="/media" +LIVE_MEDIA_PATH="live" +HOSTNAME="host" +custom_overlay_label="persistence" +persistence_list="persistence.conf" + +mkdir -p "${mountpoint}" +mkdir -p /var/lib/live/boot diff --git a/system-boot/components/0010-debug b/system-boot/components/0010-debug new file mode 100755 index 0000000..cfb2fc8 --- /dev/null +++ b/system-boot/components/0010-debug @@ -0,0 +1,27 @@ +#!/bin/sh + +#set -e + +Debug () +{ + for _PARAMETER in ${LIVE_BOOT_CMDLINE} + do + case "${_PARAMETER}" in + live-boot.debug|debug) + LIVE_BOOT_DEBUG="true" + ;; + esac + done + + case "${LIVE_BOOT_DEBUG}" in + true) + ;; + + *) + return 0 + ;; + esac + + # Write the trace output + set -x +} diff --git a/system-boot/components/0020-read-only b/system-boot/components/0020-read-only new file mode 100755 index 0000000..f56b8cf --- /dev/null +++ b/system-boot/components/0020-read-only @@ -0,0 +1,72 @@ +#!/bin/sh + +#set -e + +Read_only () +{ + for _PARAMETER in ${LIVE_BOOT_CMDLINE} + do + case "${_PARAMETER}" in + live-boot.read-only=*|read-only=*) + LIVE_READ_ONLY="true" + LIVE_READ_ONLY_DEVICES="${_PARAMETER#*read-only=}" + ;; + + live-boot.read-only|read-only) + LIVE_READ_ONLY="true" + ;; + esac + done + + case "${LIVE_READ_ONLY}" in + true) + ;; + + *) + return 0 + ;; + esac + + # Marking some block devices as read-only to ensure that nothing + # gets written as linux still writes to 'only' read-only mounted filesystems. + LIVE_READ_ONLY_DEVICES="${LIVE_READ_ONLY_DEVICES:-/dev/sd* /dev/vd*}" + + for _DEVICE in $(echo ${LIVE_READ_ONLY_DEVICES} | sed -e 's|,| |g') + do + if [ ! -b "${_DEVICE}" ] + then + continue + fi + + echo -n "live-boot: Setting ${_DEVICE} read-only..." > /dev/console + + blockdev --setro ${_DEVICE} + _RETURN="${?}" + + case "${_RETURN}" in + 0) + echo " done, use 'blockdev --setrw ${_DEVICE}' to set read-write." > /dev/console + ;; + + *) + echo " failed." > /dev/console + ;; + esac + done + + if grep -qw persistence /proc/cmdline + then + printf " * Persistence mode enabled, searching for persistency related devices to unlock\n" >/dev/console + + for label in custom-ov home-rw home-sn live-rw live-sn persistence + do + if blkid -t LABEL="$label" | grep -q '.' + then + device=$(blkid -t LABEL="$label" | awk -F: '{print $1}') + printf " - Setting device %-9s with label '%s' to write mode for persistence mode: " "$device" "$label" >/dev/console + blockdev --setrw $device && printf "done\n" >/dev/console || printf "failed\n" >/dev/console + fi + done + fi + +} diff --git a/system-boot/components/0030-verify-checksums b/system-boot/components/0030-verify-checksums new file mode 100755 index 0000000..4453558 --- /dev/null +++ b/system-boot/components/0030-verify-checksums @@ -0,0 +1,89 @@ +#!/bin/sh + +#set -e + +Verify_checksums () +{ + for _PARAMETER in ${LIVE_BOOT_CMDLINE} + do + case "${_PARAMETER}" in + live-boot.verify-checksums=*|verify-checksums=*) + LIVE_VERIFY_CHECKSUMS="true" + LIVE_VERIFY_CHECKSUMS_DIGESTS="${_PARAMETER#*verify-checksums=}" + ;; + + live-boot.verify-checksums|verify-checksums) + LIVE_VERIFY_CHECKSUMS="true" + ;; + esac + done + + case "${LIVE_VERIFY_CHECKSUMS}" in + true) + ;; + + *) + return 0 + ;; + esac + + _MOUNTPOINT="${1}" + + LIVE_VERIFY_CHECKSUMS_DIGESTS="${LIVE_VERIFY_CHECKSUMS_DIGESTS:-sha512 sha384 sha256 sha224 sha1 md5}" + _TTY="/dev/tty8" + + log_begin_msg "Verifying checksums" + + cd "${_MOUNTPOINT}" + + for _DIGEST in $(echo ${LIVE_VERIFY_CHECKSUMS_DIGESTS} | sed -e 's|,| |g') + do + _CHECKSUMS="$(echo ${_DIGEST} | tr [a-z] [A-Z])SUMS ${_DIGEST}sum.txt" + + for _CHECKSUM in ${_CHECKSUMS} + do + if [ -e "${_CHECKSUM}" ] + then + echo "Found ${_CHECKSUM}..." > "${_TTY}" + + if [ -e "/bin/${_DIGEST}sum" ] + then + echo "Checking ${_CHECKSUM}..." > "${_TTY}" + + # Verify checksums + grep -v '^#' "${_CHECKSUM}" | /bin/${_DIGEST}sum -c > "${_TTY}" + _RETURN="${?}" + + # Stop after first verification + break + else + echo "Not found /bin/${_DIGEST}sum..." > "${_TTY}" + fi + fi + done + done + + log_end_msg + + case "${_RETURN}" in + 0) + log_success_msg "Verification successfull, rebooting in 10 seconds." + sleep 10 + + # Unmount live-media + cd / + umount -f "${_MOUNTPOINT}" > /dev/null 2>&1 + sync + + # Attempt to remount all mounted filesystems read-only + echo u > /proc/sysrq-trigger + + # Immediately reboot the system without syncing or unmounting filesystems + echo b > /proc/sysrq-trigger + ;; + + *) + panic "Verification failed, $(basename ${_TTY}) for more information." + ;; + esac +} diff --git a/system-boot/components/2010-remove-persistence b/system-boot/components/2010-remove-persistence new file mode 100755 index 0000000..717a408 --- /dev/null +++ b/system-boot/components/2010-remove-persistence @@ -0,0 +1,31 @@ +#!/bin/sh + +#set -e + +Remove_persistence () +{ + for _PARAMETER in ${LIVE_BOOT_CMDLINE} + do + case "${_PARAMETER}" in + live-boot.persistence-remove=*|persistence-remove=*) + LIVE_PERSISTENCE_REMOVE="${_PARAMETER#*persistence-remove=}" + ;; + + live-boot.persistence-remove|persistence-remove) + LIVE_PERSISTENCE_REMOVE="true" + ;; + esac + done + + case "${LIVE_PERSISTENCE_REMOVE}" in + true) + ;; + + *) + return 0 + ;; + esac + + # Remove persistence + cd /run/live/overlay && find . -not -name 'persistence.conf' | xargs rm -rf +} diff --git a/system-boot/components/3020-swap b/system-boot/components/3020-swap new file mode 100755 index 0000000..345b9a0 --- /dev/null +++ b/system-boot/components/3020-swap @@ -0,0 +1,62 @@ +#!/bin/sh + +#set -e + +Swap () +{ + for _PARAMETER in ${LIVE_BOOT_CMDLINE} + do + case "${_PARAMETER}" in + live-boot.swap=*|swap=*) + LIVE_SWAP="true" + LIVE_SWAP_DEVICES="${_PARAMETER#*swap=}" + ;; + + live-boot.swap|swap) + LIVE_SWAP="true" + ;; + esac + done + + case "${LIVE_SWAP}" in + true) + ;; + + *) + return 0 + ;; + esac + + LIVE_SWAP_DEVICES="${LIVE_SWAP_DEVICES:-/dev/sd* /dev/vd*}" + + for _DEVICE in $(echo ${LIVE_SWAP_DEVICES} | sed -e 's|,| |g') + do + if [ ! -b "${_DEVICE}" ] + then + continue + fi + + blkid -o udev -p ${_DEVICE%%[0-9]*} | grep -q "^ID_FS_USAGE=raid" && continue + + _MAGIC="$(/bin/dd if=${_DEVICE} bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null)" || continue + + case "${_MAGIC}" in + SWAPSPACE2|SWAP-SPACE) + _SWAP_DEVICES="${_SWAP_DEVICES} ${_DEVICE}" + ;; + esac + done + + # Remove all auto swap entries + if grep -qs "swap swap" /root/etc/fstab + then + grep -v "swap swap" /root/etc/fstab > /root/etc/fstab.tmp + mv /root/etc/fstab.tmp /root/etc/fstab + fi + + # Add new swap entries + for _DEVICE in ${_SWAP_DEVICES} + do + echo "${_DEVICE} swap swap defaults 0 0" >> /root/etc/fstab + done +} diff --git a/system-boot/components/9990-cmdline-old b/system-boot/components/9990-cmdline-old new file mode 100755 index 0000000..dad5ecb --- /dev/null +++ b/system-boot/components/9990-cmdline-old @@ -0,0 +1,327 @@ +#!/bin/sh + +#set -e + +Cmdline_old () +{ + for _PARAMETER in ${LIVE_BOOT_CMDLINE} + do + case "${_PARAMETER}" in + skipconfig) + NOFSTAB="true" + NONETWORKING="true" + + export NOFSTAB NONETWORKING + ;; + + BOOTIF=*) + BOOTIF="${_PARAMETER#BOOTIF=}" + ;; + dns=*) + DNS=${_PARAMETER#dns=} + DNSSERVERS=$(echo ${DNS} | sed 's/,/ /g') + export DNSSERVERS + unset DNS + ;; + dhcp) + # Force dhcp even while netbooting + # Use for debugging in case somebody works on fixing dhclient + DHCP="true"; + export DHCP + ;; + + nodhcp) + DHCP="" + export DHCP + NODHCP="true" + export NODHCP + ;; + + ethdevice=*) + DEVICE="${_PARAMETER#ethdevice=}" + ETHDEVICE="${DEVICE}" + export DEVICE ETHDEVICE + ;; + + ethdevice-timeout=*) + ETHDEV_TIMEOUT="${_PARAMETER#ethdevice-timeout=}" + export ETHDEV_TIMEOUT + ;; + + fetch=*) + FETCH="${_PARAMETER#fetch=}" + export FETCH + ;; + + findiso=*) + FINDISO="${_PARAMETER#findiso=}" + export FINDISO + ;; + + ftpfs=*) + FTPFS="${_PARAMETER#ftpfs=}" + export FTPFS + ;; + + httpfs=*) + HTTPFS="${_PARAMETER#httpfs=}" + export HTTPFS + ;; + + iscsi=*) + ISCSI="${_PARAMETER#iscsi=}" + #ip:port - separated by ; + ISCSI_PORTAL="${ISCSI%;*}" + if echo "${ISCSI_PORTAL}" | grep -q , ; then + ISCSI_SERVER="${ISCSI_PORTAL%,*}" + ISCSI_PORT="${ISCSI_PORTAL#*,}" + fi + #target name + ISCSI_TARGET="${ISCSI#*;}" + export ISCSI ISCSI_PORTAL ISCSI_TARGET ISCSI_SERVER ISCSI_PORT + ;; + + isofrom=*|fromiso=*) + FROMISO="${_PARAMETER#*=}" + export FROMISO + ;; + + ignore_uuid) + IGNORE_UUID="true" + export IGNORE_UUID + ;; + + ip=*) + STATICIP="${_PARAMETER#ip=}" + + if [ -z "${STATICIP}" ] + then + STATICIP="frommedia" + fi + + export STATICIP + ;; + + live-media=*|bootfrom=*) + LIVE_MEDIA="${_PARAMETER#*=}" + export LIVE_MEDIA + ;; + + live-media-uuid=*) + LIVE_MEDIA_UUID="${_PARAMETER#*=}" + export LIVE_MEDIA_UUID + ;; + + live-media-mount-opts=*) + LIVE_MEDIA_MOUNT_OPTS="${_PARAMETER#*=}" + export LIVE_MEDIA_MOUNT_OPTS + ;; + + live-media-encryption=*|encryption=*) + LIVE_MEDIA_ENCRYPTION="${_PARAMETER#*=}" + export LIVE_MEDIA_ENCRYPTION + ;; + + live-media-offset=*) + LIVE_MEDIA_OFFSET="${_PARAMETER#live-media-offset=}" + export LIVE_MEDIA_OFFSET + ;; + + live-media-path=*) + LIVE_MEDIA_PATH="${_PARAMETER#live-media-path=}" + export LIVE_MEDIA_PATH + ;; + + live-media-timeout=*) + LIVE_MEDIA_TIMEOUT="${_PARAMETER#live-media-timeout=}" + export LIVE_MEDIA_TIMEOUT + ;; + + module=*) + MODULE="${_PARAMETER#module=}" + export MODULE + ;; + + netboot=*) + NETBOOT="${_PARAMETER#netboot=}" + export NETBOOT + ;; + + nfsopts=*) + NFSOPTS="${_PARAMETER#nfsopts=}" + export NFSOPTS + ;; + + nfsoverlay=*) + NFS_COW="${_PARAMETER#nfsoverlay=}" + export NFS_COW + ;; + + nofstab) + NOFSTAB="true" + export NOFSTAB + ;; + + nonetworking) + NONETWORKING="true" + export NONETWORKING + ;; + + ramdisk-size=*) + ramdisk_size="${_PARAMETER#ramdisk-size=}" + ;; + + overlay-size=*) + OVERLAY_SIZE="${_PARAMETER#overlay-size=}" + export OVERLAY_SIZE + ;; + + persistence) + PERSISTENCE="true" + export PERSISTENCE + ;; + + persistence-encryption=*) + PERSISTENCE_ENCRYPTION="${_PARAMETER#*=}" + export PERSISTENCE_ENCRYPTION + ;; + + persistence-media=*) + PERSISTENCE_MEDIA="${_PARAMETER#*=}" + export PERSISTENCE_MEDIA + ;; + persistence-method=*) + PERSISTENCE_METHOD="${_PARAMETER#*=}" + export PERSISTENCE_METHOD + ;; + + persistence-path=*) + PERSISTENCE_PATH="${_PARAMETER#persistence-path=}" + export PERSISTENCE_PATH + ;; + persistence-read-only) + PERSISTENCE_READONLY="true" + export PERSISTENCE_READONLY + ;; + + persistence-storage=*) + PERSISTENCE_STORAGE="${_PARAMETER#persistence-storage=}" + export PERSISTENCE_STORAGE + ;; + + persistence-label=*) + custom_overlay_label="${_PARAMETER#persistence-label=*}" + ;; + + nopersistence) + NOPERSISTENCE="true" + export NOPERSISTENCE + ;; + + quickusbmodules) + QUICKUSBMODULES="true" + export QUICKUSBMODULES + ;; + + todisk=*) + TODISK="${_PARAMETER#todisk=}" + export TODISK + ;; + + toram) + TORAM="true" + export TORAM + ;; + + toram=*) + TORAM="true" + MODULETORAM="${_PARAMETER#toram=}" + export TORAM MODULETORAM + ;; + + exposedroot) + EXPOSED_ROOT="true" + export EXPOSED_ROOT + ;; + + plainroot) + PLAIN_ROOT="true" + export PLAIN_ROOT + ;; + + skipunion) + SKIP_UNION_MOUNTS="true" + export SKIP_UNION_MOUNTS + ;; + + root=*) + ROOT="${_PARAMETER#root=}" + export ROOT + ;; + + union=*) + UNIONTYPE="${_PARAMETER#union=}" + export UNIONTYPE + ;; + esac + done + + # sort of compatibility with netboot.h from linux docs + if [ -z "${NETBOOT}" ] + then + if [ "${ROOT}" = "/dev/nfs" ] + then + NETBOOT="nfs" + export NETBOOT + elif [ "${ROOT}" = "/dev/cifs" ] + then + NETBOOT="cifs" + export NETBOOT + fi + fi + + if [ -z "${MODULE}" ] + then + MODULE="filesystem" + export MODULE + fi + + if [ -z "${UNIONTYPE}" ] + then + UNIONTYPE="overlay" + export UNIONTYPE + fi + + if [ -z "${PERSISTENCE_ENCRYPTION}" ] + then + PERSISTENCE_ENCRYPTION="none" + export PERSISTENCE_ENCRYPTION + elif is_in_comma_sep_list luks ${PERSISTENCE_ENCRYPTION} + then + if ! modprobe dm-crypt + then + log_warning_msg "Unable to load module dm-crypt" + PERSISTENCE_ENCRYPTION=$(echo ${PERSISTENCE_ENCRYPTION} | sed -e 's/\> /root/etc/fstab + fi + + if ! grep -qs "^tmpfs /tmp" /root/etc/fstab + then + echo "tmpfs /tmp tmpfs nosuid,nodev 0 0" >> /root/etc/fstab + fi + + log_end_msg +} diff --git a/system-boot/components/9990-initramfs-tools.sh b/system-boot/components/9990-initramfs-tools.sh new file mode 100755 index 0000000..eb11d23 --- /dev/null +++ b/system-boot/components/9990-initramfs-tools.sh @@ -0,0 +1,75 @@ +#!/bin/sh + +#set -e + +log_wait_msg () +{ + # Print a message and wait for enter + if [ -x /bin/plymouth ] && plymouth --ping + then + plymouth message --text="$@" + plymouth watch-keystroke | read nunya + fi + + _log_msg "Waiting: ${@} ... \n" +} + +# Override maybe_break from scripts/functions +maybe_break() +{ + if [ "${break}" = "$1" ]; then + # Call original panic + . /scripts/functions + panic "Spawning shell within the initramfs" + fi +} + +# Override panic from scripts/functions +panic() +{ + for _PARAMETER in ${LIVE_BOOT_CMDLINE} + do + case "${_PARAMETER}" in + panic=*) + panic="${_PARAMETER#*panic=}" + ;; + esac + done + + DEB_1="\033[1;31m .''\`. \033[0m" + DEB_2="\033[1;31m: :' : \033[0m" + DEB_3="\033[1;31m\`. \`'\` \033[0m" + DEB_4="\033[1;31m \`- \033[0m" + + LIVELOG="\033[1;37m/boot.log\033[0m" + DEBUG="\033[1;37mdebug\033[0m" + + # Reset redirections to avoid buffering + exec 1>&6 6>&- + exec 2>&7 7>&- + kill ${tailpid} + + printf "\n\n" + printf " \033[1;37mBOOT FAILED!\033[0m\n" + printf "\n" + printf " This Live System image failed to boot.\n\n" + + printf " Please file a bug against the 'live-boot' package or email the Live Systems\n" + printf " mailing list at , making sure to note the\n" + printf " exact version, name and distribution of the image you were attempting to boot.\n\n" + + printf " The file ${LIVELOG} contains some debugging information but booting with the\n" + printf " ${DEBUG} command-line parameter will greatly increase its verbosity which is\n" + printf " extremely useful when diagnosing issues.\n\n" + + if [ -n "${panic}" ]; then + printf " live-boot will now restart your system. " + else + printf " live-boot will now start a shell. " + fi + printf "The error message was:\n\n " + + # Call original panic + . /scripts/functions + panic "$@" +} diff --git a/system-boot/components/9990-main.sh b/system-boot/components/9990-main.sh new file mode 100755 index 0000000..ed48be3 --- /dev/null +++ b/system-boot/components/9990-main.sh @@ -0,0 +1,195 @@ +#!/bin/sh + +# set -e + +Live () +{ + if [ -x /scripts/local-top/cryptroot ] + then + /scripts/local-top/cryptroot + fi + + exec 6>&1 + exec 7>&2 + exec > boot.log + exec 2>&1 + tail -f boot.log >&7 & + tailpid="${!}" + + LIVE_BOOT_CMDLINE="${LIVE_BOOT_CMDLINE:-$(cat /proc/cmdline)}" + Cmdline_old + + Debug + + Read_only + + Select_eth_device + + if [ -e /conf/param.conf ] + then + . /conf/param.conf + fi + + # Needed here too because some things (*cough* udev *cough*) + # changes the timeout + + if [ ! -z "${NETBOOT}" ] || [ ! -z "${FETCH}" ] || [ ! -z "${HTTPFS}" ] || [ ! -z "${FTPFS}" ] + then + if do_netmount + then + livefs_root="${mountpoint}" + else + panic "Unable to find a live file system on the network" + fi + else + if [ -n "${ISCSI_PORTAL}" ] + then + do_iscsi && livefs_root="${mountpoint}" + elif [ -n "${PLAIN_ROOT}" ] && [ -n "${ROOT}" ] + then + # Do a local boot from hd + livefs_root=${ROOT} + else + if [ -x /usr/bin/memdiskfind ] + then + MEMDISK=$(/usr/bin/memdiskfind) + + if [ $? -eq 0 ] + then + # We found a memdisk, set up phram + modprobe phram phram=memdisk,${MEMDISK} + modprobe phram phram=memdisk,${MEMDISK} + + # Load mtdblock, the memdisk will be /dev/mtdblock0 + modprobe mtdblock + fi + fi + + # Scan local devices for the image + i=0 + while [ "$i" -lt 60 ] + do + livefs_root=$(find_livefs ${i}) + + if [ -n "${livefs_root}" ] + then + break + fi + + sleep 1 + i="$(($i + 1))" + done + fi + fi + + if [ -z "${livefs_root}" ] + then + panic "Unable to find a medium containing a live file system" + fi + + Verify_checksums "${livefs_root}" + + if [ "${TORAM}" ] + then + live_dest="ram" + elif [ "${TODISK}" ] + then + live_dest="${TODISK}" + fi + + if [ "${live_dest}" ] + then + log_begin_msg "Copying live media to ${live_dest}" + copy_live_to "${livefs_root}" "${live_dest}" + log_end_msg + fi + + # if we do not unmount the ISO we can't run "fsck /dev/ice" later on + # because the mountpoint is left behind in /proc/mounts, so let's get + # rid of it when running from RAM + if [ -n "$FROMISO" ] && [ "${TORAM}" ] + then + losetup -d /dev/loop0 + + if is_mountpoint /run/live/fromiso + then + umount /run/live/fromiso + rmdir --ignore-fail-on-non-empty /run/live/fromiso \ + >/dev/null 2>&1 || true + fi + fi + + if [ -n "${MODULETORAMFILE}" ] || [ -n "${PLAIN_ROOT}" ] + then + setup_unionfs "${livefs_root}" "${rootmnt}" + else + mac="$(get_mac)" + mac="$(echo ${mac} | sed 's/-//g')" + mount_images_in_directory "${livefs_root}" "${rootmnt}" "${mac}" + fi + + if [ -n "${ROOT_PID}" ] + then + echo "${ROOT_PID}" > "${rootmnt}"/lib/live/root.pid + fi + + log_end_msg + + # aufs2 in kernel versions around 2.6.33 has a regression: + # directories can't be accessed when read for the first the time, + # causing a failure for example when accessing /var/lib/fai + # when booting FAI, this simple workaround solves it + ls /root/* >/dev/null 2>&1 + + # if we do not unmount the ISO we can't run "fsck /dev/ice" later on + # because the mountpoint is left behind in /proc/mounts, so let's get + # rid of it when running from RAM + if [ -n "$FINDISO" ] && [ "${TORAM}" ] + then + losetup -d /dev/loop0 + + if is_mountpoint /run/live/findiso + then + umount /run/live/findiso + rmdir --ignore-fail-on-non-empty /run/live/findiso \ + >/dev/null 2>&1 || true + fi + fi + + if [ -L /root/etc/resolv.conf ] ; then + # assume we have resolvconf + DNSFILE="${rootmnt}/etc/resolvconf/resolv.conf.d/base" + else + DNSFILE="${rootmnt}/etc/resolv.conf" + fi + if [ -f /etc/resolv.conf ] && ! grep -E -q -v '^[[:space:]]*#|^[[:space:]]*$' ${DNSFILE} + then + log_begin_msg "Copying /etc/resolv.conf to ${DNSFILE}" + cp -v /etc/resolv.conf ${DNSFILE} + log_end_msg + fi + + if ! [ -d "/lib/live/boot" ] + then + panic "A wrong rootfs was mounted." + fi + + # avoid breaking existing user scripts that rely on the old path + # this includes code that checks what is mounted on /lib/live/mount/* + # (eg: grep /lib/live /proc/mount) + # XXX: to be removed before the bullseye release + mkdir -p ${rootmnt}/lib/live/mount + mount --rbind /run/live ${rootmnt}/lib/live/mount + + Fstab + Netbase + + Swap + + exec 1>&6 6>&- + exec 2>&7 7>&- + kill ${tailpid} + [ -w "${rootmnt}/var/log/" ] && mkdir -p "${rootmnt}/var/log/live" && ( \ + cp boot.log "${rootmnt}/var/log/live" 2>/dev/null; \ + cp fsck.log "${rootmnt}/var/log/live" 2>/dev/null ) +} diff --git a/system-boot/components/9990-misc-helpers.sh b/system-boot/components/9990-misc-helpers.sh new file mode 100755 index 0000000..2811aaa --- /dev/null +++ b/system-boot/components/9990-misc-helpers.sh @@ -0,0 +1,1713 @@ +#!/bin/sh + +#set -e + +is_live_path() +{ + DIRECTORY="${1}/${LIVE_MEDIA_PATH}" + for FILESYSTEM in squashfs ext2 ext3 ext4 xfs dir jffs + do + if ls "${DIRECTORY}/"*.${FILESYSTEM} > /dev/null 2>&1 + then + return 0 + fi + done + return 1 +} + +matches_uuid () +{ + if [ "${IGNORE_UUID}" ] || ([ ! -e /conf/uuid.conf ] && [ ! "${LIVE_MEDIA_UUID}" ]) + then + return 0 + fi + + path="${1}" + uuid="$(cat /conf/uuid.conf)" + uuid="${LIVE_MEDIA_UUID:-${uuid}}" + + for try_uuid_file in "${path}/.disk/live-uuid"* + do + [ -e "${try_uuid_file}" ] || continue + + try_uuid="$(cat "${try_uuid_file}")" + + if [ "${uuid}" = "${try_uuid}" ] + then + return 0 + fi + done + + return 1 +} + +get_backing_device () +{ + case "${1}" in + *.squashfs|*.ext2|*.ext3|*.ext4|*.jffs2) + echo $(setup_loop "${1}" "loop" "/sys/block/loop*" '0' "${LIVE_MEDIA_ENCRYPTION}" "${2}") + ;; + + *.dir) + echo "directory" + ;; + + *) + panic "Unrecognized live filesystem: ${1}" + ;; + esac +} + +mount_images_in_directory () +{ + directory="${1}" + rootmnt="${2}" + mac="${3}" + + if is_live_path "${directory}" + then + [ -n "${mac}" ] && adddirectory="${directory}/${LIVE_MEDIA_PATH}/${mac}" + setup_unionfs "${directory}/${LIVE_MEDIA_PATH}" "${rootmnt}" "${adddirectory}" + else + panic "No supported filesystem images found at /${LIVE_MEDIA_PATH}." + fi +} + +is_nice_device () +{ + sysfs_path="${1#/sys}" + + if udevadm info --query=all --path="${sysfs_path}" | egrep -q "DEVTYPE=disk" + then + return 0 + elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$' + then + return 0 + elif echo ${sysfs_path} | grep -q "^/block/dm-" + then + return 0 + elif echo ${sysfs_path} | grep -q "^/block/mtdblock" + then + return 0 + fi + + return 1 +} + +check_dev () +{ + local force fix + sysdev="${1}" + devname="${2}" + skip_uuid_check="${3}" + mount_opts="${LIVE_MEDIA_MOUNT_OPTS:-ro,noatime}" + + # support for fromiso=.../isofrom=.... + if [ -n "$FROMISO" ] + then + ISO_DEVICE=$(dirname $FROMISO) + if ! [ -b $ISO_DEVICE ] + then + # to support unusual device names like /dev/cciss/c0d0p1 + # as well we have to identify the block device name, let's + # do that for up to 15 levels + i=15 + while [ -n "$ISO_DEVICE" ] && [ "$i" -gt 0 ] + do + ISO_DEVICE=$(dirname ${ISO_DEVICE}) + [ -b "$ISO_DEVICE" ] && break + i=$(($i -1)) + done + fi + + if [ "$ISO_DEVICE" = "/" ] + then + # not a block device, check if it's an iso file, for + # example an ISO when booting on an ONIE system + if echo "${FROMISO}" | grep -q "\.iso$" + then + fs_type=$(get_fstype "${FROMISO}") + if is_supported_fs ${fs_type} + then + mkdir /run/live/fromiso + mount -t $fs_type "${FROMISO}" /run/live/fromiso + if [ "$?" != 0 ] + then + echo "Warning: unable to mount ${FROMISO}." >>/boot.log + fi + devname="/run/live/fromiso" + fi + else + echo "Warning: device for bootoption fromiso= ($FROMISO) not found.">>/boot.log + fi + else + fs_type=$(get_fstype "${ISO_DEVICE}") + if is_supported_fs ${fs_type} + then + mkdir /run/live/fromiso + mount -t $fs_type "$ISO_DEVICE" /run/live/fromiso + ISO_NAME="$(echo $FROMISO | sed "s|$ISO_DEVICE||")" + loopdevname=$(setup_loop "/run/live/fromiso/${ISO_NAME}" "loop" "/sys/block/loop*" "" '') + devname="${loopdevname}" + else + echo "Warning: unable to mount $ISO_DEVICE." >>/boot.log + fi + fi + fi + + if [ -z "${devname}" ] + then + devname=$(sys2dev "${sysdev}") + fi + + if [ -d "${devname}" ] + then + mount -o bind "${devname}" $mountpoint || continue + + if is_live_path $mountpoint + then + echo $mountpoint + return 0 + else + umount $mountpoint + fi + fi + + IFS="," + for device in ${devname} + do + case "$device" in + *mapper*) + # Adding lvm support + if [ -x /scripts/local-top/lvm2 ] + then + ROOT="$device" resume="" /scripts/local-top/lvm2 >>/boot.log + fi + ;; + + /dev/md*) + # Adding raid support + if [ -x /scripts/local-top/mdadm ] + then + [ -r /conf/conf.d/md ] && cp /conf/conf.d/md /conf/conf.d/md.orig + echo "MD_DEVS=$device " >> /conf/conf.d/md + /scripts/local-top/mdadm >>/boot.log + [ -r /conf/conf.d/md.orig ] && mv /conf/conf.d/md.orig /conf/conf.d/md + fi + ;; + esac + done + unset IFS + + [ -n "$device" ] && devname="$device" + + [ -e "$devname" ] || continue + + if [ -n "${LIVE_MEDIA_OFFSET}" ] + then + loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVE_MEDIA_OFFSET}" '') + devname="${loopdevname}" + fi + + fstype=$(get_fstype "${devname}") + + if is_supported_fs ${fstype} + then + devuid=$(blkid -o value -s UUID "$devname") + [ -n "$devuid" ] && grep -qs "\<$devuid\>" /var/lib/live/boot/devices-already-tried-to-mount && continue + + for _PARAMETER in ${LIVE_BOOT_CMDLINE} + do + case "${_PARAMETER}" in + forcefsck) + FORCEFSCK="true" + ;; + esac + done + + if [ "${PERSISTENCE_FSCK}" = "true" ] || [ "${PERSISTENCE_FSCK}" = "yes" ] || [ "${FORCEFSCK}" = "true" ] + then + force="" + if [ "$FORCEFSCK" = "true" ] + then + force="-f" + fi + + fix="-a" + if [ "$FSCKFIX" = "true" ] || [ "$FSCKFIX" = "yes" ] + then + fix="-y" + fi + + fsck $fix $force ${devname} >> fsck.log 2>&1 + fi + + mount -t ${fstype} -o "${mount_opts}" "${devname}" ${mountpoint} || continue + [ -n "$devuid" ] && echo "$devuid" >> /var/lib/live/boot/devices-already-tried-to-mount + + if [ -n "${FINDISO}" ] + then + if [ -f ${mountpoint}/${FINDISO} ] + then + umount ${mountpoint} + mkdir -p /run/live/findiso + mount -t ${fstype} -o "${mount_opts}" "${devname}" /run/live/findiso + loopdevname=$(setup_loop "/run/live/findiso/${FINDISO}" "loop" "/sys/block/loop*" 0 "") + devname="${loopdevname}" + mount -t iso9660 -o "${mount_opts}" "${devname}" ${mountpoint} + else + umount ${mountpoint} + fi + fi + + if is_live_path ${mountpoint} && \ + ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint}) + then + echo ${mountpoint} + return 0 + else + umount ${mountpoint} 2>/dev/null + fi + fi + + if [ -n "${LIVE_MEDIA_OFFSET}" ] + then + losetup -d "${loopdevname}" + fi + + return 1 +} + +find_livefs () +{ + timeout="${1}" + + # first look at the one specified in the command line This is OK + # before the timeout has expired, if more than one device matches the + # criteria the outcome is undefined anyway, so we can pick the first + # one that appears. + case "${LIVE_MEDIA}" in + removable-usb|usb) + for sysblock in $(removable_usb_dev "sys") + do + for dev in $(subdevices "${sysblock}") + do + if check_dev "${dev}" + then + return 0 + fi + done + done + ;; + cdrom) + for sysblock in $(removable_cdrom_dev "sys") + do + for dev in $(subdevices "${sysblock}") + do + if check_dev "${dev}" + then + return 0 + fi + done + done + ;; + removable) + for sysblock in $(removable_dev "sys") + do + for dev in $(subdevices "${sysblock}") + do + if check_dev "${dev}" + then + return 0 + fi + done + done + ;; + + *) + if [ ! -z "${LIVE_MEDIA}" ] + then + if check_dev "null" "${LIVE_MEDIA}" "skip_uuid_check" + then + return 0 + fi + fi + ;; + esac + + # don't start autodetection before timeout has expired + if [ -n "${LIVE_MEDIA_TIMEOUT}" ] + then + if [ "${timeout}" -lt "${LIVE_MEDIA_TIMEOUT}" ] + then + return 1 + fi + fi + + # autodetection of live media + # prefer removable devices over non-removable devices, so scan them first + devices_to_scan="$(removable_dev 'sys') $(non_removable_dev 'sys')" + + for sysblock in $devices_to_scan + do + devname=$(sys2dev "${sysblock}") + [ -e "$devname" ] || continue + fstype=$(get_fstype "${devname}") + + if /lib/udev/cdrom_id ${devname} > /dev/null + then + if check_dev "null" "${devname}" + then + return 0 + fi + elif is_nice_device "${sysblock}" + then + for dev in $(subdevices "${sysblock}") + do + if check_dev "${dev}" + then + return 0 + fi + done + elif [ "${fstype}" = "squashfs" -o \ + "${fstype}" = "btrfs" -o \ + "${fstype}" = "ext2" -o \ + "${fstype}" = "ext3" -o \ + "${fstype}" = "ext4" -o \ + "${fstype}" = "jffs2" ] + then + # This is an ugly hack situation, the block device has + # an image directly on it. It's hopefully + # live-boot, so take it and run with it. + ln -s "${devname}" "${devname}.${fstype}" + echo "${devname}.${fstype}" + return 0 + fi + done + + return 1 +} + +is_in_list_separator_helper () +{ + local sep element list + sep=${1} + shift + element=${1} + shift + list=${*} + echo ${list} | grep -qe "^\(.*${sep}\)\?${element}\(${sep}.*\)\?$" +} + +is_in_space_sep_list () +{ + local element + element=${1} + shift + is_in_list_separator_helper "[[:space:]]" "${element}" "${*}" +} + +is_in_comma_sep_list () +{ + local element + element=${1} + shift + is_in_list_separator_helper "," "${element}" "${*}" +} + +sys2dev () +{ + sysdev=${1#/sys} + echo "/dev/$(udevadm info -q name -p ${sysdev} 2>/dev/null|| echo ${sysdev##*/})" +} + +subdevices () +{ + sysblock=${1} + r="" + + for dev in "${sysblock}"/* "${sysblock}" + do + if [ -e "${dev}/dev" ] + then + r="${r} ${dev}" + fi + done + + echo ${r} +} + +storage_devices() +{ + black_listed_devices="${1}" + white_listed_devices="${2}" + + for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "loop|ram|fd") + do + fulldevname=$(sys2dev "${sysblock}") + + if is_in_space_sep_list ${fulldevname} ${black_listed_devices} || \ + [ -n "${white_listed_devices}" ] && \ + ! is_in_space_sep_list ${fulldevname} ${white_listed_devices} + then + # skip this device entirely + continue + fi + + for dev in $(subdevices "${sysblock}") + do + devname=$(sys2dev "${dev}") + + if is_in_space_sep_list ${devname} ${black_listed_devices} + then + # skip this subdevice + continue + else + echo "${devname}" + fi + done + done +} + +is_supported_fs () +{ + fstype="${1}" + + # Validate input first + if [ -z "${fstype}" ] + then + return 1 + fi + + # get_fstype might report "unknown" or "swap", ignore it as no such kernel module exists + if [ "${fstype}" = "unknown" ] || [ "${fstype}" = "swap" ] + then + return 1 + fi + + # Try to look if it is already supported by the kernel + if grep -q ${fstype} /proc/filesystems + then + return 0 + else + # Then try to add support for it the gentle way using the initramfs capabilities + modprobe -q -b ${fstype} + if grep -q ${fstype} /proc/filesystems + then + return 0 + # Then try the hard way if /root is already reachable + else + kmodule="/root/lib/modules/`uname -r`/${fstype}/${fstype}.ko" + if [ -e "${kmodule}" ] + then + insmod "${kmodule}" + if grep -q ${fstype} /proc/filesystems + then + return 0 + fi + fi + fi + fi + + return 1 +} + +get_fstype () +{ + blkid -s TYPE -o value $1 2>/dev/null +} + +where_is_mounted () +{ + device=${1} + # return first found + grep -m1 "^${device} " /proc/mounts | cut -f2 -d ' ' +} + +trim_path () +{ + # remove all unnecessary /:s in the path, including last one (except + # if path is just "/") + echo ${1} | sed 's|//\+|/|g' | sed 's|^\(.*[^/]\)/$|\1|' +} + +what_is_mounted_on () +{ + local dir + dir="$(trim_path ${1})" + grep -m1 "^[^ ]\+ ${dir} " /proc/mounts | cut -d' ' -f1 +} + +chown_ref () +{ + local reference targets owner + reference="${1}" + shift + targets=${@} + owner=$(stat -c %u:%g "${reference}") + chown -h ${owner} ${targets} +} + +chmod_ref () +{ + local reference targets rights + reference="${1}" + shift + targets=${@} + rights=$(stat -c %a "${reference}") + chmod ${rights} ${targets} +} + +lastline () +{ + while read lines + do + line=${lines} + done + + echo "${line}" +} + +base_path () +{ + testpath="${1}" + mounts="$(awk '{print $2}' /proc/mounts)" + testpath="$(realpath ${testpath})" + + while true + do + if echo "${mounts}" | grep -qs "^${testpath}" + then + set -- $(echo "${mounts}" | grep "^${testpath}" | lastline) + echo ${1} + break + else + testpath=$(dirname $testpath) + fi + done +} + +fs_size () +{ + # Returns used/free fs kbytes + 5% more + # You could pass a block device as ${1} or the mount point as ${2} + + dev="${1}" + mountp="${2}" + used="${3}" + + if [ -z "${mountp}" ] + then + mountp="$(where_is_mounted ${dev})" + + if [ -z "${mountp}" ] + then + mountp="/mnt/tmp_fs_size" + + mkdir -p "${mountp}" + mount -t $(get_fstype "${dev}") -o ro "${dev}" "${mountp}" || log_warning_msg "cannot mount -t $(get_fstype ${dev}) -o ro ${dev} ${mountp}" + + doumount=1 + fi + fi + + if [ "${used}" = "used" ] + then + size=$(du -ks ${mountp} | cut -f1) + size=$(expr ${size} + ${size} / 20 ) # FIXME: 5% more to be sure + else + # free space + size="$(df -kP | grep -s ${mountp} | awk '{print $4}')" + fi + + if [ -n "${doumount}" ] + then + umount "${mountp}" || log_warning_msg "cannot umount ${mountp}" + rmdir "${mountp}" + fi + + echo "${size}" +} + +load_keymap () +{ + # Load custom keymap + if [ -x /bin/loadkeys -a -r /etc/boottime.kmap.gz ] + then + loadkeys --quiet /etc/boottime.kmap.gz + fi +} + +setup_loop () +{ + local fspath module pattern offset encryption readonly + fspath=${1} + module=${2} + pattern=${3} + offset=${4} + encryption=${5} + readonly=${6} + + # the output of setup_loop is evaluated in other functions, + # modprobe leaks kernel options like "libata.dma=0" + # as "options libata dma=0" on stdout, causing serious + # problems therefor, so instead always avoid output to stdout + modprobe -q -b "${module}" 1>/dev/null + + udevadm settle + + for loopdev in ${pattern} + do + if [ "$(cat ${loopdev}/size)" -eq 0 ] + then + dev=$(sys2dev "${loopdev}") + options='' + + if [ -n "${readonly}" ] + then + if losetup --help 2>&1 | grep -q -- "-r\b" + then + options="${options} -r" + fi + fi + + if [ -n "${offset}" ] && [ 0 -lt "${offset}" ] + then + options="${options} -o ${offset}" + fi + + if [ -z "${encryption}" ] + then + losetup ${options} "${dev}" "${fspath}" + else + # Loop AES encryption + while true + do + load_keymap + + echo -n "Enter passphrase for root filesystem: " >&6 + read -s passphrase + echo "${passphrase}" > /tmp/passphrase + unset passphrase + exec 9&6 + read answer + + if [ "$(echo "${answer}" | cut -b1 | tr A-Z a-z)" = "n" ] + then + unset answer + break + fi + done + fi + + echo "${dev}" + return 0 + fi + done + + panic "No loop devices available" +} + +try_mount () +{ + dev="${1}" + mountp="${2}" + opts="${3}" + fstype="${4}" + + old_mountp="$(where_is_mounted ${dev})" + + if [ -n "${old_mountp}" ] + then + if [ "${opts}" != "ro" ] + then + mount -o remount,"${opts}" "${dev}" "${old_mountp}" || panic "Remounting ${dev} ${opts} on ${old_mountp} failed" + fi + + mount -o bind "${old_mountp}" "${mountp}" || panic "Cannot bind-mount ${old_mountp} on ${mountp}" + else + if [ -z "${fstype}" ] + then + fstype=$(get_fstype "${dev}") + fi + mount -t "${fstype}" -o "${opts}" "${dev}" "${mountp}" || \ + ( echo "SKIPPING: Cannot mount ${dev} on ${mountp}, fstype=${fstype}, options=${opts}" > boot.log && return 0 ) + fi +} + +# Try to mount $device to the place expected by live-boot. If $device +# is already mounted somewhere, move it to the expected place. If $device +# ends with a "/" this is a directory path. +# If we're only probing $device (to check if it has custom persistence) +# $probe should be set, which suppresses warnings upon failure. On +# success, print the mount point for $device. +mount_persistence_media () +{ + local device probe backing old_backing fstype mount_opts + device=${1} + probe=${2} + + # get_custom_mounts() might call this with a directory path instead + # of a block device path. This means we have found sub-directory path + # underneath /run/live/persistence, so we're done + if [ -d "${device}" ] + then + echo "${device}" + return 0 + fi + + if [ ! -b "${device}" ] + then + return 1 + fi + + backing="/run/live/persistence/$(basename ${device})" + + mkdir -p "${backing}" + old_backing="$(where_is_mounted ${device})" + if [ -z "${old_backing}" ] + then + fstype="$(get_fstype ${device})" + mount_opts="rw,noatime" + if [ -n "${PERSISTENCE_READONLY}" ] + then + mount_opts="ro,noatime" + fi + if mount -t "${fstype}" -o "${mount_opts}" "${device}" "${backing}" >/dev/null + then + echo ${backing} + return 0 + else + [ -z "${probe}" ] && log_warning_msg "Failed to mount persistence media ${device}" + rmdir "${backing}" + return 1 + fi + elif [ "${backing}" != "${old_backing}" ] + then + if ! mount -o move ${old_backing} ${backing} >/dev/null + then + [ -z "${probe}" ] && log_warning_msg "Failed to move persistence media ${device}" + rmdir "${backing}" + return 1 + fi + mount_opts="rw,noatime" + if [ -n "${PERSISTENCE_READONLY}" ] + then + mount_opts="ro,noatime" + fi + if ! mount -o "remount,${mount_opts}" "${backing}" >/dev/null + then + log_warning_msg "Failed to remount persistence media ${device} writable" + # Don't unmount or rmdir the new mountpoint in this case + fi + echo ${backing} + return 0 + else + # This means that $device has already been mounted on + # the place expected by live-boot, so we're done. + echo ${backing} + return 0 + fi +} + +close_persistence_media () +{ + local device backing + device=${1} + backing="$(where_is_mounted ${device})" + + if [ -d "${backing}" ] + then + umount "${backing}" >/dev/null 2>&1 + rmdir "${backing}" >/dev/null 2>&1 + fi + + if is_active_luks_mapping ${device} + then + cryptsetup luksClose ${device} + fi +} + +open_luks_device () +{ + dev="${1}" + name="$(basename ${dev})" + opts="--key-file=-" + if [ -n "${PERSISTENCE_READONLY}" ] + then + opts="${opts} --readonly" + fi + + if cryptsetup status "${name}" >/dev/null 2>&1 + then + re="^[[:space:]]*device:[[:space:]]*\([^[:space:]]*\)$" + opened_dev=$(cryptsetup status ${name} 2>/dev/null | grep "${re}" | sed "s|${re}|\1|") + if [ "${opened_dev}" = "${dev}" ] + then + luks_device="/dev/mapper/${name}" + echo ${luks_device} + return 0 + else + log_warning_msg "Cannot open luks device ${dev} since ${opened_dev} already is opened with its name" + return 1 + fi + fi + + load_keymap + + # check for plymouth + [ -x /bin/plymouth ] && plymouth --ping && plymouth="y" + + # export udisk properties (used to get a nice device label) + unset ID_VENDOR_ENC ID_MODEL_ENC ID_PART_ENTRY_NUMBER + eval $(udevadm info --name=${dev} --query=property -x) + [ -z "${ID_VENDOR_ENC}" -a -z "${ID_MODEL_ENC}" ] && ID_MODEL_ENC="Unidentified device" + label="$(echo -e "${ID_VENDOR_ENC}${ID_MODEL_ENC}, Partition ${ID_PART_ENTRY_NUMBER} (${dev})")" + + if [ "${plymouth}" = "y" ] + then + cryptkeyscript="plymouth ask-for-password --prompt" + # Plymouth will add a : if it is a non-graphical prompt + cryptkeyprompt="Please unlock disk '${label}'" + else + cryptkeyscript="/lib/cryptsetup/askpass" + cryptkeyprompt="Please unlock disk '${label}': " + fi + + while true + do + $cryptkeyscript "$cryptkeyprompt" | \ + /sbin/cryptsetup -T 1 luksOpen ${dev} ${name} ${opts} + + if [ 0 -eq ${?} ] + then + luks_device="/dev/mapper/${name}" + echo ${luks_device} + return 0 + fi + + echo >&6 + retryprompt="There was an error decrypting '${label}' ... Retry? [Y/n]" + + if [ "${plymouth}" == "y" ] + then + plymouth display-message --text "${retryprompt}" + plymouth pause-progress + answer=$(plymouth watch-keystroke --keys="YNyn") + plymouth unpause-progress + else + echo -n "${retryprompt} " >&6 + read answer + fi + + if [ "$(echo "${answer}" | cut -b1 | tr A-Z a-z)" = "n" ] + then + [ "${plymouth}" = "y" ] && plymouth display-message --text "" + return 2 + fi + done +} + +get_gpt_name () +{ + local dev + dev="${1}" + blkid -s PART_ENTRY_NAME -p -o value ${dev} 2>/dev/null +} + +is_gpt_device () +{ + local dev + dev="${1}" + [ "$(blkid -s PART_ENTRY_SCHEME -p -o value ${dev} 2>/dev/null)" = "gpt" ] +} + +probe_for_gpt_name () +{ + local overlays dev gpt_dev gpt_name + overlays="${1}" + dev="${2}" + + gpt_dev="${dev}" + if is_active_luks_mapping ${dev} + then + # if $dev is an opened luks device, we need to check + # GPT stuff on the backing device + gpt_dev=$(get_luks_backing_device "${dev}") + fi + + if ! is_gpt_device ${gpt_dev} + then + return + fi + + gpt_name=$(get_gpt_name ${gpt_dev}) + for label in ${overlays} + do + if [ "${gpt_name}" = "${label}" ] + then + echo "${label}=${dev}" + fi + done +} + +probe_for_fs_label () +{ + local overlays dev + overlays="${1}" + dev="${2}" + + for label in ${overlays} + do + if [ "$(blkid -s LABEL -o value $dev 2>/dev/null)" = "${label}" ] + then + echo "${label}=${dev}" + fi + done +} + +probe_for_file_name () +{ + local overlays dev ret backing + overlays="${1}" + dev="${2}" + + ret="" + backing="$(mount_persistence_media ${dev} probe)" + if [ -z "${backing}" ] + then + return + fi + + for label in ${overlays} + do + path=${backing}/${PERSISTENCE_PATH}/${label} + if [ -f "${path}" ] + then + local loopdev + loopdev=$(setup_loop "${path}" "loop" "/sys/block/loop*") + ret="${ret} ${label}=${loopdev}" + fi + done + + if [ -n "${ret}" ] + then + echo ${ret} + else + # unmount and remove mountpoint + umount ${backing} > /dev/null 2>&1 || true + rmdir ${backing} > /dev/null 2>&1 || true + fi +} + +probe_for_directory_name () +{ + local overlays dev ret backing + overlays="${1}" + dev="${2}" + + ret="" + backing="$(mount_persistence_media ${dev} probe)" + if [ -z "${backing}" ] + then + return + fi + + for label in ${overlays} + do + path=${backing}/${PERSISTENCE_PATH}/${label} + if [ -d "${path}" ] + then + # in this case the "device" ends with a "/" + ret="${ret} ${label}=${backing}/${PERSISTENCE_PATH}/${label%%/}/" + fi + done + + if [ -n "${ret}" ] + then + echo ${ret} + else + # unmount and remove mountpoint + umount ${backing} > /dev/null 2>&1 || true + rmdir ${backing} > /dev/null 2>&1 || true + fi +} + +find_persistence_media () +{ + # Scans devices for overlays, and returns a whitespace + # separated list of how to use them. Only overlays with a partition + # label or file name in ${overlays} are returned. + # + # When scanning a LUKS device, the user will be asked to enter the + # passphrase; on failure to enter it, or if no persistence partitions + # or files were found, the LUKS device is closed. + # + # For all other cases (overlay partition and overlay file) the + # return value is "${label}=${device}", where ${device} a device that + # can mount the content. In the case of an overlay file, the device + # containing the file will remain mounted as a side-effect. + # + # No devices in ${black_listed_devices} will be scanned, and if + # ${white_list_devices} is non-empty, only devices in it will be + # scanned. + + local overlays white_listed_devices ret black_listed_devices + overlays="${1}" + white_listed_devices="${2}" + ret="" + + # + # The devices that are hosting the actual live rootfs should not be + # used for persistence storage since otherwise you might mount a + # parent directory on top of a sub-directory of the same filesystem + # in one union together. + # + black_listed_devices="" + for d in /run/live/rootfs/* /run/live/findiso /run/live/fromiso + do + black_listed_devices="${black_listed_devices} $(what_is_mounted_on d)" + done + + for dev in $(storage_devices "${black_listed_devices}" "${white_listed_devices}") + do + local result luks_device + result="" + + luks_device="" + # Check if it's a luks device; we'll have to open the device + # in order to probe any filesystem it contains, like we do + # below. activate_custom_mounts() also depends on that any luks + # device already has been opened. + if is_in_comma_sep_list luks ${PERSISTENCE_ENCRYPTION} && is_luks_partition ${dev} + then + if luks_device=$(open_luks_device "${dev}") + then + dev="${luks_device}" + else + # skip $dev since we failed/chose not to open it + continue + fi + elif ! is_in_comma_sep_list none ${PERSISTENCE_ENCRYPTION} + then + # skip $dev since we don't allow unencrypted storage + continue + fi + + # Probe for matching GPT partition names or filesystem labels + if is_in_comma_sep_list filesystem ${PERSISTENCE_STORAGE} + then + result=$(probe_for_gpt_name "${overlays}" ${dev}) + if [ -n "${result}" ] + then + ret="${ret} ${result}" + continue + fi + + result=$(probe_for_fs_label "${overlays}" ${dev}) + if [ -n "${result}" ] + then + ret="${ret} ${result}" + continue + fi + fi + + # Probe for files with matching name on mounted partition + if is_in_comma_sep_list file ${PERSISTENCE_STORAGE} + then + result=$(probe_for_file_name "${overlays}" ${dev}) + if [ -n "${result}" ] + then + local loopdevice + loopdevice=${result##*=} + if is_in_comma_sep_list luks ${PERSISTENCE_ENCRYPTION} && is_luks_partition ${loopdevice} + then + local luksfile + luksfile="" + if luksfile=$(open_luks_device "${loopdevice}") + then + result=${result%%=*} + result="${result}=${luksfile}" + else + losetup -d $loopdevice + result="" + fi + fi + ret="${ret} ${result}" + continue + fi + fi + + # Probe for directory with matching name on mounted partition + if is_in_comma_sep_list directory ${PERSISTENCE_STORAGE} + then + result=$(probe_for_directory_name "${overlays}" ${dev}) + if [ -n "${result}" ] + then + ret="${ret} ${result}" + continue + fi + fi + + # Close luks device if it isn't used + if [ -z "${result}" ] && [ -n "${luks_device}" ] && is_active_luks_mapping "${luks_device}" + then + cryptsetup luksClose "${luks_device}" + fi + done + + if [ -n "${ret}" ] + then + echo ${ret} + fi +} + +get_mac () +{ + mac="" + + for adaptor in /sys/class/net/* + do + status="$(cat ${adaptor}/iflink)" + + if [ "${status}" -eq 2 ] + then + mac="$(cat ${adaptor}/address)" + mac="$(echo ${mac} | sed 's/:/-/g' | tr '[a-z]' '[A-Z]')" + fi + done + + echo ${mac} +} + +is_luks_partition () +{ + device="${1}" + cryptsetup isLuks "${device}" 1>/dev/null 2>&1 +} + +is_active_luks_mapping () +{ + device="${1}" + cryptsetup status "${device}" 1>/dev/null 2>&1 +} + +get_luks_backing_device () +{ + device=${1} + cryptsetup status ${device} 2> /dev/null | \ + awk '{if ($1 == "device:") print $2}' +} + +removable_dev () +{ + output_format="${1}" + device_class="${2}" + ret= + + for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)") + do + if [ ! -d "${sysblock}" ]; then + continue + fi + + dev_ok= + if [ "${device_class}" = "usb" ] && readlink ${sysblock} | grep -Eq "/usb[0-9]+/" + then + # We only want USB and this is an USB device + dev_ok="true" + elif [ "${device_class}" = "cdrom" ] && echo ${sysblock} | grep -Eq "/sr[0-9]+$" + then + # We only want CD-ROM devices and this is such a device + dev_ok="true" + elif [ -z "${device_class}" ] + then + if readlink ${sysblock} | grep -Eq "/(usb[0-9]+|fw[0-9]+|mmc[0-9]+)/" || [ "$(cat ${sysblock}/removable)" = "1" ] + then + # Assume all USB, Firewire and SD cards are external, + # This is the best possible guess, eg. udisks has the same logic + # There is NO property which indicates with certainity if a device is + # removable or not. + # Devices that contain a removable medium are considered removable + # too. Many (older) USB sticks also set this property although it's + # technically wrong. The flash chips are NOT removable from the device. + dev_ok="true" + fi + fi + + if [ "${dev_ok}" = "true" ] + then + case "${output_format}" in + sys) + ret="${ret} ${sysblock}" + ;; + *) + devname=$(sys2dev "${sysblock}") + ret="${ret} ${devname}" + ;; + esac + fi + done + + echo "${ret}" +} + +removable_usb_dev () +{ + output_format="${1}" + + removable_dev "${output_format}" "usb" +} + +removable_cdrom_dev () +{ + output_format="${1}" + + removable_dev "${output_format}" "cdrom" +} + +non_removable_dev () +{ + output_format="${1}" + ret= + + for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)") + do + if [ ! -d "${sysblock}" ]; then + continue + fi + + if [ "$(cat ${sysblock}/removable)" = "0" ] + then + case "${output_format}" in + sys) + ret="${ret} ${sysblock}" + ;; + *) + devname=$(sys2dev "${sysblock}") + ret="${ret} ${devname}" + ;; + esac + fi + done + + echo "${ret}" +} + +link_files () +{ + # create source's directory structure in dest, and recursively + # create symlinks in dest to to all files in source. if mask + # is non-empty, remove mask from all source paths when + # creating links (will be necessary if we change root, which + # live-boot normally does (into $rootmnt)). + local src_dir dest_dir src_transform + + # remove multiple /:s and ensure ending on / + src_dir="$(trim_path ${1})/" + dest_dir="$(trim_path ${2})/" + src_transform="${3}" + + # This check can only trigger on the inital, non-recursive call since + # we create the destination before recursive calls + if [ ! -d "${dest_dir}" ] + then + log_warning_msg "Must link_files into a directory" + return + fi + + find "${src_dir}" -mindepth 1 -maxdepth 1 | \ + while read src + do + local dest final_src + dest="${dest_dir}$(basename "${src}")" + if [ -d "${src}" ] + then + if [ -z "$(ls -A "${src}")" ] + then + continue + fi + if [ ! -d "${dest}" ] + then + mkdir -p "${dest}" + chown_ref "${src}" "${dest}" + chmod_ref "${src}" "${dest}" + fi + link_files "${src}" "${dest}" "${src_transform}" + else + final_src=${src} + if [ -n "${src_transform}" ] + then + final_src="$(echo ${final_src} | sed "${src_transform}")" + fi + rm -rf "${dest}" 2> /dev/null + ln -s "${final_src}" "${dest}" + chown_ref "${src}" "${dest}" + fi + done +} + +do_union () +{ + local unionmountpoint unionrw unionro + unionmountpoint="${1}" # directory where the union is mounted + shift + unionrw="${1}" # branch where the union changes are stored + shift + unionro="${*}" # space separated list of read-only branches (optional) + + case "${UNIONTYPE}" in + aufs) + rw_opt="rw" + ro_opt="rr+wh" + noxino_opt="noxino" + + unionmountopts="-o noatime,${noxino_opt},dirs=${unionrw}=${rw_opt}" + if [ -n "${unionro}" ] + then + for rofs in ${unionro} + do + unionmountopts="${unionmountopts}:${rofs}=${ro_opt}" + done + fi + ;; + + overlay) + # XXX: can unionro be optional? i.e. can overlay skip lowerdir? + if [ -z "${unionro}" ] + then + panic "overlay needs at least one lower filesystem (read-only branch)." + fi + # Multiple lower layers can now be given using the the colon (":") as a + # separator character between the directory names. + unionro="$(echo ${unionro} | sed -e 's| |:|g')" + # overlayfs requires: + # + a workdir to become mounted + # + workdir and upperdir to reside under the same mount + # + workdir and upperdir to be in separate directories + mkdir "${unionrw}/rw" + mkdir "${unionrw}/work" + unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}/rw,workdir=${unionrw}/work" + ;; + esac + + mount -t ${UNIONTYPE} ${unionmountopts} ${UNIONTYPE} "${unionmountpoint}" +} + +get_custom_mounts () +{ + # Side-effect: leaves $devices with persistence.conf mounted in /run/live/persistence + # Side-effect: prints info to file $custom_mounts + + local custom_mounts devices bindings links + custom_mounts=${1} + shift + devices=${@} + + bindings="/tmp/bindings.list" + links="/tmp/links.list" + rm -rf ${bindings} ${links} 2> /dev/null + + for device in ${devices} + do + local device_name backing include_list + device_name="$(basename ${device})" + backing=$(mount_persistence_media ${device}) + if [ -z "${backing}" ] + then + continue + fi + + if [ -r "${backing}/${persistence_list}" ] + then + include_list="${backing}/${persistence_list}" + else + continue + fi + + if [ -n "${LIVE_BOOT_DEBUG}" ] && [ -e "${include_list}" ] + then + cp ${include_list} /run/live/persistence/${persistence_list}.${device_name} + fi + + while read dir options # < ${include_list} + do + if echo ${dir} | grep -qe "^[[:space:]]*\(#.*\)\?$" + then + # skipping empty or commented lines + continue + fi + + if trim_path ${dir} | grep -q -e "^[^/]" -e "^/lib" -e "^/run/live\(/.*\)\?$" -e "^/\(.*/\)\?\.\.\?\(/.*\)\?$" + then + log_warning_msg "Skipping unsafe custom mount ${dir}: must be an absolute path containing neither the \".\" nor \"..\" special dirs, and cannot be \"/lib\", or \"/run/live\" or any of its sub-directories." + continue + fi + + local opt_source opt_link source full_source full_dest + opt_source="" + opt_link="" + for opt in $(echo ${options} | tr ',' ' '); + do + case "${opt}" in + source=*) + opt_source=${opt#source=} + ;; + link) + opt_link="true" + ;; + union|bind) + ;; + *) + log_warning_msg "Skipping custom mount with unknown option: ${opt}" + continue 2 + ;; + esac + done + + source="${dir}" + if [ -n "${opt_source}" ] + then + if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${opt_source}" != "." ] + then + log_warning_msg "Skipping unsafe custom mount with option source=${opt_source}: must be either \".\" (the media root) or a relative path w.r.t. the media root that contains neither comas, nor the special \".\" and \"..\" path components" + continue + else + source="${opt_source}" + fi + fi + + full_source="$(trim_path ${backing}/${source})" + full_dest="$(trim_path ${rootmnt}/${dir})" + if [ -n "${opt_link}" ] + then + echo "${device} ${full_source} ${full_dest} ${options}" >> ${links} + else + echo "${device} ${full_source} ${full_dest} ${options}" >> ${bindings} + fi + done < ${include_list} + done + + # We sort the list according to destination so we're sure that + # we won't hide a previous mount. We also ignore duplicate + # destinations in a more or less arbitrary way. + [ -e "${bindings}" ] && sort -k3 -sbu ${bindings} >> ${custom_mounts} && rm ${bindings} + + # After all mounts are considered we add symlinks so they + # won't be hidden by some mount. + [ -e "${links}" ] && cat ${links} >> ${custom_mounts} && rm ${links} + + # We need to make sure that no two custom mounts have the same sources + # or are nested; if that is the case, too much weird stuff can happen. + local prev_source prev_dest + prev_source="impossible source" # first iteration must not match + prev_dest="" + # This sort will ensure that a source /a comes right before a source + # /a/b so we only need to look at the previous source + [ -e ${custom_mounts} ] && sort -k2 -b ${custom_mounts} | + while read device source dest options + do + if echo ${source} | grep -qe "^${prev_source}\(/.*\)\?$" + then + panic "Two persistence mounts have the same or nested sources: ${source} on ${dest}, and ${prev_source} on ${prev_dest}" + fi + prev_source=${source} + prev_dest=${dest} + done +} + +activate_custom_mounts () +{ + local custom_mounts used_devices + custom_mounts="${1}" # the ouput from get_custom_mounts() + used_devices="" + + while read device source dest options # < ${custom_mounts} + do + local opt_bind opt_link opt_union + opt_bind="true" + opt_link="" + opt_union="" + for opt in $(echo ${options} | tr ',' ' '); + do + case "${opt}" in + bind) + opt_bind="true" + unset opt_link opt_union + ;; + link) + opt_link="true" + unset opt_bind opt_union + ;; + union) + opt_union="true" + unset opt_bind opt_link + ;; + esac + done + + if [ -n "$(what_is_mounted_on "${dest}")" ] + then + if [ "${dest}" = "${rootmnt}" ] + then + umount "${dest}" + else + log_warning_msg "Skipping custom mount ${dest}: $(what_is_mounted_on "${dest}") is already mounted there" + continue + fi + fi + + if [ ! -d "${dest}" ] + then + # create the destination and delete existing files in + # its path that are in the way + path="/" + for dir in $(echo ${dest} | sed -e 's|/\+| |g') + do + path=$(trim_path ${path}/${dir}) + if [ -f ${path} ] + then + rm -f ${path} + fi + if [ ! -e ${path} ] + then + mkdir -p ${path} + if echo ${path} | grep -qe "^${rootmnt}/*home/[^/]\+" + then + # if ${dest} is in /home try fixing proper ownership by assuming that the intended user is the first, which is usually the case + # FIXME: this should really be handled by live-config since we don't know for sure which uid a certain user has until then + chown 1000:1000 ${path} + fi + fi + done + fi + + # if ${source} doesn't exist on our persistence media + # we bootstrap it with $dest from the live filesystem. + # this both makes sense and is critical if we're + # dealing with /etc or other system dir. + if [ ! -d "${source}" ] + then + if [ -n "${PERSISTENCE_READONLY}" ] + then + continue + elif [ -n "${opt_union}" ] || [ -n "${opt_link}" ] + then + # unions and don't need to be bootstrapped + # link dirs can't be bootstrapped in a sensible way + mkdir -p "${source}" + chown_ref "${dest}" "${source}" + chmod_ref "${dest}" "${source}" + elif [ -n "${opt_bind}" ] + then + # ensure that $dest is not copied *into* $source + mkdir -p "$(dirname ${source})" + cp -a "${dest}" "${source}" + fi + fi + + # XXX: If CONFIG_AUFS_ROBR is added to the Debian kernel we can + # ignore the loop below and set rootfs_dest_backing=$dest + local rootfs_dest_backing + rootfs_dest_backing="" + if [ -n "${opt_link}" ] || [ -n "${opt_union}" ] + then + for d in /run/live/rootfs/* + do + if [ -n "${rootmnt}" ] + then + fs="${d}/$(echo ${dest} | sed -e "s|${rootmnt}||")" + else + fs="${d}/${dest}" + fi + if [ -d "${fs}" ] + then + rootfs_dest_backing="${rootfs_dest_backing} ${fs}" + fi + done + fi + + local cow_dir links_source + if [ -n "${opt_link}" ] && [ -z "${PERSISTENCE_READONLY}" ] + then + link_files ${source} ${dest} "" + elif [ -n "${opt_link}" ] && [ -n "${PERSISTENCE_READONLY}" ] + then + mkdir -p /run/live/persistence + links_source=$(mktemp -d /run/live/persistence/links-source-XXXXXX) + chown_ref ${source} ${links_source} + chmod_ref ${source} ${links_source} + # We put the cow dir in the below strange place to + # make it absolutely certain that the link source + # has its own directory and isn't nested with some + # other custom mount (if so that mount's files would + # be linked, causing breakage. + cow_dir="/run/live/overlay/run/live/persistence/$(basename ${links_source})" + mkdir -p ${cow_dir} + chown_ref "${source}" "${cow_dir}" + chmod_ref "${source}" "${cow_dir}" + do_union ${links_source} ${cow_dir} ${source} ${rootfs_dest_backing} + link_files ${links_source} ${dest} "s|^${rootmnt}||" + elif [ -n "${opt_union}" ] && [ -z "${PERSISTENCE_READONLY}" ] + then + do_union ${dest} ${source} ${rootfs_dest_backing} + elif [ -n "${opt_bind}" ] && [ -z "${PERSISTENCE_READONLY}" ] + then + mount -o bind "${source}" "${dest}" + elif [ -n "${opt_bind}" -o -n "${opt_union}" ] && [ -n "${PERSISTENCE_READONLY}" ] + then + # bind-mount and union mount are handled the same + # in read-only mode, but note that rootfs_dest_backing + # is non-empty (and necessary) only for unions + cow_dir="/run/live/overlay/${dest}" + if [ -e "${cow_dir}" ] && [ -z "${opt_link}" ] + then + # If an earlier custom mount has files here + # it will "block" the current mount's files + # which is undesirable + rm -rf "${cow_dir}" + fi + mkdir -p ${cow_dir} + chown_ref "${source}" "${cow_dir}" + chmod_ref "${source}" "${cow_dir}" + if [ "${UNIONTYPE}" = "overlay" ] + then + # When we use overlay we add the "/rw" postfix to our source when using it + # as upper layer. Therefore we also have to add it here when using it as + # the lower layer. + source="${source}/rw" + fi + do_union ${dest} ${cow_dir} ${source} ${rootfs_dest_backing} + fi + + PERSISTENCE_IS_ON="1" + export PERSISTENCE_IS_ON + + if echo ${used_devices} | grep -qve "^\(.* \)\?${device}\( .*\)\?$" + then + used_devices="${used_devices} ${device}" + fi + done < ${custom_mounts} + + echo ${used_devices} +} + +is_mountpoint () +{ + directory="$1" + + [ $(stat -fc%d:%D "${directory}") != $(stat -fc%d:%D "${directory}/..") ] +} diff --git a/system-boot/components/9990-mount-cifs.sh b/system-boot/components/9990-mount-cifs.sh new file mode 100755 index 0000000..8dd1818 --- /dev/null +++ b/system-boot/components/9990-mount-cifs.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#set -e + +do_cifsmount () +{ + rc=1 + + if [ -x "/sbin/mount.cifs" ] + then + if [ -z "${NFSOPTS}" ] + then + CIFSOPTS="-o user=root,password=" + else + CIFSOPTS="-o ${NFSOPTS}" + fi + + log_begin_msg "Trying mount.cifs ${NFSROOT} ${mountpoint} ${CIFSOPTS}" + modprobe -q cifs + + if mount.cifs "${NFSROOT}" "${mountpoint}" ${CIFSOPTS} + then + rc=0 + fi + fi + + return ${rc} +} diff --git a/system-boot/components/9990-mount-http.sh b/system-boot/components/9990-mount-http.sh new file mode 100755 index 0000000..f58c3a3 --- /dev/null +++ b/system-boot/components/9990-mount-http.sh @@ -0,0 +1,93 @@ +#!/bin/sh + +#set -e + +do_httpmount () +{ + rc=1 + + for webfile in HTTPFS FTPFS FETCH + do + local url extension dest + url="$(eval echo \"\$\{${webfile}\}\")" + extension="$(echo "${url}" | sed 's/\(.*\)\.\(.*\)/\2/')" + + if [ -n "$url" ] + then + case "${extension}" in + iso|squashfs|tgz|tar) + if [ "${extension}" = "iso" ] + then + mkdir -p "${alt_mountpoint}" + dest="${alt_mountpoint}" + else + dest="${mountpoint}/${LIVE_MEDIA_PATH}" + mount -t ramfs ram "${mountpoint}" + mkdir -p "${dest}" + fi + case "${url}" in + *:///*) url="${url%%:///*}://${ROOTSERVER}/${url##*:///}" ;; + esac + if [ "${webfile}" = "FETCH" ] + then + case "$url" in + tftp*) + ip="$(dirname $url | sed -e 's|tftp://||g' -e 's|/.*$||g')" + rfile="$(echo $url | sed -e "s|tftp://$ip||g")" + lfile="$(basename $url)" + log_begin_msg "Trying tftp -g -b 65464 -r $rfile -l ${dest}/$lfile $ip" + tftp -g -b 65464 -r $rfile -l ${dest}/$lfile $ip + ;; + + *) + log_begin_msg "Trying wget ${url} -O ${dest}/$(basename ${url})" + wget "${url}" -O "${dest}/$(basename ${url})" + ;; + esac + else + log_begin_msg "Trying to mount ${url} on ${dest}/$(basename ${url})" + if [ "${webfile}" = "FTPFS" ] + then + FUSE_MOUNT="curlftpfs" + url="$(dirname ${url})" + else + FUSE_MOUNT="httpfs" + fi + + modprobe fuse + $FUSE_MOUNT "${url}" "${dest}" + ROOT_PID="$(minips h -C "$FUSE_MOUNT" | { read x y ; echo "$x" ; } )" + fi + [ ${?} -eq 0 ] && rc=0 + [ "${extension}" = "tgz" ] && live_dest="ram" + if [ "${extension}" = "iso" ] + then + isoloop=$(setup_loop "${dest}/$(basename "${url}")" "loop" "/sys/block/loop*" "" '') + mount -t iso9660 "${isoloop}" "${mountpoint}" + rc=${?} + fi + break + ;; + + *) + log_begin_msg "Unrecognized archive extension for ${url}" + ;; + esac + fi + done + + if [ ${rc} != 0 ] + then + if [ -d "${alt_mountpoint}" ] + then + umount "${alt_mountpoint}" + rmdir "${alt_mountpoint}" + fi + umount "${mountpoint}" + elif [ "${webfile}" != "FETCH" ] ; then + NETBOOT="${webfile}" + export NETBOOT + fi + + return ${rc} +} diff --git a/system-boot/components/9990-mount-iscsi.sh b/system-boot/components/9990-mount-iscsi.sh new file mode 100755 index 0000000..c9bab90 --- /dev/null +++ b/system-boot/components/9990-mount-iscsi.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +#set -e + +do_iscsi() +{ + do_netsetup + #modprobe ib_iser + modprobe iscsi_tcp + local debugopt + debugopt="" + [ "${LIVE_BOOT_DEBUG}" = "true" ] && debugopt="-d 8" + #FIXME this name is supposed to be unique - some date + ifconfig hash? + ISCSI_INITIATORNAME="iqn.1993-08.org.debian.live:01:$(echo "${HWADDR}" | sed -e s/://g)" + export ISCSI_INITIATORNAME + if [ -n "${ISCSI_SERVER}" ] ; then + iscsistart $debugopt -i "${ISCSI_INITIATORNAME}" -t "${ISCSI_TARGET}" -g 1 -a "${ISCSI_SERVER}" -p "${ISCSI_PORT}" + else + iscsistart $debugopt -i "${ISCSI_INITIATORNAME}" -t "${ISCSI_TARGET}" -g 1 -a "${ISCSI_PORTAL}" -p 3260 + fi + if [ $? != 0 ] + then + panic "Failed to log into iscsi target" + fi + local host + host="$(ls -d /sys/class/scsi_host/host*/device/iscsi_host:host* \ + /sys/class/scsi_host/host*/device/iscsi_host/host* | sed -e 's:/device.*::' -e 's:.*host::')" + if [ -n "${host}" ] + then + local devices i + devices="" + i=0 + while [ -z "${devices}" -a $i -lt 60 ] + do + sleep 1 + devices="$(ls -d /sys/class/scsi_device/${host}*/device/block:* \ + /sys/class/scsi_device/${host}*/device/block/* | sed -e 's!.*[:/]!!')" + i=$(expr $i + 1) + echo -ne $i\\r + done + for dev in $devices + do + if check_dev "null" "/dev/$dev" + then + NETBOOT="iscsi" + export NETBOOT + return 0; + fi + done + panic "Failed to locate a live device on iSCSI devices (tried: $devices)." + else + panic "Failed to locate iSCSI host in /sys" + fi +} diff --git a/system-boot/components/9990-mount-nfs.sh b/system-boot/components/9990-mount-nfs.sh new file mode 100755 index 0000000..6a3ae55 --- /dev/null +++ b/system-boot/components/9990-mount-nfs.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +#set -e + +do_nfsmount () +{ + rc=1 + + modprobe -q nfs + + if [ -n "${NFSOPTS}" ] + then + NFSOPTS="-o ${NFSOPTS}" + fi + + log_begin_msg "Trying nfsmount -o nolock -o ro ${NFSOPTS} ${NFSROOT} ${mountpoint}" + + # FIXME: This while loop is an ugly HACK round an nfs bug + i=0 + while [ "$i" -lt 60 ] + do + nfsmount -o nolock -o ro ${NFSOPTS} "${NFSROOT}" "${mountpoint}" && rc=0 && break + sleep 1 + i="$(($i + 1))" + done + + return ${rc} +} diff --git a/system-boot/components/9990-netbase.sh b/system-boot/components/9990-netbase.sh new file mode 100755 index 0000000..bae858a --- /dev/null +++ b/system-boot/components/9990-netbase.sh @@ -0,0 +1,139 @@ +#!/bin/sh + +#set -e + +Netbase () +{ + if [ -n "${NONETWORKING}" ] + then + return + fi + + log_begin_msg "Preconfiguring networking" + + IFFILE="/root/etc/network/interfaces" + if [ -L /root/etc/resolv.conf ] ; then + # assume we have resolvconf + DNSFILE="/root/etc/resolvconf/resolv.conf.d/base" + else + DNSFILE="/root/etc/resolv.conf" + fi + + if [ "${STATICIP}" = "frommedia" ] && [ -e "${IFFILE}" ] + then + # will use existent /etc/network/interfaces + log_end_msg + return + fi + +cat > "${IFFILE}" << EOF +auto lo +iface lo inet loopback + +EOF + + udevadm trigger + udevadm settle + + if [ -z "${NETBOOT}" ] && [ -n "${STATICIP}" ] && [ "${STATICIP}" != "frommedia" ] + then + parsed=$(echo "${STATICIP}" | sed -e 's|,| |g') + + for ifline in ${parsed} + do + ifname="$(echo ${ifline} | cut -f1 -d ':')" + ifaddress="$(echo ${ifline} | cut -f2 -d ':')" + ifnetmask="$(echo ${ifline} | cut -f3 -d ':')" + ifgateway="$(echo ${ifline} | cut -f4 -d ':')" + nameserver="$(echo ${ifline} | cut -f5 -d ':')" + +cat >> "${IFFILE}" << EOF +allow-hotplug ${ifname} +iface ${ifname} inet static + address ${ifaddress} + netmask ${ifnetmask} +EOF + + if [ -n "${ifgateway}" ] + then + +cat >> "${IFFILE}" << EOF + gateway ${ifgateway} + +EOF + + fi + + if [ -n "${nameserver}" ] + then + if [ -e "${DNSFILE}" ] + then + grep -v ^nameserver "${DNSFILE}" > "${DNSFILE}.tmp" + mv "${DNSFILE}.tmp" "${DNSFILE}" + fi + + echo "nameserver ${nameserver}" >> "${DNSFILE}" + fi + done + else + if [ -n "${NODHCP}" ] + then + # force DHCP off + method="manual" + elif [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ] + then + # default, dhcp assigned + method="dhcp" + else + # make sure that the preconfigured interface would not get reassigned by dhcp + # on startup by ifup script - otherwise our root fs might be disconnected! + method="manual" + fi + + # iterate the physical interfaces and add them to the interfaces list and also add when ethdevice= called on cmdline + if [ "${method}" != dhcp ] || ([ ! -x /root/usr/sbin/NetworkManager ] && [ ! -x /root/usr/sbin/wicd ]) || [ ! -z "${ETHDEVICE}" ] + then + for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan* /sys/class/net/en* + do + [ -e ${interface} ] || continue + i="$(basename ${interface})" + +cat >> "${IFFILE}" << EOF +allow-hotplug ${i} +iface ${i} inet ${method} + +EOF + + done + fi + + if [ ! -f "${DNSFILE}" ] || [ -z "$(cat ${DNSFILE})" ] + then + if [ -f /netboot.config ] + then + # create a resolv.conf if it is not present or empty + cp /netboot.config /root/var/log/netboot.config + + rc_search=$(cat netboot.config | awk '/domain/ { print $3 }') + rc_server0="$(cat netboot.config | awk '/dns0/ { print $5 }')" + +cat > $DNSFILE << EOF +search ${rc_search} +domain ${rc_search} +nameserver ${rc_server0} +EOF + + rc_server1=$(cat netboot.config | awk '/dns0/ { print $8 }') + + if [ "${rc_server1}" != "0.0.0.0" ] + then + echo "nameserver ${rc_server1}" >> $DNSFILE + fi + + cat $DNSFILE >> /root/var/log/netboot.config + fi + fi + fi + + log_end_msg +} diff --git a/system-boot/components/9990-netboot.sh b/system-boot/components/9990-netboot.sh new file mode 100755 index 0000000..5054fb8 --- /dev/null +++ b/system-boot/components/9990-netboot.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +#set -e + +do_netmount() +{ + do_netsetup + + if [ "${NFSROOT}" = "auto" ] + then + NFSROOT=${ROOTSERVER}:${ROOTPATH} + fi + + rc=1 + + if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] ) + then + do_httpmount + return $? + fi + + if [ "${NFSROOT#*:}" = "${NFSROOT}" ] && [ "$NETBOOT" != "cifs" ] + then + NFSROOT=${ROOTSERVER}:${NFSROOT} + fi + + log_begin_msg "Trying netboot from ${NFSROOT}" + + if [ "${NETBOOT}" != "nfs" ] && do_cifsmount + then + rc=0 + elif do_nfsmount + then + NETBOOT="nfs" + export NETBOOT + rc=0 + fi + + log_end_msg + return ${rc} +} diff --git a/system-boot/components/9990-networking.sh b/system-boot/components/9990-networking.sh new file mode 100755 index 0000000..9cc3674 --- /dev/null +++ b/system-boot/components/9990-networking.sh @@ -0,0 +1,179 @@ +#!/bin/sh + +#set -e + +Device_from_bootif () +{ + # support for Syslinux IPAPPEND parameter + # it sets the BOOTIF variable on the kernel parameter + + if [ -n "${BOOTIF}" ] + then + # pxelinux sets BOOTIF to a value based on the mac address of the + # network card used to PXE boot, so use this value for DEVICE rather + # than a hard-coded device name from initramfs.conf. this facilitates + # network booting when machines may have multiple network cards. + # pxelinux sets BOOTIF to 01-$mac_address + + # strip off the leading "01-", which isn't part of the mac + # address + temp_mac=${BOOTIF#*-} + + # convert to typical mac address format by replacing "-" with ":" + bootif_mac="" + IFS='-' + for x in $temp_mac + do + if [ -z "$bootif_mac" ] + then + bootif_mac="$x" + else + bootif_mac="$bootif_mac:$x" + fi + done + unset IFS + + # look for devices with matching mac address, and set DEVICE to + # appropriate value if match is found. + + for device in /sys/class/net/* + do + if [ -f "$device/address" ] + then + current_mac=$(cat "$device/address") + + if [ "$bootif_mac" = "$current_mac" ] + then + DEVICE=${device##*/} + break + fi + fi + done + fi +} + +do_netsetup () +{ + modprobe -q af_packet # For DHCP + + udevadm trigger + udevadm settle + + [ -n "$ETHDEV_TIMEOUT" ] || ETHDEV_TIMEOUT=15 + echo "Using timeout of $ETHDEV_TIMEOUT seconds for network configuration." + + if [ -z "${NETBOOT}" ] && [ -z "${FETCH}" ] && [ -z "${HTTPFS}" ] && [ -z "${FTPFS}" ] + then + # See if we can select the device from BOOTIF + Device_from_bootif + + # if ethdevice was not specified on the kernel command line + # make sure we try to get a working network configuration + # for *every* present network device (except for loopback of course) + if [ -z "$ETHDEVICE" ] + then + echo "If you want to boot from a specific device use bootoption ethdevice=..." + for device in /sys/class/net/* + do + dev=${device##*/} + if [ "$dev" != "lo" ] + then + ETHDEVICE="$ETHDEVICE $dev" + fi + done + fi + + # split args of ethdevice=eth0,eth1 into "eth0 eth1" + for device in $(echo "$ETHDEVICE" | sed 's/,/ /g') + do + devlist="$devlist $device" + done + + for dev in $devlist + do + echo "Executing ipconfig -t $ETHDEV_TIMEOUT $dev" + ipconfig -t "$ETHDEV_TIMEOUT" "$dev" | tee -a /netboot.config + + # if configuration of device worked we should have an assigned + # IP address, if so let's use the device as $DEVICE for later usage. + # simple and primitive approach which seems to work fine + if ifconfig "$dev" | grep -q -E 'inet.*addr:|inet [0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*' + then + export DEVICE="$dev" + break + fi + done + else + for interface in ${DEVICE}; do + ipconfig -t "$ETHDEV_TIMEOUT" "${interface}" | tee "/netboot-${interface}.config" + + [ -e "/run/net-${interface}.conf" ] && . "/run/net-${interface}.conf" + + if [ "$IPV4ADDR" != "0.0.0.0" ] + then + break + fi + done + fi + + for interface in ${DEVICE} + do + # source relevant ipconfig output + OLDHOSTNAME=${HOSTNAME} + + [ -e "/run/net-${interface}.conf" ] && . "/run/net-${interface}.conf" + + [ -z "${HOSTNAME}" ] && HOSTNAME="${OLDHOSTNAME}" + export HOSTNAME + + if [ -n "${interface}" ] + then + HWADDR="$(cat "/sys/class/net/${interface}/address")" + fi + + # Only create /etc/hosts if FQDN is known (to let 'hostname -f' query + # this file). Otherwise DNS will be queried to determine the FQDN. + if [ ! -e "/etc/hosts" ] && [ -n "${DNSDOMAIN}" ] + then + echo "Creating /etc/hosts" + cat > /etc/hosts < /etc/resolv.conf + echo "search ${DNSDOMAIN}" >> /etc/resolv.conf + fi + + for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVERS} + do + if [ -n "$i" ] && [ "$i" != 0.0.0.0 ] + then + echo "nameserver $i" >> /etc/resolv.conf + fi + done + fi + + # Check if we have a network device at all + if ! ls /sys/class/net/"$interface" > /dev/null 2>&1 && \ + ! ls /sys/class/net/eth0 > /dev/null 2>&1 && \ + ! ls /sys/class/net/wlan0 > /dev/null 2>&1 && \ + ! ls /sys/class/net/ath0 > /dev/null 2>&1 && \ + ! ls /sys/class/net/ra0 > /dev/null 2>&1 + then + panic "No supported network device found, maybe a non-mainline driver is required." + fi + done +} diff --git a/system-boot/components/9990-overlay.sh b/system-boot/components/9990-overlay.sh new file mode 100755 index 0000000..61b1f26 --- /dev/null +++ b/system-boot/components/9990-overlay.sh @@ -0,0 +1,337 @@ +#!/bin/sh + +#set -e + +setup_unionfs () +{ + image_directory="${1}" + rootmnt="${2}" + addimage_directory="${3}" + + modprobe -q -b ${UNIONTYPE} + + if ! cut -f2 /proc/filesystems | grep -q "^${UNIONTYPE}\$" + then + panic "${UNIONTYPE} not available." + fi + + croot="/run/live/rootfs" + + # Let's just mount the read-only file systems first + rootfslist="" + + if [ -z "${PLAIN_ROOT}" ] + then + # Read image names from ${MODULE}.module if it exists + if [ -e "${image_directory}/filesystem.${MODULE}.module" ] + then + for IMAGE in $(cat ${image_directory}/filesystem.${MODULE}.module) + do + image_string="${image_string} ${image_directory}/${IMAGE}" + done + elif [ -e "${image_directory}/${MODULE}.module" ] + then + for IMAGE in $(cat ${image_directory}/${MODULE}.module) + do + image_string="${image_string} ${image_directory}/${IMAGE}" + done + else + # ${MODULE}.module does not exist, create a list of images + for FILESYSTEM in squashfs ext2 ext3 ext4 xfs jffs2 dir + do + for IMAGE in "${image_directory}"/*."${FILESYSTEM}" + do + if [ -e "${IMAGE}" ] + then + image_string="${image_string} ${IMAGE}" + fi + done + done + + if [ -n "${addimage_directory}" ] && [ -d "${addimage_directory}" ] + then + for FILESYSTEM in squashfs ext2 ext3 ext4 xfs jffs2 dir + do + for IMAGE in "${addimage_directory}"/*."${FILESYSTEM}" + do + if [ -e "${IMAGE}" ] + then + image_string="${image_string} ${IMAGE}" + fi + done + done + fi + + # Now sort the list + image_string="$(echo ${image_string} | sed -e 's/ /\n/g' | sort )" + fi + + [ -n "${MODULETORAMFILE}" ] && image_string="${image_directory}/$(basename ${MODULETORAMFILE})" + + mkdir -p "${croot}" + + for image in ${image_string} + do + imagename=$(basename "${image}") + + export image devname + maybe_break live-realpremount + log_begin_msg "Running /scripts/live-realpremount" + run_scripts /scripts/live-realpremount + log_end_msg + + if [ -d "${image}" ] + then + # it is a plain directory: do nothing + rootfslist="${image} ${rootfslist}" + elif [ -f "${image}" ] + then + if losetup --help 2>&1 | grep -q -- "-r\b" + then + backdev=$(get_backing_device "${image}" "-r") + else + backdev=$(get_backing_device "${image}") + fi + fstype=$(get_fstype "${backdev}") + + case "${fstype}" in + unknown) + panic "Unknown file system type on ${backdev} (${image})" + ;; + + "") + fstype="${imagename##*.}" + log_warning_msg "Unknown file system type on ${backdev} (${image}), assuming ${fstype}." + ;; + esac + + mpoint=$(trim_path "${croot}/${imagename}") + rootfslist="${mpoint} ${rootfslist}" + + mkdir -p "${mpoint}" + log_begin_msg "Mounting \"${image}\" on \"${mpoint}\" via \"${backdev}\"" + mount -t "${fstype}" -o ro,noatime "${backdev}" "${mpoint}" || panic "Can not mount ${backdev} (${image}) on ${mpoint}" + log_end_msg + else + log_warning_msg "Could not find image '${image}'. Most likely it is listed in a .module file, perhaps by mistake." + fi + done + else + # we have a plain root system + mkdir -p "${croot}/filesystem" + log_begin_msg "Mounting \"${image_directory}\" on \"${croot}/filesystem\"" + mount -t $(get_fstype "${image_directory}") -o ro,noatime "${image_directory}" "${croot}/filesystem" || \ + panic "Can not mount ${image_directory} on ${croot}/filesystem" && \ + rootfslist="${croot}/filesystem ${rootfslist}" + # probably broken: + mount -o bind ${croot}/filesystem $mountpoint + log_end_msg + fi + + # tmpfs file systems + touch /etc/fstab + mkdir -p /run/live/overlay + + # Looking for persistence devices or files + if [ -n "${PERSISTENCE}" ] && [ -z "${NOPERSISTENCE}" ] + then + + if [ -z "${QUICKUSBMODULES}" ] + then + # Load USB modules + num_block=$(ls -l /sys/block | wc -l) + for module in sd_mod uhci-hcd ehci-hcd ohci-hcd usb-storage + do + modprobe -q -b ${module} + done + + udevadm trigger + udevadm settle + + # For some reason, udevsettle does not block in this scenario, + # so we sleep for a little while. + # + # See https://bugs.launchpad.net/ubuntu/+source/casper/+bug/84591 + for timeout in 5 4 3 2 1 + do + sleep 1 + + if [ $(ls -l /sys/block | wc -l) -gt ${num_block} ] + then + break + fi + done + fi + + local whitelistdev + whitelistdev="" + if [ -n "${PERSISTENCE_MEDIA}" ] + then + case "${PERSISTENCE_MEDIA}" in + removable) + whitelistdev="$(removable_dev)" + ;; + + removable-usb) + whitelistdev="$(removable_usb_dev)" + ;; + esac + if [ -z "${whitelistdev}" ] + then + whitelistdev="ignore_all_devices" + fi + fi + + if is_in_comma_sep_list overlay ${PERSISTENCE_METHOD} + then + overlays="${custom_overlay_label}" + fi + + local overlay_devices + overlay_devices="" + if [ "${whitelistdev}" != "ignore_all_devices" ] + then + for media in $(find_persistence_media "${overlays}" "${whitelistdev}") + do + media="$(echo ${media} | tr ":" " ")" + + case ${media} in + ${custom_overlay_label}=*) + device="${media#*=}" + overlay_devices="${overlay_devices} ${device}" + ;; + esac + done + fi + elif [ -n "${NFS_COW}" ] && [ -z "${NOPERSISTENCE}" ] + then + # check if there are any nfs options + if echo ${NFS_COW} | grep -q ',' + then + nfs_cow_opts="-o nolock,$(echo ${NFS_COW}|cut -d, -f2-)" + nfs_cow=$(echo ${NFS_COW}|cut -d, -f1) + else + nfs_cow_opts="-o nolock" + nfs_cow=${NFS_COW} + fi + + if [ -n "${PERSISTENCE_READONLY}" ] + then + nfs_cow_opts="${nfs_cow_opts},nocto,ro" + fi + + mac="$(get_mac)" + if [ -n "${mac}" ] + then + cowdevice=$(echo ${nfs_cow} | sed "s/client_mac_address/${mac}/") + cow_fstype="nfs" + else + panic "unable to determine mac address" + fi + fi + + if [ -z "${cowdevice}" ] + then + cowdevice="tmpfs" + cow_fstype="tmpfs" + cow_mountopt="rw,noatime,mode=755,size=${OVERLAY_SIZE:-50%}" + fi + + if [ -n "${PERSISTENCE_READONLY}" ] && [ "${cowdevice}" != "tmpfs" ] + then + mount -t tmpfs -o rw,noatime,mode=755,size=${OVERLAY_SIZE:-50%} tmpfs "/run/live/overlay" + root_backing="/run/live/persistence/$(basename ${cowdevice})-root" + mkdir -p ${root_backing} + else + root_backing="/run/live/overlay" + fi + + if [ "${cow_fstype}" = "nfs" ] + then + log_begin_msg \ + "Trying nfsmount ${nfs_cow_opts} ${cowdevice} ${root_backing}" + nfsmount ${nfs_cow_opts} ${cowdevice} ${root_backing} || \ + panic "Can not mount ${cowdevice} (n: ${cow_fstype}) on ${root_backing}" + else + mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} ${root_backing} || \ + panic "Can not mount ${cowdevice} (o: ${cow_fstype}) on ${root_backing}" + fi + + rootfscount=$(echo ${rootfslist} |wc -w) + + rootfs=${rootfslist%% } + + if [ -n "${EXPOSED_ROOT}" ] + then + if [ ${rootfscount} -ne 1 ] + then + panic "only one RO file system supported with exposedroot: ${rootfslist}" + fi + + mount -o bind ${rootfs} ${rootmnt} || \ + panic "bind mount of ${rootfs} failed" + + if [ -z "${SKIP_UNION_MOUNTS}" ] + then + cow_dirs='/var/tmp /var/lock /var/run /var/log /var/spool /home /var/lib/live' + else + cow_dirs='' + fi + else + cow_dirs="/" + fi + + for dir in ${cow_dirs}; do + unionmountpoint=$(trim_path "${rootmnt}${dir}") + mkdir -p ${unionmountpoint} + cow_dir=$(trim_path "/run/live/overlay${dir}") + rootfs_dir="${rootfs}${dir}" + mkdir -p ${cow_dir} + if [ -n "${PERSISTENCE_READONLY}" ] && [ "${cowdevice}" != "tmpfs" ] + then + do_union ${unionmountpoint} ${cow_dir} ${root_backing} ${rootfs_dir} + else + do_union ${unionmountpoint} ${cow_dir} ${rootfs_dir} + fi || panic "mount ${UNIONTYPE} on ${unionmountpoint} failed with option ${unionmountopts}" + done + + # Remove persistence depending on boot parameter + Remove_persistence + + # Correct the permissions of /: + chmod 0755 "${rootmnt}" + + # Correct the permission of /tmp: + if [ -d "${rootmnt}/tmp" ] + then + chmod 1777 "${rootmnt}"/tmp + fi + + # Adding custom persistence + if [ -n "${PERSISTENCE}" ] && [ -z "${NOPERSISTENCE}" ] + then + local custom_mounts + custom_mounts="/tmp/custom_mounts.list" + rm -f ${custom_mounts} + + # Gather information about custom mounts from devies detected as overlays + get_custom_mounts ${custom_mounts} ${overlay_devices} + + [ -n "${LIVE_BOOT_DEBUG}" ] && cp ${custom_mounts} "/run/live/persistence" + + # Now we do the actual mounting (and symlinking) + local used_overlays + used_overlays="" + used_overlays=$(activate_custom_mounts ${custom_mounts}) + rm -f ${custom_mounts} + + # Close unused overlays (e.g. due to missing $persistence_list) + for overlay in ${overlay_devices} + do + if echo ${used_overlays} | grep -qve "^\(.* \)\?${overlay}\( .*\)\?$" + then + close_persistence_media ${overlay} + fi + done + fi +} diff --git a/system-boot/components/9990-select-eth-device.sh b/system-boot/components/9990-select-eth-device.sh new file mode 100755 index 0000000..c8f36b0 --- /dev/null +++ b/system-boot/components/9990-select-eth-device.sh @@ -0,0 +1,108 @@ +#!/bin/sh + +Select_eth_device () +{ + # Boot type in initramfs's config + bootconf=$(egrep '^BOOT=' /conf/initramfs.conf | tail -1) + + # can be superseded by command line (used by Debian-Live's netboot for example) + for ARGUMENT in ${LIVE_BOOT_CMDLINE} + do + case "${ARGUMENT}" in + netboot=*) + NETBOOT="${ARGUMENT#netboot=}" + ;; + esac + done + + if [ "$bootconf" != "BOOT=nfs" ] && [ -z "$NETBOOT" ] && [ -z "$FETCH" ] && [ -z "$FTPFS" ] && [ -z "$HTTPFS" ] + then + # Not a net boot : nothing to do + return + fi + + # we want to do some basic IP + modprobe -q af_packet + + # Ensure all our net modules get loaded so we can actually compare MAC addresses... + udevadm trigger + udevadm settle + + # Available Ethernet interfaces ? + l_interfaces="" + + # See if we can derive the boot device + Device_from_bootif + + if [ -z "$DEVICE" ] + then + echo "Waiting for ethernet card(s) up... If this fails, maybe the ethernet card is not supported by the kernel `uname -r`?" + while [ -z "$l_interfaces" ] + do + l_interfaces="$(cd /sys/class/net/ && ls -d * 2>/dev/null | grep -v "lo")" + done + + if [ $(echo $l_interfaces | wc -w) -lt 2 ] + then + # only one interface : no choice + echo "DEVICE=$l_interfaces" >> /conf/param.conf + return + fi + + # If user force to use specific device, write it + for ARGUMENT in ${LIVE_BOOT_CMDLINE} + do + case "${ARGUMENT}" in + live-netdev=*) + NETDEV="${ARGUMENT#live-netdev=}" + echo "DEVICE=$NETDEV" >> /conf/param.conf + echo "Found live-netdev parameter, forcing to to use network device $NETDEV." + return + ;; + esac + done + else + l_interfaces="$DEVICE" + fi + + found_eth_dev="" + while true + do + echo -n "Looking for a connected Ethernet interface ..." + + for interface in $l_interfaces + do + # ATTR{carrier} is not set if this is not done + echo -n " $interface ?" + ipconfig -c none -d $interface -t 1 >/dev/null 2>&1 + done + + echo '' + + for step in 1 2 3 4 5 + do + for interface in $l_interfaces + do + carrier=$(cat /sys/class/net/$interface/carrier \ + 2>/dev/null) + # link detected + + case "${carrier}" in + 1) + echo "Connected $interface found" + # inform initrd's init script : + found_eth_dev="$found_eth_dev $interface" + ;; + esac + done + if [ -n "$found_eth_dev" ] + then + echo "DEVICE='$found_eth_dev'" >> /conf/param.conf + return + else + # wait a bit + sleep 1 + fi + done + done +} diff --git a/system-boot/components/9990-toram-todisk.sh b/system-boot/components/9990-toram-todisk.sh new file mode 100755 index 0000000..5b76d54 --- /dev/null +++ b/system-boot/components/9990-toram-todisk.sh @@ -0,0 +1,103 @@ +#!/bin/sh + +#set -e + +copy_live_to () +{ + copyfrom="${1}" + copytodev="${2}" + copyto="${copyfrom}_swap" + + if [ -z "${MODULETORAM}" ] + then + size=$(fs_size "" ${copyfrom}/ "used") + else + MODULETORAMFILE="${copyfrom}/${LIVE_MEDIA_PATH}/${MODULETORAM}" + + if [ -f "${MODULETORAMFILE}" ] + then + size=$( expr $(ls -la ${MODULETORAMFILE} | awk '{print $5}') / 1024 + 5000 ) + else + log_warning_msg "Error: toram-module ${MODULETORAM} (${MODULETORAMFILE}) could not be read." + return 1 + fi + fi + + if [ "${copytodev}" = "ram" ] + then + # copying to ram: + freespace=$(awk '/^MemFree:/{f=$2} /^Cached:/{c=$2} END{print f+c}' /proc/meminfo) + mount_options="-o size=${size}k" + free_string="memory" + fstype="tmpfs" + dev="/dev/shm" + else + # it should be a writable block device + if [ -b "${copytodev}" ] + then + dev="${copytodev}" + free_string="space" + fstype=$(get_fstype "${dev}") + freespace=$(fs_size "${dev}") + else + log_warning_msg "${copytodev} is not a block device." + return 1 + fi + fi + + if [ "${freespace}" -lt "${size}" ] + then + log_warning_msg "Not enough free ${free_string} (${freespace}k free, ${size}k needed) to copy live media in ${copytodev}." + return 1 + fi + + # Custom ramdisk size + if [ -z "${mount_options}" ] && [ -n "${ramdisk_size}" ] + then + # FIXME: should check for wrong values + mount_options="-o size=${ramdisk_size}" + fi + + # begin copying (or uncompressing) + mkdir "${copyto}" + log_begin_msg "mount -t ${fstype} ${mount_options} ${dev} ${copyto}" + mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}" + + if [ "${extension}" = "tgz" ] + then + cd "${copyto}" + tar zxf "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})" + rm -f "${copyfrom}/${LIVE_MEDIA_PATH}/$(basename ${FETCH})" + mount -r -o move "${copyto}" "${rootmnt}" + cd "${OLDPWD}" + else + if [ -n "${MODULETORAMFILE}" ] + then + if [ -x /bin/rsync ] + then + echo " * Copying $MODULETORAMFILE to RAM" 1>/dev/console + rsync -a --progress ${MODULETORAMFILE} ${copyto} 1>/dev/console # copy only the filesystem module + else + cp ${MODULETORAMFILE} ${copyto} # copy only the filesystem module + fi + else + if [ -x /bin/rsync ] + then + echo " * Copying whole medium to RAM" 1>/dev/console + rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console # "cp -a" from busybox also copies hidden files + else + cp -a ${copyfrom}/* ${copyto}/ + if [ -e ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ] + then + cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ${copyto} + fi + fi + fi + + umount ${copyfrom} + mount -r -o move ${copyto} ${copyfrom} + fi + + rmdir ${copyto} + return 0 +} diff --git a/system-boot/frontend/live-boot b/system-boot/frontend/live-boot new file mode 100755 index 0000000..2df56fe --- /dev/null +++ b/system-boot/frontend/live-boot @@ -0,0 +1,20 @@ +#!/bin/sh + +# set -e + +# Reading configuration file from filesystem and live-media +for _FILE in /etc/live/boot.conf /etc/live/boot/* +do + if [ -e "${_FILE}" ] + then + . "${_FILE}" + fi +done + +for _COMPONENT in /lib/live/boot/????-* +do + if [ -e "${_COMPONENT}" ] + then + . ${_COMPONENT} + fi +done diff --git a/system-boot/frontend/live-swapfile b/system-boot/frontend/live-swapfile new file mode 100755 index 0000000..745fa87 --- /dev/null +++ b/system-boot/frontend/live-swapfile @@ -0,0 +1,100 @@ +#!/bin/sh + +# File: live-swapfile - create and use a swap file +# Copyright: (C) 2009 Daniel Baumann +# License: GPL-3+ + +set -e + +# Options +_SWAP_DIRECTORY="${_SWAP_DIRECTORY:-/live/swap}" +_SWAP_FILE="${_SWAP_FILE:-swapfile.img}" + +_SWAP_SIZE="${_SWAP_SIZE:-auto}" +_SWAP_FACTOR="${_SWAP_FACTOR:-2}" + +_SWAP_PURGE="${_SWAP_PURGE:-true}" +_FORCE="${_FORCE:-true}" + +case "${1}" in + add) + # Reading size of physical memory + _MEM_TOTAL_KB="$(awk '/^MemTotal: / { print $2 }' /proc/meminfo)" + _MEM_TOTAL_MB="$(expr ${_MEM_TOTAL_KB} / 1024)" + + echo "Found ${_MEM_TOTAL_MB} MB physical memory." + + # Setting size of new swapfile + if [ -z "${_SWAP_SIZE}" ] || [ "${_SWAP_SIZE}" = "auto" ] + then + _SWAP_SIZE_KB="$(expr ${_MEM_TOTAL_KB} '*' ${_SWAP_FACTOR})" + _SWAP_SIZE_MB="$(expr ${_SWAP_SIZE_KB} / 1024)" + else + _SWAP_SIZE_MB="${_SWAP_SIZE}" + fi + + echo "Requesting ${_SWAP_SIZE_MB} MB swapfile." + + # Reading size of old swapfile + if [ -e "${_SWAP_DIRECTORY}/${_SWAP_FILE}" ] + then + _SWAP_FILESIZE="$(ls -hl ${_SWAP_DIRECTORY}/${_SWAP_FILE} | awk '{ print $5 }')" + + echo "Found ${_SWAP_FILESIZE} MB swapfile." + fi + + # Creating new swap file + if [ "${_SWAP_FILESIZE}" != "${_SWAP_SIZE_MB}M" ] + then + if [ "${_FORCE}" = "true" ] + then + # Removing old swapfile + rm -f "${_SWAP_DIRECTORY}/${_SWAP_FILE}" + + echo "Creating ${_SWAP_SIZE_MB} MB swapfile." + + mkdir -p "${_SWAP_DIRECTORY}" + + # Unfortunately, swapon does not support files + # with holes, therefore we cannot preallocate. + dd if=/dev/zero of="${_SWAP_DIRECTORY}/${_SWAP_FILE}" bs=1024k count="${_SWAP_SIZE_MB}" + else + echo "Exit." + return 1 + fi + fi + + echo "Enabling ${_SWAP_DIRECTORY}/${_SWAP_FILE}." + + mkswap "${_SWAP_DIRECTORY}/${_SWAP_FILE}" + swapon "${_SWAP_DIRECTORY}/${_SWAP_FILE}" + ;; + + rm|remove) + if grep -qs "${_SWAP_DIRECTORY}/${_SWAP_FILE}" /proc/swaps + then + echo "Disabling ${_SWAP_DIRECTORY}/${_SWAP_FILE}." + + swapoff "${_SWAP_DIRECTORY}/${_SWAP_FILE}" + fi + + if [ "${_SWAP_PURGE}" = "true" ] + then + echo "Removing ${_SWAP_DIRECTORY}/${_SWAP_FILE}." + + rm -f "${_SWAP_DIRECTORY}/${_SWAP_FILE}" + + __DIRECTORY="${_SWAP_DIRECTORY}" + while [ "${__DIRECTORY}" != "/" ] + do + rmdir --ignore-fail-on-non-empty "${__DIRECTORY}" + __DIRECTORY="$(dirname ${__DIRECTORY})" + done + fi + ;; + + *) + echo "Usage: ${0} {add|remove}" + exit 1 + ;; +esac diff --git a/system-boot/manpages/Makefile b/system-boot/manpages/Makefile new file mode 100644 index 0000000..122e7d6 --- /dev/null +++ b/system-boot/manpages/Makefile @@ -0,0 +1,57 @@ +# Makefile + +SHELL := sh -e + +LANGUAGES = $(shell cd po && ls) + +all: build + +po4a.cfg: + echo "[po4a_langs] $(LANGUAGES)" > po4a.cfg + echo "[po4a_paths] pot/\$$master.pot \$$lang:po/\$$lang/\$$master.po" >> po4a.cfg + + for MANPAGE in en/*; \ + do \ + SECTION="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \ + echo "[type: man] $${MANPAGE} \$$lang:\$$lang/$$(basename $${MANPAGE} .$${SECTION}).\$$lang.$${SECTION}" >> po4a.cfg; \ + done + +update: + ./bin/update-version.sh + +build: check po4a.cfg + @if [ ! -x "$$(which po4a 2>/dev/null)" ]; \ + then \ + echo "E: po4a - command not found"; \ + echo "I: po4a can be obtained from:"; \ + echo "I: http://po4a.alioth.debian.org/"; \ + echo "I: On Debian based systems, po4a can be installed with:"; \ + echo "I: apt-get install po4a"; \ + exit 1; \ + fi + + po4a --copyright-holder "Live Systems Project" --keep 0 --package-name live-boot --package-version $(shell cat ../VERSION) po4a.cfg + +clean: + rm -rf $(LANGUAGES) + +distclean: clean + rm -f po4a.cfg + +rebuild: distclean update build + +check: + @echo -n "Checking the integrity of .po files " + + @if [ -x /usr/bin/msgfmt ]; \ + then \ + for POFILE in po/*/*; \ + do \ + msgfmt --check --output-file=/dev/null $${POFILE}; \ + echo -n "."; \ + done; \ + else \ + echo "WARNING: skipping po integrity check. You must install gettext."; \ + fi + + @echo " done!" diff --git a/system-boot/manpages/bin/update-version.sh b/system-boot/manpages/bin/update-version.sh new file mode 100755 index 0000000..bfa6fbb --- /dev/null +++ b/system-boot/manpages/bin/update-version.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +## live-boot(7) - System Boot Components +## Copyright (C) 2006-2015 Daniel Baumann +## +## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +set -e + +PROGRAM="LIVE\\\-BOOT" +VERSION="$(cat ../VERSION)" + +DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)" + +DAY="$(LC_ALL=C date +%d)" +MONTH="$(LC_ALL=C date +%m)" +YEAR="$(LC_ALL=C date +%Y)" + +echo "Updating version headers..." + +for MANPAGE in en/* +do + SECTION="$(basename ${MANPAGE} | awk -F. '{ print $2 }')" + + sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Live Systems Project\"|" ${MANPAGE} +done + +# European date format +for _LANGUAGE in es fr it +do + if ls po/${_LANGUAGE}/*.po > /dev/null 2>&1 + then + for _FILE in po/${_LANGUAGE}/*.po + do + sed -i -e "s|^msgstr .*.2015-.*$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" \ + -e "s|^msgstr .*.2015\"$|msgstr \"${DAY}.${MONTH}.${YEAR}\"|g" \ + "${_FILE}" + done + fi +done + +# Brazilian date format +if ls po/pt_BR/*.po > /dev/null 2>&1 +then + for _FILE in po/pt_BR/*.po + do + sed -i -e "s|^msgstr .*.2015-.*$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" \ + -e "s|^msgstr .*-2015\"$|msgstr \"${DAY}-${MONTH}-${YEAR}\"|g" \ + "${_FILE}" + done +fi diff --git a/system-boot/manpages/en/live-boot.7 b/system-boot/manpages/en/live-boot.7 new file mode 100644 index 0000000..0a45bb4 --- /dev/null +++ b/system-boot/manpages/en/live-boot.7 @@ -0,0 +1,214 @@ +.TH LIVE\-BOOT 7 2015\-09\-22 5.0~a5-1 "Live Systems Project" + +.SH NAME +\fBlive\-boot\fR \- System Boot Components + +.SH DESCRIPTION +\fBlive\-boot\fR contains the components that configure a live system during the boot process (early userspace). +.PP +.\" FIXME +live\-boot is a hook for the initramfs\-tools, used to generate a initramfs capable to boot live systems, such as those created by \fIlive\-helper\fR(7). This includes the Live systems ISOs, netboot tarballs, and usb stick images. +.PP +At boot time it will look for a (read\-only) medium containing a "/live" directory where a root filesystems (often a compressed filesystem image like squashfs) is stored. If found, it will create a writable environment, using aufs, to boot the system from. +.\" FIXME + +.SH CONFIGURATION +\fBlive\-boot\fR can be configured through a boot parameter or a configuration file. +.PP +To configure the live\-boot parameters used by default in a live image, see the \-\-bootappend\-live option in the \fIlb_config\fR(1) manual page. + +.SS Kernel Parameters +\fBlive\-boot\fR is only activated if 'boot=live' was used as a kernel parameter. +.PP +In addition, there are some more boot parameters to influence the behaviour, see below. + +.SS Configuration Files +\fBlive\-boot\fR can be configured (but not activated) through configuration files. Those files can be placed either in the root filesystem itself (/etc/live/boot.conf, /etc/live/boot/*), or on the live media (live/boot.conf, live/boot/*). +These environment variables can only be set in the configuration files: + +.TP +\fBDISABLE_CDROM\fR=[\fItrue\fR|\fIfalse\fR] +Disable support for booting from CD-ROMs. If set to '\fIy\fR' mkinitramfs will build an initramfs without the kernel modules for reading CD-ROMs. + +.TP +\fBDISABLE_FAT\fR=[\fItrue\fR|\fIfalse\fR] +Disable support for booting from FAT file systems. If set to '\fIy\fR' mkinitramfs will build an initramfs without the kernel module vfat and some nls_* modules. + +.TP +\fBDISABLE_FUSE\fR=[\fItrue\fR|\fIfalse\fR] +Disable support for booting from FUSE-based file systems. If set to '\fIy\fR' mkinitramfs will build an initramfs without the kernel module fuse and file systems that depend on it (like curlftpfs and httpfs2). + +.TP +\fBDISABLE_NTFS\fR=[\fItrue\fR|\fIfalse\fR] +Disable support for booting from NTFS file systems. If set to '\fIy\fR' mkinitramfs will build an initramfs without the kernel module ntfs. + +.TP +\fBDISABLE_USB\fR=[\fItrue\fR|\fIfalse\fR] +Disable support for booting from USB devices. If set to '\fIy\fR' mkinitramfs will build an initramfs without the kernel module sd_mod. + +.TP +\fBMINIMAL\fR=[\fItrue\fR|\fIfalse\fR] +Build a minimal initramfs. If set to '\fIy\fR' mkinitramfs will build an initramfs without some udev scripts and without rsync. + +.TP +\fBPERSISTENCE_FSCK\fR=[\fItrue\fR|\fIfalse\fR] +Run fsck on persistence filesystem on boot. Will attempt to repair errors. The execution log will be saved in /var/log/live/fsck.log. + +.TP +\fBFSCKFIX\fR=[\fItrue\fR|\fIfalse\fR] +If PERSISTENCE_FSCK or forcefsck are set, will pass -y to fsck to stop it from asking questions interactively and assume yes to all queries. + +.SH OPTIONS +\fBlive\-boot\fR currently features the following parameters. +.\" FIXME +.IP "\fBaccess\fR=\fIACCESS\fR" 4 +Set the accessibility level for physically or visually impaired users. ACCESS must be one of v1, v2, v3, m1, or m2. v1=lesser visual impairment, v2=moderate visual impairment, v3=blindness, m1=minor motor difficulties, m2=moderate motor difficulties. +.IP "\fBconsole\fR=\fITTY,SPEED\fR" 4 +Set the default console to be used with the "live\-getty" option. Example: "console=ttyS0,115200" +.IP "\fBdebug\fR" 4 +Makes initramfs boot process more verbose. +.br +Use: debug=1 +.br +Without setting debug to a value the messages may not be shown. +.IP "\fBfetch\fR=\fIURL\fR" 4 +.IP "\fBhttpfs\fR=\fIURL\fR" 4 +Another form of netboot by downloading a squashfs image from a given URL. +The fetch method copies the image to RAM and the httpfs method uses FUSE and +httpfs2 to mount the image in place. Copying to RAM requires more memory and +might take a long time for large images. However, it is more likely to work +correctly because it does not require networking afterwards and the system +operates faster once booted because it does not require to contact the server +anymore. +.br +Due to current limitations in busybox's wget and DNS resolution, an URL can not contain a hostname but an IP address only. +.br +Not working: http://example.com/path/to/your_filesystem.squashfs +.br +Working: http://1.2.3.4/path/to/your_filesystem.squashfs +.br +Also note that therefore it's currently not possible to fetch an image from a name-based virtualhost of an httpd if it is sharing the IP address with the main httpd instance. +.br +You may also use the live ISO image in place of the squashfs image. +.IP "\fBiscsi\fR=\fIserver-ip[,server-port];target-name\fR" 4 +Boot from an iSCSI target that has an ISO or disk live image as one of its LUNs. The specified target is searched for a LUN which looks like a live medium. If you use the \fBiscsitarget\fR software iSCSI target solution your ietd.conf might look like this: +.br +# The target-name you specify in the iscsi= parameter +.br +Target + Lun 0 Path=,Type=fileio,IOMode=ro + # If you want to boot multiple machines you might want to look at tuning some parameters like + # Wthreads or MaxConnections +.IP "\fBfindiso\fR=\fI/PATH/TO/IMAGE\fI" 4 +Look for the specified ISO file on all disks where it usually looks for the .squashfs file (so you don't have to know the device name as in fromiso=....). +.IP "\fBforcefsck\fR" 4 +Run fsck on persistence filesystem on boot. Will attempt to repair errors. The execution log will be saved in /var/log/live/fsck.log. +.IP "\fBfromiso\fR=\fI/PATH/TO/IMAGE\fI" 4 +Use a filesystem from within an ISO image that's available on live-media. The first part of the argument should be the block device where the image is stored, followed by the path and filename (e.g. fromiso=/dev/sda1/live/image.iso). +.br +Alternatively, it can be used to boot from an ISO embedded into an initrd (e.g. fromiso=/live/image.iso). +.IP "\fBignore_uuid\fR" 4 +Do not check that any UUID embedded in the initramfs matches the discovered medium. live\-boot may be told to generate a UUID by setting LIVE_GENERATE_UUID=1 when building the initramfs. +.IP "\fBverify\-checksums\fR" 4 +If specified, an MD5 sum is calculated on the live media during boot and compared to the value found in md5sum.txt found in the root directory of the live media. +.IP "\fBip\fR=[\fIDEVICE\fR]:[\fICLIENT_IP\fR]:[\fINETMASK\fR]:[\fIGATEWAY_IP\fR]:[\fINAMESERVER\fR] [,[\fIDEVICE\fR]:[\fICLIENT_IP\fR]:[\fINETMASK\fR]:[\fIGATEWAY_IP\fR]:[\fINAMESERVER\fR]]" 4 +Let you specify the name(s) and the options of the interface(s) that should be configured at boot time. Do not specify this if you want to use dhcp (default). It will be changed in a future release to mimic official kernel boot param specification (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp). +.IP "\fBip\fR=[\fIfrommedia\fR]" 4 +If this variable is set, dhcp and static configuration are just skipped and the system will use the (must be) media\-preconfigured /etc/network/interfaces instead. +.IP "\fBlive\-media\-uuid\fR=\fIUUID\fR" 4 +Override UUID embedded in the initramfs. +.IP "\fBlive\-media\-mount\-opts\fR=\fIOPTS\fR" 4 +This specific which mount opts to use for mounting live-media. +Default: ro,noatime +.IP "{\fBlive\-media\fR|\fBbootfrom\fR}=\fIDEVICE\fR" 4 +If you specify one of this two equivalent forms, live\-boot will first try to find this device for the "/live" directory where the read\-only root filesystem should reside. If it did not find something usable, the normal scan for block devices is performed. +.br +Instead of specifying an actual device name, the keyword 'removable' can be used to limit the search of acceptable live media to removable type only. Note that if you want to further restrict the media to usb mass storage only, you can use the 'removable\-usb' keyword. +.IP "{\fBlive\-media\-encryption\fR|\fBencryption\fR}=\fITYPE\fI" 4 +live\-boot will mount the encrypted rootfs TYPE, asking the passphrase, useful to build paranoid live systems :\-). TYPE supported so far is "aes" for loop\-aes encryption type. +.IP "\fBlive\-media\-offset\fR=\fIBYTES\fR" 4 +This way you could tell live\-boot that your image starts at offset BYTES in the above specified or autodiscovered device, this could be useful to hide the live system ISO or image inside another ISO or image, to create "clean" images. +.IP "\fBlive\-media\-path\fR=\fIPATH\fR" 4 +Sets the path to the live filesystem on the medium. By default, it is set to '/live' and you should not change that unless you have customized your media accordingly. +.IP "\fBlive\-media\-timeout\fR=\fISECONDS\fI" 4 +Set the timeout in seconds for the device specified by "live\-media=" to become ready before giving up. +.IP "\fBmodule\fR=\fINAME\fR" 4 +Instead of using the default optional file "filesystem.module" (see below) another file could be specified without the extension ".module"; it should be placed on "/live" directory of the live medium. +.IP "\fBnetboot\fR[=nfs|cifs]" 4 +This tells live\-boot to perform a network mount. The parameter "nfsroot=" (with optional "nfsopts="), should specify where is the location of the root filesystem. With no args, will try cifs first, and if it fails nfs. +.IP "\fBnfsopts\fR=" 4 +This lets you specify custom nfs options. +.IP "\fBnofastboot\fR" 4 +This parameter disables the default disabling of filesystem checks in /etc/fstab. If you have static filesystems on your harddisk and you want them to be checked at boot time, use this parameter, otherwise they are skipped. +.IP "\fBnopersistence\fR" 4 +disables the "persistence" feature, useful if the bootloader (like syslinux) has been installed with persistence enabled. +.IP "\fBnoeject\fR" 4 +Do not prompt to eject the live medium. +.IP "\fBramdisk\-size\fR" 4 +This parameter defines a custom ramdisk size (it's the '\-o size' option of tmpfs mount). By default, there is no ramdisk size set, so the default of mount applies (currently 50% of available RAM). Note that this option has currently no effect when booting with toram. +.IP "\fBoverlay\-size\fR=\fISIZE\fR" 4 +The size of the tmpfs mount (used for the upperdir union root mount) in bytes, and rounded up to entire pages. This option accepts a suffix % to limit the instance to that percentage of your physical RAM or a suffix k, m or g for Ki, Mi, Gi (binary kilo (kibi), binary mega (mebi) and binary giga (gibi)). By default, 50% of available RAM will be used. +.IP "\fBswap=true\fR" 4 +This parameter enables usage of local swap partitions. +.IP "\fBpersistence\fR" 4 +live\-boot will probe devices for persistence media. These can be partitions (with the correct GPT name), filesystems (with the correct label) or image files (with the correct file name). Overlays are labeled/named "persistence" (see \fIpersistence.conf\fR(5)). Overlay image files are named "persistence". +.IP "\fBpersistence\-encryption\fR=\fITYPE1\fR,\fITYPE2\fR ... \fITYPEn\fR" 4 +This option determines which types of encryption that are allowed to be used when probing devices for persistence media. If "none" is in the list, we allow unencrypted media; if "luks" is in the list, we allow LUKS\-encrypted media. Whenever a device containing encrypted media is probed the user will be prompted for the passphrase. The default value is "none". +.IP "\fBpersistence\-media\fR={\fIremovable\fR|\fIremovable\-usb\fR}" 4 +If you specify the keyword 'removable', live\-boot will try to find persistence partitions on removable media only. Note that if you want to further restrict the media to usb mass storage only, you can use the 'removable\-usb' keyword. +.IP "\fBpersistence\-method\fR=\fITYPE1\fR,\fITYPE2\fR ... \fITYPEn\fR" 4 +This option determines which types of persistence media we allow. If "overlay" is in the list, we consider overlays (i.e. "live\-rw" and "home\-rw"). The default is "overlay". +.IP "\fBpersistence\-path\fR=\fIPATH\fR" 4 +live\-boot will look for persistency files in the root directory of a partition, with this parameter, the path can be configured so that you can have multiple directories on the same partition to store persistency files. +.IP "\fBpersistence\-read\-only\fR" 4 +Filesystem changes are not saved back to persistence media. In particular, overlays and netboot NFS mounts are mounted read-only. +.IP "\fBpersistence\-storage\fR=\fITYPE1\fR,\fITYPE2\fR ... \fITYPEn\fR" 4 +This option determines which types of persistence storage to consider when probing for persistence media. If "filesystem" is in the list, filesystems with matching labels will be used; if "file" is in the list, all filesystems will be probed for archives and image files with matching filenames. The default is "file,filesystem". +.IP "\fBpersistence\-label\fR=\fILABEL\fR" 4 +live-boot will use the name "LABEL" instead of "persistence" when searching for persistent storage. LABEL can be any valid filename, partition label, or GPT name. +.IP "\fBnoeject\fR" 4 +This option causes live\-boot to reboot without attempting to eject the media and without asking the user to remove the boot media. +.IP "\fBshowmounts\fR" 4 +This parameter will make live\-boot to show on "/" the ro filesystems (mostly compressed) on "/lib/live". This is not enabled by default because could lead to problems by applications like "mono" which store binary paths on installation. +.IP "\fBsilent\fR" 4 +If you boot with the normal quiet parameter, live\-boot hides most messages of its own. When adding silent, it hides all. +.IP "\fBtodisk\fR=\fIDEVICE\fR" 4 +Adding this parameter, live\-boot will try to copy the entire read\-only media to the specified device before mounting the root filesystem. It probably needs a lot of free space. Subsequent boots should then skip this step and just specify the "live\-media=DEVICE" boot parameter with the same DEVICE used this time. +.IP "\fBtoram\fR" 4 +Adding this parameter, live\-boot will try to copy the whole read\-only media to the computer's RAM before mounting the root filesystem. This could need a lot of ram, according to the space used by the read\-only media. +.IP "\fBunion\fR=overlay|aufs\fR" 4 +By default, live\-boot uses overlay. With this parameter, you can switch to aufs. +.\" FIXME + +.\" FIXME +.SH FILES (old) +.IP "\fB/etc/live.conf\fR" 4 +Some variables can be configured via this config file (inside the live system). +.IP "\fBlive/filesystem.module\fR" 4 +This optional file (inside the live media) contains a list of white\-space or carriage\-return\-separated file names corresponding to disk images in the "/live" directory. If this file exists, only images listed here will be merged into the root aufs, and they will be loaded in the order listed here. The first entry in this file will be the "lowest" point in the aufs, and the last file in this list will be on the "top" of the aufs, directly below /overlay. Without this file, any images in the "/live" directory are loaded in alphanumeric order. +.\" FIXME + +.SH FILES +.IP "\fB/etc/live/boot.conf\fR" 4 +.IP "\fB/etc/live/boot/*\fR" 4 +.IP "\fBlive/boot.conf\fR" 4 +.IP "\fBlive/boot/*\fR" 4 +.IP "\fBpersistence.conf\fR" 4 + +.SH SEE ALSO +\fIpersistence.conf\fR(5) +.PP +\fIlive\-build\fR(7) +.PP +\fIlive\-config\fR(7) +.PP +\fIlive\-tools\fR(7) + +.SH HOMEPAGE +More information about live\-boot and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>. + +.SH BUGS +Bugs can be reported by submitting a bugreport for the live\-boot package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\fIdebian-live@lists.debian.org\fR>. + +.SH AUTHOR +live\-boot was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. diff --git a/system-boot/manpages/en/persistence.conf.5 b/system-boot/manpages/en/persistence.conf.5 new file mode 100644 index 0000000..834cb29 --- /dev/null +++ b/system-boot/manpages/en/persistence.conf.5 @@ -0,0 +1,206 @@ +.TH LIVE\-BOOT conf 2015\-09\-22 5.0~a5-1 "Live Systems Project" + +.SH NAME +\fBpersistence.conf\fR \- Configuration file for persistence media in +live\-boot + +.SH DESCRIPTION +If live-boot probes a persistence volume with the label (or GPT name, +or file name, but from now on we will just say "label") "persistence", +that volume's persistence is fully customizable through the +\fBpersistence.conf\fR file stored on the root of its file system. Any such +labeled volume must have such a file, or it will be ignored. +.PP +The format of \fBpersistence.conf\fR allows empty lines and lines starting +with a "#" (used for comments), both which will be ignored. A so +called "custom mount" has the format: +.PP +.RS +\fIDIR\fR [\fIOPTION\fR]... +.RE +.PP +which roughly translates to "make \fIDIR\fR persistence in the way +described by the list of \fIOPTION\fRs". +.PP +For each custom mount \fIDIR\fR must be an absolute path that cannot +contain white spaces or the special . and .. path components, and +cannot be /live (or any of its sub-directories). +Once activated all changes (file +deletion, creation and modification) to \fIDIR\fR on the live file +system are stored persistently into a path equivalent to \fIDIR\fR on +the persistence media, called the source directory. The default way to +achieve persistence is to simply bind-mount the corresponding source +directory to \fIDIR\fR, but this can be changed through the use of +\fIOPTION\fRs. +.PP +All custom mounts will be done in an order so that no two custom +mounts can "hide" each other. For instance, if we have the two +\fIDIR\fR:s /a and /a/b it would always be the case that /a is mounted +first, then /a/b. This remains true no matter how the lines in +\fBpersistence.conf\fR are ordered, or if several \fBpersistence.conf\fR files +on different persistence media are used at the same time. However, it +is forbidden for custom mounts to have their source directory inside +the source directory of another custom mount, so the source +directories that are auto-created by live-boot does not support +"nested" mounts like /a and /a/b on the same media. In this case you +must use the \fBsource\fR option (see below) to make sure that they +are stored in different source directories. +.PP +When a source directory doesn't exist on the persistence media for a +certain custom mount, it will be created automatically, and +permissions and ownership will be optimistically set according to +\fIDIR\fR. It will also be bootstrapped by copying the contents of the +\fIDIR\fR into its source directory on the persistence media. The +bootstrapping will not happen when the \fBlink\fR or \fBunion\fR +options are used (see below). + +.SH OPTIONS +Custom mounts defined in \fBpersistence.conf\fR accept the following +options in a comma-separated list: +.IP "\fBsource\fR=\fIPATH\fR" 4 +When given, store the persistence changes into \fIPATH\fR on the +persistence media. \fIPATH\fR must be a relative path (with respect to the +persistence media root) that cannot contain white spaces or the +special . or .. path components, with the exception that it can be +just . which means the persistence media root. This option is mostly +relevant if you want to nest custom mounts, which otherwise would +cause errors, or if you want to make the whole media root available +(similar to the now deprecated \fBhome-rw\fR type of persistence). +.PP +The following options are mutually exclusive (only the last given one +will be in effect): +.IP "\fBbind\fR" 4 +Bind-mount the source directory to \fIDIR\fR. This is the default. +.IP "\fBlink\fR" 4 +Create the directory structure of the source directory on the +persistence media in \fIDIR\fR and create symbolic links from the +corresponding place in \fIDIR\fR to each file in the source directory. +Existing files or directories with the same name as any link will be +overwritten. Note that deleting the links in \fIDIR\fR will only +remove the link, not the corresponding file in the source; removed +links will reappear after a reboot. To permanently add or delete a +file one must do so directly in the source directory. +.IP +Effectively \fBlink\fR will make only files already in the source +directory persistent, not any other files in \fIDIR\fR. These files +must be manually added to the source directory to make use of this +option, and they will appear in \fIDIR\fR in addition to files already +there. This option is useful when only certain files need to be +persistent, not the whole directory they're in, e.g. some +configuration files in a user's home directory. +.IP "\fBunion\fR" 4 +Save the rw branch of a union on the persistence media, so only the +changes are stored persistently. This can potentially reduce disk +usage compared to bind-mounts, and will not hide files added to the +read-only media. One caveat is that the union will use \fIDIR\fR from +the image's read-only file system, not the real file system root, so +files created after boot (e.g. by live-config) will not appear in the +union. This option will use the union file system specified by +live-boot's \fBunion\fR boot parameter. + +.SH DIRECTORIES +.IP "\fB/live/persistence\fR" 4 +All persistence volumes will be mounted here (in a directory +corresponding to the device name). The \fBpersistence.conf\fR file can +easily be edited through this mount, as well as any source directories +(which is especially practical for custom mounts using the +\fBlink\fR option). + +.SH EXAMPLES + +Let's say we have a persistence volume \fIVOL\fR with the a +\fBpersistence.conf\fR file containing the following four lines (numbered +for ease of reference): +.TP 7 +1. +/home/user1 link,source=config-files/user1 +.TP +2. +/home/user2 link,source=config-files/user2 +.TP +3. +/home +.TP +4. +/usr union +.PP +The corresponding source directories are: +.TP 7 +1. +\fIVOL\fR/config-files/user1 (but it would be \fIVOL\fR/home/user1 +without the \fBsource\fR option) +.TP +2. +\fIVOL\fR/config-files/user2 (but it would be \fIVOL\fR/home/user2 +without the \fBsource\fR option) +.TP +3. +\fIVOL\fR/home +.TP +4. +\fIVOL\fR/usr +.PP +It was necessary to set the \fBsource\fR options for 1 and 2, since +they otherwise would become nested with 3's source, which is invalid. +.PP +Line 3 will be taken care of before line 1 and 2 in order to prevent +custom mounts 1 and 2 from being hidden by 3. When line 3 is handled, +\fIVOL\fR/home is simply bind-mounted on /home. To illustrate what +happens for lines 1 and 2, let's say that the following files exist: +.TP 7 +a. +\fIVOL\fR/config-files/user1/.emacs +.TP +b. +\fIVOL\fR/config-files/user2/.bashrc +.TP +c. +\fIVOL\fR/config-files/user2/.ssh/config +.PP +Then the following links and directories will be created: +.TP 7 +Link: +/home/user1/.emacs -> \fIVOL\fR/config-files/user1/.emacs (from a) +.TP +Link: +/home/user2/.bashrc -> \fIVOL\fR/config-files/user2/.bashrc (from b) +.TP +Dir: +/homea/user2/.ssh (from c) +.TP +Link: +/home/user2/.ssh/config -> \fIVOL\fR/config-files/user2/.ssh/config +(from c) +.PP +One could argue, though, that lines 1 and 2 in the example +\fBpersistence.conf\fR file above are unnecessary since line 3 already +would make all of /home persistent. The \fBlink\fR option is +intended for situations where you don't want a complete directory to +be persistent, only certain files in it or its sub-directories. +.PP +Line 4 can be mounted at any time since its \fIDIR\fR (and source +directory) is completely disjoint from all the other custom +mounts. When mounted, \fIVOL\fR/usr will be the rw branch due to the +\fBunion\fR option, and will only contain the difference compared to +the underlying read-only file system. Hence packages could be +installed into /usr with great space-wise efficiency compared to +bind-mounts, since in the latter case all of /usr would have to be +copied into \fIVOL\fR/usr during the initial bootstrap. + +.SH SEE ALSO +\fIlive\-boot\fR(7) +.PP +\fIlive\-build\fR(7) +.PP +\fIlive\-config\fR(7) +.PP +\fIlive\-tools\fR(7) + +.SH HOMEPAGE +More information about live\-boot and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>. + +.SH BUGS +Bugs can be reported by submitting a bugreport for the live\-boot package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\fIdebian-live@lists.debian.org\fR>. + +.SH AUTHOR +live\-boot was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. diff --git a/system-boot/manpages/es/live-boot.es.7 b/system-boot/manpages/es/live-boot.es.7 new file mode 100644 index 0000000..61a1b9a --- /dev/null +++ b/system-boot/manpages/es/live-boot.es.7 @@ -0,0 +1,303 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LIVE\-BOOT 7 2015\-09\-22 5.0~a5\-1 "Proyecto Live Systems" + +.SH NOMBRE +\fBlive\-boot\fP \- Componentes de Arranque del Sistema + +.SH DESCRIPCIÓN +\fBlive\-boot\fP contiene los componentes que configuran un sistema en vivo +durante el proceso de arranque (early userspace). +.PP +.\" FIXME +live\-boot es un hook para initramfs\-tools, usado para generar un initramfs +capaz de arrancar sistemas en vivo, tales como los creados por +\fIlive\-helper\fP(7). Esto incluye las ISOs de Live Systems, netboot tarballs y +las imágenes para llaves usb. +.PP +.\" FIXME +En el momento del arranque se buscará un dispositivo de sólo lectura que +contenga un directorio "/live" dónde se almacena un sistema de ficheros raíz +(a menudo se trata de una imagen comprimida de un sistema de ficheros como +squashfs). Si live\-boot lo encuentra, creará un entorno de escritura, usando +aufs, a partir del cual pueda arrancar un sistema. + +.SH CONFIGURACIÓN +\fBlive\-boot\fP se puede configurar mediante un parámetro de arranque o un +fichero de configuración. +.PP +Para configurar los parámetros de live\-boot utilizados por defecto en una +imagen en vivo, ver la opción \-\-bootappend\-live en la página de manual +\fIlb_config\fP(1) + +.SS "Parámetros del kernel" +\fBlive\-boot\fP sólo se activa si se usa 'boot=live' como parámetro del kernel +.PP +Además, hay algunos otros parámetros de arranque que influyen en su +comportamiento, ver más abajo. + +.SS "Ficheros de configuración" +\fBlive\-boot\fP se puede configurar (pero no activar) mediante ficheros de +configuración. Estos ficheros se pueden colocar en el sistema de ficheros +raíz (/etc/live/boot.conf, /etc/live/boot/*), o en el medio en vivo +(live/boot.conf, live/boot/*). + +.SH OPCIONES +.\" FIXME +\fBlive\-boot\fP incluye los siguientes parámetros. +.IP \fBaccess\fP=\fIACCESS\fP 4 +Establece el nivel de accesibilidad para usuarios con minusvalías físicas o +con discapacidad visual. ACCESS debe ser uno de los siguientes, v1, v2, v3, +m1 o m2. v1=menor deterioro visual, v2=discapacidad visual moderada, +v3=ceguera, m1=dificultades motoras menores, m2=dificultades motoras +moderadas. +.IP \fBconsole\fP=\fITTY,SPEED\fP 4 +Establece la consola que se utilizará por defecto con la opción +"live\-getty". Ejemplo: "console=ttyS0,115200" +.IP \fBdebug\fP 4 +Hace que el proceso de arranque de initramfs sea más detallado. +.br +Uso: debug=1 +.br +Si no se asigna un valor a debug, puede que no se muestren los mensajes. +.IP \fBfetch\fP=\fIURL\fP 4 +.IP \fBhttpfs\fP=\fIURL\fP 4 +Otra forma de arranque en red mediante la descarga de una imagen squashfs a +partir de una URL determinada. El método «fetch» copia la imagen en la +memoria RAM y el método httpfs utiliza FUSE y httpfs2 para montar la imagen +en su lugar. Copiar en la memoria RAM requiere más memoria y puede tardar +mucho tiempo con imágenes de gran tamaño. Sin embargo, es más probable que +funcione correctamente, ya que no requiere el uso de la red después y el +sistema funciona más rápido una vez iniciado, debido a que ya no necesita +ponerse más en contacto con el servidor. +.br +Debido a las limitaciones actuales de busybox, wget y la resolución de DNS, +una dirección URL no puede contener un nombre de anfitrión, sino sólo una +dirección IP. +.br +No funciona: http://ejemplo.com/ruta/al/sistema_de_ficheros.squashfs +.br +Funciona: http://ejemplo.com/ruta/al/sistema_de_ficheros.squashfs +.br +Tener en cuenta también que, por lo tanto, no es posible en la actualidad ir +a buscar una imagen en un host virtual basado en nombre de un httpd si está +compartiendo la IP con la instancia principal httpd. +.br +También se puede utilizar la imagen ISO en vivo en lugar de la imagen +squashfs. +.IP \fBiscsi\fP=\fIserver\-ip[,server\-port];target\-name\fP 4 +Arranca desde un iSCSI que tiene una ISO una imagen de disco en vivo como +uno de sus LUNs. Se busca en el objetivo especificado un LUN que sea similar +a un medio en vivo. Si se utiliza el software de iSCSI \fBiscsitarget\fP el +ietd.conf podría ser similar al siguiente: +.br +# El nombre de destino se especifica en el parámetro iscsi= +.br +Target + Lun 0 Path=,Type=fileio,IOMode=ro + # Si se desea arrancar varias máquinas, es posible que se desee afinar algunos parámetros como + # Wthreads o MaxConnections +.IP \fBfindiso\fP=\fI/PATH/TO/IMAGE\fP 4 +Busca el fichero ISO especificado en todos los discos en los que por lo +general se busca el fichero .squashfs (por lo que no se tiene que saber el +nombre del dispositivo como en fromiso=....). +.IP \fBfromiso\fP=\fI/PATH/TO/IMAGE\fP 4 +Permite utilizar un sistema de ficheros desde dentro de una imagen ISO que +está disponible en los medios en vivo. +.IP \fBignore_uuid\fP 4 +No comprobar que cualquier UUID integrado en el initramfs coincida con el +medio encontrado. Se puede especificar a live\-boot que genere un UUID +configurando LIVE_GENERATE_UUID=1 en el momento de crear el initramfs. +.IP \fBverify\-checksums\fP 4 +Si se especifica, se calcula una suma MD5 sobre los medios en vivo durante +el arranque y se compara con el valor md5sum.txt que se encuentra en el +directorio raíz de los medios en vivo. +.IP "\fBip\fP=[\fIDEVICE\fP]:[\fICLIENT_IP\fP]:[\fINETMASK\fP]:[\fIGATEWAY_IP\fP]:[\fINAMESERVER\fP] [,[\fIDEVICE\fP]:[\fICLIENT_IP\fP]:[\fINETMASK\fP]:[\fIGATEWAY_IP\fP]:[\fINAMESERVER\fP]]" 4 +Permite especificar el nombre(s) y las opciones de la interfaz(ces) que se +debe configurar en el arranque. No especificar esta opción si se desea +utilizar DHCP (opción por defecto). Esto cambiará en una futura versión para +utilizar la misma especificación de los parámetros de arranque que el kernel +oficial (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp). +.IP \fBip\fP=[\fIfrommedia\fP] 4 +Si se establece esta variable, no se configura la red ni por dhcp ni usando +una dirección estática y se debe añadir un fichero preconfigurado +/etc/network/interfaces que el sistema utilizará en su lugar. +.IP {\fBlive\-media\fP|\fBbootfrom\fP}=\fIDEVICE\fP 4 +Si se especifica una de estas dos formas equivalentes, live\-boot en primer +lugar tratará de encontrar este dispositivo buscando el directorio "/live" +dónde debe estar la raíz del sistema de ficheros de sólo lectura. Si no +encuentra nada que pueda utilizar, live\-boot escaneará los dispositivos +restantes. +.br +En lugar de especificar el nombre de un dispositivo real, se puede utilizar +la palabra clave 'removable' para limitar la búsqueda solo en los medios en +vivo de tipo extraíble. Tener en cuenta que si se desea restringir aún más +los medios a sistemas de almacenamiento masivo USB se puede utilizar la +palabra clave 'removable\-usb' +.IP {\fBlive\-media\-encryption\fP|\fBencryption\fP}=\fITYPE\fP 4 +live\-boot montará el TYPE rotfs cifrado, pidiendo la contraseña. Es útil +para crear sistemas en vivo paranoicos :\-) Hasta el momento el TYPE +soportado es "aes" para cifrado loop\-aes. +.IP \fBlive\-media\-offset\fP=\fIBYTES\fP 4 +De esta manera se puede especificar a live\-boot que la imagen comienza en +BYTES en el dispositivo anteriormente especificado, o auto\-descubierto, esto +podría ser útil para esconder la ISO o la imagen dentro de otra ISO o +imagen, para crear imágenes "limpias". +.IP \fBlive\-media\-path\fP=\fIPATH\fP 4 +Establece la ruta de acceso al sistema de ficheros en vivo en el medio. De +forma predeterminada está en '/live' y no se debe cambiar a menos que se +haya personalizado los medios de forma adecuada. +.IP \fBlive\-media\-timeout\fP=\fISECONDS\fP 4 +Establece el tiempo de espera en segundos para que el dispositivo +especificado por "live\-media=" esté preparado antes de desistir. +.IP \fBmodule\fP=\fINAME\fP 4 +En lugar de utilizar el fichero opcional por defecto "filesystem.module" +(ver más abajo) se podría especificar otro fichero sin la extensión +".module"; se debe colocar en el directorio "/live" del medio en vivo. +.IP \fBnetboot\fP[=nfs|cifs] 4 +Indica a live\-boot que debe hacer un montaje en red. El parámetro +"nfsroot=" (con "nfsopts=" opcional), debe especificar dónde se encuentra el +sistema de ficheros raíz. Sin argumentos, probará primero cifs, y entonces, +si falla, nfs. +.IP \fBnfsopts\fP= 4 +Permite especificar opciones nfs personalizadas. +.IP \fBnofastboot\fP 4 +Este parámetro deshabilita la desactivación por defecto de la comprobación +del sistema de ficheros en /etc/fstab. Si hay sistemas de ficheros estáticos +en el disco duro y se desea comprobarlos en el momento del arranque, +utilizar este parámetro, de lo contrario, se omite. +.IP \fBnopersistence\fP 4 +desactiva la "persistencia", es útil si el gestor de arranque (como +syslinux) se ha instalado con persistencia habilitada. +.IP \fBnoeject\fP 4 +No pedir que se extraiga el dispositivo en vivo. +.IP \fBramdisk\-size\fP 4 +Este parámetro permite establecer un tamaño de disco RAM personalizado (que +es la opción '\-o size' del montaje tmpfs). No hay un tamaño de ramdisk +predeterminado, por lo que se aplica el valor por defecto (actualmente el +50% de la RAM disponible). Tener en cuenta que esta opción no tiene +actualmente ningún efecto cuando se arranca con toram. +.IP \fBswap=true\fP 4 +Este parámetro permite el uso de particiones swap locales. +.IP \fBpersistence\fP 4 +live\-boot buscará dispositivos con "persistence". Estos pueden ser +particiones (con el nombre GPT correcto), sistemas de ficheros (con la +etiqueta correcta) o ficheros imagen (con el nombre de fichero +correcto). Los overlays tienen la etiqueta/nombre "persistence" (ver +\fIpersistence.conf\fP(5)). Los ficheros imagen overlay tienen, como nombre, +"persistence". +.IP "\fBpersistence\-encryption\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4 +Esta opción determina qué tipo de cifrado se usa cuando se prueban los +dispositivos de los medios con persistencia. Si se especifica "none" en la +lista, no se permite cifrar el medio; si se especifica "luks" en la lista, +se puede usar cifrado LUKS en los medios. Cada vez que se encuentra un +dispositivo que contiene medios cifrados se pregunta al usuario una frase de +contraseña. Por defecto es "none". +.IP \fBpersistence\-media\fP={\fIremovable\fP|\fIremovable\-usb\fP} 4 +Si se especifica la palabra clave 'removable', live\-boot intentará encontrar +particiones con persistencia únicamente en los medios extraíbles. Tener en +cuenta que si se desea restringir aún más los medios a sistemas de +almacenamiento masivo USB se puede utilizar la palabra clave 'removable\-usb' +.IP "\fBpersistence\-method\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4 +Esta opción determina qué tipos de medios se permiten para la +persistencia. Si se especifica "overlay" en la lista, se considera overlays +(es decir "live\-rw" y "home\-rw"). Por defecto es "overlay". +.IP \fBpersistence\-path\fP=\fIPATH\fP 4 +live\-boot buscará ficheros con persistencia en el directorio raíz de una +partición, con este parámetro, la ruta se puede configurar de modo que se +pueda tener varios directorios en la misma partición para almacenar ficheros +con persistencia. +.IP \fBpersistence\-read\-only\fP 4 +Los cambios en el sistema de ficheros no se guardan de nuevo en los medios +con persistencia. En particular, los overlays y los montajes NFS de red son +montados en sólo lectura. +.IP "\fBpersistence\-storage\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4 +Esta opción determina qué tipos de almacenamiento persistente hay que tener +en cuenta cuando se comprueban los medios con persistencia. Si "filesystem" +está en la lista, se usarán los sistemas de ficheros que tengan su etiqueta +correspondiente; si "file" está en la lista, todos los sistemas de ficheros +se probarán buscando ficheros y ficheros imagen con sus etiquetas +correspondientes. Por defecto es "file,filesystem". +.IP \fBpersistence\-label\fP=\fILABEL\fP 4 +live\-boot utilizará el nombre "LABEL" en lugar de "persistence" cuando +busque medios de almacenamiento persistente. LABEL puede ser cualquier +nombre de fichero, etiqueta de una partición or nombre GPT. +.IP \fBnoeject\fP 4 +Esta opción hace que live\-boot reinicie sin tratar de expulsar los medios y +sin pedirle al usuario que extraiga el dispositivo usado para arrancar. +.IP \fBshowmounts\fP 4 +Este parámetro hará que live\-boot muestre en "/" los sistemas de ficheros ro +(en su mayoría comprimidos) en "/lib/live". Esto no está activado por +defecto, porque podría dar lugar a problemas con aplicaciones como "mono" +que almacenan rutas binarias durante su instalación. +.IP \fBsilent\fP 4 +Si arranca con el parámetro normal quiet, live\-boot esconde la mayoría de +sus propios mensajes. Cuando se utiliza silent, los esconde todos. +.IP \fBtodisk\fP=\fIDEVICE\fP 4 +Al añadir este parámetro, live\-boot tratará de copiar la totalidad de medios +de sólo lectura en el dispositivo especificado antes de montar el sistema de +ficheros raíz. Probablemente hace falta una gran cantidad de espacio +libre. Los arranques posteriores deben saltar este paso y basta con +especificar el parámetro de arranque "live\-media=DEVICE" con el mismo DEVICE +que se ha utilizado esta vez. +.IP \fBtoram\fP 4 +Al añadir este parámetro, live\-boot trata de copiar los medios de sólo +lectura enteros en la memoria RAM del ordenador antes de montar el sistema +de ficheros raíz. Para esto puede ser necesaria mucha memoria RAM, según el +espacio utilizado por los medios de sólo lectura. +.IP \fBunion\fP=overlay|aufs 4 +.\" FIXME +Por defecto, live\-boot usa overlay. Con este parámetro, se puede cambiar a +aufs. + +.\" FIXME +.SH "FICHEROS (antiguos)" +.IP \fB/etc/live.conf\fP 4 +Algunas variables pueden ser configuradas a través de este fichero de +configuración (dentro del sistema en vivo). +.IP \fBlive/filesystem.module\fP 4 +.\" FIXME +Este fichero opcional (dentro del medio en vivo) contiene una lista de +nombres de ficheros separados por espacios en blanco o retornos de carro que +corresponden a imágenes de disco en el directorio "/live". Si este fichero +existe, sólo las imágenes que figuran en esta lista se fusionarán en la raíz +aufs, y se cargarán en el orden en que aparecen aquí. La primera entrada en +este fichero será el punto "más bajo" en el aufs y el último fichero de esta +lista estará en el punto "más alto" del aufs, justo debajo de /overlay. Sin +este fichero, las imágenes en el directorio "/live" se cargan en orden +alfanumérico. + +.SH FICHEROS +.IP \fB/etc/live/boot.conf\fP 4 +.IP \fB/etc/live/boot/*\fP 4 +.IP \fBlive/boot.conf\fP 4 +.IP \fBlive/boot.d/*\fP 4 +.IP \fBpersistence.conf\fP 4 + +.SH "VER ADEMÁS" +\fIpersistence.conf\fP(5) +.PP +\fIlive\-build\fP(7) +.PP +\fIlive\-config\fP(7) +.PP +\fIlive\-tools\fP(7) + +.SH "PÁGINA WEB" +Se puede encontrar más información acerca de live\-boot y el proyecto Live +Systems en la página web <\fIhttp://live\-systems.org/\fP> y en el +manual en <\fIhttp://live\-systems.org/manual/\fP>. + +.SH ERRORES +Se puede notificar los fallos enviando un informe de errores sobre el +paquete live\-boot al Sistema de Seguimiento de Errores en +<\fIhttp://bugs.debian.org/\fP> o escribiendo un mensaje a la lista de +correo de Live Systems a la dirección +<\fIdebian\-live@lists.debian.org\fP>. + +.SH AUTOR +live\-boot fue escrito por Daniel Baumann +<\fImail@daniel\-baumann.ch\fP>. diff --git a/system-boot/manpages/es/persistence.conf.es.5 b/system-boot/manpages/es/persistence.conf.es.5 new file mode 100644 index 0000000..1803cec --- /dev/null +++ b/system-boot/manpages/es/persistence.conf.es.5 @@ -0,0 +1,224 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LIVE\-BOOT conf 2015\-09\-22 5.0~a5\-1 "Proyecto Live Systems" + +.SH NOMBRE +\fBpersistence.conf\fP \- Fichero para configurar medios de almacenamiento con +persistencia en live\-boot + +.SH DESCRIPCIÓN +Si live\-boot prueba un volumen persistente con la etiqueta (o nombre GPT, o +nombre de fichero, aunque a partir de este momento nos referiremos a él como +simplemente "etiqueta") "persistence", la persistencia de ese volumen es +completamente personalizable a través del fichero \fBpersistence.conf\fP +almacenado en la raíz de su sistema de ficheros. Cualquier volumen esa +etiqueta debe tener uno de esos ficheros, o si no será ignorado. +.PP +El formato de \fBpersistence.conf\fP permite añadir líneas vacias o líneas que +comiencen por "#" (usado para los comentarios), ambos serán ignorados. Un +"montaje personalizado" tiene el formato: +.PP +.RS +\fIDIR\fP [\fIOPTION\fP]... +.RE +.PP +lo que se traduce como "hacer \fIDIR\fP persistente en la forma descrita en la +lista de \fIOPTION\fPs". +.PP +Para cada uno de los montajes personalizados \fIDIR\fP debe ser una ruta +absoluta que no puede contener espacios en blanco ni los componentes +especiales . y .. además no puede ser /live (o ninguno de sus +sub\-directorios) ni /. Una vez activados, todos los cambios (creación, +modificación y borrado de ficheros) en \fIDIR\fP en el sistema de ficheros en +vivo, son guardados de forma persistente en una ruta equivalente a \fIDIR\fP en +el medio persistente, llamado el directorio de origen. La manera de +conseguir la persistencia por defecto es simplemente hacer un montaje +enlazado (bind\-mount N.del T.) del directorio de origen al \fIDIR\fP, aunque +esto se puede cambiar utilizando las opciones \fIOPTION\fPs. +.PP +Todos los montajes personalizados serán montados en orden de tal manera que +dos montajes personalizados no se "escondan" uno al otro. Por ejemplo, si +tenemos los dos \fIDIR\fP:s /a y /a/b siempre /a será montado en primer lugar, +después /a/b. Esto siempre es así sin importar el orden en que aparezcan las +líneas en \fBpersistence.conf\fP o incluso si se usan varios ficheros +\fBpersistence.conf\fP en medios persistentes distintos al mismo tiempo. Sin +embargo, no está permitido que un montaje personalizado tenga su directorio +de origen en el interior del directorio de origen de otro montaje +personalizado, ya que los directorios de origen que live\-boot crea +automáticamente no tienen soporte para montajes "anidados" como /a y /a/b en +el mismo medio. En este caso se debe usar la opción \fBsource\fP (ver debajo) +para asegurarse de que se almacenan en directorios de origen diferentes. +.PP +Cuando un directorio de origen no existe en los medios con persistencia para +un montaje personalizado en particular, se creará automáticamente, y los +permisos y sus propietarios se establecen de forma óptima de acuerdo a +\fIDIR\fP. También se realiza una preinstalación (bootstrap N. del T.) copiando +los contenidos de \fIDIR\fP en su directorio de origen en el medio con +persistencia. La preinstalación no se realiza cuando se utilizan las +opciones \fBlink\fP o \fBunion\fP (ver debajo). + +.SH OPCIONES +Los montajes personalizados definidos en \fBpersistence.conf\fP aceptan las +siguientes opciones en una lista separada por comas: +.IP \fBsource\fP=\fIPATH\fP 4 +Cuando se especifica, se guardan los cambios persistentes en \fIPATH\fP en los +medios con persistencia. \fIPATH\fP debe ser una ruta relativa (respecto a la +raíz del medio persistente) que no puede contener espacios en blanco o los +componentes especiales . o .. con la excepción de que puede ser simplemente +\&. lo que significa la raíz del medio persistente. Esta opción es relevante +si se desea anidar montajes personalizados, lo que de otro modo produciría +errores, o si se desea hacer que toda la raíz del medio esté disponible (de +forma similar al ahora obsoleto tipo de persistencia \fBhome\-rw\fP) +.PP +Las siguientes opciones son mutuamente exclusivas (únicamente la última +tendrá efecto): +.IP \fBbind\fP 4 +Montar de forma enlazada el directorio de origen a \fIDIR\fP. Esto es así por +defecto. +.IP \fBlink\fP 4 +Crea la estructura de directorios del directorio de origen en el medio +persistente en \fIDIR\fP y crea los enlaces simbólicos desde el lugar +correspondiente en \fIDIR\fP a cada fichero en el directorio de origen. Si los +directorios o ficheros contienen el mismo nombre, al igual que cualquier +otro enlace, serán sobrescritos. Tener en cuenta que los enlaces en \fIDIR\fP +sólo eliminan el enlace, no el fichero correspondiente en el directorio; los +enlaces eliminados reaparecerán tras reiniciar. Para añadir o eliminar un +fichero de forma permanente se debe hacer directamente en el directorio de +origen. +.IP +\fBlink\fP tan sólo hará persistentes los ficheros que ya se encuentran en el +directorio de origen, y no cualquier otro fichero en \fIDIR\fP. Estos ficheros +deben ser añadidos manualmente en el directorio de origen pare utilizar esta +opción y ellos aparecerán en \fIDIR\fP además de los ficheros que ya se +encuentran allí. Esta opción es útil cuando sólo es necesario hacer +persistentes ciertos ficheros y no todo el directorio en el que se +encuentran, por ejemplo, algunos ficheros de configuración en el directorio +home de un usuario. +.IP \fBunion\fP 4 +Guardar la rama rw de una unión en un medio persistente, de modo que los +cambios son guardados de forma persistente. Potencialmente esto puede +reducir el uso del disco comparado con los montajes enlazados, y no +esconderá los ficheros añadidos a los medios de sólo lectura. Un buen truco +es que la unión utilizará el \fIDIR\fP del sistema de ficheros de sólo lectura +de la imagen y no de la raíz del sistema de ficheros real, por eso los +ficheros que se crean después del arranque (por ejemplo live\-config) no +aparecerán en la unión. Esta opción utilizará el sistema de ficheros unión +especificado por el parámetro de arranque \fBunion\fP de live\-boot. + +.SH DIRECTORIOS +.IP \fB/live/persistence\fP 4 +Aquí se montarán todos los volumenes persistentes (en un directorio que +corresponda con el nombre del dispositivo). El fichero \fBpersistence.conf\fP +se puede editar fácilmente a través de este montaje, así como cualquier +directorio de origen (esto resulta especialmente práctico para los montajes +personalizados usando la opción \fBlink\fP). + +.SH EJEMPLOS + +Si tenemos un volumen con persistencia \fIVOL\fP con un fichero +\fBpersistence.conf\fPque contiene las cuatro lineas siguientes (numeradas para +una mejor referencia): +.TP 7 +1. +/home/user1 link,source=config\-files/user1 +.TP +2. +/home/user2 link,source=config\-files/user2 +.TP +3. +/home +.TP +4. +/usr union +.PP +Los directorios de origen correspondientes son: +.TP 7 +1. +\fIVOL\fP/config\-files/user1 (pero sería \fIVOL\fP/home/user1 sin la opción +\fBsource\fP) +.TP +2. +\fIVOL\fP/config\-files/user2 (pero sería \fIVOL\fP/home/user2 sin la opción +\fBsource\fP) +.TP +3. +\fIVOL\fP/home +.TP +4. +\fIVOL\fP/usr +.PP +Era necesario establecer las opciones \fBsource\fP para 1 y 2, ya que de otro +modo resultarían anidados con el origen de 3, lo cual no es válido. +.PP +La línea 3 será tenida en cuenta antes que las líneas 1 y 3 para evitar que +los montajes personalizados 1 y 2 resulten escondidos por 3. Cuando se +procesa la línea 3, \fIVOL\fP/home es simplemente montado en unión a +/home. Para ilustrar lo que sucede con las líneas 1 y 2, digamos que los +siguientes ficheros existen: +.TP 7 +a. +\fIVOL\fP/config\-files/user1/.emacs +.TP +b. +\fIVOL\fP/config\-files/user2/.bashrc +.TP +c. +\fIVOL\fP/config\-files/user2/.ssh/config +.PP +Entonces se crearán los siguientes enlaces y directorios: +.TP 7 +Enlace: +/home/user1/.emacs \-> \fIVOL\fP/config\-files/user1/.emacs (de a) +.TP +Enlace: +/home/user2/.bashrc \-> \fIVOL\fP/config\-files/user2/.bashrc (de b) +.TP +Directorio: +/homea/user2/.ssh (de c) +.TP +Enlace: +/home/user2/.ssh/config \-> \fIVOL\fP/config\-files/user2/.ssh/config (de c) +.PP +Se podría decir, sin embargo, que las líneas 1 y 2 en el fichero de ejemplo +\fBpersistence.conf\fP anterior son innecesarias ya que la línea 3 ya crearía +el directorio /home persistente. La opción \fBlink\fP se utiliza en +situaciones en las que no se desea guardar de forma persistente un +directorio completo, sino únicamente algunos ficheros o subdirectorios +incluidos en él. +.PP +La línea 4 se puede montar en cualquier momento ya que su \fIDIR\fP (y su +directorio de origen) es completamente independiente de todos los otros +montajes personalizados. Cuando se monta, \fIVOL\fP/usr será la rama rw debido +a la opción \fBunion\fP y tan sólo contendrá la diferencia en comparación con +el sistema de ficheros subyacente de sólo lectura. Por eso los paquetes +pueden ser instalados en /usr con gran eficiencia de espacio comparado con +los montajes enlazados, ya que en este último caso el contenido de /usr +tendría que ser copiado en \fIVOL\fP/usr durante la preinstalación inicial. + +.SH "VER ADEMÁS" +\fIlive\-boot\fP(7) +.PP +\fIlive\-build\fP(7) +.PP +\fIlive\-config\fP(7) +.PP +\fIlive\-tools\fP(7) + +.SH "PÁGINA WEB" +Se puede encontrar más información acerca de live\-boot y el proyecto Live +Systems en la página web <\fIhttp://live\-systems.org/\fP> y en el +manual en <\fIhttp://live\-systems.org/manual/\fP>. + +.SH ERRORES +Se puede notificar los fallos enviando un informe de errores sobre el +paquete live\-boot al Sistema de Seguimiento de Errores en +<\fIhttp://bugs.debian.org/\fP> o escribiendo un mensaje a la lista de +correo de Live Systems a la dirección +<\fIdebian\-live@lists.debian.org\fP>. + +.SH AUTOR +live\-boot fue escrito por Daniel Baumann +<\fImail@daniel\-baumann.ch\fP>. diff --git a/system-boot/manpages/fr/live-boot.fr.7 b/system-boot/manpages/fr/live-boot.fr.7 new file mode 100644 index 0000000..3f4540e --- /dev/null +++ b/system-boot/manpages/fr/live-boot.fr.7 @@ -0,0 +1,306 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LIVE\-BOOT 7 22.09.2015 5.0~a5\-1 "Projet Live Systems" + +.SH NOM +\fBlive\-boot\fP \- Composants de démarrage du système + +.SH DESCRIPTION +\fBlive\-boot\fP comprend les composants qui configure un système live pendant +le processus de démarrage (espace utilisateur primitif). +.PP +.\" FIXME +live\-boot est un hameçon (hook) pour initramfs\-tools, utilisé pour générer +un initramfs capable de démarrer les systèmes live, comme ceux créés par +\fIlive\-helper\fP(7). Ceci comprends les ISOs Live Systems, les paquets tar de +démarrage par le net (netboot), et les images de clef USB. +.PP +.\" FIXME +Au moment du démarrage, il recherchera un médium (en lecture seule) +contenant un répertoire "/live" où est placé un système de fichier racine +(souvent une image d'un système de fichier compressé comme squashfs). Si +ceci est trouvé, il créera un environnement enregistrable en utilisant aufs, +pour démarrer le système à partir de lui. + +.SH CONFIGURATION +\fBlive\-boot\fP peut être configuré à travers un paramètre de démarrage ou un +fichier de configuration. +.PP +Pour configurer les paramètres de live\-boot utilisés par défaut dans l'image +live, voir l'option \-\-bootappend\-live dans la page de manuel +\fIlb_config\fP(1). + +.SS "Paramètres du noyau" +\fBlive\-boot\fP est activé uniquement si 'boot=live' a été utilisé en tant que +paramètre du noyau. +.PP +De plus, il y a plusieurs autres paramètres de démarrage pour influencer le +comportement, voir ci\-dessous. + +.SS "Fichiers de configurations" +\fBlive\-boot\fP peut être configuré (mais pas activé) à travers des fichiers de +configuration. Ces fichiers peuvent être placés soit dans le système de +fichier racine lui\-même (/etc/live/boot.conf, /etc/live/boot/*), ou sur le +média live (live/boot.conf, live/boot/*). + +.SH OPTIONS +.\" FIXME +\fBlive\-boot\fP fourni actuellement les paramètres suivants. +.IP \fBaccess\fP=\fIACCESS\fP 4 +Met en place le niveau d'accessibilité pour les utilisateurs physiquement ou +visuellement handicapés. ACCESS doit être un des v1, v2, v3, m1, or +m2. v1=handicap visuel faible, v2=handicap visuel modéré, v3=cessité +visuelle, m1=difficultés moteur faibles m2=difficultés moteur modérées. +.IP \fBconsole\fP=\fITTY,SPEED\fP 4 +Paramètre la console par défaut étant utilisée avec l'option +"live\-getty". Exemple : "console=ttyS0,115200". +.IP \fBdebug\fP 4 +Rend le processus de démarrage initramfs plus verbeux. +.br +Utiliser : debug=1 +.br +Si debug n'est pas paramétré à une valeur, les messages pourraient ne pas +être affichés. +.IP \fBfetch\fP=\fIURL\fP 4 +.IP \fBhttpfs\fP=\fIURL\fP 4 +Une autre forme de démarrage par le net en téléchargeant une image squashfs +depuis une URL donnée. La méthode fetch copie l'image dans la RAM et la +méthode httpfs utilise FUSE et httpfs2 pour monter l'image en place. La +copier dans la RAM nécessite davantage de mémoire et pourrait prendre du +temps pour des images volumineuses. Ceci dit, ça devrait mieux fonctionner +correctement car cela ne nécessite pas de réseau ensuite et le système +fonctionne plus vite une fois démarré car il n'a plus besoin de contacter un +serveur. +.br +À cause des limitations actuelles de la version wget de busybox et de sa +résolution DNS, une URL ne peut pas contenir un hostname mais uniquement une +adresse IP. +.br +Ne fonctionne pas : http://example.com/path/to/your_filesystem.squashfs +.br +Fonctionne : http://1.2.3.4/path/to/your_filesystem.squashfs +.br +Notez également que par conséquent, il n'est actuellement pas possible +d'attraper une image depuis un virtualhost basé\-sur\-un\-nom d'un httpd s'il +partage l'adresse IP avec l'instance httpd principale. +.br +Vous voudrez également utiliser l'image ISO live à la place de l'image +squashfs. +.IP \fBiscsi\fP=\fIserver\-ip[,server\-port];target\-name\fP 4 +Démarrer depuis une cible iSCSI qui a une image ISO ou disque en tant que +l'un de ces LUNs. La cible spécifiée est recherchée pour un LUN qui +ressemble à un medium live medium. Si vous utilisez la solution cible iSCSI +logiciel \fBiscsitarget\fP , votre ietd.conf devrait ressembler à ça : +.br +# Le nom\-cible que vous spécifiez dans le paramètre iscsi= +.br +Cible + Lun 0 Path=,Type=fileio,IOMode=ro + # Si vous voulez démarrez de multiples machines, vous pourriez vouloir jeter un oeil aux réglages de certains paramètres comme + # Wthreads ou MaxConnections +.IP \fBfindiso\fP=\fI/PATH/TO/IMAGE\fP 4 +Regarder pour le fichier ISO spécifié sur tous les disques quandil regarde +habituellement pour le fichier squashfs (donc vous n'avez pas besoin de +connaître le nom de périphérique comme dans fromiso=....). +.IP \fBfromiso\fP=\fI/PATH/TO/IMAGE\fP 4 +Permet d'utiliser un système de fichier venant de l'intérieur d'une image +ISO qui est disponible sur live\-media. +.IP \fBignore_uuid\fP 4 +Ne pas vérifierque chaque UUID embarqué dans le initramfs correspond au +medium découvert. On peut dire à live\-boot de générer un UUID en paramétrant +LIVE_GENERATE_UUID=1 lors de la construction de l'initramfs. +.IP \fBverify\-checksums\fP 4 +Si spécifié, une somme MD5 est calculée sur le média live pendant le +démarragea et est comparée à une valeur présente dans md5sum.txt dans le +répertoire racine du média live. +.IP "\fBip\fP=[\fIDEVICE\fP]:[\fICLIENT_IP\fP]:[\fINETMASK\fP]:[\fIGATEWAY_IP\fP]:[\fINAMESERVER\fP] [,[\fIDEVICE\fP]:[\fICLIENT_IP\fP]:[\fINETMASK\fP]:[\fIGATEWAY_IP\fP]:[\fINAMESERVER\fP]]" 4 +Vous laisse spécifier le(s) nom(s) et les options de l'(les) interface(s) +qui devraient être configurées au moment du démarrage. Ne pas spécifier ceci +si vous voulez utiliser dhcp (défaut). Ceci sera modifié dans une version +future pour refléter la spécification des paramètres de démarrage du noyau +officiel (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp). +.IP \fBip\fP=[\fIfrommedia\fP] 4 +Si cette variable est paramétrée, dhcp et la configuration statique sont +simplement sautées et le système utilisera à la place les interfaces (qui +doivent être) préconfigurées /etc/network/. +.IP {\fBlive\-media\fP|\fBbootfrom\fP}=\fIDEVICE\fP 4 +Si vous spécifiez une des ces deux formes équivalentes, live\-boot essaiera +en premier de trouver ce périphérique le répertoire "/live" où le système de +fichier racine en lecture seule devrait être. Si il ne trouve pas quelque +chose d'utilisable, le scan normal pour les périphériques blocks est +effectué. +.br +Plutôt que de spécifié un nom de périphérique actuel, le mot\-clef +\&'removable' peut être utilisé pour limiter la recherche des médias live +acceptables au type removable uniquement. Notez que si vous voulez +restreindre d'avantage les médias aux seuls périphériques de stockage USB, +vous pouvez utiliser le mot\-clef 'removable\-usb'. +.IP {\fBlive\-media\-encryption\fP|\fBencryption\fP}=\fITYPE\fP 4 +live\-boot montera le TYPE rootfs encrypté, en demandant une +phrase\-mot\-de\-passe, utile pour construire des systèmes live paranoïaques +:\-).Le TYPE supporté pour l'instant est "aes" pour un type d'encryptage +loop\-aes. +.IP \fBlive\-media\-offset\fP=\fIBYTES\fP 4 +De cette façon, vous pouvez dire à live\-boot que votre image démarre à +l'offset BYTES dans le périphérique spécifié ci\-dessus ou auto\-découvert, +qui pourra être utile pour cacher l'ISO du système live ou l'image à +l'intérieur d'une autr ISO ou image, pour créer des image "propre". +.IP \fBlive\-media\-path\fP=\fIPATH\fP 4 +Paramètre le chemin vers le système de fichier live sur le médium. Par +défaut, il est paramétré sur '/live' et vous ne devriez pas changer ceci +sauf si vous avez personnalisé votre média en conséquence. +.IP \fBlive\-media\-timeout\fP=\fISECONDS\fP 4 +Paramètre le temps d'expiration en secondes pour le périphérique spécifié +par "live\-media=" à être prêt avant de laisser tomber. +.IP \fBmodule\fP=\fINAME\fP 4 +Plutôt que d'utiliser le fichier optionnel par défaut "filesystem.module" +(voir ci\-dessous), un autre fichier peut être spécifié sans l'extension +".module"; il devra être placé dans le répertoire "/live" du médium live. +.IP \fBnetboot\fP[=nfs|cifs] 4 +Ceci dit à live\-boot d'effectuer un montage réseau. Le paramètre +"nfsroot="(avec l'optionnel "nfsopts="), devrait spécifier où est +l'emplacement du système de fichier racine. En l'absence d'arguments, il +essaiera cifs en premier puis, s'il échoue, nfs. +.IP \fBnfsopts\fP= 4 +Ceci vous permet de spécifier des options nfs personnalisées. +.IP \fBnofastboot\fP 4 +Ce paramètre désactive la désactivation par défaut du système de fichier +dans /etc/fstab. Si vous avez des système de fichier statiques sur votre +disque dur et vous voulez qu'ils soient vérifiés au moment du démarrage, +utilisez ce paramètre, sinon ils sont sautés. +.IP \fBnopersistence\fP 4 +désactive la fonctionnalité "persistance", utile si le bootloader (comme +syslinux) a été installé avec la persistance activée. +.IP \fBnoeject\fP 4 +Ne pas demander pour l'éjection du médium live. +.IP \fBramdisk\-size\fP 4 +Ce paramètre permet de paramétrer un taille de ramdisk personnalisée (c'est +l'option '\-o size' du montage tmpfs). Par défaut, il n'y a pas de taille de +ramdisk paramétrée, donc le montage par défaut s'applique (en fait : 50% de +la RAM disponible). Notez que cette option n'a actuellement aucun effet lors +d'un démarrage avec toram. +.IP \fBswap=true\fP 4 +Ce paramètre active l'utilisation de partition swap locales. +.IP \fBpersistence\fP 4 +live\-boot sondera les périphériques pour les média de persistance. Ceux\-ci +pourront être des partitions (avec un nom GPT correct), des systèmes de +fichier (avec une étiquette correcte) ou des fichiers image (avec un nom de +fichier correct). Les récouvrements sont étiquettés/nommés "persistence" +(voir \fIpersistence.conf\fP(5)). Les fichiers images de recouvrement sont +nommés "persistence". +.IP "\fBpersistence\-encryption\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4 +Cette option détermine quels sont les types d'encryptage que nous autorisons +à être utilisés lors du sondage des périphérique pour les médias de +persistance. Si "none" (aucun) n'est dans la liste, nous autorisons les +médias non\-cryptés; si "luks" est dans la liste, nous autorisons les médias +encryptés\-LUKS. À chaque fois qu'un périphérique contenant un média encrypté +est sondé, il sera demandé la phrase\-mot\-de\-passe à l'utilisateur. La valeur +par défaut est "none". +.IP \fBpersistence\-media\fP={\fIremovable\fP|\fIremovable\-usb\fP} 4 +Si vous spécifiez le mot\-clef 'removable', live\-boot essaiera de trouver les +partitions de persistance sur les périphériques enlevables uniquement. Notez +que si vous voulez davantage restreindre les médias à des périphériques de +stockage de masse USB uniquement, vous pouvez utiliser le mot\-clef +\&'removable\-usb'. +.IP "\fBpersistence\-method\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4 +Cette option détermine quels types de média de persistance nous autorisons +If "overlay" est dans la liste, nous considérons les récouvrements +(i.e. "live\-rw" et "home\-rw"). Le défaut est "overlay". +.IP \fBpersistence\-path\fP=\fIPATH\fP 4 +live\-boot recherchera pour des fichiers de persistance dans le répertoire +racine d'une partition, avec ce paramètre, le chemin pourra être configuré +de manière à ce que vous puissiez avoir des répertoires multiples sur la +même partition pour emmagasiner des fichiers de persistance. +.IP \fBpersistence\-read\-only\fP 4 +Les modifications de système de fichier ne sont pas sauvegardés dans le +média de persistance. En particulier, les montages NFS netboot et overlays +sont montés en lecture\-seule. +.IP "\fBpersistence\-storage\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4 +Cette option détermine quels sont les types de stockage de persistance à +considérer lors d'un sondage pour le média de persistance. Si "filesystem" +est dans la liste, les systèmes de fichier avec des étiquettes +correspondantes seront utilisés; si "file" est dans la liste, tous les +systèmes de fichier seront sondés pour archives et fichiers image avec des +noms de fichier correspondant. Le défaut est "file,filesystem". +.IP \fBpersistence\-label\fP=\fILABEL\fP 4 +live\-boot utilisera le nom "LABEL" à la place de "persistence" lorsqu'il +cherchera pour un stockage persistant. LABEL peut être tout nom de fichier +valide, étiquette de partition ou nom GPT. +.IP \fBnoeject\fP 4 +Cette option fait en sorte que live\-boot redémarre sans essayer d'éjecter le +média et sans demander à l'utilisateur de retirer le média de démarrage. +.IP \fBshowmounts\fP 4 +Avec ce paramètre, live\-boot montrera sur "/" les systèmes de fichier ro +(essentiellement compressés) sur "/lib/live". Ceci n'est pas activé par +défaut car ça pourrait conduire à des problèmes avec des applications comme +"mono" qui stocke des chemins binaires lors de l'installation. +.IP \fBsilent\fP 4 +Si vous démarrez avec le paramètre quiet normal, live\-boot caches la plupart +de ses messages. Lorsque de l'ajout de silent, il cache tout. +.IP \fBtodisk\fP=\fIDEVICE\fP 4 +À l'ajout de ce paramètre, live\-boot essaiera de copier le média en +lecture\-seule entièrement vers le périphérique spécifié avant de monter le +système de fichier racine. Il nécessite probablement un bon paquet d'espace +libre. Les démarrages suivant devraient alors sauter cette étape et +simplement spécifier le paramètre de démarrage "live\-media=DEVICE" avec le +même DEVICE utilisé cette fois. +.IP \fBtoram\fP 4 +À l'ajout de ce paramètre, live\-boot essaiera de copier l'entiereté du média +en lecture\-seule vers la RAM de l'ordinateur avant de monter le système de +fichier racine. Ceci pourrait nécessiter beaucoup de RAM, en fonction de +l'espace utilisé par le média en lecture\-seule. +.IP \fBunion\fP=aufs|overlay 4 +.\" FIXME +Par défaut, live\-boot utilise aufs. Avec ce paramètre, vous pouvez changer +ceci pour overlay. + +.\" FIXME +.SH "FICHIERS (ancien)" +.IP \fB/etc/live.conf\fP 4 +Certaines variables peuvent être configurées à l'aide de ce fichier de +configuration (à l'intérieur du système live). +.IP \fBlive/filesystem.module\fP 4 +.\" FIXME +Ce fichier optionnel (à l'intérieur du média live) contient une liste de +noms de fichier séparés\-par\-un\-caractère\-de\-retour ou une espace\-blanc +correspondants aux images disque dans le répertoire "/live". Si ce fichier +existe, uniquement les images listées ici seront fusionnées dans le aufs +racine, et elles seront chargées dans l'ordre de cette liste. La première +entrée dans ce fichier sera le point "le plus bas" dans le aufs, et le +dernier fichier dans cette liste sera en "haut" du aufs, directement en +dessous de /overlay. Sans ce fichier, toute image dans le répertoire "/live" +sont chargées par ordre alphanumérique. + +.SH FICHIERS +.IP \fB/etc/live/boot.conf\fP 4 +.IP \fB/etc/live/boot/*\fP 4 +.IP \fBlive/boot.conf\fP 4 +.IP \fBlive/boot/*\fP 4 +.IP \fBpersistence.conf\fP 4 + +.SH "VOIR AUSSI" +\fIpersistence.conf\fP(5) +.PP +\fIlive\-build\fP(7) +.PP +\fIlive\-config\fP(7) +.PP +\fIlive\-tools\fP(7) + +.SH "PAGE D'ACCUEIL" +Davantage d'informations à propos de live\-boot et du projet Live Systems +peuvent être trouvées sur la page <\fIhttp://live\-systems.org/\fP> et +dans le manuel sur <\fIhttp://live\-systems.org/manual/\fP>. + +.SH BOGUES +Les bogues peuvent être signalés en soumettant un rapport de bogue pour le +paquet live\-boot dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par +l'écriture d'un courriel à la liste de diffusion Live Systems à +<\fIdebian\-live@lists.debian.org\fP>. + +.SH AUTEUR +live\-images a été écrit par Daniel Baumann +<\fImail@daniel\-baumann.ch\fP>. diff --git a/system-boot/manpages/fr/persistence.conf.fr.5 b/system-boot/manpages/fr/persistence.conf.fr.5 new file mode 100644 index 0000000..9a26ad6 --- /dev/null +++ b/system-boot/manpages/fr/persistence.conf.fr.5 @@ -0,0 +1,224 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LIVE\-BOOT conf 22.09.2015 5.0~a5\-1 "Projet Live Systems" + +.SH NOM +\fBpersistence.conf\fP \- Fichier de configuration pour le media de persistance +dans live\-boot + +.SH DESCRIPTION +Si live\-boot sondes un volume de persistance avec l'étiquette (ou le nom GPT +ou le nom de fichier, mais à partir de maintenant nous dirons juste +"étiquette") "persistence", ce volume de persistance est complètement +personnalisable à travers le fichier \fBpersistence.conf\fP stockée à la +racine de son système de fichier. Tout volume ainsi étiquetté doit avoir un +fichier comme ceci, ou il sera ignoré. +.PP +Le format de \fBpersistence.conf\fP permet les lignes vides et les lignes +commençant avec un "#" (utilisé pour les commentaires), les deux seront +ignorés. Un "montage personnalisé" a le format : +.PP +.RS +\fIDIR\fP [\fIOPTION\fP]... +.RE +.PP +qui se traduit grossièrement par "fabrique \fIDIR\fP la persistance selon le +chemin décrit par la liste d'\fIOPTION\fPs". +.PP +Pour chaque montage personnalisé \fIDIR\fP doit être un chemin absolu qui ne +peut pas contenir d'espaces blanc ou les composants de chemins . et .. , et +ne peut pas être /live (ou un de ses sous\-répertoires). Une fois activé, +toutes les modifications (effacement de fichier, création et modification) +dans \fIDIR\fP sur le système de fichier live sont emmagasinées de façon +persistante dans un chemin équivalent à \fIDIR\fP sur le média de persitance, +appelé le répertoire source. Le moyen par défaut pour accomplir la +persistance est simplement de bind\-monter le répertoire source correspondant +à \fIDIR\fP, mais ceci peut être modifié à travers l'utilisation d'\fIOPTION\fPs. +.PP +Tous les montages personnalisés seront réalisés dans un ordre qui ne +permettent pas à deux montages personnalisés de se "cacher" l'un +l'autre. Par exemple, si nous avons les deux \fIDIR\fP:s /a et /a/b , /a sera +toujours monté en premier, puis /a/b. Ceci sera toujours vrai quelque soit +l'ordre des lignes dans \fBpersistence.conf\fP, ou si plusieurs fichiers +\fBpersistence.conf\fP sur différents média de persistance sont utilisés au +même moment. Néanmoins, il est interdit aux montages personnalisés d'avoir +leurs répertoires source à l'intérieur du répertoire source d'un autre +montage personnalisé, ainsi les répertoires source qui sont auto\-créés par +live\-boot ne prennent pas en charge les montages "emboîtés" comme /a et /a/b +sur le même média. Dans ce cas, vous devez utiliser l'option \fBsource\fP (voir +ci\-dessous) pour être certains qu'ils ne sont pas emmagasinés dans +différents répertoires source. +.PP +Lorsqu'un répertoire source n'existe pas sur le média de persistance pour un +montage personnalisé donné, il sera créé automatiquement, et les permissions +et la propriété seront paramétrées avec optimisme en accord avec \fIDIR\fP. Il +sera également amorcé en copiant le contenu du \fIDIR\fP dans son répertoire +source sur le média de persistance. L'amorçage ne se passera pas lorsque les +options \fBlink\fP ou \fBunion\fP sont utilisées (voir ci\-dessous). + +.SH OPTIONS +Les montages personnalisés défini dans \fBpersistence.conf\fP acceptent les +options suivantes dans une liste séparée par des commas : +.IP \fBsource\fP=\fIPATH\fP 4 +Lorsqu'indiqué, emmagasine les modifications persistantes dans \fIPATH\fP sur +le média de persistance. \fIPATH\fP doit être un chemin relatif (au regard de +la racine du média de persistance) qui ne peut pas contenit d'espaces blancs +ou de composants de chemins spéciaux comme . ou .. , avec l'exception qu'il +peut simplement s'agir de . qui signifie : la racine du média de +persistance.Cette option est principalement utile si vous voulez imbriquer +des montages personnalisés qui, autrement, causeraient des erreurs, ou si +vous voulez rendre disponible la racine du média en entier (équivalent à au +\- maintenant déprécié \- type de persistance \fBhome\-rw\fP). +.PP +Les options suivantes sont mutuellement exclusives (uniquement la dernière +donnée sera effective) : +.IP \fBbind\fP 4 +Bind\-monte le répertoire source dans \fIDIR\fP. Ceci est le défaut. +.IP \fBlink\fP 4 +Crée la structure de répertoire du répertoire source sur le média de +persistance dans \fIDIR\fP et crée des liens symboliques depuis l'emplacement +correspondant dans \fIDIR\fP pour chaque fichier dans le répertoire source. Les +fichiers ou répertoire existants avec le même nom aussi bien que tout lien +seront écrasés. Notez que l'effacement des liens dans \fIDIR\fP supprimera +uniquement le lien, pas le fichier correspondant dans la source; les liens +supprimés réapparaîtront après un redémarrage. Pour ajouter ou supprimer un +fichier de façon permanente, on doit le faire directement dans le répertoire +source. +.IP +En réalité, \fBlink\fP rendra persistants uniquement les fichiers déjà présents +dans le répertoire source, aucun autre fichier dans \fIDIR\fP. Ces fichiers +doivent être ajoutés manuellement au répertoire source pour pouvoir utiliser +cette option, et ils apparaîtront dans \fIDIR\fP en addition des fichiers déjà +présents. Cette option est utile lorsque seulement certain fichiers doivent +être persistants, et pas l'ensemble du répertoire dans lequel ils se +trouvent, par exemple certains fichiers de configuration dans le répertoire +de l'utilisateur. +.IP \fBunion\fP 4 +Sauvegarde la branche rw d'un union sur le média de persistance, ainsi, +seuls les modifications sont emmagasinnées de façon persistante. Ceci peut +potentiellement réduire l'utilisation du disque comparé aux montages\-bind, +et ne cachera pas les fichiers ajoutés au média en lecture seule. Un +avertissement est que l'union utilisera \fIDIR\fP depuis le système de fichier +en lecture seule de l'image, pas le système de fichier racine réel, et donc +les fichiers créés après le démarrage (par exemple par live\-config) +n'apparaîtront pas dans l'union. Cette option utilisera le système de +fichier union spécifié par le paramètre de démarrage \fBunion\fP de live\-boot. + +.SH RÉPERTOIRES +.IP \fB/live/persistence\fP 4 +Tous les volumes de persistance seront montés ici (dans le répertoire +correspondant au nom de périphérique). Le fichier \fBpersistence.conf\fP peut +être facilement édité à travers ce montage, de la même façon que tout +répertoire source (ce qui est spécialement pratique pour les montages +personnalisés utilisant l'option \fBlink\fP). + +.SH EXEMPLES + +Disons que nous avons un volume persistant \fIVOL\fP avec un fichier +\fBpersistence.conf\fP contenantles quatre lignes suivantes (numérotée pour +faciliter leur référencement) : +.TP 7 +1. +/home/user1 link,source=config\-files/user1 +.TP +2. +/home/user2 link,source=config\-files/user2 +.TP +3. +/home +.TP +4. +/usr union +.PP +Les répertoires source correspondant sont : +.TP 7 +1. +\fIVOL\fP/config\-files/user1 (mais ce serait \fIVOL\fP/home/user1 sans l'option +\fBsource\fP) +.TP +2. +\fIVOL\fP/config\-files/user2 (mais ce serait \fIVOL\fP/home/user2 sans l'option +\fBsource\fP) +.TP +3. +\fIVOL\fP/home +.TP +4. +\fIVOL\fP/usr +.PP +Il était nécessaire de paramétrer les options \fBsource\fP pour 1 et 2, +puisqu'autrement ils seraient devenus imbriqués avec la source du 3, ce qui +est invalide. +.PP +La ligne 3 sera prise en compte avant les lignes 1 et 2 afin d'éviter que +les montages personnalisés 1 et 2 ne soient cachés par 3. Lorsque la ligne 3 +est prise en charge, \fIVOL\fP/home est simplement bind\-monté sur /home. Pour +illustrer ce qu'il se passe pour les lignes 1 et 2, disons que les fichiers +suivants existent : +.TP 7 +a. +\fIVOL\fP/config\-files/user1/.emacs +.TP +b. +\fIVOL\fP/config\-files/user2/.bashrc +.TP +c. +\fIVOL\fP/config\-files/user2/.ssh/config +.PP +Puis que les liens et les répertoires suivant seront créés : +.TP 7 +Liens : +/home/user1/.emacs \-> \fIVOL\fP/config\-files/user1/.emacs (depuis a) +.TP +Liens : +/home/user2/.bashrc \-> \fIVOL\fP/config\-files/user2/.bashrc (depuis b) +.TP +Rép : +/homea/user2/.ssh (depuis c) +.TP +Liens : +/home/user2/.ssh/config \-> \fIVOL\fP/config\-files/user2/.ssh/config (depuis +c) +.PP +On pourrait dire que les lignes 1 et 2 dans l'exemple de fichier +\fBpersistence.conf\fP ci\-dessus sont non\-nécessaires puisque la ligne 3 +rendrait déjà presistant l'entierté de /home. L'option \fBlink\fP est pensée +pour les situations où vous ne voulez pas que tout le répertoire soit +persistant, mais seulement certains de fichiers y étant présents ou ses +sous\-répertoires. +.PP +La ligne 4 peut être montée n'importe quand puisque son \fIDIR\fP (et +répertoire source) est complètement disjoint de tous les autres montages +personnalisés. Lorsque monté, \fIVOL\fP/usr sera la branche rw à cause de +l'option \fBunion\fP, et contiendra seulement la différence comparée au système +de fichier en lecture seule sous\-jascent. En conséquence, les paquets +pourront être installés dans /usr avec une grande efficacité d'empreinte +d'espace comparé aux montages\-bind, puisque dans ce dernier cas, tout le +contenu de /usr devra être copié dans \fIVOL\fP/usr pendant l'amorçage inital. + +.SH "VOIR AUSSI" +\fIlive\-boot\fP(7) +.PP +\fIlive\-build\fP(7) +.PP +\fIlive\-config\fP(7) +.PP +\fIlive\-tools\fP(7) + +.SH "PAGE D'ACCUEIL" +Davantage d'informations à propos de live\-boot et du projet Live Systems +peuvent être trouvées sur la page <\fIhttp://live\-systems.org/\fP> et +dans le manuel sur <\fIhttp://live\-systems.org/manual/\fP>. + +.SH BOGUES +Les bogues peuvent être signalés en soumettant un rapport de bogue pour le +paquet live\-boot dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par +l'écriture d'un courriel à la liste de diffusion Live Systems à +<\fIdebian\-live@lists.debian.org\fP>. + +.SH AUTEUR +live\-images a été écrit par Daniel Baumann +<\fImail@daniel\-baumann.ch\fP>. diff --git a/system-boot/manpages/ja/live-boot.ja.7 b/system-boot/manpages/ja/live-boot.ja.7 new file mode 100644 index 0000000..ec0a519 --- /dev/null +++ b/system-boot/manpages/ja/live-boot.ja.7 @@ -0,0 +1,229 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LIVE\-BOOT 7 2015\-09\-22 5.0~a5\-1 "Live システムプロジェクト" + +.SH 名前 +\fBlive\-boot\fP \- システム起動構成要素 + +.SH 説明 +\fBlive\-boot\fP はブートプロセス中 (早期ユーザ空間) に Live システムを設定する構成要素を収録しています。 +.PP +.\" FIXME +live\-boot は initramfs\-tools 用のフックで、例えば \fIlive\-helper\fP(7) で作成した Live +システムをブートできる initramfs を生成するのに利用します。これには Live システムの ISO やネットワーク経由でブートするための +tar アーカイブ、USB メモリ用のイメージ等があります。 +.PP +.\" FIXME +これはブート時に root ファイルシステム (squashfs 等圧縮ファイルシステムのイメージであることが多い) +が置かれている「/live」ディレクトリを収録する (読み取り専用の) メディアを検索します。見つけた場合は aufs +を使って書き込み可能な環境を作成してシステムを起動します。 + +.SH 設定 +\fBlive\-boot\fP はブートパラメータまたは設定ファイル経由で設定できます。 +.PP +Live イメージで利用されるデフォルトの live\-boot パラメータを設定する場合は \fIlb_config\fP(1) マニュアルページの +\-\-bootappend\-live オプションを見てください。 + +.SS カーネルパラメータ +\fBlive\-boot\fP はカーネルパラメータとして「boot=live」が利用された場合にのみ有効になります。 +.PP +さらに、挙動に影響するブートパラメータが他にもいくつかあります。下記を見てください。 + +.SS 設定ファイル +\fBlive\-boot\fP は設定ファイルを利用して設定 (但し有効化しない) できます。この設定ファイルは root ファイルシステム自体 +(/etc/live/boot.conf、 /etc/live/boot/*)、または Live メディア (live/boot.conf、 +live/boot/*) に配置できます。 + +.SH オプション +.\" FIXME +\fBlive\-boot\fP では以下のパラメータが現在有効です。 +.IP \fBaccess\fP=\fIアクセス\fP 4 +物理的または視覚的に障害のあるユーザ向けのアクセシビリティレベルをセットします。\fIアクセス\fPに入るのは v1、v2、v3、m1、m2 +のどれかでないといけません。v1=軽度の視覚障害、 v2=中程度の視覚障害、 v3=盲目、 m1=運動神経に些細な難あり、 +m2=運動神経に中程度の難あり。 +.IP \fBconsole\fP=\fITTY,速度\fP 4 +「live\-getty」オプションで利用するデフォルトのコンソールをセットします。例: 「console=ttyS0,115200」 +.IP \fBdebug\fP 4 +initramfs ブートプロセスの出力をもっと冗長にします。 +.br +debug=1 としてください +.br +debug に値をセットしないとメッセージは表示されないかもしれません。 +.IP \fBfetch\fP=\fIURL\fP 4 +.IP \fBhttpfs\fP=\fIURL\fP 4 +指定した URL から squashfs イメージをダウンロードしてネットワーク経由でブートする別のやり方で、この取得方法ではイメージを RAM +にコピーし、httpfs を使う方法では FUSE と httpfs2 を使ってイメージを適切な位置にマウントします。RAM +へのコピーにはさらに多くのメモリが必要で、大きなイメージでは多少時間がかかるかもしれません。しかしその後はネットワークを必要としないため正常に動作する可能性が高くなり、それ以上サーバとやりとりする必要がないためブート後はそのシステムは高速に動作します。 +.br +busybox の現在の wget 及び DNS 解決の制限のために URL にはホスト名を使えず、IPアドレスにしか対応していません。 +.br +機能しない: http://example.com/path/to/your_filesystem.squashfs +.br +機能する: http://1.2.3.4/path/to/your_filesystem.squashfs +.br +また、そのため httpd の名前ベースのバーチャルホストからイメージを取得することは、httpd +のそのホストの設定で同一のIPアドレスを共有している場合は現在不可能であることにも注意してください。 +.br +また、squashfs イメージの適切な位置にある Live ISO イメージも利用できます。 +.IP \fBiscsi\fP=\fIサーバのIPアドレス[,サーバのポート];対象の名前\fP 4 +LUN (Logical Unit Number、論理ユニット番号) が iso またはディスクの Live イメージを指している iSCSI +ターゲットからのブートで、指定されたターゲットは LUN のうち Live メディアらしきものから検索されます。\fBiscsitarget\fP +ソフトウェアを使って iSCSI ターゲットを判定している場合の ietd.conf はこのようになります: +.br +# iscsi= パラメータで指定したターゲットの名前 +.br +Target <ターゲットの名前> + Lun 0 Path=,Type=fileio,IOMode=ro + # 複数のマシンのブートに使いたい場合は + # Wthreads や MaxConnections のような一部の + # パラメータを調整してみるのもいいかもしれません。 +.IP \fBfindiso\fP=\fI/イメージ/への/パス\fP 4 +\&.squashfs ファイルを通常検索する位置にある全ディスクから、指定した ISO ファイルを検索します (そのため +fromiso=... で指定するデバイス名を知っている必要はありません)。 +.IP \fBfromiso\fP=\fI/イメージ/への/パス\fP 4 +Live メディア上で利用可能な ISO イメージ内からファイルシステムを利用できるようにします。 +.IP \fBignore_uuid\fP 4 +検出したメディアに合う initramfs に埋め込まれた UUID の確認を一切行いません。initramfs のビルド時に +LIVE_GENERATE_UUID=1 を設定して UUID を生成するように live\-boot に指示しているかもしれません。 +.IP \fBverify\-checksums\fP 4 +指定するとブート中に Live メディアの MD5 サムを計算し、その Live メディアのルートディレクトリにある md5sum.txt +中の値と比較します。 +.IP "\fBip\fP=[\fIデバイス\fP]:[\fIクライアントのIPアドレス\fP]:[\fIネットマスク\fP]:[\fIゲートウェイのIPアドレス\fP]:[\fIネームサーバ\fP] [,[\fIデバイス\fP]:[\fIクライアントのIPアドレス\fP]:[\fIネットマスク\fP]:[\fIゲートウェイのIPアドレス\fP]:[\fIネームサーバ\fP]]" 4 +ブート時に設定するインターフェイスの名前とオプションを指定できます。dhcp (デフォルト) +を使いたい場合は指定しないでください。将来のリリースでは公式のカーネルブートパラメータの仕様に倣って変更される (例えば +ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp) かもしれません。 +.IP \fBip\fP=[\fI読み込み元メディア\fP] 4 +この変数をセットすると dhcp 及び固定のネットワーク設定は単に飛ばされ、システムはメディアで事前に設定されている (設定されていないといけません) +/etc/network/interfaces を代わりに利用します。 +.IP {\fBlive\-media\fP|\fBbootfrom\fP}=\fIデバイス\fP 4 +この2つは等価で、どちらかを指定すると live\-boot +はまずこのデバイスについて読み取り専用のルートファイルシステムが存在するであろう「/live」ディレクトリを検索します。それで使えそうなものが見つからない場合は通常のブロックデバイスの走査が行われます。 +.br +実際のデバイス名を指定する代わりに「removable」というキーワードを使って、検索対象とする Live +メディアを脱着可能なものだけに限定することができます。メディアを USB +大容量記憶装置だけにさらに限定したい場合は「removable\-usb」というキーワードを使えることに注目してください。 +.IP {\fBlive\-media\-encryption\fP|\fBencryption\fP}=\fI暗号化の種類\fP 4 +live\-boot はパスフレーズを質問することで暗号化する種類の rootfs をマウントできます。凝った Live システムをビルドするのに有用です +:\-)。これまでのところサポートしているのは loop\-aes 暗号化を指示する「aes」です。 +.IP \fBlive\-media\-offset\fP=\fIバイト数\fP 4 +このようにして、上記で指定したまたは自動検出したデバイスの、指定バイト数だけずれた位置からイメージが開始することを live\-boot +に指示できます。他の ISO やイメージの中にある Live システムの ISO +やイメージを見えないようにして「クリーン」なイメージを作成するのに有用かもしれません。 +.IP \fBlive\-media\-path\fP=\fIパス\fP 4 +メディア上の Live +ファイルシステムへのパスをセットします。このデフォルト値は「/live」で、合わせてメディアを独自化していない限りこの値を変更すべきではありません。 +.IP \fBlive\-media\-timeout\fP=\fI秒数\fP 4 +「live\-media=」により指定したデバイスがその処理をあきらめるまでの制限時間を秒数で指示します。 +.IP \fBmodule\fP=\fI名前\fP 4 +デフォルトとなっているオプションのファイル「filesystem.module」(以下参照) +を使う代わりに別のファイルを拡張子「.module」を外して指定することができます。これは Live +メディアの「/live」ディレクトリに配置すべきです。 +.IP \fBnetboot\fP[=nfs|cifs] 4 +ネットワークマウントを行うことを live\-boot に指示します。(オプションの「nfsopts=」で) +パラメータ「nfsroot=」によりルートファイルシステムが置かれている場所を指定します。引数を付けない場合はまず cifs +を試し、それが失敗した場合は nfs を試します。 +.IP \fBnfsopts\fP= 4 +これを使って nfs オプションを指定できます。 +.IP \fBnofastboot\fP 4 +このパラメータは /etc/fstab +にあるファイルシステムのチェックがデフォルトで無効化されているのを無効にします。ハードディスクに静的ファイルシステムがあり、ブート時にそれをチェックさせたい場合はこのパラメータを使ってください。使わない場合はファイルシステムのチェックは飛ばされます。 +.IP \fBnopersistence\fP 4 +「保持 (persistence)」機能を無効化します。ブートローダ (syslinux のようなもの) +が保持機能を有効にしてインストールされている場合に有用です。 +.IP \fBnoeject\fP 4 +Live メディアを取り出すかどうか確認しません。 +.IP \fBramdisk\-size\fP 4 +このパラメータにより独自の RAM ディスクサイズ (tmpfs マウント時の「\-o サイズ」オプション) をセットできます。デフォルトでは RAM +ディスクサイズはセットされていないため、マウント時のデフォルト値が適用されます (現在は利用可能な RAM の 50%)。toram +を指定してブートした場合、このオプションは現在のところ効果がないことに注意してください +.IP \fBswap=true\fP 4 +このパラメータはローカルのスワップパーティションの利用を有効にします。 +.IP \fBpersistence\fP 4 +live\-boot は保持用メディアのデバイスを調査します。このデバイスにはパーティション (GPT (GUID Partition +Table、GUIDパーティションテーブル) の名前を正しく指定) やファイルシステム (ラベルの名前を正しく指定)、イメージファイル +(ファイル名を正しく指定) を使えます。保存先は「persistence」(\fIpersistence.conf\fP(5) 参照) +という名前/ラベルになります。保存先のイメージファイルは「persistence」という名前になります。 +.IP "\fBpersistence\-encryption\fP=\fI種類1\fP,\fI種類2\fP ... \fI種類n\fP" 4 +このオプションは保持用メディアのデバイス調査時に利用を許可する暗号化の種類を決定します。「none」が一覧にある場合は暗号化されていないメディアを許可します。「luks」が一覧にある場合は +LUKS +により暗号化されているメディアを許可します。暗号化されているメディアがデバイスにある場合はそのメディアの調査時にパスフレーズをユーザに質問します。デフォルト値は「none」です。 +.IP \fBpersistence\-media\fP={\fIremovable\fP|\fIremovable\-usb\fP} 4 +「removable」というキーワードを指定すると、live\-boot は保持用パーティションを脱着可能なメディアからのみ検索します。メディアを USB +大容量記憶装置だけにさらに限定したい場合は「removable\-usb」というキーワードを使えることに注目してください。 +.IP "\fBpersistence\-method\fP=\fI種類1\fP,\fI種類2\fP ... \fI種類n\fP" 4 +このオプションは許可する保持用メディアの種類を決定します。「overlay」が一覧にある場合はオーバーレイと見なします +(つまり「live\-rw」と「home\-rw」)。デフォルト値は「overlay」です。 +.IP \fBpersistence\-path\fP=\fIパス\fP 4 +live\-boot +は保持用ファイルをパーティションのルートディレクトリから検索します。このパラメータを使ってパスを設定すると同一のパーティションの複数のディレクトリを保持用ファイルの保管先にできます。 +.IP \fBpersistence\-read\-only\fP 4 +ファイルシステムの変更は保持用メディアには残されません。特にオーバーレイとネットワーク経由のブート用の NFS +マウントは読み取り専用でマウントされます。 +.IP "\fBpersistence\-storage\fP=\fI種類1\fP,\fI種類2\fP ... \fI種類n\fP" 4 +このオプションは保持用メディアの調査時に対象とする保持用記憶装置の種類を決定します。「filesystem」が一覧にある場合はラベルが該当するファイルシステムを利用します。「file」が一覧にある場合は全ファイルシステムについてファイル名が該当するアーカイブやイメージファイルを調査します。デフォルト値は「file,filesystem」です。 +.IP \fBpersistence\-label\fP=\fIラベル\fP 4 +live\-boot +は保持用記憶装置の検索時に「persistence」の代わりにここで指定した「ラベル」を使います。「ラベル」はファイル名やパーティションのラベル、GPT +の名前として有効な任意のものを使えます。 +.IP \fBnoeject\fP 4 +このオプションを使うと live\-boot はメディアを取り出さず、ブート用メディアを削除するかユーザに質問することもなくリブートします。 +.IP \fBshowmounts\fP 4 +このパラメータを使うと live\-boot は「/」で「/lib/live」上の (ほとんどの場合圧縮されている) ro +ファイルシステムを提示します。これはインストール時にバイナリのパスを記憶する「mono」のようなアプリケーションで問題を起こす可能性があるためデフォルトでは有効にされていません。 +.IP \fBsilent\fP 4 +通常の quiet パラメータを付けてブートすると live\-boot +が出すほとんどのメッセージを非表示にします。「silent」を付けると全て非表示にします。 +.IP \fBtodisk\fP=\fIデバイス\fP 4 +このパラメータを追加すると、live\-boot +はルートファイルシステムをマウントする前に読み取り専用メディア全体を指定したデバイスにコピーしようとします。これには恐らく多くの RAM +が必要となります。以後のブートではこの段階を飛ばして、今回そのデバイスで使ったのと同一の「live\-media=デバイス」ブートパラメータを単に指定するようにしてください。 +.IP \fBtoram\fP 4 +このパラメータを追加すると、live\-boot はルートファイルシステムをマウントする前に読み取り専用メディア全体をそのコンピュータの RAM +にコピーしようとします。その読み取り専用メディアで利用している容量により、これには多くの RAM が必要となるかもしれません。 +.IP \fBunion\fP=overlay|aufs 4 +.\" FIXME +デフォルトで live\-boot は overlay を利用します。このパラメータにより aufs に切り替えることができます。 + +.\" FIXME +.SH "ファイル (古い情報)" +.IP \fB/etc/live.conf\fP 4 +一部の変数はこの (Live システム中の) 設定ファイルにより設定できます。 +.IP \fBlive/filesystem.module\fP 4 +.\" FIXME +この (Live メディア内の) +オプションのファイルは「/live」ディレクトリ中のディスクイメージに対応するファイル名を空白文字または復帰文字で区切った一覧を収録します。このファイルが存在する場合はその中の一覧にあるイメージだけがルート +aufs に統合され、その一覧の順に読み込まれます。このファイルの最初の項目が /overlay 直下で aufs +の「最下位の」マウントポイント、この一覧の最後のファイルが /overlay 直下で aufs +の「最上位の」マウントポイントとなります。このファイルがない場合は「/live」ディレクトリにあるイメージを英数字順に読み込みます。 + +.SH ファイル +.IP \fB/etc/live/boot.conf\fP 4 +.IP \fB/etc/live/boot/*\fP 4 +.IP \fBlive/boot.conf\fP 4 +.IP \fBlive/boot/*\fP 4 +.IP \fBpersistence.conf\fP 4 + +.SH 関連項目 +\fIpersistence.conf\fP(5) +.PP +\fIlive\-build\fP(7) +.PP +\fIlive\-config\fP(7) +.PP +\fIlive\-tools\fP(7) + +.SH ホームページ +live\-boot 及び Live +システムプロジェクトについてのさらなる情報は、<\fIhttp://live\-systems.org/\fP> のホームページや +<\fIhttp://live\-systems.org/manual/\fP> のマニュアルにあります。 + +.SH バグ +バグは <\fIhttp://bugs.debian.org/\fP> にあるバグ追跡システムに live\-boot +パッケージのバグ報告として提出するか、<\fIdebian\-live@lists.debian.org\fP> にある Live +システムのメーリングリスト宛てにメールを書くことにより報告できます。 + +.SH 作者 +live\-boot は Daniel Baumann さん <\fImail@daniel\-baumann.ch\fP> により書かれました。 diff --git a/system-boot/manpages/ja/persistence.conf.ja.5 b/system-boot/manpages/ja/persistence.conf.ja.5 new file mode 100644 index 0000000..4a4fde9 --- /dev/null +++ b/system-boot/manpages/ja/persistence.conf.ja.5 @@ -0,0 +1,155 @@ +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* +.TH LIVE\-BOOT conf 2015\-09\-22 5.0~a5\-1 "Live システムプロジェクト" + +.SH 名前 +\fBpersistence.conf\fP \- live\-boot 状態保持用メディアの設定ファイル + +.SH 説明 +live\-boot が「persistence」というラベル (GPT の名前やファイル名も含みますがここからは「ラベル」と呼びます) +を付けられた保持用ボリュームを調査するとき、そのボリュームの保持方法はそのファイルシステムの最上部に置かれた \fBpersistence.conf\fP +ファイルにより全面的に独自化できます。こういったラベルを付けられたボリュームにはそういったファイルがないといけません。ない場合は無視します。 +.PP +\fBpersistence.conf\fP の形式では空行や「#」で始まる行 (コメント用) +を両方とも利用でき、そういった行は解釈されず無視されます。いわゆる「独自マウント」は +.PP +.RS +\fIディレクトリ\fP [\fIオプション\fP]... +.RE +.PP +の形式で、大まかに言い換えると「\fIオプション\fP一覧により指示した方法で\fIディレクトリ\fPを保持する」ということになります。 +.PP +独自マウントそれぞれについて\fIディレクトリ\fPには絶対パスを使う必要があり、空白文字や特別なパスである「.」や「..」を含めること、/live +(やそのサブディレクトリ) を使うことはできません。Live ファイルシステムの\fIディレクトリ\fPに対するあらゆる変更 (ファイルの削除や作成、変更) +はそれを有効にした段階でソースディレクトリと呼ばれる保持用メディアの\fIディレクトリ\fPに相当するパスに持続的に保管されます。保持を実現するデフォルトの方法は対応するソースディレクトリを\fIディレクトリ\fPに対して単純にバインドマウントする方法ですが、これは\fIオプション\fPを使うことで変更できます。 +.PP +独自マウントは全て順番に行われるため、2つの独自マウントで互いに「隠す」ようなことはできません。例えば2つの\fIディレクトリ\fP /a と /a/b +があるとすると、この場合は常にまず /a がマウントされ、それから /a/b がマウントされます。これは \fBpersistence.conf\fP +の他の行の順を問わず成り立ち、異なる保持用メディアにある複数の \fBpersistence.conf\fP +ファイルを同時に使う場合でも同様です。しかし、独自マウントではソースディレクトリを別の独自マウントのソースディレクトリ内にすることは禁止されているため、live\-boot +により自動生成されたソースディレクトリは同一のメディアでの /a と /a/b のような「入り組んだ」マウントをサポートしません。この場合は +\fBsource\fP オプション (以下参照) を使い、対象ディレクトリが必ず異なるソースディレクトリにあるようにしないといけません。 +.PP +特定の独自マウントのソースディレクトリが保持用メディアに存在しない場合は自動的に作成され、その\fIディレクトリ\fPにふさわしい権限と所有がセットされます。\fIディレクトリ\fPの内容を保持用メディアのソースディレクトリにコピーすることでもこの自動処理は行われます。\fBlink\fP +や \fBunion\fP オプション (以下参照) を使った場合はこの自動処理は行われません。 + +.SH オプション +\fBpersistence.conf\fP で定義する独自マウントでは以下のオプションをコンマで区切った一覧の形で受け付けます: +.IP \fBsource\fP=\fIパス\fP 4 +指定した場合は保持用メディアの\fIパス\fPに保持内容の変更を保管します。\fIパス\fPは (その保持用メディアのルートからの) +相対パスを使う必要があり、空白文字や特別なパスである「.」や「..」については、「.」だけが単体で使われたときにはその保持用メディアのルートを指しますが、その例外を除いて含めることができません。このオプションが関連するのはほとんどが、これ以外ではエラーを引き起こす入り組んだ独自マウントにしたい場合、またはメディア全体のルートを利用できるようにしたい場合です +(現在では非推奨となっている \fBhome\-rw\fP という種類の保持に似ています)。 +.PP +以下のオプションは相互に排他です (効果があるのは最後に指定したものだけです): +.IP \fBbind\fP 4 +ソースディレクトリを\fIディレクトリ\fPにバインドマウントします。これはデフォルトです。 +.IP \fBlink\fP 4 +ソースディレクトリのディレクトリ構造を保持用メディアの\fIディレクトリ\fPに作成し、\fIディレクトリ\fPの対応する位置からソースディレクトリの各ファイルに向けてシンボリックリンクを作成します。リンクと同一名の既存のファイルやディレクトリは全て上書きされます。\fIディレクトリ\fP内にあるリンクの削除はリンクを削除するだけで、ソースの対応するファイルは削除しないことに注意してください。削除したリンクは再起動後には再び現れます。ファイルを恒久的に追加、削除するにはソースディレクトリで直接その作業を行わないといけません。 +.IP +事実上、\fBlink\fP +は既にソースディレクトリにあるファイルだけを保持し、\fIディレクトリ\fPにあるそれ以外のファイルは保持しません。保持するファイルをこのオプションの対象とするには手作業によりソースディレクトリに追加する必要があり、そうすることで\fIディレクトリ\fPに、既にそこにあるファイルに加えて現れるようになります。このオプションは特定のファイルだけを保持する必要があり、それがあるディレクトリ全体が必要ではない場合、例えばユーザのホームディレクトリにある設定ファイルの一部を保持する場合に有用です。 +.IP \fBunion\fP 4 +結合ファイルシステムの rw +ブランチを保持用メディアに保存するため、変更点だけを持続的に保管します。バインドマウントと比較するとこの方法は潜在的にディスク使用量を減らせる可能性があり、また読み取り専用メディアに追加したファイルを隠しません。1つ注意があり、結合後に実際のファイルシステムのルートではなくイメージの読み取り専用ファイルシステムから\fIディレクトリ\fPを使うため、(例えば +live\-config により) ブート後に作成されたファイルは結合後には見えなくなります。このオプションは live\-boot の \fBunion\fP +ブートパラメータにより指定された結合ファイルシステムを使います。 + +.SH ディレクトリ +.IP \fB/live/persistence\fP 4 +保持用ボリュームは全てここで (デバイス名に対応するディレクトリで) マウントされます。\fBpersistence.conf\fP +ファイルはこのマウントや任意のソースディレクトリから (\fBlink\fP オプションを使った独自マウントではこちらが特に実用的) 簡単に編集できます。 + +.SH 例 + +保持用ボリューム \fIVOL\fP があり、その \fBpersistence.conf\fP ファイルに以下の4行を収録しているものとしましょう +(番号は参照しやすいように付加しています): +.TP 7 +1. +/home/user1 link,source=config\-files/user1 +.TP +2. +/home/user2 link,source=config\-files/user2 +.TP +3. +/home +.TP +4. +/usr union +.PP +それぞれに対応するディレクトリ: +.TP 7 +1. +\fIVOL\fP/config\-files/user1 (ただし \fBsource\fP オプションを指定しない場合は \fIVOL\fP/home/user1) +.TP +2. +\fIVOL\fP/config\-files/user2 (ただし \fBsource\fP オプションを指定しない場合は \fIVOL\fP/home/user2) +.TP +3. +\fIVOL\fP/home +.TP +4. +\fIVOL\fP/usr +.PP +1と2の例では \fBsource\fP オプションをセットする必要があります。そうしないと3のソースと入り組んでしまい不正となるためです。 +.PP +1行目と2行目の独自マウントが3行目によって隠されるのを回避するため3行目は1行目と2行目よりも先に処理されます。3行目が処理された時点で +\fIVOL\fP/home は単純に /home +に対してバインドマウントした状態になります。1行目と2行目で起きたことを説明するため、以下のファイルが存在するとしましょう: +.TP 7 +a. +\fIVOL\fP/config\-files/user1/.emacs +.TP +b. +\fIVOL\fP/config\-files/user2/.bashrc +.TP +c. +\fIVOL\fP/config\-files/user2/.ssh/config +.PP +それにより作成されるリンクやディレクトリ: +.TP 7 +リンク: +/home/user1/.emacs \-> \fIVOL\fP/config\-files/user1/.emacs (a の場合) +.TP +リンク: +/home/user2/.bashrc \-> \fIVOL\fP/config\-files/user2/.bashrc (b の場合) +.TP +ディレクトリ: +/homea/user2/.ssh (c の場合) +.TP +リンク: +/home/user2/.ssh/config \-> \fIVOL\fP/config\-files/user2/.ssh/config (c の場合) +.PP +別の主張があるかもしれませんが、上記の \fBpersistence.conf\fP ファイルの例では3行目が既に /home +の全てを保持対象としているため1行目と2行目は不要です。\fBlink\fP +オプションはディレクトリ全体を保持したいのではなく、そのディレクトリ中やサブディレクトリにある特定のファイルを保持したいという状況を対象としています。 +.PP +4行目はその\fIディレクトリ\fP (とソースディレクトリ) +が他のどの独自マウントとも完全に分離しているためいつでもマウントできます。マウントすると、\fIVOL\fP/usr は \fBunion\fP +オプションが指定されているため rw +ブランチになり、元の読み取り専用ファイルシステムと比較した差分だけが収録されます。そのため、バインドマウントと比較すると容量の面で非常に効率良くパッケージを +/usr にインストールできます。これは後者では初期の自動処理で /usr 全体を \fIVOL\fP/usr にコピーする必要があるためです。 + +.SH 関連項目 +\fIlive\-boot\fP(7) +.PP +\fIlive\-build\fP(7) +.PP +\fIlive\-config\fP(7) +.PP +\fIlive\-tools\fP(7) + +.SH ホームページ +live\-boot 及び Live +システムプロジェクトについてのさらなる情報は、<\fIhttp://live\-systems.org/\fP> のホームページや +<\fIhttp://live\-systems.org/manual/\fP> のマニュアルにあります。 + +.SH バグ +バグは <\fIhttp://bugs.debian.org/\fP> にあるバグ追跡システムに live\-boot +パッケージのバグ報告として提出するか、<\fIdebian\-live@lists.debian.org\fP> にある Live +システムのメーリングリスト宛てにメールを書くことにより報告できます。 + +.SH 作者 +live\-boot は Daniel Baumann さん <\fImail@daniel\-baumann.ch\fP> により書かれました。 diff --git a/system-boot/manpages/po/es/live-boot.7.po b/system-boot/manpages/po/es/live-boot.7.po new file mode 100644 index 0000000..d2c8682 --- /dev/null +++ b/system-boot/manpages/po/es/live-boot.7.po @@ -0,0 +1,1077 @@ +# Spanish translations for live-boot package +# Copyright (C) 2012-2014 Carlos Zuferri «chals» +# This file is distributed under the same license as the live-boot package. +# +msgid "" +msgstr "" +"Project-Id-Version: live-boot\n" +"POT-Creation-Date: 2015-09-22 10:09+0200\n" +"PO-Revision-Date: 2013-11-10 20:10+0900\n" +"Last-Translator: Carlos Zuferri \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.5.4\n" + +#. type: TH +#: en/live-boot.7:1 en/persistence.conf.5:1 +#, no-wrap +msgid "LIVE-BOOT" +msgstr "LIVE-BOOT" + +#. type: TH +#: en/live-boot.7:1 en/persistence.conf.5:1 +#, no-wrap +msgid "2015-09-22" +msgstr "" + +#. type: TH +#: en/live-boot.7:1 en/persistence.conf.5:1 +#, no-wrap +msgid "5.0~a5-1" +msgstr "" + +#. type: TH +#: en/live-boot.7:1 en/persistence.conf.5:1 +#, no-wrap +msgid "Live Systems Project" +msgstr "Proyecto Live Systems" + +#. type: SH +#: en/live-boot.7:3 en/persistence.conf.5:3 +#, no-wrap +msgid "NAME" +msgstr "NOMBRE" + +#. type: Plain text +#: en/live-boot.7:5 +msgid "B - System Boot Components" +msgstr "B - Componentes de Arranque del Sistema" + +#. type: SH +#: en/live-boot.7:6 en/persistence.conf.5:7 +#, no-wrap +msgid "DESCRIPTION" +msgstr "DESCRIPCIÓN" + +#. type: Plain text +#: en/live-boot.7:8 +msgid "" +"B contains the components that configure a live system during the " +"boot process (early userspace)." +msgstr "" +"B contiene los componentes que configuran un sistema en vivo " +"durante el proceso de arranque (early userspace)." + +#. FIXME +#. type: Plain text +#: en/live-boot.7:11 +msgid "" +"live-boot is a hook for the initramfs-tools, used to generate a initramfs " +"capable to boot live systems, such as those created by I(7). " +"This includes the Live systems ISOs, netboot tarballs, and usb stick images." +msgstr "" +"live-boot es un hook para initramfs-tools, usado para generar un initramfs " +"capaz de arrancar sistemas en vivo, tales como los creados por I(7). Esto incluye las ISOs de Live Systems, netboot tarballs y las " +"imágenes para llaves usb. " + +#. FIXME +#. type: Plain text +#: en/live-boot.7:14 +msgid "" +"At boot time it will look for a (read-only) medium containing a \"/live\" " +"directory where a root filesystems (often a compressed filesystem image like " +"squashfs) is stored. If found, it will create a writable environment, using " +"aufs, to boot the system from." +msgstr "" +"En el momento del arranque se buscará un dispositivo de sólo lectura que " +"contenga un directorio \"/live\" dónde se almacena un sistema de ficheros " +"raíz (a menudo se trata de una imagen comprimida de un sistema de ficheros " +"como squashfs). Si live-boot lo encuentra, creará un entorno de escritura, " +"usando aufs, a partir del cual pueda arrancar un sistema." + +#. type: SH +#: en/live-boot.7:15 +#, no-wrap +msgid "CONFIGURATION" +msgstr "CONFIGURACIÓN" + +#. type: Plain text +#: en/live-boot.7:17 +msgid "" +"B can be configured through a boot parameter or a configuration " +"file." +msgstr "" +"B se puede configurar mediante un parámetro de arranque o un " +"fichero de configuración." + +#. type: Plain text +#: en/live-boot.7:19 +msgid "" +"To configure the live-boot parameters used by default in a live image, see " +"the --bootappend-live option in the I(1) manual page." +msgstr "" +"Para configurar los parámetros de live-boot utilizados por defecto en una " +"imagen en vivo, ver la opción --bootappend-live en la página de manual " +"I(1)" + +#. type: SS +#: en/live-boot.7:20 +#, no-wrap +msgid "Kernel Parameters" +msgstr "Parámetros del kernel" + +#. type: Plain text +#: en/live-boot.7:22 +msgid "" +"B is only activated if 'boot=live' was used as a kernel parameter." +msgstr "" +"B sólo se activa si se usa 'boot=live' como parámetro del kernel" + +#. type: Plain text +#: en/live-boot.7:24 +msgid "" +"In addition, there are some more boot parameters to influence the behaviour, " +"see below." +msgstr "" +"Además, hay algunos otros parámetros de arranque que influyen en su " +"comportamiento, ver más abajo." + +#. type: SS +#: en/live-boot.7:25 +#, no-wrap +msgid "Configuration Files" +msgstr "Ficheros de configuración" + +#. type: Plain text +#: en/live-boot.7:27 +msgid "" +"B can be configured (but not activated) through configuration " +"files. Those files can be placed either in the root filesystem itself (/etc/" +"live/boot.conf, /etc/live/boot/*), or on the live media (live/boot.conf, " +"live/boot/*)." +msgstr "" +"B se puede configurar (pero no activar) mediante ficheros de " +"configuración. Estos ficheros se pueden colocar en el sistema de ficheros " +"raíz (/etc/live/boot.conf, /etc/live/boot/*), o en el medio en vivo (live/" +"boot.conf, live/boot/*)." + +#. type: SH +#: en/live-boot.7:28 en/persistence.conf.5:57 +#, no-wrap +msgid "OPTIONS" +msgstr "OPCIONES" + +#. FIXME +#. type: Plain text +#: en/live-boot.7:31 +msgid "B currently features the following parameters." +msgstr "B incluye los siguientes parámetros." + +#. type: IP +#: en/live-boot.7:31 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:33 +msgid "" +"Set the accessibility level for physically or visually impaired users. " +"ACCESS must be one of v1, v2, v3, m1, or m2. v1=lesser visual impairment, " +"v2=moderate visual impairment, v3=blindness, m1=minor motor difficulties, " +"m2=moderate motor difficulties." +msgstr "" +"Establece el nivel de accesibilidad para usuarios con minusvalías físicas o " +"con discapacidad visual. ACCESS debe ser uno de los siguientes, v1, v2, v3, " +"m1 o m2. v1=menor deterioro visual, v2=discapacidad visual moderada, " +"v3=ceguera, m1=dificultades motoras menores, m2=dificultades motoras " +"moderadas." + +#. type: IP +#: en/live-boot.7:33 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:35 +msgid "" +"Set the default console to be used with the \"live-getty\" option. Example: " +"\"console=ttyS0,115200\"" +msgstr "" +"Establece la consola que se utilizará por defecto con la opción \"live-getty" +"\". Ejemplo: \"console=ttyS0,115200\"" + +#. type: IP +#: en/live-boot.7:35 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:37 +msgid "Makes initramfs boot process more verbose." +msgstr "Hace que el proceso de arranque de initramfs sea más detallado." + +#. type: Plain text +#: en/live-boot.7:39 +msgid "Use: debug=1" +msgstr "Uso: debug=1" + +#. type: Plain text +#: en/live-boot.7:41 +msgid "Without setting debug to a value the messages may not be shown." +msgstr "" +"Si no se asigna un valor a debug, puede que no se muestren los mensajes. " + +#. type: IP +#: en/live-boot.7:41 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: IP +#: en/live-boot.7:42 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:50 +msgid "" +"Another form of netboot by downloading a squashfs image from a given URL. " +"The fetch method copies the image to RAM and the httpfs method uses FUSE and " +"httpfs2 to mount the image in place. Copying to RAM requires more memory and " +"might take a long time for large images. However, it is more likely to work " +"correctly because it does not require networking afterwards and the system " +"operates faster once booted because it does not require to contact the " +"server anymore." +msgstr "" +"Otra forma de arranque en red mediante la descarga de una imagen squashfs a " +"partir de una URL determinada. El método «fetch» copia la imagen en la " +"memoria RAM y el método httpfs utiliza FUSE y httpfs2 para montar la imagen " +"en su lugar. Copiar en la memoria RAM requiere más memoria y puede tardar " +"mucho tiempo con imágenes de gran tamaño. Sin embargo, es más probable que " +"funcione correctamente, ya que no requiere el uso de la red después y el " +"sistema funciona más rápido una vez iniciado, debido a que ya no necesita " +"ponerse más en contacto con el servidor." + +#. type: Plain text +#: en/live-boot.7:52 +msgid "" +"Due to current limitations in busybox's wget and DNS resolution, an URL can " +"not contain a hostname but an IP address only." +msgstr "" +"Debido a las limitaciones actuales de busybox, wget y la resolución de DNS, " +"una dirección URL no puede contener un nombre de anfitrión, sino sólo una " +"dirección IP." + +#. type: Plain text +#: en/live-boot.7:54 +msgid "Not working: http://example.com/path/to/your_filesystem.squashfs" +msgstr "No funciona: http://ejemplo.com/ruta/al/sistema_de_ficheros.squashfs" + +#. type: Plain text +#: en/live-boot.7:56 +msgid "Working: http://1.2.3.4/path/to/your_filesystem.squashfs" +msgstr "Funciona: http://ejemplo.com/ruta/al/sistema_de_ficheros.squashfs" + +#. type: Plain text +#: en/live-boot.7:58 +msgid "" +"Also note that therefore it's currently not possible to fetch an image from " +"a name-based virtualhost of an httpd if it is sharing the IP address with " +"the main httpd instance." +msgstr "" +"Tener en cuenta también que, por lo tanto, no es posible en la actualidad ir " +"a buscar una imagen en un host virtual basado en nombre de un httpd si está " +"compartiendo la IP con la instancia principal httpd." + +#. type: Plain text +#: en/live-boot.7:60 +msgid "You may also use the live ISO image in place of the squashfs image." +msgstr "" +"También se puede utilizar la imagen ISO en vivo en lugar de la imagen " +"squashfs." + +#. type: IP +#: en/live-boot.7:60 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:62 +msgid "" +"Boot from an iSCSI target that has an ISO or disk live image as one of its " +"LUNs. The specified target is searched for a LUN which looks like a live " +"medium. If you use the B software iSCSI target solution your " +"ietd.conf might look like this:" +msgstr "" +"Arranca desde un iSCSI que tiene una ISO una imagen de disco en vivo como " +"uno de sus LUNs. Se busca en el objetivo especificado un LUN que sea similar " +"a un medio en vivo. Si se utiliza el software de iSCSI B el " +"ietd.conf podría ser similar al siguiente: " + +#. type: Plain text +#: en/live-boot.7:64 +msgid "# The target-name you specify in the iscsi= parameter" +msgstr "# El nombre de destino se especifica en el parámetro iscsi= " + +#. type: Plain text +#: en/live-boot.7:69 +#, no-wrap +msgid "" +"Target Etarget-nameE\n" +" Lun 0 Path=Epath-to-your-live-image.isoE,Type=fileio,IOMode=ro\n" +" # If you want to boot multiple machines you might want to look at tuning some parameters like\n" +" # Wthreads or MaxConnections\n" +msgstr "" +"Target Etarget-nameE\n" +" Lun 0 Path=Epath-to-your-live-image.isoE,Type=fileio,IOMode=ro\n" +" # Si se desea arrancar varias máquinas, es posible que se desee afinar algunos parámetros como\n" +" # Wthreads o MaxConnections\n" + +#. type: IP +#: en/live-boot.7:69 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:71 +msgid "" +"Look for the specified ISO file on all disks where it usually looks for the ." +"squashfs file (so you don't have to know the device name as in fromiso=....)." +msgstr "" +"Busca el fichero ISO especificado en todos los discos en los que por lo " +"general se busca el fichero .squashfs (por lo que no se tiene que saber el " +"nombre del dispositivo como en fromiso=....)." + +#. type: IP +#: en/live-boot.7:71 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:73 +msgid "" +"Allows to use a filesystem from within an ISO image that's available on live-" +"media." +msgstr "" +"Permite utilizar un sistema de ficheros desde dentro de una imagen ISO que " +"está disponible en los medios en vivo." + +#. type: IP +#: en/live-boot.7:73 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:75 +msgid "" +"Do not check that any UUID embedded in the initramfs matches the discovered " +"medium. live-boot may be told to generate a UUID by setting " +"LIVE_GENERATE_UUID=1 when building the initramfs." +msgstr "" +"No comprobar que cualquier UUID integrado en el initramfs coincida con el " +"medio encontrado. Se puede especificar a live-boot que genere un UUID " +"configurando LIVE_GENERATE_UUID=1 en el momento de crear el initramfs." + +#. type: IP +#: en/live-boot.7:75 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:77 +msgid "" +"If specified, an MD5 sum is calculated on the live media during boot and " +"compared to the value found in md5sum.txt found in the root directory of the " +"live media." +msgstr "" +"Si se especifica, se calcula una suma MD5 sobre los medios en vivo durante " +"el arranque y se compara con el valor md5sum.txt que se encuentra en el " +"directorio raíz de los medios en vivo." + +#. type: IP +#: en/live-boot.7:77 +#, no-wrap +msgid "B=[I]:[I]:[I]:[I]:[I] [,[I]:[I]:[I]:[I]:[I]]" +msgstr "B=[I]:[I]:[I]:[I]:[I] [,[I]:[I]:[I]:[I]:[I]]" + +#. type: Plain text +#: en/live-boot.7:79 +msgid "" +"Let you specify the name(s) and the options of the interface(s) that should " +"be configured at boot time. Do not specify this if you want to use dhcp " +"(default). It will be changed in a future release to mimick official kernel " +"boot param specification (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::" +"eth0,:::::eth1:dhcp)." +msgstr "" +"Permite especificar el nombre(s) y las opciones de la interfaz(ces) que se " +"debe configurar en el arranque. No especificar esta opción si se desea " +"utilizar DHCP (opción por defecto). Esto cambiará en una futura versión para " +"utilizar la misma especificación de los parámetros de arranque que el kernel " +"oficial (e.g. ip=10.0.0.1::10.0.0.254:255.255.255.0::eth0,:::::eth1:dhcp)." + +#. type: IP +#: en/live-boot.7:79 +#, no-wrap +msgid "B=[I]" +msgstr "B=[I]" + +#. type: Plain text +#: en/live-boot.7:81 +msgid "" +"If this variable is set, dhcp and static configuration are just skipped and " +"the system will use the (must be) media-preconfigured /etc/network/" +"interfaces instead." +msgstr "" +"Si se establece esta variable, no se configura la red ni por dhcp ni usando " +"una dirección estática y se debe añadir un fichero preconfigurado /etc/" +"network/interfaces que el sistema utilizará en su lugar." + +#. type: IP +#: en/live-boot.7:81 +#, no-wrap +msgid "{B|B}=I" +msgstr "{B|B}=I" + +#. type: Plain text +#: en/live-boot.7:83 +msgid "" +"If you specify one of this two equivalent forms, live-boot will first try to " +"find this device for the \"/live\" directory where the read-only root " +"filesystem should reside. If it did not find something usable, the normal " +"scan for block devices is performed." +msgstr "" +"Si se especifica una de estas dos formas equivalentes, live-boot en primer " +"lugar tratará de encontrar este dispositivo buscando el directorio \"/live\" " +"dónde debe estar la raíz del sistema de ficheros de sólo lectura. Si no " +"encuentra nada que pueda utilizar, live-boot escaneará los dispositivos " +"restantes." + +#. type: Plain text +#: en/live-boot.7:85 +msgid "" +"Instead of specifing an actual device name, the keyword 'removable' can be " +"used to limit the search of acceptable live media to removable type only. " +"Note that if you want to further restrict the media to usb mass storage " +"only, you can use the 'removable-usb' keyword." +msgstr "" +"En lugar de especificar el nombre de un dispositivo real, se puede utilizar " +"la palabra clave 'removable' para limitar la búsqueda solo en los medios en " +"vivo de tipo extraíble. Tener en cuenta que si se desea restringir aún más " +"los medios a sistemas de almacenamiento masivo USB se puede utilizar la " +"palabra clave 'removable-usb'" + +#. type: IP +#: en/live-boot.7:85 +#, no-wrap +msgid "{B|B}=I" +msgstr "{B|B}=I" + +#. type: Plain text +#: en/live-boot.7:87 +msgid "" +"live-boot will mount the encrypted rootfs TYPE, asking the passphrase, " +"useful to build paranoid live systems :-). TYPE supported so far is \"aes\" " +"for loop-aes encryption type." +msgstr "" +"live-boot montará el TYPE rotfs cifrado, pidiendo la contraseña. Es útil " +"para crear sistemas en vivo paranoicos :-) Hasta el momento el TYPE " +"soportado es \"aes\" para cifrado loop-aes." + +#. type: IP +#: en/live-boot.7:87 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:89 +msgid "" +"This way you could tell live-boot that your image starts at offset BYTES in " +"the above specified or autodiscovered device, this could be useful to hide " +"the live system ISO or image inside another ISO or image, to create \"clean" +"\" images." +msgstr "" +"De esta manera se puede especificar a live-boot que la imagen comienza en " +"BYTES en el dispositivo anteriormente especificado, o auto-descubierto, esto " +"podría ser útil para esconder la ISO o la imagen dentro de otra ISO o " +"imagen, para crear imágenes \"limpias\"." + +#. type: IP +#: en/live-boot.7:89 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:91 +msgid "" +"Sets the path to the live filesystem on the medium. By default, it is set to " +"'/live' and you should not change that unless you have customized your media " +"accordingly." +msgstr "" +"Establece la ruta de acceso al sistema de ficheros en vivo en el medio. De " +"forma predeterminada está en '/live' y no se debe cambiar a menos que se " +"haya personalizado los medios de forma adecuada." + +#. type: IP +#: en/live-boot.7:91 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:93 +msgid "" +"Set the timeout in seconds for the device specified by \"live-media=\" to " +"become ready before giving up." +msgstr "" +"Establece el tiempo de espera en segundos para que el dispositivo " +"especificado por \"live-media=\" esté preparado antes de desistir." + +#. type: IP +#: en/live-boot.7:93 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:95 +msgid "" +"Instead of using the default optional file \"filesystem.module\" (see below) " +"another file could be specified without the extension \".module\"; it should " +"be placed on \"/live\" directory of the live medium." +msgstr "" +"En lugar de utilizar el fichero opcional por defecto \"filesystem.module" +"\" (ver más abajo) se podría especificar otro fichero sin la extensión \"." +"module\"; se debe colocar en el directorio \"/live\" del medio en vivo." + +#. type: IP +#: en/live-boot.7:95 +#, no-wrap +msgid "B[=nfs|cifs]" +msgstr "B[=nfs|cifs]" + +#. type: Plain text +#: en/live-boot.7:97 +msgid "" +"This tells live-boot to perform a network mount. The parameter \"nfsroot=" +"\" (with optional \"nfsopts=\"), should specify where is the location of the " +"root filesystem. With no args, will try cifs first, and if it fails nfs." +msgstr "" +"Indica a live-boot que debe hacer un montaje en red. El parámetro \"nfsroot=" +"\" (con \"nfsopts=\" opcional), debe especificar dónde se encuentra el " +"sistema de ficheros raíz. Sin argumentos, probará primero cifs, y entonces, " +"si falla, nfs." + +#. type: IP +#: en/live-boot.7:97 +#, no-wrap +msgid "B=" +msgstr "B=" + +#. type: Plain text +#: en/live-boot.7:99 +msgid "This lets you specify custom nfs options." +msgstr "Permite especificar opciones nfs personalizadas." + +#. type: IP +#: en/live-boot.7:99 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:101 +msgid "" +"This parameter disables the default disabling of filesystem checks in /etc/" +"fstab. If you have static filesystems on your harddisk and you want them to " +"be checked at boot time, use this parameter, otherwise they are skipped." +msgstr "" +"Este parámetro deshabilita la desactivación por defecto de la comprobación " +"del sistema de ficheros en /etc/fstab. Si hay sistemas de ficheros estáticos " +"en el disco duro y se desea comprobarlos en el momento del arranque, " +"utilizar este parámetro, de lo contrario, se omite." + +#. type: IP +#: en/live-boot.7:101 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:103 +msgid "" +"disables the \"persistence\" feature, useful if the bootloader (like " +"syslinux) has been installed with persistence enabled." +msgstr "" +"desactiva la \"persistencia\", es útil si el gestor de arranque (como " +"syslinux) se ha instalado con persistencia habilitada." + +#. type: IP +#: en/live-boot.7:103 en/live-boot.7:125 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:105 +msgid "Do not prompt to eject the live medium." +msgstr "No pedir que se extraiga el dispositivo en vivo." + +#. type: IP +#: en/live-boot.7:105 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:107 +msgid "" +"This parameter allows to set a custom ramdisk size (it's the '-o size' " +"option of tmpfs mount). By default, there is no ramdisk size set, so the " +"default of mount applies (currently 50% of available RAM). Note that this " +"option has currently no effect when booting with toram." +msgstr "" +"Este parámetro permite establecer un tamaño de disco RAM personalizado (que " +"es la opción '-o size' del montaje tmpfs). No hay un tamaño de ramdisk " +"predeterminado, por lo que se aplica el valor por defecto (actualmente el " +"50% de la RAM disponible). Tener en cuenta que esta opción no tiene " +"actualmente ningún efecto cuando se arranca con toram." + +#. type: IP +#: en/live-boot.7:107 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:109 +msgid "This parameter enables usage of local swap partitions." +msgstr "Este parámetro permite el uso de particiones swap locales." + +#. type: IP +#: en/live-boot.7:109 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:111 +msgid "" +"live-boot will probe devices for persistence media. These can be partitions " +"(with the correct GPT name), filesystems (with the correct label) or image " +"files (with the correct file name). Overlays are labeled/named \"persistence" +"\" (see I(5)). Overlay image files are named \"persistence" +"\"." +msgstr "" +"live-boot buscará dispositivos con \"persistence\". Estos pueden ser " +"particiones (con el nombre GPT correcto), sistemas de ficheros (con la " +"etiqueta correcta) o ficheros imagen (con el nombre de fichero correcto). " +"Los overlays tienen la etiqueta/nombre \"persistence\" (ver I(5)). Los ficheros imagen overlay tienen, como nombre, \"persistence\"." + +#. type: IP +#: en/live-boot.7:111 +#, no-wrap +msgid "B=I,I ... I" +msgstr "B=I,I ... I" + +#. type: Plain text +#: en/live-boot.7:113 +msgid "" +"This option determines which types of encryption that we allow to be used " +"when probing devices for persistence media. If \"none\" is in the list, we " +"allow unencrypted media; if \"luks\" is in the list, we allow LUKS-encrypted " +"media. Whenever a device containing encrypted media is probed the user will " +"be prompted for the passphrase. The default value is \"none\"." +msgstr "" +"Esta opción determina qué tipo de cifrado se usa cuando se prueban los " +"dispositivos de los medios con persistencia. Si se especifica \"none\" en la " +"lista, no se permite cifrar el medio; si se especifica \"luks\" en la lista, " +"se puede usar cifrado LUKS en los medios. Cada vez que se encuentra un " +"dispositivo que contiene medios cifrados se pregunta al usuario una frase de " +"contraseña. Por defecto es \"none\"." + +#. type: IP +#: en/live-boot.7:113 +#, no-wrap +msgid "B={I|I}" +msgstr "B={I|I}" + +#. type: Plain text +#: en/live-boot.7:115 +msgid "" +"If you specify the keyword 'removable', live-boot will try to find " +"persistence partitions on removable media only. Note that if you want to " +"further restrict the media to usb mass storage only, you can use the " +"'removable-usb' keyword." +msgstr "" +"Si se especifica la palabra clave 'removable', live-boot intentará encontrar " +"particiones con persistencia únicamente en los medios extraíbles. Tener en " +"cuenta que si se desea restringir aún más los medios a sistemas de " +"almacenamiento masivo USB se puede utilizar la palabra clave 'removable-usb'" + +#. type: IP +#: en/live-boot.7:115 +#, no-wrap +msgid "B=I,I ... I" +msgstr "B=I,I ... I" + +#. type: Plain text +#: en/live-boot.7:117 +msgid "" +"This option determines which types of persistence media we allow. If " +"\"overlay\" is in the list, we consider overlays (i.e. \"live-rw\" and " +"\"home-rw\"). The default is \"overlay\"." +msgstr "" +"Esta opción determina qué tipos de medios se permiten para la persistencia. " +"Si se especifica \"overlay\" en la lista, se considera overlays (es decir " +"\"live-rw\" y \"home-rw\"). Por defecto es \"overlay\"." + +#. type: IP +#: en/live-boot.7:117 +#, no-wrap +msgid "B=I" +msgstr "B=I" + +#. type: Plain text +#: en/live-boot.7:119 +msgid "" +"live-boot will look for persistency files in the root directory of a " +"partition, with this parameter, the path can be configured so that you can " +"have multiple directories on the same partition to store persistency files." +msgstr "" +"live-boot buscará ficheros con persistencia en el directorio raíz de una " +"partición, con este parámetro, la ruta se puede configurar de modo que se " +"pueda tener varios directorios en la misma partición para almacenar ficheros " +"con persistencia." + +#. type: IP +#: en/live-boot.7:119 +#, no-wrap +msgid "B" +msgstr "B" + +#. type: Plain text +#: en/live-boot.7:121 +msgid "" +"Filesystem changes are not saved back to persistence media. In particular, " +"overlays and netboot NFS mounts are mounted read-only." +msgstr "" +"Los cambios en el sistema de ficheros no se guardan de nuevo en los medios " +"con persistencia. En particular, los overlays y los montajes NFS de red son " +"montados en sólo lectura." + +#. type: IP +#: en/live-boot.7:121 +#, no-wrap +msgid "B=I,I ... I" +msgstr "B=I,I ... I" + +#. type: Plain text +#: en/live-boot.7:123 +msgid "" +"This option determines which types of persistence storage to consider when " +"probing for persistence media. If \"filesystem\" is in the list, filesystems " +"with matching labels will be used; if \"file\" is in the list, all " +"filesystems will be probed for archives and image files with matching " +"filenames. The default is \"file,filesystem\"." +msgstr "" +"Esta opción determina qué tipos de almacenamiento persistente hay que tener " +"en cuenta cuando se comprueban los medios con persistencia. Si \"filesystem" +"\" está en la lista, se usarán los sistemas de ficheros que tengan su " +"etiqueta correspondiente; si \"file\" está en la lista, todos los sistemas " +"de ficheros se probarán buscando ficheros y ficheros imagen con sus " +"etiquetas correspondientes. Por defecto es \"file,filesystem\". " + +#. type: IP +#: en/live-boot.7:123 +#, no-wrap +msgid "B=I