⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 630.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
                        <TD vAlign=top width="80%"> 
                          <DIV align=center>
                        <FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
                            </FORM>
                        <TABLE cellSpacing=0 cellPadding=0 width="95%" 
                          border=0><TBODY>
                          <TR>
                            <TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif" 
                          height=30></TD></TR></TBODY></TABLE>
                        <TABLE cellSpacing=0 cellPadding=3 width="95%" 
                        align=center border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=3 width="100%" 
                              border=0>
                                <TBODY>
                                <TR>
                                      <TD vAlign=top> 
<p><FONT class=normalfont><B><font color=blue>制作自己的Floppy-Linux Step By Step</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:阿土<br>来自:Linux知识宝库<br>联系方式:无名<br><br>这是我自己看了一些网络上的文章以后,亲手制作的一个Floppy Linux,大家可以看看!<br>
1. 软盘上安装引导器(grub)<br>
<br>
一般制作软盘上跑的linux引导器都使用syslinux这个工具(这个工具不支持ext2分区格式,只能支持fat分区格式),因为我对grub比较熟悉,并且我在软盘上安装grub只用了132KB空间,不是很耗磁盘空间。<br>
具体操作如下:<br>
<br>
# mke2fs /dev/fd0<br>
<br>
创建了 ext2 文件系统后,需要安装该文件系统:<br>
<br>
# mount /dev/fd0 /mnt/floppy<br>
<br>
现在,需要创建一些目录,并将一些关键文件(原先安装 GRUB 时已安装了这些文件)复制到软盘:<br>
<br>
# mkdir /mnt/floppy/boot<br>
# mkdir /mnt/floppy/boot/grub<br>
# cp /boot/grub/stage1 /mnt/floppy/boot/grub<br>
# cp /boot/grub/stage2 /mnt/floppy/boot/grub<br>
<br>
再有一个步骤,就能得到可用的引导盘。<br>
<br>
在linux bash中,从 root 用户运行“grub”,该程序非常有趣并值得注意,因为它实际上是 GRUB 引导装入器的半功能性版本。尽管 Linux 已经启动并正在运行,您仍可以运行 GRUB 并执行某些任务,而且其界面与使用 GRUB 引导盘或将 GRUB 安装到硬盘 MBR 时看到的界面(即GRUB控制台)完全相同。<br>
<br>
在 grub&gt; 提示符处,输入:<br>
<br>
grub&gt; root (fd0)<br>
grub&gt; setup (fd0)<br>
grub&gt; quit<br>
<br>
现在,引导盘完成了。<br>
<br>
2. 安装根文件系统:<br>
<br>
一套linux系统要正常启动,根文件系统要包括下列文件夹:<br>
<br>
/bin /etc /proc /tmp /var /dev /mnt<br>
<br>
要包括下列基本的设备文件:<br>
<br>
/dev/console /dev/fd0 /dev/null /dev/ram0 /dev/tty /dev/tty0<br>
<br>
要包括下列配置文件:<br>
<br>
/etc/rc.d/inittab /etc/rc.d/rc.sysinit /etc/fstab<br>
<br>
要实现基本的功能,还要包括一些常用工具:<br>
<br>
如:sh,ls,cd,cat……<br>
<br>
其中,前面三个部分不要多少空间的,但是常用工具会占用很多空间,要是用原来系统中的这些命令,就是全部用静态编译,不是用动态连接库,大概有2MB~3MB,放不进软盘。网络上解决的方案是使用BusyBox工具。具体可以到官方网站:www.busybox.net看看。<br>
<br>
下载BusyBox工具的源代码,编译:<br>
<br>
注意:<br>
<br>
(1) 译的时候要静态编译,修改 Makefile 中的 DOSTATIC 参数,从false 改为 true,这样,编译出来的代码就不要依赖glibc了。<br>
<br>
(2) 因为我们用的是 BusyBox 上的 init,与一般所使用的 init 不太一样,会先执行 /etc/init.d/rcS 而非 /etc/rc.d/rc.sysinit,为了做出来的 FloppyLinux 架构与 Redhat 的架构一样,所以修改了 BusyBox 中的 init.c底下是修到的部分内容∶<br>
<br>
#ifndef INIT_SCRIPT<br>
#define INIT_SRCIPT "/etc/rc.d/rc.sysinit"<br>
#endif<br>
<br>
具体操作如下:<br>
<br>
(1) 官方网站上下载BusyBox的最新版本:busybox-0.60.5.tar.gz解开,按照上面的注意点修改源代码<br>
<br>
(2) 运行下列命令:<br>
<br>
#make<br>
#make install<br>
<br>
(3) 译好的可势行文件放在 ./_install 文件夹里的。<br>
<br>
#cp ./_install /tmp/floppy-linux -r<br>
<br>
(4) 动建立其它的文件或文件夹:<br>
<br>
<br>
#cd /tmp/floppy-linux<br>
# mkdir dev etc etc/rc.d proc mnt tmp var<br>
# chmod 755 dev etc etc/rc.d bin mnt tmp var<br>
# chmod 555 proc<br>
# cd dev<br>
# mknod tty c 5 0<br>
# mknod console c 5 1<br>
# chmod 666 tty console<br>
# mknod tty0 c 4 0<br>
# chmod 666 tty0<br>
# mknod ram0 b 1 0<br>
# chmod 600 ram0<br>
# mknod fd0 b 2 0<br>
# chmod 600 fd0<br>
# mknod null c 1 3<br>
# chmod 666 null<br>
<br>
(5) 建启动配置文件:(inittab,rc.sysinit,fstab)<br>
<br>
initab:<br>
::sysinit:/etc/rc.d/rc.sysinit<br>
::askfirst:/bin/sh<br>
rc.sysinit:<br>
#!/bin/sh<br>
mount -a<br>
# chmod 755 rc.sysinit<br>
fstab:<br>
proc /proc proc defaults 0 0<br>
<br>
(6) 作Ramdisk的镜像文件:<br>
<br>
<br>
# dd if=/dev/zero of=/tmp/initrd bs=1k count=4096<br>
# losetup /dev/loop0 /tmp/initrd<br>
# mke2fs -m 0 /dev/loop0&gt;<br>
# mount -t ext2 /dev/loop0 /mnt<br>
# cp -r /tmp/floppy-linux/* /mnt<br>
# umount /mnt<br>
# losetup -d /dev/loop0<br>
# dd if=/tmp/initrd | gzip -9 &gt; /tmp/initrd.gz<br>
# rm -f /tmp/initrd<br>
# sync<br>
<br>
3.编译内核:<br>
<br>
这部分内容不详细讲述,主要是去掉了一些不需要的选项,减小内核,编译出来的内核是725920Byte。里面包含了必要的网卡驱动和网络协议栈。<br>
<br>
4.整合启动盘<br>
<br>
现在所用到了的东西全部搞好了,下面就是整合一下:<br>
<br>
全部文件(文件夹)如下:<br>
<br>
/lost+found/<br>
/boot/<br>
/boot/grub/<br>
/boot/grub/stage1 =========èGrub启动时用到的两个文件<br>
/boot/grub/stage2<br>
/boot/grub/menu.lst =========èGrub的配置文件指向grub.conf<br>
/boot/grub/grub.conf<br>
/boot/kernel =============è内核<br>
/initrd.gz ===============è内存镜像文件<br>
<br>
这样这张软盘就能启动一套Linux系统了,占用1.213MB。<br>
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -