summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-04-27 20:31:49 +0200
committerDaniel Baumann <daniel@debian.org>2012-04-27 20:31:49 +0200
commit58cb79b8cdfe7b2dce672b033d75d5fc1461851b (patch)
treea20032b8cad7b9b9eec5b834dae71ef109450179
parent4b333fb98091936fe0cd805e3164e31a4759d810 (diff)
downloadvyos-live-build-58cb79b8cdfe7b2dce672b033d75d5fc1461851b.tar.gz
vyos-live-build-58cb79b8cdfe7b2dce672b033d75d5fc1461851b.zip
Transforming failsafe boot parameter into an own option.
-rwxr-xr-xfunctions/defaults.sh2
-rwxr-xr-xscripts/build/lb_binary_grub11
-rwxr-xr-xscripts/build/lb_binary_grub211
-rwxr-xr-xscripts/build/lb_binary_silo11
-rwxr-xr-xscripts/build/lb_binary_yaboot11
-rwxr-xr-xscripts/build/lb_config12
6 files changed, 37 insertions, 21 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index b1efd6b87..5a5550348 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -989,6 +989,8 @@ Set_defaults ()
fi
# Setting boot parameters
+ LB_BOOTAPPEND_FAILSAFE="${LB_BOOTAPPEND_FAILSAFE:-memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"
+
# LB_BOOTAPPEND_LIVE
if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then
diff --git a/scripts/build/lb_binary_grub b/scripts/build/lb_binary_grub
index ca52032ef..b01a78431 100755
--- a/scripts/build/lb_binary_grub
+++ b/scripts/build/lb_binary_grub
@@ -182,9 +182,6 @@ fi
LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
-# Parameters are listed at: linux/Documentation/kernel-parameters.txt
-FAILSAFE="memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal"
-
# Assembling kernel configuration
# Default entries
@@ -193,14 +190,18 @@ DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}"
-Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${FAILSAFE}"
+
+if [ "${LB_BOOTAPPEND_FAILSAFE}" != "none" ]
+then
+ Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
+fi
for KERNEL in chroot/boot/vmlinuz-*
do
VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}"
- Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${FAILSAFE}"
+ Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${LB_BOOTAPPEND_FAILSAFE}"
done
LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
diff --git a/scripts/build/lb_binary_grub2 b/scripts/build/lb_binary_grub2
index 3021fd108..bc61b58f0 100755
--- a/scripts/build/lb_binary_grub2
+++ b/scripts/build/lb_binary_grub2
@@ -156,9 +156,6 @@ fi
LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
-# Parameters are listed at: linux/Documentation/kernel-parameters.txt
-FAILSAFE="memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal"
-
# Assembling kernel configuration
# Default entries
@@ -167,14 +164,18 @@ DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}"
-Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${FAILSAFE}"
+
+if [ "${LB_BOOTAPPEND_FAILSAFE}" != "none" ]
+then
+ Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
+fi
for KERNEL in chroot/boot/vmlinuz-*
do
VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}"
- Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${FAILSAFE}"
+ Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${LB_BOOTAPPEND_FAILSAFE}"
done
LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
diff --git a/scripts/build/lb_binary_silo b/scripts/build/lb_binary_silo
index 05f35d62e..90c445f2b 100755
--- a/scripts/build/lb_binary_silo
+++ b/scripts/build/lb_binary_silo
@@ -146,9 +146,6 @@ fi
LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
-# Parameters are listed at: linux/Documentation/kernel-parameters.txt
-FAILSAFE="memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=ofonly"
-
# Assembling kernel configuration
# Default entries
@@ -157,7 +154,11 @@ DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
Silo_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
-Silo_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
+
+if [ "${LB_BOOTAPPEND_FAILSAFE}" != "none" ]
+then
+ Silo_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
+fi
if [ "$(echo ${LB_LINUX_FLAVOURS} | wc -w)" -gt "1" ]
then
@@ -168,7 +169,7 @@ then
INITRD="initrd.img-${KERNEL_VERSION}"
Silo_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}"
- Silo_live_entry "live-${KERNEL_VERSION}-failsafe" "${KERNEL_IMAGE}" "${INITRD}" "${FAILSAFE}"
+ Silo_live_entry "live-${KERNEL_VERSION}-failsafe" "${KERNEL_IMAGE}" "${INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
done
fi
diff --git a/scripts/build/lb_binary_yaboot b/scripts/build/lb_binary_yaboot
index ff706ced0..7b5da685a 100755
--- a/scripts/build/lb_binary_yaboot
+++ b/scripts/build/lb_binary_yaboot
@@ -188,9 +188,6 @@ fi
LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
-# Parameters are listed at: linux/Documentation/kernel-parameters.txt
-FAILSAFE="memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=ofonly"
-
# Assembling kernel configuration
# Default entries
@@ -199,7 +196,11 @@ DEFAULT_KERNEL="$(basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinux-||')"
Yaboot_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
-Yaboot_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
+
+if [ "${LB_BOOTAPPEND_FAILSAFE}" != "none" ]
+then
+ Yaboot_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
+fi
if [ "$(echo ${LB_LINUX_FLAVOURS} | wc -w)" -gt "1" ]
then
@@ -210,7 +211,7 @@ then
INITRD="initrd.img-${KERNEL_VERSION}"
Yaboot_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}"
- Yaboot_live_entry "live-${KERNEL_VERSION}-failsafe" "${KERNEL_IMAGE}" "${INITRD}" "${FAILSAFE}"
+ Yaboot_live_entry "live-${KERNEL_VERSION}-failsafe" "${KERNEL_IMAGE}" "${INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
done
fi
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index 26f34cc9e..f1ae30cdf 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -44,6 +44,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--binary-filesystem fat16|fat32|ext2|ext3|ext4]\n\
\t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
\t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
+\t [--bootappend-failsafe PARAMETER|\"PARAMETERS\"]\n\
\t [--bootloader grub|syslinux|yaboot]\n\
\t [--bootstrap cdebootstrap|cdebootstrap-static|debootstrap|copy]\n\
\t [-f|--bootstrap-flavour minimal|standard]\n\
@@ -166,7 +167,7 @@ Local_arguments ()
archives:,archive-areas:,parent-archive-areas:,chroot-filesystem:,exposed-root:,
gzip-options:,hooks:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
package-lists:,security:,volatile:,backports:,binary-filesystem:,binary-images:,
- apt-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,compression:,build-with-chroot:,
+ apt-indices:,bootappend-install:,bootappend-live:,bootappend-failsafe:,bootloader:,checksums:,compression:,build-with-chroot:,
debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,iso-application:,iso-preparer:,iso-publisher:,
iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
@@ -610,6 +611,11 @@ Local_arguments ()
shift 2
;;
+ --bootappend-failsafe)
+ LB_BOOTAPPEND_FAILSAFE="${2}"
+ shift 2
+ ;;
+
--bootloader)
LB_BOOTLOADER="${2}"
shift 2
@@ -1296,6 +1302,10 @@ LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE}"
# (Default: empty)
LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL}"
+# \$LB_BOOTAPPEND_FAILSAFE: set boot parameters
+# (Default: empty)
+LB_BOOTAPPEND_FAILSAFE="${LB_BOOTAPPEND_FAILSAFE}"
+
# \$LB_BOOTLOADER: set bootloader
# (Default: ${LB_BOOTLOADER})
LB_BOOTLOADER="${LB_BOOTLOADER}"