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
如果哪位朋友有兴趣也研究一下,只要有任何进展都可以联系我或者在这里发帖子