QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 465|回复: 1

可可请进来,这是在ISO当中的一个README

[复制链接]
发表于 2003-5-8 20:50:40 | 显示全部楼层 |阅读模式
This kit allows you to generate your own ISOs with your own modules and
configuration.

You need these tools: Perl, mtools, and mkisofs. And cdrecord if you are
burning to CD on the same machine. Sorry, it's only tested on Linux. I
have no other platforms to test on so I can't help you there.

1. Become root.

2. Mount the CD or the CD image as an ISO9660 filesystem.

3. Create a working directory called cdfw, and under that a directory
called cd and copy the contents of the CD there.  E.g.

        mkdir -p /root/cdfw/cd
        cd /media/cdrom
        cp -a * /root/cdfw/cd
        cd /root/cdfw

Unless otherwise stated, all the steps below assume you are in
/root/cdfw.

4. Make all directories and files writable in the disk version.

        find cd | xargs chmod u+w

5. Copy the Makefile up one level for convenience.

        cp cd/Makefile .

6. Assign the drive f: to a disk image both in Makefile and in
/root/.mtoolsrc. e.g.

        drive f: file="/root/cdfw/floppyfw-2.0.4.img"

7. Copy floppyfw-2.0.4.img to /root/cdfw.

        cp /somewhere/floppyfw-2.0.4.img .

8. Extract config and firewall.ini and do what you want to them. If you
want to be able to extract and replace other config files, see Makefile.

        make extract
        # edit them, etc
        make replace

9. Add any extra modules and scripts you want to the image. Remember the
limitation on space is due to the floppy image, not due to the CD image.

        mcopy foo.bz2 f:packages/

10. If you don't have enough space, start with a bigger floppy image,
e.g. 2.88 MB "floppy". I leave the reader how to work out do this with
mtools, i.e. I haven't tried it :-), but it probably involves mapping a
1.44 MB image and a 2.88 MB image to disk files and copying all the
files to the larger image. If you are adding a lot of files, you may
also have to increase the ramdisk size by creating a new one with a
larger initial size and copying the old initrd to the new one. Also
the kernel may need to be recompiled to increase the size limit on the
ramdisk.

11. If you wish to add anything to the CD, the directory cd will be the
top directory of the resulting CD so just put it there. The contents of
the CD will be available after booting Linux and mounting. The provided
kernel of floppyfw may not have support for ISO9660 filesystems so you
may have to recompile the kernel or load the module, depending.

12. Unpack the mkffwnb image while in /.

        (cd /; tar zxvf -) < cd/mkffwnb.tgz

13. If you wish another timezone, edit Makefile and change the timezone
file passed to mkffwnb.pl.

14. Now make the CD image. This will leave the ISO image in
floppyfw-2.0.4.iso.

        make cdimage

15. Burn to CD and hopefully it will work. This requires a BIOS that can
boot from CD, of course.
 楼主| 发表于 2003-5-8 21:06:39 | 显示全部楼层

这是其中的一个MAKEFILE文件

# If you change the image name and drive, you also need to edit ~/.mtoolsrc
IMAGE=        floppyfw-2.0.4-1680K-pppoe.img
DRIVE=        f:
# List of files we will extract, edit and replace
CONFIG=                config firewall.ini
# Comma separated version of above list
CONFIGLIST:=        ${shell echo ${CONFIG} | sed 's/ /,/'}

what:
        @echo 'The following are available:'
        @echo 'make extract - get config files for editing'
        @echo 'make replace - put config files back in image'
        @echo 'make cdimage - make bootable CD'

extract:
        @echo 'mcopy will let you abort overwrites, just say y if you are sure'
        mcopy -m ${DRIVE}{${CONFIGLIST}} .

replace:
        mcopy -mo {${CONFIGLIST}} ${DRIVE}

cdimage:
        PATH=.:/usr/local/bin:$$PATH mkffwnb --localtime=/usr/share/zoneinfo/UTC --format=elf --nonet ${DRIVE}
        cp -p /tmp/mkffwnb/{vmlinuz,initrd.gz} cd/isolinux
        cp -p /tmp/mkffwnb/syslinux.cfg cd/isolinux/isolinux.cfg
        mkisofs -R -o `basename ${IMAGE} img`iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table cd
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-2 10:33 , Processed in 0.050511 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表