summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog48
-rw-r--r--debian/control2
-rw-r--r--debian/initramfs-tools.postinst1
-rw-r--r--hook-functions13
-rw-r--r--init12
-rw-r--r--scripts/functions15
-rw-r--r--scripts/local2
-rw-r--r--scripts/local-top/lvm17
-rw-r--r--scripts/nfs1
9 files changed, 102 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog
index aaa2dba..09bc345 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,49 @@
+initramfs-tools (0.23) breezy; urgency=low
+
+ "This suspense is terrible. I hope it will last."
+ - Oscar Wilde
+
+ * scripts/local: Quote ${ROOT} so that an empty value causes us
+ to drop to a shell.
+ Thanks to Matt Zimmerman for this fix!
+
+ - hook-functions (auto_add_modules): Add atiixp and opti621 to
+ the IDE set.
+
+ - hook-functions (dep_add_modules): Detect i2o and add i2o_block
+ (auto_add_modules): Include i2o_block.
+
+ - scripts/functions (i2o_boot_events): New function
+ (load_modules): Call it. (Ubuntu# 13806)
+ Thanks to Tollef Fog Heen for the i2o patch!
+
+ - debian/control: Depend on udev.
+ Thanks to Alexander Butenko for troubleshooting this with me.
+
+ - init: Move the /dev directory to the root filesystem.
+ Handle all the udev bind mounts as needed.
+ Make sure input and output is associated with dev/console.
+
+ - scripts/functions (parse_numeric): Exit if we're refering to a path.
+ Otherwise override root setting to be /dev/root.
+ - init: Call parse_numeric when setting the root variable.
+ - scripts/local-top/lvm: When using a numeric root, call vgchange -ay
+ Don't attempt to start LVM on regular partitions.
+ (Ubuntu #13365, #13778, and some of #13399)
+
+ - scripts/local-top/lvm: Cope with -'s in the Volume Group and
+ logical volume names. (Ubuntu #13387)
+ Thanks to Stephen Shirley for the patch!
+
+ -- Jeff Bailey <jbailey@ubuntu.com> Thu, 25 Aug 2005 11:48:15 -0400
+
+initramfs-tools (0.22) breezy; urgency=low
+
+ * Fix argument handling in force_load hook-function
+ * Add "sleep 3" to scripts/nfs as a nasty hack around bug #12942
+
+ -- Matt Zimmerman <mdz@ubuntu.com> Fri, 19 Aug 2005 23:50:16 -0700
+
initramfs-tools (0.21) breezy; urgency=low
"All that I desire to point out is the general principle that
@@ -20,7 +66,7 @@ initramfs-tools (0.21) breezy; urgency=low
* debian/initramfs-tools.postinst: Preserve /etc/mkinitrd/modules if
possible on new install. (Ubuntu #13372)
- -- Jeff Bailey <jbailey@ubuntu.com> Tue, 16 Aug 2005 15:56:00 -0400
+ -- Jeff Bailey <jbailey@ubuntu.com> Thu, 18 Aug 2005 00:20:11 -0400
initramfs-tools (0.20) breezy; urgency=low
diff --git a/debian/control b/debian/control
index cd47480..4120074 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.6.2.0
Package: initramfs-tools
Architecture: all
-Depends: klibc-utils, busybox-cvs-initramfs (>= 20040623-1ubuntu19), cpio, mdadm, lvm2 (>= 2.01.04-5)
+Depends: klibc-utils, busybox-cvs-initramfs (>= 20040623-1ubuntu19), cpio, mdadm, lvm2 (>= 2.01.04-5), udev
Description: tools for generating an initramfs
This package contains tools to create and boot an initramfs for prepackaged
2.6 Linux kernel. The initramfs is an cpio archive. At boot time, the kernel
diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst
index fe734cf..6e61803 100644
--- a/debian/initramfs-tools.postinst
+++ b/debian/initramfs-tools.postinst
@@ -15,6 +15,7 @@ if [ "$1" = configure ]; then
if [ -e /etc/mkinitrd/modules ]; then
cp /etc/mkinitrd/modules /etc/mkinitramfs
+ sed -i -e 's/mkinitrd/mkinitramfs/g' /etc/mkinitramfs/modules
fi
if [ -e ${RESUME} ]; then
diff --git a/hook-functions b/hook-functions
index 8642af9..8ff5267 100644
--- a/hook-functions
+++ b/hook-functions
@@ -6,7 +6,7 @@ catenate_cpiogz() {
force_load()
{
- manual_add_modules ${module}
+ manual_add_modules ${@}
echo ${@} >>${DESTDIR}/conf/modules
}
@@ -106,6 +106,10 @@ dep_add_modules()
if [ -e /sys/bus/scsi/devices/ ]; then
manual_add_modules sd_mod
fi
+
+ if [ -e /sys/bus/i2o/devices/ ]; then
+ manual_add_modules i2o_block
+ fi
}
@@ -123,7 +127,7 @@ auto_add_modules()
done
# ide
- for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do
+ for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 opti621 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do
manual_add_modules ${x}
done
@@ -132,6 +136,11 @@ auto_add_modules()
manual_add_modules ${x}
done
+ # i2o
+ for x in i2o_block; do
+ manual_add_modules ${x}
+ done
+
}
usage()
diff --git a/init b/init
index 38450da..f3aa221 100644
--- a/init
+++ b/init
@@ -61,6 +61,9 @@ log_end_msg
# Populate /dev tree
log_begin_msg "Initializing /dev"
+mount -t ramfs none /dev
+touch /dev/.initramfs-tools
+parse_numeric ${ROOT}
udevstart
log_end_msg
@@ -80,8 +83,15 @@ log_begin_msg "Running /scripts/init-bottom"
run_scripts /scripts/init-bottom
log_end_msg
+# Move our /dev to the real filesystem. Do the setup that udev otherwise
+# would.
+mkdir -p /dev/.static/dev
+chmod 700 /dev/.static/
+mount -o bind /root/dev /dev/.static/dev
+mount -o move /dev /root/dev
+
umount /sys
umount /proc
# Chain to real filesystem
-exec run-init ${rootmnt} ${init} "$@"
+exec run-init ${rootmnt} ${init} "$@" </root/dev/console >/root/dev/console
diff --git a/scripts/functions b/scripts/functions
index 10918f8..956b1c3 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -181,6 +181,15 @@ scsi_boot_events()
}
+i2o_boot_events()
+{
+ [ -e /sys/bus/i2o/devices/ ] || return
+
+ for device in /sys/bus/i2o/devices/*; do
+ [ -e ${device}/block ] && modprobe i2o_block
+ done
+}
+
load_modules()
{
depmod -a
@@ -217,10 +226,15 @@ load_modules()
ide_boot_events
scsi_boot_events
+
+ i2o_boot_events
}
parse_numeric() {
case $1 in
+ /*)
+ return
+ ;;
*:*)
minor=${1#*:}
major=${1%:*}
@@ -232,5 +246,6 @@ parse_numeric() {
esac
mknod /dev/root b ${major} ${minor}
+ ROOT=/dev/root
}
diff --git a/scripts/local b/scripts/local
index bcc96ad..539a2a4 100644
--- a/scripts/local
+++ b/scripts/local
@@ -8,7 +8,7 @@ mountroot ()
log_end_msg
# Get the root filesystem type
- if [ ! -e ${ROOT} ]; then
+ if [ ! -e "${ROOT}" ]; then
panic "ALERT! ${ROOT} does not exist. Dropping to a shell!"
fi
diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm
index 4f199de..9307f55 100644
--- a/scripts/local-top/lvm
+++ b/scripts/local-top/lvm
@@ -15,10 +15,21 @@ prereqs)
;;
esac
-vg=$(echo ${ROOT} | sed -e 's#/dev/mapper/\(.*\)-.*#\1#')
-
-[ x${vg} != x ] || return
+vg=${ROOT#/dev/mapper/}
+case ${vg} in
+ /dev/root)
+ unset vg
+ ;;
+ /*)
+ exit 0
+ ;;
+esac
+
modprobe -q dm-mod
+# Cope with -'s in the volume group and node names.
+vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#')
+
vgchange -ay ${vg}
+
diff --git a/scripts/nfs b/scripts/nfs
index 8149e86..10f8f1d 100644
--- a/scripts/nfs
+++ b/scripts/nfs
@@ -29,6 +29,7 @@ mountroot ()
roflag="-o rw"
fi
+ sleep 3
nfsmount ${roflag} ${NFSROOT} ${rootmnt}
log_begin_msg "Running /scripts/nfs-bottom"