手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网站运营>建站经验>列表

利用BusyBox定制Linux Live CD

来源:互联网 作者:west263.com 时间:2008-04-16
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

Now run make


$ make

A few files need to change. This assumes your current directory is "_install/openssh-3.9p1"

  $ mv ../../_install/usr/bin/install  ../../_install/usr/bin/installBB

$ cp /usr/bin/install ../../_install/usr/bin/.

When this is done, "cd" so that your current directory is "_install".

  $ cd ..

Now, "chroot".

   $ chroot . /bin/sh -i

BusyBox v1.00 (2005.02.21-00:50 0000) Built-in shell (ash)

Enter 'help' for a list of built-in commands.

$ cd openssh-3.9p1/

$ make install

If all goes well, exit out of chroot.

   $ exit

$ mv usr/bin/installBB usr/bin/install

mv: overwrite `usr/bin/install'? y

$ rm -rf openssh-3.9p1*

At this point ssh should be installed with the correct references to "etc", and all other files.


STEP 8: Compiling the Linux Kernel

You do not need to download the full kernel on each revision. Note, with the "linux-2.6.11.tar.gz" there is also a patch "patch-2.6.11.bz2". The patch get's applied to the "linux-2.6.10" kernel, assuming you had already downloaded it.

Assuming you have no linux kernel's downloaded.

  $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.tar.gz

$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.tar.gz.sign

Next, grab the correct key and verify the signature.

  $ gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E

$ gpg --verify linux-2.6.11.tar.gz.sign linux-2.6.11.tar.gz

At this point, you know the source code is valid. Unroll the "tar.gz".

  $ tar -xzf linux-2.6.11.tar.gz

[********** Special Note - What if you had the 2.6.10 kernel source? ***************]

If this is the case, all you need to install is the patch "patch-2.6.11.bz2". This is the preferred method, as it keeps you ".config" settings.

  $ wget http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.11.bz2

$ wget http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.11.bz2.sign

$ gpg --verify patch-2.6.11.bz2.sign patch-2.6.11.bz2

$ cd linux-2.6.10   <-- note this is my existing source

$ bzip2 -dc ../patch-2.6.11.bz2 | patch -p1

$ cd ..

[********************* End Special Note ********************************************]

You may want to copy by kernel ".config", or take a look at it if downloading the ""cdrom_linux_boot_proj1.iso"" found all the drivers on your computer.

  $ wget

$ make xconfig   -- This will allow you to graphically look at all

the options.

$ make bzImage   -- Only do this

$ cp arch/i386/boot/bzImage ${PROJDIR}/proj1/staging_iso_image/boot/isolinux/linux26

That is it for create the compress kernel image. It may be necessary to add in additional drivers. What driver modules are used by your current system? Check "/etc/modprobe.conf"

  $ cat "/etc/modprobe.conf"

...

alias eth0 tg3

...

Notice above that "eth0", the network interface card on my current system is loading this module. If I look for "tg3" in all the kernel "Makefile's", I can see that "CONFIG_TIGON3" should compiled into the kernel.

  $ find . -iname 'Makefile' -exec grep -H 'tg3' {} \;

./drivers/net/Makefile:obj-$(CONFIG_TIGON3)  = tg3.o

Check your device drives and set them to yes in the ".config" file. As you can see, the ".config" used for proj1 has this option set to yes so when the kernel boot it will automatically find the needed network drivers. These steps should be performed for any NICs, or USB devices needed at boot time.

  $ cat .config |grep 'CONFIG_TIGON3'

CONFIG_TIGON3=y

Also, if you want to NFS mount devices, you may want to include the NFS in the kernel

  CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

CONFIG_NFS_V4=y

(see cdrom_linux_boot_unionfs.iso)

For the complete kernel config for NFS see the following link:

http://prdownloads.sourceforge.net/souptonuts/cdrom_linux_boot_unionfs.iso


UNIONFS (Optional Step)

Unionfs is a utility for merging several directories into a single unified view. For example, if you had directory "/Fruits" and "/Vegetables" then you can combine the contents of those two directories into a third, which will be "/mnt/healthy". For more usage examples, see the following article:

   http://www.linuxjournal.com/article/7714

Unionfs will work on the 2.6.9 kernels. The software can be downloaded from the following site:

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!