找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 7577|回复: 13

[linux] [讨论]那位哥们实现了coyote linux从CD-ROM上的引导,交流一下!

[复制链接]
发表于 2003-11-4 11:35:04 | 显示全部楼层
coyote linux可以从软盘引导,也实现了从硬盘上引导,但我更愿意从光盘上引导。因为光盘不容易坏,启动速度比软盘快,配置一般一次设置终生使用,即使更改配置也大不了重刻一张,CD-R白盘3元而已,而且在平时使用过程中光驱没有读盘,耗电也极少,同时可以让那些坏了软驱坏了硬盘的老机器也能作软件路由器。

以下是我从网上找来的。有两个方法。不过两个方法提到的文件root.linuxrcw在coyotelinux2.x的root.tgz中没有找到。不知大家没有试过,或者有更好的办法。希望大家交流一下
Booting Coyote Linux from a CD-ROM


Overview

This is an involved process and requires some hacking on a full Linux system to create the boot CD. Something to keep in mind is that the configuration of such a system cannot be updated; you are creating a CD-ROM, as in "Read Only Memory". All of your configuration options, port-forwarding, or script modifications must be completed and tested before you create the CD. You don't need an IDE-enabled kernel to make this work, as it merely takes advantage of the BIOS-enabled ability of many computers to boot from a CD.

Following are two sets of instructions. The first set were provided for CL1.x; they have not been tested (to my knowledge) with CL2.x. The second set were written for CL2.


--------------------------------------------------------------------------------
Method 1
Mount the floppy on the machine with the CD burner. Start from your home directory; this example uses /home/fred.

mkdir cdcoyote
cp /mnt/floppy/* cdcoyote
mkdir cdcoyote/root
cd cdcoyote/root
tar -xzvf ../root.tgz
Edit linuxrc and continue on, but you may want to uncomment DEBUG if you wish, and then continue to this:
MNT="/var/lib/lrpkg/mnt"
qt mkdir $MNT
becomes this:
MNT="/var/lib/lrpkg/mnt"
#qt mkdir $MNT
change this:
qt mount -o ro -t $FSTYPE /dev/$DEVICE $MNT
ln -sf $DEVICE /dev/boot
to this:
#qt mount -o ro -t $FSTYPE /dev/$DEVICE $MNT
ln -sf $DEVICE /dev/boot
and this:
qt umount /proc
qt umount $MNT
becomes this:
qt umount /proc
#qt umount $MNT
Save it.


cd var/lib/lrppkg
mkdir mnt
cd mnt
copy all the ROOTMAP tgz files here (those in syslinux.cfg LRP=.......
copy all tgz files listed in the packages file here.
cd /home/fred/cdcoyote/root
tar -czvf ../newroot.tgz *
cd ../
check the permissions on the old root.tgz and make newroot.tgz match'em then
rm root.tgz
mv newroot.tgz root.tgz
rm the tgz files that you moved to lrppkg/mnt from /home/fred mkdir cdimg
mkdosfs -C 288.img 2880
mount -t msdos -o loop 288.img cdimg
cd cdimg
cp /home/fred/cdcoyote/* .
cd ../
syslinux 288.img
umount cdimg
mv 288.img cdimg
mkisofs -b 288.img -c boot-catalog -o /tmp/coyote.iso cdimg
cdrecord speed=4 dev=0,0,0 /tmp/coyote.iso


Most of this was listed in a mini howto for LRP (password required).


--------------------------------------------------------------------------------
Method 2
Author: Tiago Ratto
Date: 10-10-03 15:41


What do you need ?

A WORKING Coyote Linux 2.x floppy
1 Computer running WIndows
1 Computer running Linux (Windows with Cygwin might work, not tested)
1 CD-R Drive
1 (or more) CD-R media
WinImage (to create and change disk images)
optional: Bochs (to test the images you've made)
BCD, MultiMemDisk (www.nu2.nu - Thanx Bart)

-1st Step
[Location: Windows]
So, you've already created your Coyote linux ok ? Run WinImage and make a disk image of your disk, save the image as non-compressed format.

- 2nd Step
[Location: Linux/Cygwin]
Now create a folder in your hard drive and extract all the tgz's inside. Create another folder inside the folder you've created named root and extract the root.tgz inside. Move the others tgz's files to the folder root. Now go tho to root/var/lib/lrpkg/ and edit the root.linuxrc file. Now change the following lines:


[126]
if [ -f $MNT/$f.tgz ]; then
to:
if [ -f /$f.tgz ]; then

[131]
zcat $MNT/$f.tgz | qt tar -x
to:
zcat /$f.tgz | qt tar -x

[154]
if [ -f $MNT/$f.tgz ]; then
to:
if [ -f /$f.tgz ]; then

[156]
qt zcat $MNT/$f.tgz > /dev/null
to:
qt zcat /$f.tgz > /dev/null

Now extract the file syslinux.cfg from the image and open it. Change the parameter:
boot=/dev/fd0
to:
boot=/

- 3rd Step
[Linux/Cygwin]
Now enter the root folder and compress all the files using tgz-like tool creating a new root.tgz.
[Windows]
After all that put the files you'd changed back into the image file using the WinImage and save it. And copy it to the cds/multi_memdisk/disk1/isolinux folder on the MultiMemDisk folder. Go to the MultiMemDisk folder and enter the cds/multi_memdisk/disk1/isolinux and alter the isolinux.cfg and the bootmsg as you like. After that go back to the MultiMemDisk folder and type "run" to burn your CD-R, follow the intructions and all should be fine !!! :-))))

PS1: If you are using WindowsXP generate a image file with de MultiMemDisk and burn it to the CD using a Nero-like software.


Credits, Licenses, Sources and Documentation

Coyote Linux - Vortech Consulting - http://www.coyotelinux.com
Coyote Linux FAQ - http://rzero.com/coyote/faq.html
BCD - http://www.nu2.nu

Compiled by Todd VerBeek.
routeros
回复

使用道具 举报

 楼主| 发表于 2003-11-5 11:07:18 | 显示全部楼层
没有人感兴趣吗?或者谁有 coyote linux 1.x 版本,让我试一下。
routeros
回复

使用道具 举报

发表于 2003-11-5 18:28:24 | 显示全部楼层
我明天试验一下
按照上面的意思
我觉得作成U盘也是有可能的
routeros
回复

使用道具 举报

 楼主| 发表于 2003-11-5 21:50:21 | 显示全部楼层
可惜,coyote linux 2.0 在root.tgz中根本找不到文中所述的文件 root.linuxrc,不知从何改起了。。。
routeros
回复

使用道具 举报

发表于 2003-11-9 19:59:48 | 显示全部楼层
给你个建议,配置好coyote linux后得到的是软盘,可以使用winimage将软盘制作成镜像文件,然后使用EasyBoot,制作成启动光盘镜像文件ISO,然后就是刻盘了!!在刻盘之前你可以使用虚拟机vpc测试你的光盘能不能启动就可以了。
winimage:windows下制作软盘镜像的程序,简单无比。
EasyBoot:制作多重启动用光盘的不二之选软件,你可以将配置好的BBI软盘也制作进去,就可以在启动时选择了。
VPC:Virtual PC自己上网查查就知道干吗用的,我学习LINUX全靠她帮忙,应为我不想在硬盘上分多两个LINUX分区出来
routeros
回复

使用道具 举报

发表于 2003-11-9 20:54:27 | 显示全部楼层
哈哈,有创意,想来肯定能成功吧。
因为我用过一张N多功能的光盘,上面有效率源的1.6的零售版本,可以正常使用。他也是用linux的内核。出于一个原理,楼上大哥说的肯定能行
routeros
回复

使用道具 举报

发表于 2003-11-10 00:23:23 | 显示全部楼层
做成CD-Rom和HD或者U盘最根本的问题是
coyote根本没有S或者H的驱动
不信的话
在coyote命令行下面挂一下硬盘或者U盘
连挂都挂不上,还有什么可以进一步讨论的阿
routeros
回复

使用道具 举报

 楼主| 发表于 2003-11-10 08:24:19 | 显示全部楼层
的确如楼上所说的
通过专门工具(我用的cdrpack和multi_memdisk)可以将coyote甚至bbiagent的镜像刻到一张可引导的光盘,并且能够正常引导。可是当coyote的核心linux引导时,这时就出来新的问题,coyote linux没有光盘驱动,不能正确mount上光盘,将linux引导完后,就提示找不到应用包。既使我使用可从硬盘上引导的linux核心,也只是可以识别出光盘成 /dev/hdb或 /dev/hdc的设备,可惜仍不能用mount来挂上。我也找到了支持光盘Joliet(iso9660)格式的源码,只是不知如何找到coyote的源码,无法将其加到linux核心。
routeros
回复

使用道具 举报

发表于 2003-11-10 19:11:05 | 显示全部楼层
个人认为做在硬盘上相对于做到光盘和U盘上的简单的多了!
routeros
回复

使用道具 举报

 楼主| 发表于 2003-11-10 22:49:08 | 显示全部楼层
把coyote作到硬盘上,同样需要修改linux核心,使其支持硬盘。只不过,这个核心一个叫作Claudio的巴西老外已经做好,可以直接下载。

我在想,如果我能够修改coyote linux 2.0核心,使用其支持光盘的ISO9660格式,这样就在linux核心引导后,自动挂上光盘,然后从光盘上读取像etc ,webadmin等应用包,就能确保coyote linux 2.0的正常运行了。

不过想来想去,又觉得有点无聊。
人家coyote linux本来就是要使用小容量的软盘来实现路由器的运行,来体现linux小而专的能力,现在却让容量650m的光盘来装一个1.44m容量的软件。
routeros
回复

使用道具 举报

 楼主| 发表于 2003-11-17 16:54:36 | 显示全部楼层
下载coyote build env重建核心,使coyote linux2.0核心支持ide cd-rom(感谢 Claudio Roberto Cussuol),利用cdrpack和multi_memdisk,并对root.tgz进行适当修改,成功实现从光盘引导coyote linux2.0,资料在整理中。。。。如果大家有兴趣,我将整理出来和大家分享
routeros
回复

使用道具 举报

发表于 2003-11-17 18:20:19 | 显示全部楼层
顺便问一个问题 偶用2.3版的做了一个,能上网速度和BB差不多
就是我用192.168.0.1:8081管理的时候出来一个登陆窗口
我知道密码    可用户名填什么呀
还有这个用户名是在SETP ?填呀
routeros
回复

使用道具 举报

 楼主| 发表于 2003-11-17 21:27:05 | 显示全部楼层
用户名: root
密码是你在用2.3版创建配置时输入的超级用户密码
routeros
回复

使用道具 举报

发表于 2003-11-18 12:04:23 | 显示全部楼层
Coyote Build Environment
Author: Todd VerBeek (161.57.55.---)
Date:   10-29-03 10:26
The *current* build environment is at http://prdownloads.sourceforge.net/coyotel...ld.tbz?download
routeros
回复

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-19 22:29 , Processed in 0.098382 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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