Package: initramfs-tools
Severity: minor
Currently, initramfs-tools relies upon usr/initramfs_list in 2.6 kernels
to create the /dev and /root directories. The attached patch will make
sure that they are created along with the console and null device nodes.
This has two advantages:
1) If usr/initramfs_list changes, the initramfs will still work
2) The initramfs generated by update-initramfs can be compiled into the
kernel (thus replacing usr/initramfs_list). This is still not
straightforward to do (you have to first compile a kernel, then generate
the initramfs for it, copy it somewhere, ungzip it, configure the kernel
config to use that cpio archive as the initramfs and then compile it
again) but at least it is doable.
Re,
David
--- init.old 2005-11-23 21:06:56.000000000 +0100
+++ init 2005-11-23 21:10:43.000000000 +0100
@@ -2,6 +2,11 @@
echo "Loading, please wait..."
+[ -d /dev ] || mkdir --mode=0755 /dev
+[ -e /dev/console ] || mknod /dev/console c 5 1
+[ -e /dev/null ] || mknod /dev/null c 1 3
+touch /dev/.initramfs-tools
+[ -d /root ] || mkdir --mode=0700 /root
mkdir /sys
mkdir /proc
mkdir /tmp
@@ -9,9 +14,6 @@
mount -t sysfs sysfs /sys
mount -t proc proc /proc
mount -t ramfs none /dev
-touch /dev/.initramfs-tools
-mknod /dev/console c 5 1
-mknod /dev/null c 1 3
. /conf/initramfs.conf
. /scripts/functions