summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2006-07-24 09:13:28 +0200
committermaximilian attems <maks@debian.org>2006-07-24 09:13:28 +0200
commit8761821795732a9755d673e92fb45ac9202270df (patch)
tree2f6f5d1fc992df86554fa484e477a040ddf03d4c
parent475bcbc9d6eefe90de6efe424bfb5bcca999fbc7 (diff)
downloadinitramfs-tools-8761821795732a9755d673e92fb45ac9202270df.tar.gz
initramfs-tools-8761821795732a9755d673e92fb45ac9202270df.zip
- add BUSYBOX section to conf
- add myri10ge, smc911x and hptiop modules - fix check_minkver() logic - escape resume variables - fix SEE ALSO section in all manpages - source /usr/share/initramfs-tools/conf.d/* - check against modules.dep before running depmod - more verbose output - open console with -i for dash interactive - fix resume param by LABEL or UUID - lvm has new prereq mdadm - update-initramfs fix -v calling - functions/scripts replace basename usage with shell expansion
-rw-r--r--conf/initramfs.conf7
-rw-r--r--debian/changelog50
-rw-r--r--hook-functions17
-rwxr-xr-xinit4
-rw-r--r--initramfs-tools.85
-rw-r--r--initramfs.conf.516
-rwxr-xr-xmkinitramfs12
-rw-r--r--mkinitramfs-kpkg.86
-rw-r--r--mkinitramfs.89
-rw-r--r--scripts/functions8
-rwxr-xr-xscripts/local-premount/resume9
-rwxr-xr-xscripts/local-top/lvm2
-rwxr-xr-xupdate-initramfs4
-rw-r--r--update-initramfs.86
14 files changed, 126 insertions, 29 deletions
diff --git a/conf/initramfs.conf b/conf/initramfs.conf
index 84d3b24..b0d1dc0 100644
--- a/conf/initramfs.conf
+++ b/conf/initramfs.conf
@@ -17,6 +17,13 @@
MODULES=most
+# BUSYBOX: [ y | n ]
+#
+# Use busybox if available.
+#
+
+BUSYBOX=y
+
#
# NFS Section of the config.
#
diff --git a/debian/changelog b/debian/changelog
index faaf90a..e6f271b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,46 @@
+initramfs-tools (0.71) unstable; urgency=low
+
+ * initramfs.conf.5, initramfs-tools.8, mkinitramfs.8, mkinitramfs-kpkg.8,
+ update-initramfs.8: Fix spacing in the SEE ALSO section and have this
+ section everywhere as last. Fix linebreak in mkinitramfs.8 options.
+ Thanks Martin Michlmayr <tbm@cyrius.com> for the notice.
+
+ * scripts/functions: Use shell parameter expansion to strip known dir
+ prefix instead of gratious basename call.
+
+ * scripts/functions: On panic call open the rescue shell with -i to get
+ dash interactive features. ash from busybox ignores the param.
+ Thanks David Härdeman <david@2gen.com> for the suggestion.
+
+ * conf/initramfs.conf: Readd BUSYBOX=y section. Beware that a lot of boot
+ scripts need busybox and the current default image still does too.
+
+ * initramfs.conf: Document BUSYBOX usage.
+
+ * init: Add variable quoting around resume, NORESUME parsing and checks.
+
+ * hook-functions: Add myri10ge and smc911x to the net section. Add hptiop to
+ the scsi section.
+
+ * update-initramfs: Fix -v usage by not passing quoted ${OPTS} as one
+ option. Thanks Famelis George <famelis@otenet.gr> for the patch.
+ (closes: 379212)
+
+ * mkinitramfs: Really source /usr/share/initramfs-tools/conf.d/ entries.
+
+ * mkinitramfs: Check against modules.dep before invoking depmod.
+
+ * hook-functions: check_minkver() only needs to call init_list(),
+ when a dir gets passed. Clean up check_minkver() logic.
+
+ * scripts/function, mkinitramfs: Add output on verbose mode.
+
+ * merge 0.69ubuntu4.
+
+ * scripts/local-top/lvm: Prereqs s/md/mdadm/ for the new hooks.
+
+ -- maximilian attems <maks@sternwelten.at> Mon, 24 Jul 2006 09:10:53 +0200
+
initramfs-tools (0.70b) unstable; urgency=low
* Be more careful about vi dot files, removed.
@@ -61,6 +104,13 @@ initramfs-tools (0.69b) unstable; urgency=high
-- maximilian attems <maks@sternwelten.at> Fri, 14 Jul 2006 00:31:30 +0200
+initramfs-tools (0.69ubuntu4) edgy; urgency=low
+
+ * scripts/local-premount/suspend: Check for UUID= or LABEL= on the
+ start of $resume, and use /dev/disk/by-{uuid,label} if found.
+
+ -- Scott James Remnant <scott@ubuntu.com> Fri, 21 Jul 2006 17:58:34 +0100
+
initramfs-tools (0.69ubuntu3) edgy; urgency=low
* debian/initramfs-tools.install, debian/initramfs-tools.preinst,
diff --git a/hook-functions b/hook-functions
index 9b1bd24..3175cba 100644
--- a/hook-functions
+++ b/hook-functions
@@ -149,8 +149,8 @@ auto_add_modules()
net)
for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx \
dl2k e1000 e100 epic100 eql fealnx famachi forcedeth \
- hp100 mace mv643xx_eth natsemi ne2k-pci netconsole \
- ns83820 pcnet32 r8169 s2io sis900 skge slhc starfire \
+ hp100 mace mv643xx_eth myri10ge natsemi ne2k-pci netconsole \
+ ns83820 pcnet32 r8169 s2io sis900 skge slhc smc911x starfire \
sundance sungem sungem_phy sunhme tg3 tlan de2104x \
de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb \
typhon via-rhine via-velocity yellowfin; do
@@ -170,10 +170,10 @@ auto_add_modules()
for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci \
aic79xx aic7xxx arcmsr ata_piix atari_scsi atp870u BusLogic \
cciss ch cpqarray dac960 dc395x dmx3191d dpt_i2o eata fdomain \
- gdth ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 \
- megaraid megaraid_mbox megaraid_mm mesh mptfc mptscsih \
- mptsas mptspi nsp32 osst qla1280 qla2100 qla2200 qla2300 \
- qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_mv \
+ gdth hptiop ibmvscsic initio ipr ips isp1020 lpfc max_scsi \
+ mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptfc \
+ mptscsih mptsas mptspi nsp32 osst qla1280 qla2100 qla2200 \
+ qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_mv \
sata_nv sata_promise sata_qstor sata_sil sata_sis sata_svw \
sata_sx4 sata_uli sata_via sata_vsc scsi_mod \
scsi_transport_fc scsi_transport_iscsi scsi_transport_spi \
@@ -231,7 +231,6 @@ check_minkver()
{
curversion=${1}
initdir=${2}
- set_initlist
if [ -z ${initdir} ]; then
DPKG_ARCH=`dpkg --print-installation-architecture`
case ${DPKG_ARCH} in
@@ -247,8 +246,10 @@ check_minkver()
echo "W: not generating requested initramfs for kernel ${curversion}" >&2
exit 2
fi
+ return 0
fi
- [ -z ${initdir} ] || for cm_x in ${initlist}; do
+ set_initlist
+ for cm_x in ${initlist}; do
tmp=$(eval echo $(grep ^MINKVER ${initdir}/${cm_x} | cut -d'=' -f2))
if dpkg --compare-versions "${curversion}" lt "${tmp}"; then
echo "W: ${cm_x} hook script requires at least kernel version ${tmp}" >&2
diff --git a/init b/init
index eb14326..69d9542 100755
--- a/init
+++ b/init
@@ -76,7 +76,7 @@ for x in $(cat /proc/cmdline); do
BOOT=${x#boot=}
;;
resume=*)
- RESUME=${x#resume=}
+ RESUME="${x#resume=}"
;;
noresume)
NORESUME=y
@@ -104,7 +104,7 @@ for x in $(cat /proc/cmdline); do
esac
done
-if [ -z ${NORESUME} ]; then
+if [ -z "${NORESUME}" ]; then
export resume=${RESUME}
fi
diff --git a/initramfs-tools.8 b/initramfs-tools.8
index 5712bdd..0950b39 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -418,5 +418,6 @@ updated by Maximilian Attems <maks@sternwelten.at>.
.SH SEE ALSO
.BR
-initramfs.conf (5), mkinitramfs (8), update-initramfs(8)
-
+.IR initramfs.conf (5),
+.IR mkinitramfs (8),
+.IR update-initramfs(8).
diff --git a/initramfs.conf.5 b/initramfs.conf.5
index afd799b..8d6b621 100644
--- a/initramfs.conf.5
+++ b/initramfs.conf.5
@@ -32,6 +32,14 @@ The default setting is \fImost\fP.
\fIlist\fP includes only modules from the additional modules list.
+.TP
+\fB BUSYBOX
+Include busybox utilities for the boot scripts.
+If set to 'n'
+.B mkinitramfs
+will build an initramfs whithout busybox.
+Beware that many boot scripts need busybox utilities.
+
.SH NFS VARIABLES
.TP
\fB BOOT
@@ -48,12 +56,14 @@ Specifies the network interface, like eth0.
Defaults to \fIauto\fP in order to pick up value from DHCP server.
Otherwise you need to specify \fIHOST:MOUNT\fP.
-.SH SEE ALSO
-
-.BR initramfs-tools (8), mkinitramfs (8), update-initramfs (8)
.SH AUTHOR
The initramfs-tools are written by Jeff Bailey <jbailey@raspberryginger.com>.
This manual is maintained by Maximilian Attems <maks@sternwelten.at>.
Loosely based on mkinitrd.conf by Herbert Xu.
+.SH SEE ALSO
+.BR
+.IR initramfs-tools (8),
+.IR mkinitramfs (8),
+.IR update-initramfs (8).
diff --git a/mkinitramfs b/mkinitramfs
index 0f1cb58..52dea45 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -83,11 +83,16 @@ fi
. "${CONFDIR}/initramfs.conf"
EXTRA_CONF=''
-for i in ${CONFDIR}/conf.d/* /usr/share/initramfs-tools/conf.d/*; do
+for i in ${CONFDIR}/conf.d/*; do
EXTRA_CONF="${EXTRA_CONF} $(basename $i | grep '^[a-z0-9][a-z0-9\._-]*$' | grep -v '\.dpkg-.*$')";
done
for i in ${EXTRA_CONF}; do
-. ${CONFDIR}/conf.d/${i}
+ . ${CONFDIR}/conf.d/${i}
+done
+for i in /usr/share/initramfs-tools/conf.d/*; do
+ if [ -e $i ]; then
+ . ${i}
+ fi
done
if [ -z "${outfile}" ]; then
@@ -135,7 +140,7 @@ if [ ! -e "${MODULESDIR}" ]; then
echo "Cannot find ${MODULESDIR}"
exit 1
fi
-if [ ! -e "${MODULESDIR}/modules.depmod" ]; then
+if [ ! -e "${MODULESDIR}/modules.dep" ]; then
depmod ${version}
fi
@@ -228,6 +233,7 @@ if [ -e "${CONFDIR}/DSDT.aml" ]; then
copy_exec "${CONFDIR}/DSDT.aml" /
fi
+[ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs"
(cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}") || exit 1
if [ -s "${__TMPCPIOGZ}" ]; then
diff --git a/mkinitramfs-kpkg.8 b/mkinitramfs-kpkg.8
index 871a0f4..2a3072b 100644
--- a/mkinitramfs-kpkg.8
+++ b/mkinitramfs-kpkg.8
@@ -46,5 +46,7 @@ This option queries if mkinitramfs can create ramdisks for kernel version
mkinitramfs-kpkg is maintained by Maximilian Attems <maks@sternwelten.at>.
.SH SEE ALSO
-
-.BR initramfs.conf (5), initramfs-tools (8), update-initramfs (8)
+.BR
+.IR initramfs.conf (5),
+.IR initramfs-tools (8),
+.IR update-initramfs (8).
diff --git a/mkinitramfs.8 b/mkinitramfs.8
index 3dc2e2e..65f6203 100644
--- a/mkinitramfs.8
+++ b/mkinitramfs.8
@@ -13,9 +13,12 @@ mkinitramfs \- generate an initramfs image
.RB [ \-r
.IR root ]
.RI [ version ]
+
.B mkinitramfs
.RB [ \-\-supported-host-version=
.IR hversion ]
+
+.B mkinitramfs
.RB [ \-\-supported-target-version=
.IR tversion ]
@@ -90,5 +93,7 @@ The initramfs-tools are written by Jeff Bailey <jbailey@ubuntu.com>.
This manual is maintained by Maximilian Attems <maks@sternwelten.at>.
.SH SEE ALSO
-
-.BR initramfs.conf (5), initramfs-tools (8), update-initramfs (8)
+.BR
+.IR initramfs.conf (5),
+.IR initramfs-tools (8),
+.IR update-initramfs (8).
diff --git a/scripts/functions b/scripts/functions
index 53e07ca..9e578d7 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -62,7 +62,7 @@ panic()
modprobe -q i8042
modprobe -q atkbd
echo $@
- PS1='(initramfs) ' /bin/sh </dev/console >/dev/console 2>&1
+ PS1='(initramfs) ' /bin/sh -i </dev/console >/dev/console 2>&1
}
maybe_break()
@@ -84,7 +84,7 @@ set_initlist()
if [ ! -x ${si_x} ]; then
continue
fi
- initlist="${initlist} $(basename ${si_x})"
+ initlist="${initlist} ${si_x#${initdir}/}"
done
}
@@ -168,6 +168,10 @@ reduce_prereqs()
call_scripts()
{
for cs_x in ${runlist}; do
+ # mkinitramfs verbose output
+ if [ "${verbose}" = "y" ]; then
+ echo "Calling hook ${cs_x}"
+ fi
${initdir}/${cs_x}
# allow boot scripts to modify exported boot paramaters
if [ -e /conf/param.conf ]; then
diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume
index 059e7a4..564d6f8 100755
--- a/scripts/local-premount/resume
+++ b/scripts/local-premount/resume
@@ -19,6 +19,15 @@ if [ "x${resume}" = "x" ]; then
exit
fi
+case $resume in
+ LABEL=*)
+ resume="/dev/disk/by-label/${resume#LABEL=}"
+ ;;
+ UUID=*)
+ resume="/dev/disk/by-uuid/${resume#UUID=}"
+ ;;
+esac
+
if [ ! -e "${resume}" ]; then
exit
fi
diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm
index 5323a7d..9a45220 100755
--- a/scripts/local-top/lvm
+++ b/scripts/local-top/lvm
@@ -1,6 +1,6 @@
#!/bin/sh
-PREREQ="md"
+PREREQ="mdadm"
prereqs()
{
diff --git a/update-initramfs b/update-initramfs
index 85a5dd2..ea74136 100755
--- a/update-initramfs
+++ b/update-initramfs
@@ -66,9 +66,9 @@ generate_initramfs()
echo "update-initramfs: Generating ${initramfs}"
OPTS="-o"
if [ "${verbose}" = 1 ]; then
- OPTS="-v $OPTS"
+ OPTS="-v ${OPTS}"
fi
- if mkinitramfs "${OPTS}" "${initramfs}" "${version}"; then
+ if mkinitramfs ${OPTS} "${initramfs}" "${version}"; then
set_sha1
else
mkinitramfs_return="$?"
diff --git a/update-initramfs.8 b/update-initramfs.8
index a36e83c..7cfc206 100644
--- a/update-initramfs.8
+++ b/update-initramfs.8
@@ -67,5 +67,7 @@ The initramfs-tools are written by Jeff Bailey <jbailey@ubuntu.com>.
This manual is maintained by Maximilian Attems <maks@sternwelten.at>.
.SH SEE ALSO
-
-.BR initramfs.conf (5), initramfs-tools (8), mkinitramfs (8)
+.BR
+.IR initramfs.conf (5),
+.IR initramfs-tools (8),
+.IR mkinitramfs (8).