LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 688|回复: 4

最近想做个liveCD,哪位帮我提供点资料?

[复制链接]
发表于 2006-7-20 22:26:28 | 显示全部楼层 |阅读模式
最近想做个liveCD,哪位帮我提供点资料?谢谢
发表于 2006-7-20 23:47:58 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2006-7-21 11:14:30 | 显示全部楼层
参考此文:

AUTHOR:                Sylvie Migneault <alisou@alixe.org>



DATE:                2005-11-07



LICENSE:        GNU Free Documentation License Version 1.2



SYNOPSIS:        lfscd-remastering-HOWTO



DESCRIPTION:        This is a guide that will show you how to remaster LFSliveCD-x86-6.1-3

                Note: commands should appear on one line, after the symbol #



PREREQUISITES:        - at least 1 GB of FREE RAM+Swap total (e.g. 256M ram, and 750M swap AVAILABLE)        

                - 2 GB free on a Linux filesystem formatted disk partition       

                - Host System with SquashFS supported

                - mksquashfs tools

                - mkisofs tools

                - link: http://squashfs.sourceforge.net



HINT:



Contents

--------



    1. Host System Requirements

    2. LiveCD's structure  

    3. My working environment

    4. Boot from the lfslivecd-x86-6.1-3 and mount it

    5. Mount the work partition, create directories

    6. Uncompress .root.sqfs

    7. Copy CD's contents into lfscd (not .root.sqfs)

    8. Install mksquashfs

    9. chroot into lfshd

   10. Install any programs

   11. Create .root.sqfs

   12. Create iso file

   13. Burn and test





1. Host System Requirements

   ------------------------



        I use lfslivecd-x86-6.1-3 because SquashFS is supported by the kernel.

        If you want to use your Linux system, patch your kernel with SquashFS.

       



2. LiveCD's structure

   ------------------



        /boot

        /sources

        .root.sqfs



        I work with ".root.sqfs" file





3. My working environment

   ----------------------

       

        /dev/hdc                my CD drive

        /mnt/cdrom                content of lfslivecd-x86-0.6-3

        /mnt/hda5                 my working partition

        /mnt/hda5/lfscd                content of final CD

        /mnt/hda5/lfshd                chroot environment

        /mnt/hda5/lfsiso        content of ISO files

        /mnt/hda5/lfstmp        tempory directory





4. Boot from the lfslivecd-x86-6.1-3 and mount it

   ----------------------------------------------



        # mkdir /mnt/cdrom

        # mount /dev/hdc /mnt/cdrom



               

5. Mount the work partition, create directories

   --------------------------------------------



        # mkdir /mnt/hda5

        # mount /dev/hda5 /mnt/hda5

        # cd /mnt/hda5

        # mkdir lfscd lfshd lfstmp lfsiso





6. Uncompress .root.sqfs

   ---------------------



        # cd /mnt/cdrom

        # mount -t squashfs .root.sqfs /mnt/hda5/lfstmp -o loop

        # cd /mnt/hda5/lfstmp

        # cp -Rp * /mnt/hda5/lfshd

        # cd ..

        # umount lfstmp/

       



7. Copy LiveCD's content into lfscd (not .root.sqfs)

   -------------------------------------------------



        # cd /mnt/cdrom

        # cp -Rp * /mnt/hda5/lfscd

        # cd ..

        # umount cdrom/





8. Install mksquashfs

   ------------------

       

        Before starting, i have downloaded squashfsXX.tar.gz

        at this URL http://squashfs.sourceforge.net

        copy it into /sources



        If squashfsXX.tar.gz is on floppy

        Insert floppy in the floppy drive

        # mkdir /mnt/floppy

        # mount /dev/fd0 /mnt/floppy

        # cd /mnt/floppy

        # cp squashfsXX.tar.gs /sources

        # cd ..

        # umount floppy/

        # cd /sources

        # tar -xvf squashfsXX.tar.gz

        # cd squashfsXX

        # cd squashfs-tools

        # make



        install mksquashfs into host system

        # cp mksquashfs /usr/sbin



        install mksquashfs into chroot environment

        # cp mksquashfs /mnt/hda5/lfshd/usr/sbin





9. chroot into lfshd

   -----------------



        create the environment variable TOTO,

        verify the output



        # export TOTO=/mnt/hda5/lfshd

        # echo $TOTO

       

        Make sure the output shows is:

        /mnt/hda5/lfshd



        run the following command:

        # chroot "$TOTO" /usr/bin/env -i \

                HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \

                PATH=/bin:/usr/bin:/sbin:/usr/sbin \

                /bin/bash --login +h



        reference:

        http://www.linuxfromscratch.org/ ... apter06/chroot.html

       



10. Install any programs

    --------------------



        - ./configure

        - make

        - make install

        - ...

        - for exit the chroot environment:



        # exit





11. Create .root.sqfs

    -----------------



        # cd /mnt/hda5

        # mksquashfs lfshd/ /mnt/hda5/lfscd/.root.sqfs





12. Create iso file

    ---------------



        mkisofs tool is not present on lfslivecd-x86-6.1-3.

       

        umount all:

        # cd /

        # umount /mnt/hda5



        Reboot your PC unless lfslivecd.

        Create ISO file with this command:



        # mkisofs -pad -l -r -J -v -V "LFS_CD" -no-emul-boot -boot-load-size 4 -boot-info-table \

                -b boot/isolinux/isolinux.bin -c boot/boot.cat -hide-rr-moved \

                -o /mnt/hda5/lfsiso/livecd-remaster.iso /mnt/hda5/lfscd





13. Burn and test

    -------------



        «Have a fun!» ;-)



ACKNOWLEDGEMENTS:



        The team of «Linux from scratch» and all users.

        All users wich contribute at the OpenSource project.        :-)



CHANGELOG:



   [2005-11-07]

    * Initial hint.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-21 21:33:36 | 显示全部楼层
谢谢  但是有没有中文的比较详细的资料呢?
回复 支持 反对

使用道具 举报

发表于 2006-7-22 07:00:05 | 显示全部楼层
假如楼主只希望以最简单的方来制作 LiveCD,那麽可以用 linux-live 的脚本来做,该脚本可以在任何发行版下使用,部份 LiveCD 如 SLAX 都是采用它来做,但要满足一些基本要求,详见 http://www.linux-live.org/

中文资料我比较少看,不大清楚,也许你可以请教一下 youbest 斑竹方法吧
回复 支持 反对

使用道具 举报

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

本版积分规则

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