虽然不可能不使用某种initrd,但也可能不使用单独的initrd文件。(我从来没有使用过genkernel,所以我不能为此提供指导)。
例如,我设置了选项:
CONFIG_INITRAMFS_SOURCE="/usr/src/initrd.contents"
凡/usr/src/initrd.contents
在我的情况看起来像(我有LVM + tuxonice + fbsplash的):
dir /bin 0755 0 0
file /bin/busybox /bin/busybox 0755 0 0
file /bin/lvm /sbin/lvm.static 0755 0 0
dir /dev 0755 0 0
dir /dev/fb 0755 0 0
dir /dev/misc 0755 0 0
dir /dev/vc 0755 0 0
nod /dev/console 0600 0 0 c 5 1
nod /dev/null 0600 0 0 c 1 3
nod /dev/snapshot 0600 0 0 c 10 231
nod /dev/tty1 0600 0 0 c 4 0
dir /etc 0755 0 0
dir /etc/splash 0755 0 0
dir /etc/splash/natural_gentoo 0755 0 0
dir /etc/splash/natural_gentoo/images 0755 0 0
file /etc/splash/natural_gentoo/images/silent-1680x1050.jpg /etc/splash/natural_gentoo/images/silent-1680x1050.jpg 0644 0 0
file /etc/splash/natural_gentoo/images/verbose-1680x1050.jpg /etc/splash/natural_gentoo/images/verbose-1680x1050.jpg 0644 0 0
file /etc/splash/natural_gentoo/1680x1050.cfg /etc/splash/natural_gentoo/1680x1050.cfg 0644 0 0
slink /etc/splash/tuxonice /etc/splash/natural_gentoo 0755 0 0
file /etc/splash/luxisri.ttf /etc/splash/luxisri.ttf 0644 0 0
dir /lib64 0755 0 0
dir /lib64/splash 0755 0 0
dir /lib64/splash/proc 0755 0 0
dir /lib64/splash/sys 0755 0 0
dir /proc 0755 0 0
dir /mnt 0755 0 0
dir /root 0770 0 0
dir /sbin 0755 0 0
file /sbin/fbcondecor_helper /sbin/fbcondecor_helper 0755 0 0
slink /sbin/splash_helper /sbin/fbcondecor_helper 0755 0 0
file /sbin/tuxoniceui_fbsplash /sbin/tuxoniceui_fbsplash 0755 0 0
file /sbin/tuxoniceui_text /sbin/tuxoniceui_text 0755 0 0
dir /sys 0755 0 0
file /init /usr/src/init
并且/usr/src/init
是:
#!/bin/busybox ash
local X ROOT RUNLEVEL INIT PARAM
# Preliminary stuff
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mdev -s
/bin/lvm vgchange -ay picard-main
# Try to resume. This never returns if it succeeds
test -e /sys/power/tuxonice/do_resume && echo 1 > /sys/power/tuxonice/do_resume
#/bin/resume
# Parse the command line for relevant options.
INIT=/sbin/init
RESCUE=""
PARAM=" "
for X in `cat /proc/cmdline`
do
case "$X" in
root=*) ROOT=${X#root=} ;;
[0-6Ss]) RUNLEVEL=${X} ;;
init=*) INIT=${X#init=} ;;
rescue) RESCUE="rescue" ;;
splash=*) PARAM="${PARAM} ${X}" ;;
consol=*) PARAM="${PARAM} ${X}" ;;
esac
done
if [ x${RESCUE} = xrescue ]
then
busybox ash
fi
# Mount and switch root.
mount -o ro ${ROOT} /mnt
umount -f /sys || umount -l /sys
umount -f /proc || umount -l /proc
exec switch_root /mnt ${INIT} ${RUNLEVEL} ${PARAM}