发新话题
打印

[讨论] 讨论一下如何把asa802运行于linux系统中(非模拟 )

讨论一下如何把asa802运行于linux系统中(非模拟 )

7200emu论坛上实际上早已经有人在讨论这个问题了,一直没有时间去研究它,正好这几天放假

原帖:http://7200emu.hacki.at/viewtopic.php?t=5564

那边的想法是:因为asa802是基linux开发出来的操作系统,既然我们已经把它破解并且解压出来了,大家也看见了ASA的linux 文件系统.那么既然它是一个linux文件系统,那么里面的lina和lina_monitor也就可以在linux下运行了,注意这两个程序是ASA系统的核心.但是运新这两个程序需要他们独有的库.也就是说我们要想直接运行它就得自己搭建它的库环境
首先是 内核 mmm123 很早以前给过提示 看上面链接的1楼.
那么需要打两个补丁:
1. Bigphysarea: http://lwn.net/Articles/139414/
2. User mode drivers interrupt handling http://lwn.net/Articles/127293/
内核版本2.6.11
编译内核.
然后按照上面的那个链接中的倒数第二楼去做
引用:
-          Copied the asa802-k8.bin file to a USB stick.

-          Created a new VM with 4 NIC's, 4GB IDE hard disk, direct
passthrough to the USB stick as a secondary disk, 512MB RAM (to be safe), CDROM with ISO of Ubuntu live CD

-          Booted into Ubuntu live

-          Opened a terminal and used sudo -I to go to semi=permanent root

-          From terminal I ran 'gparted'

o        Used gparted to create a 3.5gb partition

o        Also created a 500mb swap partition

-          Mounted /dev/hda1 to /media/disk1

-          Mounted the USB stick (via passthrough) and copied the asa bin
file to the desktop.

-          Ran the commands from the batch file within the Unix tools rar:

o        hexdump -C asa802-k8.bin > asa802-k8.hd

o        grep "1f 8b 08 00 1d" asa802-k8.hd

o        ls -la asa802-k8.bin

o        tail -c 13334352 asa802-k8.bin > asa802-k8.gz

o        gzip -d asa802-k8.gz

o        cpio -i --make-directories < asa802-k8

-          the last command only works if you set your root to be
/media/disk1 (I didn't know how to do it so I did it in windows and copied the file structure over to the usb as a folder)

-          copied asa802-k8 to the root of /media/disk1

-          renamed to vmlinuz on the root of this file system to vmlinuz.old

-          copied your kernel to the root of the disk

-          from ubuntu I ran the grub installer and installed that to the
ide disk

-          I got it to boot using:

o        root=/dev/hda1 rw console=tty0 console=ttyS0,11500n8 auto nousb
ide1=noprobe bigphysarea=16384 hda=980,16,32

o        initrd=asa802-k8
他的想法是先用vmware创建一个虚拟机,之后引导使用ubuntu的livecd,然后通过livecd 创建一个硬盘(gparted)
之后mount这个硬盘,解压 asa802-k8.bin,将自己编译的内核和asa802 cpio文件拷贝到这个硬盘中.之后将grub安装到这个硬盘中,最后如果成功的话,这个虚拟机下次引导将会从硬盘引导,那么ASA 就如同一个嵌入式系统了.这个虚拟机也就成了一台ASA.我想结果是这样的.
但是目前我的进展是内核编译完了,补丁都打了.然后在制作这个虚拟机的时候,安装grub也可以引导了,但是到最后系统启动时候,停止在一个地方,无法进入到ciscoasa>,几秒钟以后自动重启了
复制内容到剪贴板
代码:
grub> kernel=/vmlinuz root=/dev/hda1 rw console=tty0 console=ttyS0,11500n8 auto nousb


ide1=noprobe bigphysarea=16384 hda=980,16,32

grub>initrd=/asa802-k8
grub>boot



我想如果成功运行.应该比较完美的运行了,以前QEMU模拟的诸如FLASH之类的问题应该都OK
如果哪位朋友有兴趣也研究一下,只要有任何进展都可以联系我或者在这里发帖子

TOP

建议老弟参照linux彻底定制指南
http://lamp.linux.gov.cn/Linux/LFS-6.2/index.html


或者参考
手把手教你如何建立自己的Linux系统 第二版

http://www.linuxsir.org/bbs/thread322894.html


作者:孙海勇(冲天飞豹)
                               Email:youbest@sina.com
                               2008年2月10日

[ 本帖最后由 syutou 于 2008-6-10 14:28 编辑 ]

TOP

这里只是需要制作一个虚拟硬盘,然后将ASA的文件系统导入到这个硬盘中,用LIVECD即可,我不知道你是否研究过那个帖子?Grub虽然可以安装入虚拟硬盘.还有另外一个关键点,就是内核需要加编译进去什么,不编译什么? 我只是打了bigphysarea和user mode linux的补丁.内核就是默认编译的,不过USB和图形以及多媒体还有声音都剔除了.另外grub引导出现了,但是在grub下输入我上面的那几个命令,也无法成功引导到asa system 中.
大家可以一起研究一下7200那个原帖子

TOP

ddddddddddddddddddddddddddddd
本帖最近评分记录
  • admin 人品 -10 恶意灌水 2008-9-17 23:40
  • admin 白银 -10 恶意灌水 2008-9-17 23:40

TOP

ddddd

TOP

This is great! Thanks for sharing, master!

TOP

学习学习!

TOP

我第一个插件找到安装包了,第二个插件有没有安装包?用别的版本的内核会出问题么?

似乎用Qemu的话没有对BIOS做更多改动,有没有办法啥都不动,直接用压缩包起机器呢?

[ 本帖最后由 lidfgab 于 2008-10-29 01:49 编辑 ]

TOP

来学习一下,希望能够成功!

TOP

学习中..................

不知道现在有没有做出来,期待中!

TOP

如果可以完美在linux下允许ASA 那可是大大的好事

TOP

发新话题