summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2006-07-07 12:05:34 +0200
committermaximilian attems <maks@debian.org>2006-07-07 12:05:34 +0200
commitf82a46fac97eee643cbd8600657f533a6e31665f (patch)
tree63c90cbc9348f0ee9bd06ba02ec6531e2e6e17f0
parentaf6f5f475221846f88a2bbda39a2a93d67556d07 (diff)
downloadinitramfs-tools-f82a46fac97eee643cbd8600657f533a6e31665f.tar.gz
initramfs-tools-f82a46fac97eee643cbd8600657f533a6e31665f.zip
- mkinitramfs take care of eventual missing depmod run
- do the migration from mkinitramfs in preinst - sed the modules file so that it looks pretty some than ours - polish modules file - allow BUSYBOX=n
-rw-r--r--conf/modules3
-rw-r--r--debian/changelog24
-rw-r--r--debian/initramfs-tools.postinst33
-rw-r--r--debian/initramfs-tools.preinst35
-rwxr-xr-xmkinitramfs14
5 files changed, 70 insertions, 39 deletions
diff --git a/conf/modules b/conf/modules
index 0067831..9aa4646 100644
--- a/conf/modules
+++ b/conf/modules
@@ -2,8 +2,9 @@
#
# Syntax: module_name [args ...]
#
+# You must run update-initramfs(8) to effect this change.
#
-# This might be good choices:
+# Examples:
#
# raid1
# sd_mod
diff --git a/debian/changelog b/debian/changelog
index 5035086..bbc2944 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,29 @@
-initramfs-tools (0.68) unstable; urgency=low
+initramfs-tools (0.68) unstable; urgency=high
* script/functions, hook-functions: Move check_minkver() to the second
file as it uses dpkg and is run by mkinitramfs and not on boot.
- -- maximilian attems <maks@sternwelten.at> Sun, 2 Jul 2006 19:44:45 +0200
+ * mkinitramfs: Check if ${BUSYBOX} is set to n before adding it.
+ Add a big fat warning that this not yet supported. Helps to do the
+ klibc-utils work.
+
+ * mkinitramfs: Run depmod if no /lib/modules/${version}/modules.dep exists.
+ Solves initramfs creation for handbuild upstream Xen targets.
+ Thanks to Klaus Ita <ita@ai.wu-wien.ac.at> for the report.
+
+ * debian/initramfs-tools.preinst, debian/initramfs-tools.postinst: Do the
+ migration of the mkinitrd settings in the preinst. (closes: #376604) Thanks
+ for the checks to Justin Pryzby <justinpryzby@users.sourceforge.net>.
+
+ * debian/initramfs-tools.preinst: Reorder. Generate an modules file similar
+ to the one we ship. This should minimize Sarge upgrade prompting if no
+ relevant modules where added to /etc/mkinitrd/modules.
+
+ * conf/initramfs.conf: Make it more similar to /etc/mkinitrd/modules.
+
+ * Set urgency high for RC fixes upload.
+
+ -- maximilian attems <maks@sternwelten.at> Fri, 7 Jul 2006 11:45:56 +0200
initramfs-tools (0.67) unstable; urgency=high
diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst
index 9a0b555..a8df95e 100644
--- a/debian/initramfs-tools.postinst
+++ b/debian/initramfs-tools.postinst
@@ -2,39 +2,6 @@
set -e
-if [ "$1" = configure ]; then
- if [ x${2} = x ]; then
-
- # First time install. Can we autodetect the RESUME partition?
- RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ')
-
- # Inhertic initrd-tools settings if possible.
- if [ -e /etc/mkinitrd/mkinitrd.conf ]; then
- . /etc/mkinitrd/mkinitrd.conf
- fi
-
- if [ -e /etc/mkinitrd/modules ]; then
- cp /etc/mkinitrd/modules /etc/initramfs-tools
- sed -i \
- -e 's/mkinitrd/mkinitramfs/g' \
- -e '/^ide-generic/d' \
- -e '/^ide-disk/d' \
- -e '/^ext2/d' \
- -e '/^ext3/d' \
- /etc/initramfs-tools/modules
- fi
-
- if [ -e ${RESUME} ]; then
- echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume
- fi
-
- if [ -e /etc/mkinitrd/DSDT ]; then
- cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml
- fi
-
- fi
-fi
-
# Regenerate initramfs on upgrade
if [ "$1" = "configure" -a -n "$2" ]; then
update-initramfs -u
diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst
index f2b667e..dca832f 100644
--- a/debian/initramfs-tools.preinst
+++ b/debian/initramfs-tools.preinst
@@ -3,6 +3,41 @@
set -e
case "$1" in
+ configure)
+ if [ -n "$2" ]; then
+ # First time install. Can we autodetect the RESUME partition?
+ RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ')
+
+ # Inhertic initrd-tools settings if possible.
+ if [ -e /etc/mkinitrd/mkinitrd.conf ]; then
+ . /etc/mkinitrd/mkinitrd.conf
+ fi
+ if [ -e ${RESUME} ]; then
+ echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume
+ fi
+
+ # Add initrd-tools modules, while trying to minimize prompting
+ if [ -e /etc/mkinitrd/modules ]; then
+ cp /etc/mkinitrd/modules /etc/initramfs-tools
+ sed -i \
+ -e 's/\/etc\/mkinitrd\/modules: Kernel modules to load for initrd./List of modules that you want to include in your initramfs./g' \
+ -e 's/mkinitrd/update-initramfs/g' \
+ -e '/# This file should/,/one per line\./d' \
+ -e 's/Comments begin with.*/Syntax: module_name [args ...]/' \
+ -e 's/^# ext2$/# raid1/' \
+ -e 's/^# wd io=0x300$/# sd_mod/'
+ -e '/^ide-generic/d' \
+ -e '/^ide-disk/d' \
+ -e '/^ext2/d' \
+ -e '/^ext3/d' \
+ /etc/initramfs-tools/modules
+ fi
+
+ if [ -e /etc/mkinitrd/DSDT ]; then
+ cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml
+ fi
+ fi
+ ;;
upgrade)
if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.61"; then
if [ -d /etc/initramfs-tools ]; then
diff --git a/mkinitramfs b/mkinitramfs
index f0ba606..f532228 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -112,6 +112,9 @@ if [ ! -e "${MODULESDIR}" ]; then
echo "Cannot find ${MODULESDIR}"
exit 1
fi
+if [ ! -e "${MODULESDIR}/modules.depmod" ]; then
+ depmod ${version}
+fi
DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1
__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1
@@ -175,9 +178,14 @@ done
echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root
# Busybox
-rm -f ${DESTDIR}/bin/sh
-copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
-ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+if [ "x${BUSYBOX}" = "xn" ]; then
+ ln -s ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh
+ echo "Warning: Busybox is required for successful boot!"
+else
+ rm -f ${DESTDIR}/bin/sh
+ copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
+ ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+fi
# Modutils
copy_exec /sbin/modprobe /sbin