CS-Mars V6.0 in VMWARE (Franken Mars)

line Tags: , , , ,

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/opt

you 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. :cool:

UPDATE: As commented by secopt below, to make this work you need to boot from the CentOS disk straight after the MARS image as installed, if you let the MARS OS boot (and start doing the oracle thing) then for some reason the mount commands don’t work!

nick

 

14 Responses to “CS-Mars V6.0 in VMWARE (Franken Mars)”

  1. L0gRuS says:

    Hi. i have problem with you instruction on VMWARE MARS

    i reimage my Mars 4.6 to 6.0 (recovery DVD 6.0.1 1 hard IDE), download centos first cd. when boot from cdrom i type: linux rescue. i select check my hard for mount sysimage, but centos don’t search any partion from my hard. i exit to shell, and type /dev/md1 /mnt/sysimage and see not found file or directory.
    also i type
    mkdir /mnt/opt
    mount /dev/md2 /mnt/opt
    directory create, but mount is not seccesufull. Unknown file or Directory.
    What is it?
    If i boot from hard drive, i can open https but i see license (

    Also, i recovery 6.0.1 from new wmvare machine with 2 hard (soft raid) but problem repeat.
    Maybe i incorrect install?

  2. adventurer says:

    Exactly the same problem as L0gRuS. Instruction doesn’t work.

  3. Nick says:

    shame :(
    When booting the CentOS disk on my PC, either /mnt/sysimage is already mounted, and I can update suders, or I can mount /mnt/opt… never both, I will see if I can work out what I’m doing different to you guys.

  4. Stewengbg says:

    Hi

    Has anyone had any progress, I cant make it work either?

    //Stewen

  5. p00pbin says:

    Hi,

    I used the old setup instructions for version 6 using vmware version 6. I set it up with a single 120 gb IDE drive on 0:0 and CDROM at 0:1. I added the extra lines to the config for the two NICS and after a long oracle install i was able to log in. The two nics for some reason were already assigned IP’s so I didnt have to use the ifconfig command. I was able to change the pnadmin password and actually log into the system from a browswer, but I get the license request page. Thats all good!

    Here is my problems though:

    As stated above, the LILO commands to get you into single user mode no longer work.

    I downloaded the first CENTOS ISO and told the MARS install to boot off of that but it just goes straight into the MARS install. I went into the BIOS of the virtual machine and its not letting me boot off of CD anymore, only HARD DRIVE and removeable media. And it actually wont let me add the ability to boot of of CD, which prevents me from booting off of one of the CENT OS ISO’s.

    Any ideas? Am I missing something simple?

    Thanks

  6. Wildfire says:

    I also had the same, this does not work, someone emailed a procedure by which to edit the vm files direct, but I lost my email and now cant find it!

  7. Nick says:

    I’ve posted a gallery of CentOS mounting the Mars partitions for all the non-believers out there ;)

  8. sporty64 says:

    This worked for me but the CENTOS boot didnt. So i downloaded the NAC Appliance ISO and booted off of it and did the easy mount commands and have the MARS up and running as a MARS 50 with no license restriction. The only issue is the speed for boot times, the ORACLE loading time is very long and any reboots such as after changing IP’s takes a long long time. Has anyone had success with speeding up the process? Is the boot time due to the writing and reading of the VM drives?

    thanks

  9. Nick says:

    @sporty64
    I’ve noticed that the 1st boot (loading ORACLE) of an actual Cisco appliance takes ages, but gets quicker on subsequent boots.

  10. sporty64 says:

    Thanks, it seems the pnuserV i believe is the next process load and takes a long while as well. I’ll compare it to our live box for boot times. I wonder if adding multiple processors to the VM might help or dedicating a physical machine to it might be better.

    thanks for the response

  11. Stewengbg says:

    Hi everyone!

    Thanks for all advices! I’m not that good at linux, but realy want to make this work because I need to learn the new version. I downloaded nac-4.5_0-K9.iso and booted on it. But I only have 2 option Server or Manager install. How do I get the prompt?

    What commands or boot commands should i use?

    Tanks in advance!

    //Stewen

  12. secopt says:

    The Centos boot disk option worked for me after many attempts. The important thing is to boot from the centos disk immediately after the mars 6 build. Disk is automatically mounted under /mnt/sysimage. I used CentOS-5.2-i386-bin-1of6.iso and csmars-6.0.1.3066.iso. The MAC boot also works but has to be less than version 4 or you do not get recovery options.

  13. Nick says:

    Thanks Secopt!!!
    I hadn’t thought that people would boot MARS and then reboot into CentOS… I’m way to impatient! I’ve added an update stressing not to let MARS boot, and that you should boot into CentOS’s rescue mode straight after the MARS install has finished.

Leave a Reply

 

Some other things that might interest you...

---