📄 00000004.htm
字号:
Memory: 7000k/8192k available (496k kernel code, 384k reserved, 312k <BR>data) <BR> <BR>7.3. 核心没有编译 <BR> <BR>如果它没有被编译,那麽可能是有个修补档失败了,或者是你从某个地方拿到的原始程 <BR>式码有问题。也有可能是因为你的 gcc 版本不正确或坏掉了。确定 Linus 在 README <BR>里所描述的符号链结都有正确建立。一般说来,如果核心没能编译,这表示在某些地方 <BR>有严重的错误。 <BR> <BR>7.4. 新版的核心似乎不能启动 <BR> <BR>没有执行 LILO ,或是没有正确的配置它。有一次我曾经碰到的问题是出在配置档里, <BR>我用了″ root = /dev/hda ″而不是″ root = /dev/hda1″(这在刚开始时真的是 <BR>很讨厌,但是一旦你有了一个可以用的配置档,应该不需要去再去改变它) <BR> <BR>7.5. 你忘了执行 lilo ,或系统根本不能启动 <BR> <BR>噢!现在最好的办法是用磁片启动,并且准备另一张可以启动的磁片(像是” make <BR>zdisk ”时做的磁片)。你得知道你的根目录( / )所在的分割区以及它的格式( <BR>second extended, minix 等等)在下面的例子中,你也得知道你的 /usr/src/linux <BR>source tree 在那个分割区,它的格式,以及它一般会挂在那儿。 <BR> <BR>在这个例子中, 根目录 / 是 /dev/hda1 ,而持有 /usr/src/linux 的分割区是 <BR>/dev/hda3 , 一般会挂在 /usr 下。它们都是 second extended 档案系统。可以运作 <BR>的核心映像叫做 zImage ,放在 /usr/src/linux 底下。 <BR> <BR>这个主意是这样的,假若有一个可以运作的核心映像叫做 zImage 在 /usr/src/linux <BR>下,可能可以把它用在新的磁片上。另外一个不一定会更好的变通办法(这跟你的系统 <BR>怎麽组成的有关)在说明这个例子之後会讨论到。 <BR> <BR>首先,从 boot/root 磁片或者是 rescue 磁片开机,然後将持有可运作核心的分割区 <BR>挂上来: <BR> <BR>mkdir /mnt <BR>mount -t ext2 /dev/hda3 /mnt <BR> <BR>如果 mkdir 指令显示该目录已经存在,忽略掉不必理会它。现在,cd 到持有可运作核 <BR>心的地方(注意: /mnt + /usr/src/linux - /usr = /mnt/src/inux )。把一张格式 <BR>化过的磁片放进 a: 磁碟机,(确定不是你的 boot/root 磁片!),把映像档倾倒到 <BR>磁片里去,然後配置你的根目录分割区。 <BR> <BR>cd /mnt/src/linux <BR>dd if=zImage of=/dev/fd0 <BR>rdev /dev/fd0 /dev/hda1 <BR> <BR>cd 到根目录 / 并且卸下标准 /usr 分割区: <BR> <BR>cd / <BR>umount /mnt <BR> <BR>你现在应该可以从这张磁片正常的开机了。在这次开机後不要忘记执行 lilo (或是其 <BR>它无论你曾经做错的什麽事)! <BR> <BR>如同前面曾经提过的,还有另外一种很普遍的变通方式。如果情况是你有一个可以运作 <BR>的核心在放在 / (例如 /vmlinuz ),你也可以使用它。假定所有的条件都跟上面的 <BR>例子一样,而我的核心映像是 /vmlinuz ,只要对上面的例子做这些改变: <BR> <BR>把 /dev/hda3 改成 /dev/hda1( / 分割区),把 /mnt/src/linux 改成 /mnt ,并且 <BR>把 if=zImage 改成 if=vmlinuz 。至於前面有关注意如何推导出 /mnt/src/linx 的那 <BR>个部分可以忽略。 <BR> <BR>7.6. 系统表示” Warning: bdflush not running” <BR> <BR>这可以算是一个相当严重的问题。从 1.0 版以後的核心开始(我记不清楚确实的版本 <BR>了,但大概是在 1994 年 4 月, 20 日左右),有个会周期性地更新档案系统缓冲区的 <BR>程式叫做″ update ”被升级或取代掉了。 <BR> <BR>取得″ bdflush ″的原始程式码(你应该可以从你取得核心的地方找到),然後编译 <BR>它(你可能会希望在旧版的核心下执行编译及安装)。它会以″ update ″为名安装它 <BR>自己,而在此之後你的新核心应该会运作良好。 <BR> <BR>7.7. 系统显示关於 obsolete routing requests 的奇怪讯息 <BR> <BR>取得新版的 route 程式,并且重新编译旧的要件。 /usr/src/linux/route.h (这是 <BR>/usr/src/linux 下的一个档案)已经做了修改。 <BR> <BR>8. □诀和技巧 <BR> <BR>8.1. 重导 make 或是 patch 指令的输出 <BR> <BR>如果你想要记录这些″ make ″或是″ patch ″ 指令到底做了些什麽,你可以把萤幕 <BR>的输出重导到一个档案去。首先,要知道你用的是是那一种 shell:″ grep root <BR>/etc/passwd″ 然後寻找看起来像″ /bin/csh ″一类的东西。 <BR> <BR>如果你使用的是 sh 或是 bash ,″ (command) 2>&1 | tee (output file) 。″将会 <BR>把一份 make 的输出放到″ (output file) ″这个档案去。 <BR> <BR>如果是 csh 或 bash,你应该使用″ (command) |& tee (output file) ″这个语法。 <BR> <BR>如果是 rc(注意:你应该不会是用 rc ),语法是″ (command) >[2=1] <BR>| tee (output file) 。" <BR> <BR>9. Misc <BR> <BR>9.1. Author <BR> <BR>The original revision was -0.1 on 3 October 1994 by Brian Ward <BR>(<A HREF="mailto:ward@blah.tu-graz.ac.at).">ward@blah.tu-graz.ac.at).</A> Please send me any comments, additions, <BR>corrections, or computers. Corrections are, in particular, the most <BR>important to me! <BR> <BR>Even though I try to be attentive as possible with mail, please <BR>remember that I get a lot of mail per day, so it may take a little <BR>time to get back to you. Especially when emailing me with a question, <BR>please try extra hard to be clear and detailed in your message. I'd <BR>like to thank everyone who's given me feedback. <BR> <BR>9.2. History and other forms of this document <BR> <BR>I originally wrote this in ASCII, then I put some TeX around it, and <BR>then horrified the TeX so that I could convert the TeX into SGML with <BR>a perl script. Because of the original in TeX, the first version of <BR>this document that appeared on sunsite had two section numbers with <BR>each section (It wouldn't have looked that bad if they weren't <BR>different.). I also realize that it's kind of nonstandard to make <BR>revision numbers negative, but oh well. And if any of the above sounds <BR>kind of stupid, I don't blame you. <BR> <BR>9.3. To do <BR> <BR>The ``Tricks and tips'' section is a little small. I hope to expand on <BR>it with suggestions from others. <BR> <BR>So is ``Additional packages.'' <BR> <BR>More debugging/crash recovery info needed. <BR> <BR>9.4. Contributions <BR> <BR>A small part of Linus' README (Re: kernel hacking options) is <BR>inclusive. (Thanks, Linus!) <BR> <BR><A HREF="mailto:uc@brian.lunetix.de">uc@brian.lunetix.de</A> (Ulrich Callmeier): patch -s and xargs. <BR> <BR> <BR><A HREF="mailto:quinlan@yggdrasil.com">quinlan@yggdrasil.com</A> (Daniel Quinlan): corrections and additions in <BR>many sections. <BR> <BR><A HREF="mailto:nat@nataa.frmug.fr.net">nat@nataa.frmug.fr.net</A> (Nat MAKAREVITCH): mrproper <BR> <BR>The people who have sent me mail with questions and problems have been <BR>helpful, too! <BR> <BR> <BR>9.5. Copyright notice and copying <BR> <BR>Copyright (c) Brian Ward, 1994, 1995. <BR> <BR>This document may be distributed in any medium as long as it and this <BR>notice remain unaltered. Permission is granted for translation into <BR>any language, so long as the translator's name is added to the <BR>document. There is no warranty on this document and its contents; no <BR>one may be held liable for any unfortunate outcome of its content. <BR> <BR>Commercial redistribution is allowed and encouraged; however, it is <BR>strongly recommended that the redistributor contact the author before <BR>the redistribution, in the interest of keeping things up-to-date. The <BR> <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -