Installing Linux on a Cisco Content Engine

Concept
I originally thought about this after reading this article, and soon I set off to install Linux on my Cisco CE560. My first attempts to install using Sarge failed, since Etch is now the current version, and Sarge is now "oldstable". I was also unable to successfully boot the floppy install of Etch for some reason. Using some of the steps from the aforementioned article, I was able to successfully install Mandrake 10.1 on my content engine.

Hardware
The Cisco CE560 has the following hardware characteristics:

  • Intel Pentium III 600 MHz
  • 2x512 MB SDRAM
  • Symbios sym53c8xx SCSI controller
  • 2x36GB 80-pin Ultra2 LVD SCSI Hard Drives
  • Asiliant 69000 Video Adapter with 16-pin output header (pinout unknown)
  • 2xIntel 82559 Ethernet Adapters (Linux driver is e100)
  • RJ-45 Serial Console port at 9600,8,N,1
  • Note: Can only boot from floppy or SCSI!

Preparation
In order to pull this off, I used the following items:

  • Cisco Console cable
  • A laptop with Windows using Hyperterminal
  • Floppy Drive
  • CD-ROM Drive
  • Power Source for Floppy (I had an extra ATX power supply. Ground pins 14 and 15 together and then give it power. Normal disclaimers apply, i.e. this will cause the end of the world, etc. See this article for more info)
  • Mandrake 10.1 Installation CDs (which I found here)
  • Windows 98 Boot Disk (which I found here, I used the Win 98 SE Custom, no Ramdrive)
  • CHNTPW Floppy boot disks. I don't think version matters much, I used bd050303 from here.
  • loadlin.exe which I found here

Initial Installation
To begin, I downloaded the Win98 boot disk and loadlin.exe. I wrote the boot disk to a floppy using WinImage, then removed scanreg.exe and placed loadlin.exe in it's place. I also burned the first two disks of the Mandrake 10.1 Installation. I then attached my CD-ROM and Floppy drives to the respective headers on the motherboard (The IDE and Floppy cables I used were keyed, but the motherboard has all pins present on each connector, so I bent the pins over where the keyed spaces were), applied power to each, placed my Win98 boot disk in the floppy drive, and fired up the CE. My CE happily booted to a DOS prompt, with the CD drive as R:. From there, I ran:

loadlin r:\isolinux\alt0\vmlinuz append initrd=r:\isolinux\alt0\all.rdz ramdisk_size=128000 root=/dev/ram3 console=ttyS0,9600
This then began the Mandrake installation wizard. You should be able to pretty much do anything you want in the setup. Since I only had the first two CDs, I marked them as the only ones available, and worked my way through setup.

Setting up Mandrake to work correctly with the Serial Console
Eventually, setup completed, and it was time to reboot the content engine. Note: Since you are accessing the Content Engine via serial cable, you will not be able to interact with the default installation of Mandrake (this may be the same with other distros, not sure). In other words, you will see it booting, but you will not be able to log in. Unfortunately, the only option you have at this point (at least the only option I know of) is to reboot, but this means your disks will not be unmounted cleanly.

What I did (and I'm sure there are a million of better ways to do this), was after setup was finished, I booted from the chntpw boot disks. If you pop in the disk on startup, you will see the disks boot loader start loading. You will need to press Ctrl-C to stop it from booting with default parameters. Soon after, you should get a boot prompt. Enter:

vmlinuz rw init=/linuxrc initrd=initrd.gz root=/dev/ram0 source=/dev/floppy/0 console=ttyS0,9600
and press enter. Once the disk boots up, enter 'd' to detect hardware. You will be prompted to insert the driver disk. Insert the SCSI drivers disk and press Enter. Enter '0' for the floppy drive number. The SCSI controller should be detected and you should be dropped back to the main menu. Enter 'q' to quit and 'n' for no new run. This will put you at a shell prompt. Next, we will mount the booting SCSI drive, make the necessary changes to allow you to interact with the box via serial console, and then unmount the booting SCSI drive. To do this, perform these steps:

mkdir /tmp/boot
mount /dev/discs/disc0/part1 /tmp/boot
cd /tmp/boot/etc
vi inittab
Comment out the line for

#s0:12345:respawn:/sbin/getty ttyS0 DT9600 ansi
And add the following line to the end

s0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 9600 ttyS0 vt100
Now, we will create the "issueserial" file

vi issueserial
Add something similar to the following:

Welcome
Connected on \l at \b bps
\U
Also, if you want to log into the console as root, you will need to edit
/etc/securetty
and add "ttyS0" to the beginning of it.
Now, unmount the drive and reboot:

cd /
umount /tmp/boot
reboot
You should get a panic error from the chntpw disk. Once this happens, power everything down, disconnect your drives and boot back up again. You should now be able to boot your Content Engine.

Final Touches
Once your Content Engine is up and running, there are two things that you will (maybe?) want to do. Give it a static IP address and add a default route out to the Internet. Again, I'm sure there are a thousand better ways to do this, but I added mine to
/etc/rc.d/rc.sysinit
Towards the top of the file, I added
ifconfig eth0 192.168.1.254 netmask 255.255.255.0
route add default 192.168.1.1
Now, every time you boot, you will have your IP set up automatically and you will be set up to where you can SSH into the box (or do whatever you need to). Also, you might want to point your box at some DNS servers.
vi /etc/resolv.conf
Then add:
nameserver 4.2.2.2
(Or whatever DNS servers you want to use.)

Comments

Popular posts from this blog

Installing Cisco CallManager 4.1(3) on VMware in 2025

Why is Cisco Licensing so terrible?