-i procps
-i strace
-i util-linux-ng
+-i zerofree
"
# Decide on names for the final output. These have to match Makefile.am.
(cd initramfs && find -name '*python*' -print0) |
xargs -0 @FEBOOTSTRAP_RUN@ initramfs -- rm -rf
+# In Fedora >= 11, it pulls in all of Perl from somewhere. Nuke from orbit.
+@FEBOOTSTRAP_RUN@ initramfs -- rm -rf /usr/lib/perl5 /usr/lib64/perl5
+
+# Anaconda? JPEG images?
+@FEBOOTSTRAP_RUN@ initramfs -- rm -rf /usr/lib/anaconda-runtime
+
# Modules take up nearly half of the image. It's a rough guess that
# we don't need many drivers (which take up most of the space).
(cd initramfs && find lib/modules/*/kernel \
-a ! -name 'virtio_pci.ko' \
-a ! -name 'virtio_ring.ko' \
-a ! -name 'ext2.ko' \
- -a ! -name 'ext4.ko' \
+ -a ! -name 'ext3.ko' \
+ -a ! -name 'ext4*.ko' \
-a ! -name 'crc16.ko' \
+ -a ! -name 'jbd.ko' \
-a ! -name 'jbd2.ko' \
-a ! -name 'fuse.ko' \
-a ! -name 'vfat.ko' \
# Create the init script.
cat > init.new <<'__EOF__'
#!/bin/sh
+echo Starting /init script ...
PATH=/sbin:/usr/sbin:$PATH
MAKEDEV mem null port zero core full ram tty console fd \
hda hdb hdc hdd sda sdb sdc sdd loop sd
@FEBOOTSTRAP_INSTALL@ initramfs init.new /init 0755 root.root
rm init.new
+# Just in case the kernel isn't looking for /init, make /sbin/init
+# be our script, not the real init.
+#@FEBOOTSTRAP_RUN@ initramfs -- ln -f /init /sbin/init
+
# Copy the daemon into the filesystem.
@FEBOOTSTRAP_INSTALL@ initramfs @abs_builddir@/daemon/guestfsd /sbin/guestfsd 0755 root.root