summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/initramfs.conf4
-rw-r--r--debian/NEWS8
-rw-r--r--debian/control2
-rw-r--r--debian/initramfs-tools.doc-base10
-rwxr-xr-xdebian/script4
-rw-r--r--debian/source/format1
-rw-r--r--docs/maintainer-notes.html28
-rw-r--r--hook-functions2
-rw-r--r--initramfs-tools.876
-rwxr-xr-xkernel/postinst.d/initramfs-tools4
-rwxr-xr-xkernel/postrm.d/initramfs-tools2
-rwxr-xr-xmkinitramfs19
-rw-r--r--scripts/functions4
-rwxr-xr-xupdate-initramfs5
14 files changed, 106 insertions, 63 deletions
diff --git a/conf/initramfs.conf b/conf/initramfs.conf
index 0a108a8..bc9060b 100644
--- a/conf/initramfs.conf
+++ b/conf/initramfs.conf
@@ -2,7 +2,7 @@
# initramfs.conf
# Configuration file for mkinitramfs(8). See initramfs.conf(5).
#
-# Note that configuration options from this file can be overriden
+# Note that configuration options from this file can be overridden
# by config files in the /etc/initramfs-tools/conf.d directory.
#
@@ -59,7 +59,7 @@ BOOT=local
# DEVICE: ...
#
# Specify a specific network interface, like eth0
-# Overriden by optional ip= bootarg
+# Overridden by optional ip= bootarg
#
DEVICE=
diff --git a/debian/NEWS b/debian/NEWS
index a2a16af..350189b 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -1,13 +1,13 @@
initramfs-tools (0.94) unstable; urgency=low
- * To improve boot speed and avoid some complications, video drivers are
+ To improve boot speed and avoid some complications, video drivers are
no longer included in the initramfs by default (MODULES=most).
-- maximilian attems <maks@debian.org> Mon, 05 Apr 2010 08:10:34 +0200
initramfs-tools (0.76) unstable; urgency=low
- * This release features nfs auto detection in the initramfs.
+ This release features nfs auto detection in the initramfs.
The boot paramaters are parsed according to the linux source
Documentation/kernel-parameters.txt and more specifically
Documentation/nfsroot.txt.
@@ -20,7 +20,7 @@ initramfs-tools (0.76) unstable; urgency=low
initramfs-tools (0.61) unstable; urgency=low
- * This release moves the initramfs-tools confdir from /etc/mkinitramfs to
+ This release moves the initramfs-tools confdir from /etc/mkinitramfs to
/etc/initramfs-tools. Packages are encouraged to ship files as scripts
under /usr/share/initramfs-tools.
@@ -31,7 +31,7 @@ initramfs-tools (0.61) unstable; urgency=low
initramfs-tools (0.10) breezy; urgency=low
- * This release includes hardware auto detection in the initramfs.
+ This release includes hardware auto detection in the initramfs.
This means two things in particular that are important:
1) the resulting initramfs will be huge. Like 10 megs huge.
diff --git a/debian/control b/debian/control
index 30d873b..99898ea 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Uploaders: maximilian attems <maks@debian.org>, Michael Prokop <mika@debian.org>
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Build-Depends: debhelper (>= 7.0)
-Standards-Version: 3.8.4
+Standards-Version: 3.9.0
Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git
Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git
diff --git a/debian/initramfs-tools.doc-base b/debian/initramfs-tools.doc-base
new file mode 100644
index 0000000..41f2134
--- /dev/null
+++ b/debian/initramfs-tools.doc-base
@@ -0,0 +1,10 @@
+Document: initramfs-maintainer
+Title: Maintainer documentation for initramfs-tools
+Author: Michael Prokop
+Abstract: This document describes the workflow of
+ the initramfs-tools maintainers.
+Section: Debian
+
+Format: HTML
+Index: /usr/share/doc/initramfs-tools/maintainer-notes.html
+Files: /usr/share/doc/initramfs-tools/maintainer-notes.html
diff --git a/debian/script b/debian/script
index fa706cd..46b6650 100755
--- a/debian/script
+++ b/debian/script
@@ -57,3 +57,7 @@ if grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ; then
ls /sys/block
echo
fi
+
+echo "-- mkinitramfs hooks"
+ls /usr/share/initramfs-tools/hooks /etc/initramfs-tools/hooks/
+echo
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/docs/maintainer-notes.html b/docs/maintainer-notes.html
index 9858201..e9cec2d 100644
--- a/docs/maintainer-notes.html
+++ b/docs/maintainer-notes.html
@@ -80,14 +80,17 @@ or online at <a
</pre>
</li>
-<li>Set environment variables (e.g. through your ~/.bashrc or ~/.zshrc) for git and devscripts (git dch):
+<li>Set environment variables (e.g. through your ~/.bashrc or ~/.zshrc) for devscripts (git dch):
<pre>
<b>export DEBEMAIL=$mailaddress
-export DEBFULLNAME=$yourname
-export GIT_AUTHOR_EMAIL=$mailaddress
-export GIT_AUTHOR_NAME=$yourname
-export GIT_COMMITTER_EMAIL=$mailaddress
-export GIT_COMMITTER_NAME=$yourname</b>
+export DEBFULLNAME=$yourname</b>
+</pre>
+</li>
+
+<li>Set user name and email address for git (drop the --global option to use configuration per-repo basis):
+<pre>
+<b>% git config --global user.name "$yourname"
+% git config --global user.email "$mailaddress"</b>
</pre>
</li>
@@ -180,6 +183,13 @@ on.
</pre>
</li>
+<li>If a branch is removed from the server it will stay locally. You can get of
+any stale remote branches locally by executing:
+<pre>
+<b>% git remote prune origin</b>
+</pre>
+</li>
+
</ol>
<h3><a name="test">3.3 Test specific branch</a></h3>
@@ -253,6 +263,12 @@ on.
</pre>
</li>
+<li>The development mailinglists are <a
+ href="mailto:debian-kernel@lists.debian.org">debian-kernel@lists.debian.org</a>
+and <a href="mailto:initramfs@vger.kernel.org">initramfs@vger.kernel.org</a>.
+Discussion of features, bugs and patches are more than welcome on one
+of these lists.</li>
+
</ol>
<div class="right"><a href="#toc">^</a></div>
diff --git a/hook-functions b/hook-functions
index d860bc7..9d63d58 100644
--- a/hook-functions
+++ b/hook-functions
@@ -532,7 +532,7 @@ check_minkver()
# sed: keep last line starting with MINKVER=,
# remove MINKVER= and trailing space
minver=$(sed '/^MINKVER=/!d;$!d;s/^MINKVER=//;s/[[:space:]]*$//' "${initdir}/${cm_x}")
- if [ -z "${tmp}" ]; then
+ if [ -z "${tmp:-}" ]; then
continue
elif dpkg --compare-versions "${curversion}" lt "${minver}"; then
echo "W: ${cm_x} hook script requires at least kernel version ${minver}" >&2
diff --git a/initramfs-tools.8 b/initramfs-tools.8
index fd00429..fc2c085 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -1,4 +1,4 @@
-.TH INITRAMFS-TOOLS 8 "2010/04/10" "Linux" "mkinitramfs script overview"
+.TH INITRAMFS-TOOLS 8 "2010/06/22" "Linux" "mkinitramfs script overview"
.SH NAME
initramfs-tools \- an introduction to writing scripts for mkinitramfs
@@ -9,38 +9,28 @@ will be used during different phases of execution. Each of these will be
discussed separately below with the help of an imaginary tool which performs a
frobnication of a lvm partition prior to mounting the root partition.
-Valid boot and hook scripts names consist solely of alphabetics, numerics,
-dashes and underscores. Other scripts are discarded.
-
-.SS Hook scripts
-These are used when an initramfs image is created and not included in the
-image itself. They can however cause files to be included in the image.
-
-.SS Boot scripts
-These are included in the initramfs image and normally executed during
-kernel boot in the early user-space before the root partition has been
-mounted.
-
-.SH INIT SCRIPT
-The script which is executed first and is in charge of running all other
-scripts can be found in /usr/share/initramfs-tools/init. It takes a number of
-arguments which influence the boot procedure:
+.SH Kernel Command Line
+The root filesystem used by the kernel is specified by the boot loader as
+always. The traditional \fBroot=/dev/sda1\fR style device specification is
+allowed. If a label is used, as in \fBroot=LABEL=rootPart\fR the initrd will
+search all available devices for a filesystem with the appropriate label, and
+mount that device as the root filesystem. \fBroot=UUID=uuidnumber\fR will
+mount the partition with that UUID as the root filesystem.
-.SS Boot options
-
-The init and root are usually passed by the boot loader for local boot.
-The other parameters are optional.
+.SS Standard
.TP
-\fB\fI init
+\fB\fI init= "<path to real init>"
the binary to hand over execution to on the root fs after the initramfs scripts are done.
.TP
-\fB\fI root
+\fB\fI root= "<path to blockdevice>"
the device node to mount as the root file system.
The recommended usage is to specify the UUID as followed "root=UUID=xxx".
-As normal device names are not stable and may change depending on the
-boot order.
+
+.TP
+\fB\fI rootfstype
+set the root file system type.
.TP
\fB\fI rootdelay
@@ -52,10 +42,6 @@ The default is 180 seconds.
set the file system mount option string.
.TP
-\fB\fI rootfstype
-set the root file system type.
-
-.TP
\fB\fI nfsroot
can be either "auto" to try to get the relevant information from DHCP or a
string of the form NFSSERVER:NFSPATH or NFSSERVER:NFSPATH:NFSOPTS.
@@ -66,12 +52,12 @@ Use root=/dev/nfs for NFS to kick to in. NFSOPTS can be looked up in
\fB\fI ip
tells how to configure the ip address. Allows to specify an different
NFS server than the DHCP server. See Documentation/filesystems/nfsroot.txt
-in any recent Linux source for details. Optional paramater for NFS root.
+in any recent Linux source for details. Optional parameter for NFS root.
.TP
\fB\fI BOOTIF
-is a mac adress in pxelinux format with leading "01-" and "-" as separations.
-pxelinux passes mac adress of network card used to PXE boot on with this
+is a mac address in pxelinux format with leading "01-" and "-" as separations.
+pxelinux passes mac address of network card used to PXE boot on with this
bootarg.
.TP
@@ -106,6 +92,7 @@ mounts the rootfs read-write.
disables load of specific modules.
Use blacklist=module1,module2,module3 bootparameter.
+.SS Debug
.TP
\fB\fI panic
sets an timeout on panic.
@@ -136,6 +123,21 @@ loads generic IDE/ATA chipset support on boot.
.SH HOOK SCRIPTS
+Valid boot and hook scripts names consist solely of alphabetics, numerics,
+dashes and underscores. Other scripts are discarded.
+
+.SS Hook scripts
+These are used when an initramfs image is created and not included in the
+image itself. They can however cause files to be included in the image.
+Hook scripts are executed under errexit. Thus a hook script can abort the
+mkinitramfs build on possible errors (exitcode != 0).
+
+.SS Boot scripts
+These are included in the initramfs image and normally executed during
+kernel boot in the early user-space before the root partition has been
+mounted.
+
+
Hooks can be found in two places: /usr/share/initramfs-tools/hooks and
/etc/initramfs-tools/hooks. They are executed during generation of the
initramfs-image and are responsible for including all the necessary components
@@ -259,7 +261,7 @@ sets if a keymap needs to be added to initramfs.
.TP
\fB\fI MODULES
specifies which kind of modules should land on initramfs.
-This setting shouldn't be overriden by hook script, but can guide them
+This setting shouldn't be overridden by hook script, but can guide them
on how much they need to include on initramfs.
@@ -496,12 +498,12 @@ init sets several variables for the boot scripts environment.
.TP
\fB\fI ROOT
-correponds to the root boot option.
+corresponds to the root boot option.
Advanced boot scripts like cryptsetup or live-initramfs need to play tricks.
Otherwise keep it alone.
.TP
\fB\fI ROOTDELAY, ROOTFLAGS, ROOTFSTYPE, IP
-correponds to the rootdelay, rootflags, rootfstype or ip boot option.
+corresponds to the rootdelay, rootflags, rootfstype or ip boot option.
.TP
\fB\fI DPKG_ARCH
allows arch specific boot actions.
@@ -521,10 +523,10 @@ passes the path to init(8) usually /sbin/init.
.TP
\fB\fI readonly
is the default for mounting the root corresponds to the ro bootarg.
-Overriden by rw bootarg.
+Overridden by rw bootarg.
.TP
\fB\fI rootmnt
-is the path where root gets mounted usualy /root.
+is the path where root gets mounted usually /root.
.TP
\fB\fI debug
indicates that a debug log is captured for further investigation.
diff --git a/kernel/postinst.d/initramfs-tools b/kernel/postinst.d/initramfs-tools
index 68124f7..d4db23d 100755
--- a/kernel/postinst.d/initramfs-tools
+++ b/kernel/postinst.d/initramfs-tools
@@ -9,6 +9,8 @@ bootopt=""
# kernel-package passes an extra arg
if [ -n "$2" ]; then
if [ -n "${KERNEL_PACKAGE_VERSION}" ]; then
+ # exit if custom kernel does not need an initramfs
+ [ "$INITRD" = 'No' ] && exit 0
bootdir=$(dirname "$2")
bootopt="-b ${bootdir}"
else
@@ -26,4 +28,4 @@ if [ -n "$DEB_MAINT_PARAMS" ]; then
fi
# we're good - create initramfs. update runs do_bootloader
-update-initramfs -c -t -k "${version}" ${bootopt}
+update-initramfs -c -t -k "${version}" ${bootopt} >&2
diff --git a/kernel/postrm.d/initramfs-tools b/kernel/postrm.d/initramfs-tools
index 7811589..4e8f73b 100755
--- a/kernel/postrm.d/initramfs-tools
+++ b/kernel/postrm.d/initramfs-tools
@@ -26,4 +26,4 @@ if [ -n "$DEB_MAINT_PARAMS" ]; then
fi
# delete initramfs
-update-initramfs -d -t -k "${version}" ${bootopt}
+update-initramfs -d -t -k "${version}" ${bootopt} >&2
diff --git a/mkinitramfs b/mkinitramfs
index 3a2feae..0bb7806 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -136,7 +136,7 @@ fi
if ! command -v "${compress}" >/dev/null 2>&1; then
compress=gzip
- COMPRESS=GZIP
+ COMPRESS=gzip
[ "${verbose}" = y ] && \
echo "No ${COMPRESS} in ${PATH}, using gzip"
fi
@@ -322,12 +322,21 @@ eval `
find . 4>&-; echo "ec1=$?;" >&4
} | {
cpio --quiet --dereference -o -H newc 4>&-; echo "ec2=$?;" >&4
- } | "${compress}" >"${outfile}"
+ } | ${compress} >"${outfile}"
echo "ec3=$?;" >&4
`
-if [ "$ec1" -ne 0 ]; then exit "$ec1"; fi
-if [ "$ec2" -ne 0 ]; then exit "$ec2"; fi
-if [ "$ec3" -ne 0 ]; then exit "$ec3"; fi
+if [ "$ec1" -ne 0 ]; then
+ echo "E: mkinitramfs failure find $ec1 cpio $ec2 $compress $ec3"
+ exit "$ec1"
+fi
+if [ "$ec2" -ne 0 ]; then
+ echo "E: mkinitramfs failure cpio $ec2 $compress $ec3"
+ exit "$ec2"
+fi
+if [ "$ec3" -ne 0 ]; then
+ echo "E: mkinitramfs failure $compress $ec3"
+ exit "$ec3"
+fi
) || exit 1
if [ -s "${__TMPCPIOGZ}" ]; then
diff --git a/scripts/functions b/scripts/functions
index 1292fd6..d42a3cf 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -107,7 +107,7 @@ set_initlist()
continue
fi
- initlist="${initlist} ${si_x#${initdir}/}"
+ initlist="${initlist:-} ${si_x#${initdir}/}"
done
}
@@ -224,7 +224,7 @@ call_scripts()
echo "E: ${initdir}/${cs_x} failed with return $ec."
exit $ec
fi
- # allow boot scripts to modify exported boot paramaters
+ # allow boot scripts to modify exported boot parameters
if [ -e /conf/param.conf ]; then
. /conf/param.conf
fi
diff --git a/update-initramfs b/update-initramfs
index f4323b7..a685241 100755
--- a/update-initramfs
+++ b/update-initramfs
@@ -222,9 +222,11 @@ run_bootloader()
fi
if [ -r /etc/zipl.conf ]; then
zipl
+ return 0
fi
if flash-kernel --supported >/dev/null 2>&1; then
flash-kernel ${version}
+ return 0
fi
}
@@ -502,11 +504,8 @@ if [ "${version}" = "all" ] \
OPTS="${OPTS} -y"
fi
for u_version in ${version_list}; do
- # Don't stop if one version doesn't work.
- set +e
verbose "Execute: ${0} -${mode} -k \"${u_version}\" ${OPTS}"
"${0}" -${mode} -k "${u_version}" ${OPTS}
- set -e
done
exit 0
fi