分类: LINUX
2007-07-11 16:29:24
*
id:3:initdefault:
0::sysinit:/etc/init.d/rcS
1::respawn:/sbin/getty 9600 tty0
2::respawn:/bin/sh
3::restart:/sbin/init
4::shutdown:/bin/umount -a –r
*************************************************
dd if=/dev/zero of=/dev/ram bs=1k count=10240
mke2fs -vm0 /dev/ram 10240
mount /dev/ram /mnt/ram
cp -a /mnt/1/1/* /mnt/ram/
#(/boot 文件夹可不要)
fstab文件:
/dev/ram / ext2 defaults 1 1
none /proc proc defaults 0 0
# df
umount /dev/ram
dd if=/dev/ram of=ram30.img bs=1k count=9911
gzip -9v ram30.img
**********2.6内核以下initrd.img文件不用做.
dd if=/dev/zero of=/dev/ram0 bs=1k count=3072
mke2fs -vm0 /dev/ram0 3072
mount /dev/ram0 /mnt/ram
cp -a /mnt/1/2/* /mnt/ram/
umount /dev/ram0
dd if=/dev/ram0 of=initrd.img bs=1k count=3019
gzip -9v initrd.img
***********************************************
# grub.conf
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,0)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.11-1.1369_FC4.img
title gllinux
root (hd0,0)
kernel /lfskernel-2.6.12.3 ro root=/dev/ram
initrd /ram30.img.gz
***************************************************