summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--hook-functions19
2 files changed, 19 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 78a6922..6d8b335 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,8 +17,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low
Thanks Vagrant Cascadian <vagrant+debianbugs@freegeek.org> for the patch.
* update-initramfs: Don't check for ro /boot inside of a chroot.
* debian/script: Fix syntax of MODULES=dep block.
+ * hook-functions: Add rootfs detection for the "auto" mount output.
+ Thanks martin f krafft <madduck@debian.org> for report. (closes: #441211)
- -- maximilian attems <maks@debian.org> Fri, 07 Sep 2007 15:10:11 +0200
+ -- maximilian attems <maks@debian.org> Fri, 07 Sep 2007 18:24:40 +0200
initramfs-tools (0.90a) unstable; urgency=high
diff --git a/hook-functions b/hook-functions
index 61af0a5..cb2c75d 100644
--- a/hook-functions
+++ b/hook-functions
@@ -203,10 +203,23 @@ sys_walk_mod_add()
# find and only copy root relevant modules
dep_add_modules()
{
- local block minor root rootfs root_dev_path x
+ local block minor root FSTYPE root_dev_path x
# findout root block device + fstype
- eval "$(mount | awk '/ \/ / {print "root=" $1 "\nrootfs=" $5; exit}')"
+ eval "$(mount | awk '/ \/ / {print "root=" $1 "\nFSTYPE=" $5; exit}')"
+
+ # find out real rootfs on auto type
+ if [ "${FSTYPE}" = "auto" ]; then
+ eval "$(/usr/lib/klibc/bin/fstype ${root})"
+ fi
+
+ # check that fstype rootfs recognition
+ if [ "${FSTYPE}" = "unknown" ]; then
+ echo "mkinitramfs: unkown fstype on root ${root}"
+ echo "mkinitramfs: workaround is MODULES=most"
+ echo "mkinitramfs: Error please report bug against klibc"
+ exit 1
+ fi
# lvm luks root
if [ "${root#/dev/mapper/}" != "${root}" ]; then
@@ -236,7 +249,7 @@ dep_add_modules()
fi
# Add rootfs
- force_load "${rootfs}"
+ force_load "${FSTYPE}"
root_dev_path=$(readlink -f /sys/block/${block}/device)
sys_walk_mod_add ${root_dev_path}