[Bug 327106] [NEW] initramfs is too big
SurJector
loic.grenie at gmail.com
Mon Feb 9 09:21:48 UTC 2009
Public bug reported:
A lot of space is wasted in initramfs because busybox is not correctly
used.
1) busybox-initramfs is compiled statically but it's useless because libc.so is on the initramfs (that means 1217840 bytes against 270112 if compiled dynamically -- give or take a few, arch: amd64)
2) some tools that are present in the initramfs could be symlinks to busybox
3) all symbolic links are destroyed by cpio --dereference in mkinitramfs
To solve 2) and 3) I propose the attached changes to mkinitramfs (and
ntfs-3g hook).
In addition to solve 1) I propose the following 1 line change to busybox-initramfs
(i.e. to busybox_1.10.2-2ubuntu4.diff).
--- busybox_1.10.2-2ubuntu4.diff.orig 2009-02-06 19:02:32.000000000 +0100
+++ busybox_1.10.2-2ubuntu4.diff 2009-02-06 16:14:14.000000000 +0100
@@ -4179,7 +4179,7 @@
+#
+# Build Options
+#
-CONFIG_STATIC=y
++# CONFIG_STATIC is not set
+# CONFIG_NOMMU is not set
+# CONFIG_BUILD_LIBBUSYBOX is not set
+# CONFIG_FEATURE_INDIVIDUAL is not set
4) Wishlist: busybox has a lot applets that are currently unused. In particular
cpio dd dmesg eject gzip halt insmod kbd_mode losetup pivot_root pkill rmmod swapon
could replace the ones on the initramfs (those one use 176656 bytes on jaunty-alpha4,
their replacement with busybox increases its size of 28768 bytes (amd64)).
5) If 4) is treated, only
fstype
ipconfig
kinit unused
minips useless (ps in busybox)
nfsmount (mount in busybox ?)
nuke = find $1 -xdev -type f | xargs rm; find $1 -xdev -depth -type d | xargs rmdir
resume
run-init
remain from klibc. Maybe it is possible to dispose of klibc completely.
As far as remember run-init is essentially nuke;chroot /dir;exec /sbin/init "$@"
ipconfig can be emulated,
fstype probably (recompiled ?).
I don't know about resume.
SurJector
** Affects: initramfs-tools (Ubuntu)
Importance: Undecided
Status: New
--
initramfs is too big
https://bugs.launchpad.net/bugs/327106
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to initramfs-tools in ubuntu.
More information about the kernel-bugs
mailing list