From fa5a962552d035b36a15ad76325bf2c0203a50c7 Mon Sep 17 00:00:00 2001 From: r00t Date: Thu, 30 Jul 2015 01:24:54 -0400 Subject: [PATCH] centos tested --- COPYING => docs/COPYING | 0 docs/FAQ | 33 +++++++++++++++++++++++++++++++++ LICENSE => docs/LICENSE | 0 README => docs/README | 0 TODO => docs/TODO | 0 lib/07-centos_is_stupid.func.sh | 9 +++++---- lib/prereqs/RHEL/pkgs | 1 + lib/prereqs/iso.pkgs.lst | 1 + 8 files changed, 40 insertions(+), 4 deletions(-) rename COPYING => docs/COPYING (100%) create mode 100644 docs/FAQ rename LICENSE => docs/LICENSE (100%) rename README => docs/README (100%) rename TODO => docs/TODO (100%) diff --git a/COPYING b/docs/COPYING similarity index 100% rename from COPYING rename to docs/COPYING diff --git a/docs/FAQ b/docs/FAQ new file mode 100644 index 0000000..ee39910 --- /dev/null +++ b/docs/FAQ @@ -0,0 +1,33 @@ +BDisk Frequently Asked(/Unasked) Questions + + + +0.) Why does it take so long to build? +1.) Why is the generated ISO file so big? +2.) How do I find the version/release/etc. number of an ISO? + + +========================================================= + + + +0.) WHY DOES IT TAKE SO LONG TO BUILD? +A: This typically occurs when you're building from within a LiveCD/LiveUSB situation, in a VM/container/etc., or on a headless server. +If this is the case, you may run into what appears to be "stalling", especially while keys are generating for the chroots. +Thankfully, there is an easy fix. You can install the "haveged"(http://www.issihosts.com/haveged/) software and run it. This will +show an immediate and non-negligible improvement for the above contexts. If you have extra power to throw at it (or are using a dedicated build box) +as well, I recommend enabling I_AM_A_RACECAR in your build.conf. BDisk will then be more aggressive with its resource consumption. + + +1.) WHY IS THE GENERATED ISO FILE SO BIG? +A: You may have enabled a LOT of packages in extra/packages.(32|64|both). Or you're using the default set of packages, which tries to include a LOT +of different (and in some cases, redundant) packages for widespread utilization and usage. In addition, keep in mind that BDisk builds a single ISO +that can be used on both i686 architectures AND full x86_64 architectures ("AMD64" as you may sometimes see it referenced). Because it doesn't cheat +and just use a 64-bit kernel with a 32-bit userland, it needs two different squash images on each ISO- one for 32-bit userland and one for 64-bit +userland. + +2.) HOW DO I FIND THE VERSION/RELEASE/ETC. NUMBER OF AN ISO? +A: This can be found in a multitude of places. The full-size ISO file (iso/---(32|64|any).iso) should have the +version right in the file name. If you want more detailed information (or perhaps you renamed the file), you can mount the ISO as loopback in GNU/Linux, +*BSD, or Mac OS X and check /path/to/mounted/iso/VERSION_INTO.txt. Lastly, within the runtime itself (especially handy if booting via iPXE), you can +check /root/VERSION_INFO.txt within the running live environment. diff --git a/LICENSE b/docs/LICENSE similarity index 100% rename from LICENSE rename to docs/LICENSE diff --git a/README b/docs/README similarity index 100% rename from README rename to docs/README diff --git a/TODO b/docs/TODO similarity index 100% rename from TODO rename to docs/TODO diff --git a/lib/07-centos_is_stupid.func.sh b/lib/07-centos_is_stupid.func.sh index 19ca659..1cffa0a 100644 --- a/lib/07-centos_is_stupid.func.sh +++ b/lib/07-centos_is_stupid.func.sh @@ -4,8 +4,7 @@ function centos_is_stupid { if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" ]]; then - rpm -qa | egrep -q "^xorriso-[0-9]" - if [[ "${?}" != "0" ]]; + if [[ "$(rpm -qa | egrep -q '^xorriso-[0-9]')" != "0" ]]; then # Download/install the proper xorriso EL_VER="$(rpm -qa coreutils | sed -re 's/^coreutils-[0-9.-]*el([0-9])*.*$/\1/g')" @@ -17,7 +16,9 @@ function centos_is_stupid { XORRISO_RPM=$(curl -s http://pkgs.repoforge.org/xorriso/ | egrep "\"xorriso-[0-9.-]*el${EL_VER}.rf.x86_64.rpm\"" | sed -re "s/^.*\"(xorriso[0-9.-]*el${EL_VER}.rf.x86_64.rpm).*$/\1/g") echo "Since you're using either CentOS or RHEL, we need to install xorriso directly from an RPM. Please wait while we do this..." curl -sLo /tmp/${XORRISO_RPM} http://pkgs.repoforge.org/xorriso/${XORRISO_RPM} + set +e yum -y install /tmp/${XORRISO_RPM} >> "${LOGFILE}.${FUNCNAME}" 2>&1 + set -e echo "Done." echo fi @@ -28,8 +29,7 @@ function centos_is_stupid { # UGH. And you know what? Fuck SUSE too. if [[ "${HOST_DIST}" == "openSUSE" || "${HOST_DIST}" == "SUSE" ]]; then - rpm -qa | egrep -q "^xorriso-[0-9]" - if [[ "${?}" != "0" ]]; + if [[ "$(rpm -qa | egrep -q '^xorriso-[0-9]')" != "0" ]]; then # Download/install the proper xorriso source /etc/os-release @@ -64,6 +64,7 @@ function centos_is_stupid { echo "Please ensure you are connected to the Internet/have repositories configured correctly." exit 1 fi + set -e fi zypper search binutils-devel | egrep -q '^[[:space:]]*|[[:space:]]*binutils-devel[[:space:]]*' diff --git a/lib/prereqs/RHEL/pkgs b/lib/prereqs/RHEL/pkgs index 4a6ac3c..41f688b 100644 --- a/lib/prereqs/RHEL/pkgs +++ b/lib/prereqs/RHEL/pkgs @@ -1,6 +1,7 @@ binutils binutils-devel curl +dosfstools gcc git libisofs diff --git a/lib/prereqs/iso.pkgs.lst b/lib/prereqs/iso.pkgs.lst index 2789018..455519b 100644 --- a/lib/prereqs/iso.pkgs.lst +++ b/lib/prereqs/iso.pkgs.lst @@ -28,6 +28,7 @@ netctl networkmanager openssh openvpn +prebootloader pv rsync sed