summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Bailey <jbailey@ubuntu.com>2005-06-17 15:57:54 +0000
committerJeff Bailey <jbailey@ubuntu.com>2005-06-17 15:57:54 +0000
commit287dcae1407c303ee929d2bff0a49c1e721b05ae (patch)
tree4cd23d9ec83698de2a8e959d648821db770709d7
parentbf8d6100fb13127151c309d842185b3a250ecfff (diff)
downloadinitramfs-tools-287dcae1407c303ee929d2bff0a49c1e721b05ae.tar.gz
initramfs-tools-287dcae1407c303ee929d2bff0a49c1e721b05ae.zip
Use /sbin, do depmod at boot time, copy all the interesting hardware drivers onto the initramfs
-rw-r--r--conf/modules6
-rw-r--r--debian/NEWS15
-rw-r--r--debian/changelog11
-rw-r--r--mkinitramfs35
-rw-r--r--scripts/functions2
-rw-r--r--scripts/local-top/md2
6 files changed, 60 insertions, 11 deletions
diff --git a/conf/modules b/conf/modules
index ee1310a..8f12189 100644
--- a/conf/modules
+++ b/conf/modules
@@ -1,7 +1,5 @@
# List of modules that you want to include in your initramfs.
# This might be good choices:
#
-#ide-disk
-#ide-generic
-#ext2
-#ext3
+# raid1
+# sd_mod
diff --git a/debian/NEWS b/debian/NEWS
new file mode 100644
index 0000000..e755806
--- /dev/null
+++ b/debian/NEWS
@@ -0,0 +1,15 @@
+initramfs-tools (0.10) breezy; urgency=low
+
+ * 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.
+ I will shrink it down once it's correct. If you're on an
+ arch that doesn't like >4mb initramfs', then this won't boot.
+
+ 2) Your network drivers are loaded in the initramfs, so hotplug
+ won't see a network event, so ifup won't be run. This will
+ be fixed shortly in hotplug.
+
+ -- Jeff Bailey <jbailey@ubuntu.com> Fri, 17 Jun 2005 15:17:06 +0000
+
diff --git a/debian/changelog b/debian/changelog
index 5cd9969..ca4efc1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,7 @@
initramfs-tools (0.10) breezy; urgency=low
+ The "I can see you!" release.
+
* Unconditionally require busybox. Might revert this eventually
but it's too much of a pain right now do this without
a reasonably environment
@@ -9,7 +11,14 @@ initramfs-tools (0.10) breezy; urgency=low
* Iterate through /sys/bus/pci and /sys/bus/usb and load drivers
based on their modalias
- -- Jeff Bailey <jbailey@ubuntu.com> Thu, 16 Jun 2005 02:23:50 +0000
+ * Start to use /sbin for things
+
+ * Include depmod in the image. Use it at boot time.
+
+ * Edit config example to show the modules that do need to be included
+ manually for this build.
+
+ -- Jeff Bailey <jbailey@ubuntu.com> Fri, 17 Jun 2005 12:45:07 +0000
initramfs-tools (0.9) breezy; urgency=low
diff --git a/mkinitramfs b/mkinitramfs
index c3e98a3..078346f 100644
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -18,16 +18,40 @@ manual_add_modules()
mkdir -p ${TMPDIR}/$(dirname ${y})
ln -s ${y} ${TMPDIR}/$(dirname ${y})
- depmod -b ${TMPDIR} ${version}
echo $(basename ${y} .ko) >>${TMPDIR}/conf/modules
done
done
}
+# Copy entire subtrees to the initramfs
+copy_modules_dir()
+{
+ tmpdir_modbase=${TMPDIR}/lib/modules/${version}
+ mkdir -p $(dirname ${tmpdir_modbase}/${1})
+ cp -a /lib/modules/${version}/${1} ${tmpdir_modbase}/${1}
+}
+
# Modules that we always add to the initramfs
auto_add_modules()
{
- for x in ext3 ext2 raid1 md sd_mod sata_svw usbhid ohci_hcd ehci_hcd; do
+ copy_modules_dir kernel/drivers/net
+ copy_modules_dir kernel/drivers/scsi
+ copy_modules_dir kernel/drivers/ide
+ copy_modules_dir kernel/drivers/md
+ copy_modules_dir kernel/drivers/usb
+ copy_modules_dir kernel/drivers/block
+ copy_modules_dir kernel/drivers/input
+ copy_modules_dir kernel/fs/ext2
+ copy_modules_dir kernel/fs/ext3
+ copy_modules_dir kernel/fs/isofs
+ copy_modules_dir kernel/fs/jbd
+ copy_modules_dir kernel/fs/jfs
+ copy_modules_dir kernel/fs/nfs
+ copy_modules_dir kernel/fs/reiserfs
+ copy_modules_dir kernel/fs/xfs
+
+ # These aren't caught by the above but really need to be there:
+ for x in mbcache; do
for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do
# Prune duplicates
if [ -e ${TMPDIR}/${y} ]; then
@@ -140,11 +164,12 @@ ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/busybox
# Modutils
ln -s /sbin/modprobe ${TMPDIR}/sbin
-ln -s /sbin/rmmod ${TMPDIR}/bin
+ln -s /sbin/depmod ${TMPDIR}/sbin
+ln -s /sbin/rmmod ${TMPDIR}/sbin
# Raid
-ln -s /sbin/mdadm ${TMPDIR}/bin
-ln -s /sbin/mdrun ${TMPDIR}/bin
+ln -s /sbin/mdadm ${TMPDIR}/sbin
+ln -s /sbin/mdrun ${TMPDIR}/sbin
(cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile})
diff --git a/scripts/functions b/scripts/functions
index 7e8c725..d5d1035 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -108,6 +108,8 @@ run_scripts()
load_modules()
{
+ depmod
+
for x in /sys/bus/pci/devices/*; do
modprobe -q $(cat ${x}/modalias)
done
diff --git a/scripts/local-top/md b/scripts/local-top/md
index d6f7e94..864ffe4 100644
--- a/scripts/local-top/md
+++ b/scripts/local-top/md
@@ -15,4 +15,4 @@ prereqs)
;;
esac
-/bin/mdrun /dev
+/sbin/mdrun /dev