|
摘自一个小型分发版的制作流程:
...
make sure your kernel is compiled with support for the RAM disk and loopback device
...
Creating the Filesystem
...
dd if=/dev/zero of=/dev/ram0 bs=1k count=5000
mke2fs -m0 /dev/ram0 5000
mount /dev/ram0 /distro
...
add the busybox to /distro
...
add a few configuration scripts :/distro/etc/inittab, /distro/etc/rc.d/rc.S, /distro/etc/fstab, /distro/etc/shells and /distro/etc/profile
...
create a few directories: /distro/dev, /distro/mnt, distro/proc, /distro/root and /distro/tmp
...
//create the initrd file:
umount /dev/ram0
dd if=/dev/ram0 of=initrd bs=1k count=5000
...
To check that everything is okay, you can mount the initrd file and take a look inside:
mount initrd /distro -o loop
ls -lR /distro
Then remember to umount it and gzip it.
我有以下疑惑,,请大家不要见笑:
1.make sure your kernel is compiled with support for the RAM disk and loopback device
RAM disk and loopback device 这两个中文确切指什么,,比如RAM disk 我感觉系统启动时kernel将filesystem unzip to 内存,是不是就是这个ram disk,这个需要内核支持?那么loopback device呢?网卡?为什么叫loopback?
2.看以上代码: dd if=/dev/zero of=/dev/ram0 bs=1k count=5000
dd 与 cp 区别是什么?
/dev/zero 和 /dev/ram0 是什么设备?
这个命令干了什么,,开了5m的空间?
3. /bin/umount -a -r >/dev/null 2>&1
/bin/mount -av -t nonfs
这两个命令何解?
希望我没有贴错地方. |
|