CS-Mars V6.0 in VMWARE (Franken Mars)
Tags: Cisco, cs-mars, franken, Linux, Security
http://netemu.cn/bbs/forum-449-1.html
Bookmark: Share/Save
Emulating software is a very grey area for Cisco, they make their money by selling boxes so I guess officially Cisco don’t approve of things like GNS3 and PEMU. BUT cisco make a lot of their money from techies training in Cisco products who then get their management to buy boxes their certified in, as a result cisco appear to turn a blind eye to emulating their products for personal training purposes
So, I’m installing a CS-Mars box in the next couple of weeks and wanted to know what’s new in version 6. How to setup version 4 is already document here in this franken cs-mars guide, the thing is to upgrade from 4 to 6 is a re-image of the box. Upon re-imaging my VMWare appliance I realised that the lilo commands linux rw init=/bin/bash didn’t appear to work anymore. As a result I have a v6 mars box I can’t use due to a licensing problem.
To get this working read through both the old instructions, and what I have written.
The init/boot sequence of a mars box looks very much like a centos/fedora boot, so I thought up a cunning new plan. I downloaded the 1st installation CD of centos 5, after booting this CD instead of hitting “enter” and running the anaconda installer I typed linux rescue, this boots my appliance into a root linux shell. (See Update Below, boot from CentOS straight after MARS installs, don’t let MARS boot!)
What happened next was a little hit and miss, if you’re lucky you can type
mkdir /mnt/opt
mount /dev/md2 /mnt/optyou can then
cd /mnt/opt/janus/release/bin
mv pnlicense pnlicense.org
echo “/bin/echo d84f7ceaf50f9c45683e2efb77752d4f:License verified:4:0:0:4″ > pnlicense
chmod +x pnlicense
as per the old documentation.
If you’re unlucky this “mount” will fail, in this case ls /mnt/sysimage if you can’t see any files issue mount /dev/md1 /mnt/sysimage otherwise the plan is to change the root password so that we can edit the pnlicense file later.
Using vi edit /mnt/sysimage/etc/passwd, and change…
pnadmin:x:500:500::/opt/janus/release/bin:/opt/janus/release/bin/pnsh
for
pnadmin:x:500:500::/opt/janus/release/bin:/bin/bash
Next, setup your editor variable, and edit the suders file…
EDITOR=/mnt/sysimage/bin/vi;export EDITOR
visudo -f /mnt/sysimage/etc/suders
and add..
pnadmin ALL=(ALL) NOPASSWD: ALL
Reboot by exiting the shell.
After the reboot login as pnadmin, you should now get a standard linux bash shell rather than the “hardened” cisco one. Change the root password…
sudo su
passwd root
And put /etc/password back to how it was. Now from the “pn shell” you can type expert and your root password will work and you’ll have root access to your mars box. With you new root access you can change the pnlicense file as described before and complete the setup process.
1 comments:
October 13, 2009 at 12:24 PM
I read it fully. Currently I didn't have such barriers. I hope it'll helpfull those who has the same.
Here,
Hals.
Post a Comment